washday-sdk 0.0.52 → 0.0.54

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.
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ // import { WashdayClientInstance } from "../../interfaces/Api";
3
+ // import axiosInstance from "../axiosInstance";
4
+ // export const deleteStoreStaffById = async function (this: WashdayClientInstance, storeId: string, staffId: string): Promise<any> {
5
+ // try {
6
+ // const config = {
7
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
8
+ // };
9
+ // const response = await axiosInstance.delete(`api/store/${storeId}/staff/${staffId}`, config);
10
+ // return response;
11
+ // } catch (error) {
12
+ // console.error('Error fetching getStoreStaff:', error);
13
+ // throw error;
14
+ // }
15
+ // };
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.getCashierboxesByStoreId = exports.GET_SET_CASHIER_BOX = void 0;
16
+ const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
+ const GET_SET_CASHIER_BOX = (storeId) => `api/store/${storeId}/cashierbox`;
18
+ exports.GET_SET_CASHIER_BOX = GET_SET_CASHIER_BOX;
19
+ const getCashierboxesByStoreId = function (storeId, queryParams) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ try {
22
+ const config = {
23
+ headers: { Authorization: `Bearer ${this.apiToken}` }
24
+ };
25
+ const response = yield axiosInstance_1.default.get(`${(0, exports.GET_SET_CASHIER_BOX)(storeId)}?${queryParams}`, config);
26
+ return response;
27
+ }
28
+ catch (error) {
29
+ console.error('Error fetching getStoreStaff:', error);
30
+ throw error;
31
+ }
32
+ });
33
+ };
34
+ exports.getCashierboxesByStoreId = getCashierboxesByStoreId;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // import { WashdayClientInstance } from "../../interfaces/Api";
3
+ // import axiosInstance from "../axiosInstance";
4
+ // const GET_SET_STORES = 'api/store';
5
+ // export const createStoreStaff = async function (this: WashdayClientInstance, storeId: string, data: any): Promise<any> {
6
+ // try {
7
+ // const config = {
8
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
9
+ // };
10
+ // const response = await axiosInstance.post(`api/store/${storeId}/staff`, data, config);
11
+ // return response;
12
+ // } catch (error) {
13
+ // console.error('Error fetching createStoreImage:', error);
14
+ // throw error;
15
+ // }
16
+ // };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // import { WashdayClientInstance } from "../../interfaces/Api";
3
+ // import { IStore } from "../../interfaces/Store";
4
+ // import axiosInstance from "../axiosInstance";
5
+ // export const updateStoreStaffById = async function (this: WashdayClientInstance, storeId: string, data: IStore): Promise<any> {
6
+ // try {
7
+ // const config = {
8
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
9
+ // };
10
+ // const response = await axiosInstance.put(`api/store/${storeId}/staff`, data, config);
11
+ // return response;
12
+ // } catch (error) {
13
+ // console.error('Error fetching getStoreById:', error);
14
+ // throw error;
15
+ // }
16
+ // };
package/dist/api/index.js CHANGED
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const get_1 = require("./companies/get");
3
+ const get_1 = require("./cashierbox/get");
4
+ const get_2 = require("./companies/get");
4
5
  const post_1 = require("./companies/post");
5
6
  const put_1 = require("./companies/put");
6
- const get_2 = require("./countries/get");
7
- const get_3 = require("./customers/get");
7
+ const get_3 = require("./countries/get");
8
+ const get_4 = require("./customers/get");
8
9
  const put_2 = require("./products/put");
