washday-sdk 0.0.67 → 0.0.69

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/dist/api/index.js CHANGED
@@ -75,6 +75,7 @@ WashdayClient.prototype.customers = {
75
75
  WashdayClient.prototype.stores = {
76
76
  getStores: get_7.getStores,
77
77
  getStoreById: get_7.getStoreById,
78
+ getStoreImages: get_7.getStoreImages,
78
79
  createStore: post_5.createStore,
79
80
  copyStore: post_5.copyStore,
80
81
  updateStoreById: put_5.updateStoreById,
@@ -12,9 +12,10 @@ 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.getStoreById = exports.getStoreReviewLink = exports.getStores = void 0;
15
+ exports.getStoreImages = exports.getStoreById = exports.getStoreReviewLink = exports.getStores = void 0;
16
16
  const axiosInstance_1 = __importDefault(require("../axiosInstance"));
17
17
  const GET_SET_STORES = 'api/store';
18
+ const GET_SET_STORE_IMAGE = 'api/store-image';
18
19
  const REQUEST_PARAMS = {
19
20
  token: 'LOGGED_USER_TOKEN',
20
21
  };
@@ -68,3 +69,19 @@ const getStoreById = function (storeId) {
68
69
  });
69
70
  };
70
71
  exports.getStoreById = getStoreById;
72
+ const getStoreImages = function (storeId) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ try {
75
+ const config = {
76
+ headers: { Authorization: `Bearer ${this.apiToken}` }
77
+ };
78
+ const response = yield axiosInstance_1.default.get(`${GET_SET_STORE_IMAGE}?store=${storeId}`, config);
79
+ return response;
80
+ }
81
+ catch (error) {
82
+ console.error('Error fetching getStoreImages:', error);
83
+ throw error;
84
+ }
85
+ });
86
+ };
87
+ exports.getStoreImages = getStoreImages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/api/index.ts CHANGED
@@ -15,7 +15,7 @@ import { deleteStoreStaffById } from "./staff/delete";
15
15
  import { getStoreStaff, getStoreStaffById } from "./staff/get";
16
16
  import { createStoreStaff } from "./staff/post";
17
17
  import { updateStoreStaffById } from "./staff/put";
18
- import { getStoreById, getStoreReviewLink, getStores } from "./stores/get";
18
+ import { getStoreById, getStoreImages, getStoreReviewLink, getStores } from "./stores/get";
19
19
  import { copyStore, createStore, createStoreImage } from "./stores/post";
20
20
  import { deleteStoreById, updateStoreById } from "./stores/put";
21
21
  import { createCFDISuscrptionCheckoutSession, createCreateSuscriptionCheckoutSession, createCustomerPortalSession } from "./stripe/post";
@@ -60,6 +60,7 @@ WashdayClient.prototype.customers = {
60
60
  WashdayClient.prototype.stores = {
61
61
  getStores: getStores,
62
62
  getStoreById: getStoreById,
63
+ getStoreImages: getStoreImages,
63
64
  createStore: createStore,
64
65
  copyStore: copyStore,
65
66
  updateStoreById: updateStoreById,
@@ -19,6 +19,11 @@ export const create = async function (this: WashdayClientInstance, data: {
19
19
  image: string;
20
20
  store: string; //this is used to valdate product limit creation of store(we might remove it later and validate by token getting company and store id using section id)
21
21
  section: string;
22
+ invoice_description: string;
23
+ invoice_product_key: string;
24
+ invoice_product_unit_key: string;
25
+ invoice_product_unit_name: string;
26
+ productSupplies: Array<any>
22
27
  }): Promise<any> {
23
28
  try {
24
29
  const config = {
@@ -3,6 +3,7 @@ import { IStore } from "../../interfaces/Store";
3
3
  import axiosInstance from "../axiosInstance";
4
4
 
5
5
  const GET_SET_STORES = 'api/store';
6
+ const GET_SET_STORE_IMAGE = 'api/store-image';
6
7
  const REQUEST_PARAMS = {
7
8
  token: 'LOGGED_USER_TOKEN',
8
9
  };
@@ -47,4 +48,17 @@ export const getStoreById = async function (this: WashdayClientInstance, storeId
47
48
  console.error('Error fetching getStoreById:', error);
48
49
  throw error;
49
50
  }
50
- };
51
+ };
52
+
53
+ export const getStoreImages = async function (this: WashdayClientInstance, storeId: string): Promise<any> {
54
+ try {
55
+ const config = {
56
+ headers: { Authorization: `Bearer ${this.apiToken}` }
57
+ };
58
+ const response = await axiosInstance.get(`${GET_SET_STORE_IMAGE}?store=${storeId}`, config);
59
+ return response;
60
+ } catch (error) {
61
+ console.error('Error fetching getStoreImages:', error);
62
+ throw error;
63
+ }
64
+ };