9
- const get_4 = require("./stores/get");
10
- const post_2 = require("./stores/post");
11
- const put_3 = require("./stores/put");
12
- const post_3 = require("./stripe/post");
13
- const put_4 = require("./users/put");
10
+ const delete_1 = require("./staff/delete");
11
+ const get_5 = require("./staff/get");
12
+ const post_2 = require("./staff/post");
13
+ const put_3 = require("./staff/put");
14
+ const get_6 = require("./stores/get");
15
+ const post_3 = require("./stores/post");
16
+ const put_4 = require("./stores/put");
17
+ const post_4 = require("./stripe/post");
18
+ const put_5 = require("./users/put");
14
19
  const WashdayClient = function WashdayClient(apiToken) {
15
20
  this.apiToken = apiToken;
16
21
  WashdayClient.prototype.customers.apiToken = apiToken;
@@ -20,29 +25,34 @@ const WashdayClient = function WashdayClient(apiToken) {
20
25
  WashdayClient.prototype.countries.apiToken = apiToken;
21
26
  WashdayClient.prototype.companies.apiToken = apiToken;
22
27
  WashdayClient.prototype.stripe.apiToken = apiToken;
28
+ WashdayClient.prototype.staff.apiToken = apiToken;
29
+ WashdayClient.prototype.cashierboxes.apiToken = apiToken;
23
30
  };
24
31
  WashdayClient.prototype.customers = {
25
- getCustomerById: get_3.getCustomerById,
26
- getCustomerHighlightsById: get_3.getCustomerHighlightsById
32
+ getCustomerById: get_4.getCustomerById,
33
+ getCustomerHighlightsById: get_4.getCustomerHighlightsById
27
34
  };
28
35
  WashdayClient.prototype.stores = {
29
- getStores: get_4.getStores,
30
- getStoreById: get_4.getStoreById,
31
- updateStoreById: put_3.updateStoreById,
32
- createStoreImage: post_2.createStoreImage,
33
- getStoreReviewLink: get_4.getStoreReviewLink
36
+ getStores: get_6.getStores,
37
+ getStoreById: get_6.getStoreById,
38
+ updateStoreById: put_4.updateStoreById,
39
+ createStoreImage: post_3.createStoreImage,
40
+ getStoreReviewLink: get_6.getStoreReviewLink
34
41
  };
35
42
  WashdayClient.prototype.products = {
36
43
  bulkUpdate: put_2.bulkUpdate,
37
44
  };
38
45
  WashdayClient.prototype.users = {
39
- updateUserById: put_4.updateUserById,
46
+ updateUserById: put_5.updateUserById,
40
47
  };
41
48
  WashdayClient.prototype.countries = {
42
- getCountries: get_2.getCountries,
49
+ getCountries: get_3.getCountries,
50
+ };
51
+ WashdayClient.prototype.cashierboxes = {
52
+ getCashierboxesByStoreId: get_1.getCashierboxesByStoreId,
43
53
  };
44
54
  WashdayClient.prototype.companies = {
45
- getCompanyById: get_1.getCompanyById,
55
+ getCompanyById: get_2.getCompanyById,
46
56
  updateCompanyById: put_1.updateCompanyById,
47
57
  updateCompanyLogoById: put_1.updateCompanyLogoById,
48
58
  updateCompanyTaxInfoById: put_1.updateCompanyTaxInfoById,
@@ -50,8 +60,14 @@ WashdayClient.prototype.companies = {
50
60
  updateCFDIOrgLogo: post_1.updateCFDIOrgLogo
51
61
  };
52
62
  WashdayClient.prototype.stripe = {
53
- createCreateSuscriptionCheckoutSession: post_3.createCreateSuscriptionCheckoutSession,
54
- createCFDISuscrptionCheckoutSession: post_3.createCFDISuscrptionCheckoutSession,
55
- createCustomerPortalSession: post_3.createCustomerPortalSession
63
+ createCreateSuscriptionCheckoutSession: post_4.createCreateSuscriptionCheckoutSession,
64
+ createCFDISuscrptionCheckoutSession: post_4.createCFDISuscrptionCheckoutSession,
65
+ createCustomerPortalSession: post_4.createCustomerPortalSession
66
+ };
67
+ WashdayClient.prototype.staff = {
68
+ getStoreStaff: get_5.getStoreStaff,
69
+ updateStoreStaffById: put_3.updateStoreStaffById,
70
+ createStoreStaff: post_2.createStoreStaff,
71
+ deleteStoreStaffById: delete_1.deleteStoreStaffById,
56
72
  };
57
73
  exports.default = WashdayClient;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.deleteStoreStaffById = void 0;
16
+ const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
+ const deleteStoreStaffById = function (storeId, staffId) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ try {
20
+ const config = {
21
+ headers: { Authorization: `Bearer ${this.apiToken}` }
22
+ };
23
+ const response = yield axiosInstance_1.default.delete(`api/store/${storeId}/staff/${staffId}`, config);
24
+ return response;
25
+ }
26
+ catch (error) {
27
+ console.error('Error fetching getStoreStaff:', error);
28
+ throw error;
29
+ }
30
+ });
31
+ };
32
+ exports.deleteStoreStaffById = deleteStoreStaffById;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.getStoreStaff = void 0;
16
+ const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
+ const getStoreStaff = function (storeId, queryParams) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ try {
20
+ const config = {
21
+ headers: { Authorization: `Bearer ${this.apiToken}` }
22
+ };
23
+ const response = yield axiosInstance_1.default.get(`api/store/${storeId}/staff?${queryParams}`, config);
24
+ return response;
25
+ }
26
+ catch (error) {
27
+ console.error('Error fetching getStoreStaff:', error);
28
+ throw error;
29
+ }
30
+ });
31
+ };
32
+ exports.getStoreStaff = getStoreStaff;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.createStoreStaff = void 0;
16
+ const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
+ const GET_SET_STORES = 'api/store';
18
+ const createStoreStaff = function (storeId, data) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ try {
21
+ const config = {
22
+ headers: { Authorization: `Bearer ${this.apiToken}` }
23
+ };
24
+ const response = yield axiosInstance_1.default.post(`api/store/${storeId}/staff`, data, config);
25
+ return response;
26
+ }
27
+ catch (error) {
28
+ console.error('Error fetching createStoreImage:', error);
29
+ throw error;
30
+ }
31
+ });
32
+ };
33
+ exports.createStoreStaff = createStoreStaff;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.updateStoreStaffById = void 0;
16
+ const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
+ const updateStoreStaffById = function (storeId, data) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ try {
20
+ const config = {
21
+ headers: { Authorization: `Bearer ${this.apiToken}` }
22
+ };
23
+ const response = yield axiosInstance_1.default.put(`api/store/${storeId}/staff`, data, config);
24
+ return response;
25
+ }
26
+ catch (error) {
27
+ console.error('Error fetching getStoreById:', error);
28
+ throw error;
29
+ }
30
+ });
31
+ };
32
+ exports.updateStoreStaffById = updateStoreStaffById;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -0,0 +1,15 @@
1
+ // import { WashdayClientInstance } from "../../interfaces/Api";
2
+ // import axiosInstance from "../axiosInstance";
3
+
4
+ // export const deleteStoreStaffById = async function (this: WashdayClientInstance, storeId: string, staffId: string): Promise<any> {
5
+ // try {
6
+ // const config = {
7
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
8
+ // };
9
+ // const response = await axiosInstance.delete(`api/store/${storeId}/staff/${staffId}`, config);
10
+ // return response;
11
+ // } catch (error) {
12
+ // console.error('Error fetching getStoreStaff:', error);
13
+ // throw error;
14
+ // }
15
+ // };
@@ -0,0 +1,18 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+ import { IStore } from "../../interfaces/Store";
4
+
5
+ export const GET_SET_CASHIER_BOX = (storeId: string) => `api/store/${storeId}/cashierbox`;
6
+
7
+ export const getCashierboxesByStoreId = async function (this: WashdayClientInstance, storeId: string, queryParams?: string): Promise<any> {
8
+ try {
9
+ const config = {
10
+ headers: { Authorization: `Bearer ${this.apiToken}` }
11
+ };
12
+ const response = await axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams}`, config);
13
+ return response;
14
+ } catch (error) {
15
+ console.error('Error fetching getStoreStaff:', error);
16
+ throw error;
17
+ }
18
+ };
@@ -0,0 +1,17 @@
1
+ // import { WashdayClientInstance } from "../../interfaces/Api";
2
+ // import axiosInstance from "../axiosInstance";
3
+
4
+ // const GET_SET_STORES = 'api/store';
5
+
6
+ // export const createStoreStaff = async function (this: WashdayClientInstance, storeId: string, data: any): Promise<any> {
7
+ // try {
8
+ // const config = {
9
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
10
+ // };
11
+ // const response = await axiosInstance.post(`api/store/${storeId}/staff`, data, config);
12
+ // return response;
13
+ // } catch (error) {
14
+ // console.error('Error fetching createStoreImage:', error);
15
+ // throw error;
16
+ // }
17
+ // };
@@ -0,0 +1,16 @@
1
+ // import { WashdayClientInstance } from "../../interfaces/Api";
2
+ // import { IStore } from "../../interfaces/Store";
3
+ // import axiosInstance from "../axiosInstance";
4
+
5
+ // export const updateStoreStaffById = async function (this: WashdayClientInstance, storeId: string, data: IStore): Promise<any> {
6
+ // try {
7
+ // const config = {
8
+ // headers: { Authorization: `Bearer ${this.apiToken}` }
9
+ // };
10
+ // const response = await axiosInstance.put(`api/store/${storeId}/staff`, data, config);
11
+ // return response;
12
+ // } catch (error) {
13
+ // console.error('Error fetching getStoreById:', error);
14
+ // throw error;
15
+ // }
16
+ // };
package/src/api/index.ts CHANGED
@@ -1,10 +1,15 @@
1
1
  import { WashdayClientInstance } from "../interfaces/Api";
2
+ import { getCashierboxesByStoreId } from "./cashierbox/get";
2
3
  import { getCompanyById } from "./companies/get";
3
4
  import { updateCFDIOrgLogo, updateCompanyTaxInfoCertificates } from "./companies/post";
4
5
  import { updateCompanyById, updateCompanyLogoById, updateCompanyTaxInfoById } from "./companies/put";
5
6
  import { getCountries } from "./countries/get";
6
7
  import { getCustomerById, getCustomerHighlightsById } from "./customers/get";
7
8
  import { bulkUpdate } from "./products/put";
9
+ import { deleteStoreStaffById } from "./staff/delete";
10
+ import { getStoreStaff } from "./staff/get";
11
+ import { createStoreStaff } from "./staff/post";
12
+ import { updateStoreStaffById } from "./staff/put";
8
13
  import { getStoreById, getStoreReviewLink, getStores } from "./stores/get";
9
14
  import { createStoreImage } from "./stores/post";
10
15
  import { updateStoreById } from "./stores/put";
@@ -26,6 +31,8 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
26
31
  WashdayClient.prototype.countries.apiToken = apiToken;
27
32
  WashdayClient.prototype.companies.apiToken = apiToken;
28
33
  WashdayClient.prototype.stripe.apiToken = apiToken;
34
+ WashdayClient.prototype.staff.apiToken = apiToken;
35
+ WashdayClient.prototype.cashierboxes.apiToken = apiToken;
29
36
  } as any;
30
37
 
31
38
  WashdayClient.prototype.customers = {
@@ -54,6 +61,10 @@ WashdayClient.prototype.countries = {
54
61
  getCountries: getCountries,
55
62
  };
56
63
 
64
+ WashdayClient.prototype.cashierboxes = {
65
+ getCashierboxesByStoreId: getCashierboxesByStoreId,
66
+ };
67
+
57
68
  WashdayClient.prototype.companies = {
58
69
  getCompanyById: getCompanyById,
59
70
  updateCompanyById: updateCompanyById,
@@ -69,4 +80,11 @@ WashdayClient.prototype.stripe = {
69
80
  createCustomerPortalSession: createCustomerPortalSession
70
81
  };
71
82
 
83
+ WashdayClient.prototype.staff = {
84
+ getStoreStaff: getStoreStaff,
85
+ updateStoreStaffById: updateStoreStaffById,
86
+ createStoreStaff: createStoreStaff,
87
+ deleteStoreStaffById: deleteStoreStaffById,
88
+ };
89
+
72
90
  export default WashdayClient;
@@ -0,0 +1,15 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+
4
+ export const deleteStoreStaffById = async function (this: WashdayClientInstance, storeId: string, staffId: string): Promise<any> {
5
+ try {
6
+ const config = {
7
+ headers: { Authorization: `Bearer ${this.apiToken}` }
8
+ };
9
+ const response = await axiosInstance.delete(`api/store/${storeId}/staff/${staffId}`, config);
10
+ return response;
11
+ } catch (error) {
12
+ console.error('Error fetching getStoreStaff:', error);
13
+ throw error;
14
+ }
15
+ };
@@ -0,0 +1,17 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+ import { IStore } from "../../interfaces/Store";
4
+
5
+
6
+ export const getStoreStaff = async function (this: WashdayClientInstance, storeId: string, queryParams?: string): Promise<any> {
7
+ try {
8
+ const config = {
9
+ headers: { Authorization: `Bearer ${this.apiToken}` }
10
+ };
11
+ const response = await axiosInstance.get(`api/store/${storeId}/staff?${queryParams}`, config);
12
+ return response;
13
+ } catch (error) {
14
+ console.error('Error fetching getStoreStaff:', error);
15
+ throw error;
16
+ }
17
+ };
@@ -0,0 +1,17 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+
4
+ const GET_SET_STORES = 'api/store';
5
+
6
+ export const createStoreStaff = async function (this: WashdayClientInstance, storeId: string, data: any): Promise<any> {
7
+ try {
8
+ const config = {
9
+ headers: { Authorization: `Bearer ${this.apiToken}` }
10
+ };
11
+ const response = await axiosInstance.post(`api/store/${storeId}/staff`, data, config);
12
+ return response;
13
+ } catch (error) {
14
+ console.error('Error fetching createStoreImage:', error);
15
+ throw error;
16
+ }
17
+ };
@@ -0,0 +1,16 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import { IStore } from "../../interfaces/Store";
3
+ import axiosInstance from "../axiosInstance";
4
+
5
+ export const updateStoreStaffById = async function (this: WashdayClientInstance, storeId: string, data: IStore): Promise<any> {
6
+ try {
7
+ const config = {
8
+ headers: { Authorization: `Bearer ${this.apiToken}` }
9
+ };
10
+ const response = await axiosInstance.put(`api/store/${storeId}/staff`, data, config);
11
+ return response;
12
+ } catch (error) {
13
+ console.error('Error fetching getStoreById:', error);
14
+ throw error;
15
+ }
16
+ };