washday-sdk 0.0.72 → 0.0.74

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
@@ -27,127 +27,121 @@ import * as sectionsEndpoints from './sections';
27
27
  import * as productsEndpoints from './products';
28
28
  import * as customersEndpoints from './customers';
29
29
  import * as csvExportEndpoints from './csv';
30
+ import * as ordersEndpoints from './order';
30
31
  const WashdayClient = function WashdayClient(apiToken) {
31
32
  this.apiToken = apiToken;
32
- WashdayClient.prototype.customers.apiToken = apiToken;
33
- WashdayClient.prototype.stores.apiToken = apiToken;
34
- WashdayClient.prototype.products.apiToken = apiToken;
35
- WashdayClient.prototype.users.apiToken = apiToken;
36
- WashdayClient.prototype.countries.apiToken = apiToken;
37
- WashdayClient.prototype.companies.apiToken = apiToken;
38
- WashdayClient.prototype.stripe.apiToken = apiToken;
39
- WashdayClient.prototype.staff.apiToken = apiToken;
40
- WashdayClient.prototype.cashierboxes.apiToken = apiToken;
41
- WashdayClient.prototype.discountCodes.apiToken = apiToken;
42
- WashdayClient.prototype.automaticDiscount.apiToken = apiToken;
43
- WashdayClient.prototype.sections.apiToken = apiToken;
44
- WashdayClient.prototype.supplies.apiToken = apiToken;
45
- WashdayClient.prototype.inventory.apiToken = apiToken;
46
- WashdayClient.prototype.csv.apiToken = apiToken;
47
- };
48
- WashdayClient.prototype.customers = {
49
- getCustomers: customersEndpoints.getModule.getList,
50
- getCustomerById: customersEndpoints.getModule.getCustomerById,
51
- getCustomerHighlightsById: customersEndpoints.getModule.getCustomerHighlightsById,
52
- getCustomerOrders: customersEndpoints.getModule.getCustomerOrders,
53
- create: customersEndpoints.postModule.create,
54
- updateById: customersEndpoints.putModule.updateById,
55
- deleteById: customersEndpoints.deleteModule.deleteById,
56
- };
57
- WashdayClient.prototype.stores = {
58
- getStores: getStores,
59
- getStoreById: getStoreById,
60
- getStoreImages: getStoreImages,
61
- createStore: createStore,
62
- copyStore: copyStore,
63
- updateStoreById: updateStoreById,
64
- createStoreImage: createStoreImage,
65
- getStoreReviewLink: getStoreReviewLink,
66
- deleteStoreById: deleteStoreById,
67
- };
68
- WashdayClient.prototype.products = {
69
- getById: productsEndpoints.getModule.getById,
70
- create: productsEndpoints.postModule.create,
71
- createProductSupply: productsEndpoints.postModule.createProductSupply,
72
- deleteById: productsEndpoints.deleteModule.deleteById,
73
- deleteProductSupplyById: productsEndpoints.deleteModule.deleteProductSupplyById,
74
- updateById: productsEndpoints.putModule.updateById,
75
- bulkUpdate: productsEndpoints.putModule.bulkUpdate
76
- };
77
- WashdayClient.prototype.users = {
78
- updateUserById: updateUserById,
79
- };
80
- WashdayClient.prototype.countries = {
81
- getCountries: getCountries,
82
- };
83
- WashdayClient.prototype.supplies = {
84
- getSupplies: getSupplies,
85
- getSupplyById: getSupplyById,
86
- getSupplyHistory: getSupplyHistory,
87
- createSupply: createSupply,
88
- updateSupplyById: updateSupplyById,
89
- addSupplyStock: addSupplyStock,
90
- deleteSupplyById: deleteSupplyById,
91
- };
92
- WashdayClient.prototype.sections = {
93
- getSections: sectionsEndpoints.getModule.getList,
94
- getById: sectionsEndpoints.getModule.getById,
95
- create: sectionsEndpoints.postModule.create,
96
- deleteById: sectionsEndpoints.deleteModule.deleteById,
97
- updateById: sectionsEndpoints.putModule.updateById,
98
- };
99
- WashdayClient.prototype.inventory = {
100
- getInventory: inventoryEndpoints.getModule.getInventory,
101
- getById: inventoryEndpoints.getModule.getInventoryById,
102
- getHistoryById: inventoryEndpoints.getModule.getHistoryById,
103
- create: inventoryEndpoints.postModule.create,
104
- deleteById: inventoryEndpoints.deleteModule.deleteById,
105
- updateById: inventoryEndpoints.putModule.updateById,
106
- addStock: inventoryEndpoints.putModule.addStock,
107
- };
108
- WashdayClient.prototype.cashierboxes = {
109
- getCashierboxesByStoreId: getCashierboxesByStoreId,
110
- getCashierboxesById: getCashierboxesById,
111
- getCashierBoxMovementsHistory: getCashierBoxMovementsHistory,
112
- createCashierBox: createCashierBox,
113
- updateCashierBoxById: updateCashierBoxById,
114
- deleteCashierBoxById: deleteCashierBoxById,
115
- addCashierBoxMovement: addCashierBoxMovement,
116
- };
117
- WashdayClient.prototype.companies = {
118
- getCompanyById: getCompanyById,
119
- updateCompanyById: updateCompanyById,
120
- updateCompanyLogoById: updateCompanyLogoById,
121
- updateCompanyTaxInfoById: updateCompanyTaxInfoById,
122
- updateCompanyTaxInfoCertificates: updateCompanyTaxInfoCertificates,
123
- updateCFDIOrgLogo: updateCFDIOrgLogo
124
- };
125
- WashdayClient.prototype.stripe = {
126
- createCreateSuscriptionCheckoutSession: createCreateSuscriptionCheckoutSession,
127
- createCFDISuscrptionCheckoutSession: createCFDISuscrptionCheckoutSession,
128
- createCustomerPortalSession: createCustomerPortalSession
129
- };
130
- WashdayClient.prototype.staff = {
131
- getStoreStaff: getStoreStaff,
132
- getStoreStaffById: getStoreStaffById,
133
- updateStoreStaffById: updateStoreStaffById,
134
- createStoreStaff: createStoreStaff,
135
- deleteStoreStaffById: deleteStoreStaffById,
136
- };
137
- WashdayClient.prototype.discountCodes = {
138
- getDiscountCodes: getDiscountCodes,
139
- getDiscountCodeById: getDiscountCodeById,
140
- verifyDiscountCode: verifyDiscountCode,
141
- createDiscountCode: createDiscountCode,
142
- deleteDiscountCodeById: deleteDiscountCodeById,
143
- };
144
- WashdayClient.prototype.automaticDiscount = {
145
- getAutomaticDiscounts: getAutomaticDiscounts,
146
- getAutomaticDiscountById: getAutomaticDiscountById,
147
- createAutomaticDiscount: createAutomaticDiscount,
148
- deleteAutomaticDiscountById: deleteAutomaticDiscountById,
149
- };
150
- WashdayClient.prototype.csv = {
151
- exportCustomersList: csvExportEndpoints.getModule.exportCustomersList,
33
+ this.orders = {
34
+ getList: ordersEndpoints.getModule.getList,
35
+ getById: ordersEndpoints.getModule.getById,
36
+ updateById: ordersEndpoints.putModule.updateById,
37
+ updatePaymentLineById: ordersEndpoints.putModule.updatePaymentLineById,
38
+ createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
39
+ deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
40
+ };
41
+ this.customers = {
42
+ getCustomers: customersEndpoints.getModule.getList,
43
+ getCustomerById: customersEndpoints.getModule.getCustomerById,
44
+ getCustomerHighlightsById: customersEndpoints.getModule.getCustomerHighlightsById,
45
+ getCustomerOrders: customersEndpoints.getModule.getCustomerOrders,
46
+ create: customersEndpoints.postModule.create,
47
+ updateById: customersEndpoints.putModule.updateById,
48
+ deleteById: customersEndpoints.deleteModule.deleteById,
49
+ };
50
+ this.stores = {
51
+ getStores: getStores,
52
+ getStoreById: getStoreById,
53
+ getStoreImages: getStoreImages,
54
+ createStore: createStore,
55
+ copyStore: copyStore,
56
+ updateStoreById: updateStoreById,
57
+ createStoreImage: createStoreImage,
58
+ getStoreReviewLink: getStoreReviewLink,
59
+ deleteStoreById: deleteStoreById,
60
+ };
61
+ this.products = {
62
+ getById: productsEndpoints.getModule.getById,
63
+ create: productsEndpoints.postModule.create,
64
+ createProductSupply: productsEndpoints.postModule.createProductSupply,
65
+ deleteById: productsEndpoints.deleteModule.deleteById,
66
+ deleteProductSupplyById: productsEndpoints.deleteModule.deleteProductSupplyById,
67
+ updateById: productsEndpoints.putModule.updateById,
68
+ bulkUpdate: productsEndpoints.putModule.bulkUpdate
69
+ };
70
+ this.users = {
71
+ updateUserById: updateUserById,
72
+ };
73
+ this.countries = {
74
+ getCountries: getCountries,
75
+ };
76
+ this.supplies = {
77
+ getSupplies: getSupplies,
78
+ getSupplyById: getSupplyById,
79
+ getSupplyHistory: getSupplyHistory,
80
+ createSupply: createSupply,
81
+ updateSupplyById: updateSupplyById,
82
+ addSupplyStock: addSupplyStock,
83
+ deleteSupplyById: deleteSupplyById,
84
+ };
85
+ this.sections = {
86
+ getSections: sectionsEndpoints.getModule.getList,
87
+ getById: sectionsEndpoints.getModule.getById,
88
+ create: sectionsEndpoints.postModule.create,
89
+ deleteById: sectionsEndpoints.deleteModule.deleteById,
90
+ updateById: sectionsEndpoints.putModule.updateById,
91
+ };
92
+ this.inventory = {
93
+ getInventory: inventoryEndpoints.getModule.getInventory,
94
+ getById: inventoryEndpoints.getModule.getInventoryById,
95
+ getHistoryById: inventoryEndpoints.getModule.getHistoryById,
96
+ create: inventoryEndpoints.postModule.create,
97
+ deleteById: inventoryEndpoints.deleteModule.deleteById,
98
+ updateById: inventoryEndpoints.putModule.updateById,
99
+ addStock: inventoryEndpoints.putModule.addStock,
100
+ };
101
+ this.cashierboxes = {
102
+ getCashierboxesByStoreId: getCashierboxesByStoreId,
103
+ getCashierboxesById: getCashierboxesById,
104
+ getCashierBoxMovementsHistory: getCashierBoxMovementsHistory,
105
+ createCashierBox: createCashierBox,
106
+ updateCashierBoxById: updateCashierBoxById,
107
+ deleteCashierBoxById: deleteCashierBoxById,
108
+ addCashierBoxMovement: addCashierBoxMovement,
109
+ };
110
+ this.companies = {
111
+ getCompanyById: getCompanyById,
112
+ updateCompanyById: updateCompanyById,
113
+ updateCompanyLogoById: updateCompanyLogoById,
114
+ updateCompanyTaxInfoById: updateCompanyTaxInfoById,
115
+ updateCompanyTaxInfoCertificates: updateCompanyTaxInfoCertificates,
116
+ updateCFDIOrgLogo: updateCFDIOrgLogo
117
+ };
118
+ this.stripe = {
119
+ createCreateSuscriptionCheckoutSession: createCreateSuscriptionCheckoutSession,
120
+ createCFDISuscrptionCheckoutSession: createCFDISuscrptionCheckoutSession,
121
+ createCustomerPortalSession: createCustomerPortalSession
122
+ };
123
+ this.staff = {
124
+ getStoreStaff: getStoreStaff,
125
+ getStoreStaffById: getStoreStaffById,
126
+ updateStoreStaffById: updateStoreStaffById,
127
+ createStoreStaff: createStoreStaff,
128
+ deleteStoreStaffById: deleteStoreStaffById,
129
+ };
130
+ this.discountCodes = {
131
+ getDiscountCodes: getDiscountCodes,
132
+ getDiscountCodeById: getDiscountCodeById,
133
+ verifyDiscountCode: verifyDiscountCode,
134
+ createDiscountCode: createDiscountCode,
135
+ deleteDiscountCodeById: deleteDiscountCodeById,
136
+ };
137
+ this.automaticDiscount = {
138
+ getAutomaticDiscounts: getAutomaticDiscounts,
139
+ getAutomaticDiscountById: getAutomaticDiscountById,
140
+ createAutomaticDiscount: createAutomaticDiscount,
141
+ deleteAutomaticDiscountById: deleteAutomaticDiscountById,
142
+ };
143
+ this.csv = {
144
+ exportCustomersList: csvExportEndpoints.getModule.exportCustomersList,
145
+ };
152
146
  };
153
147
  export default WashdayClient;
@@ -0,0 +1,25 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import axiosInstance from "../axiosInstance";
11
+ const GET_SET_ORDER_PAYMENTLINES = (orderId) => `/api/v2/order/${orderId}/paymentLines`;
12
+ export const deletePaymentLineById = function (orderId, id) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ try {
15
+ const config = {
16
+ headers: { Authorization: `Bearer ${this.apiToken}` }
17
+ };
18
+ return yield axiosInstance.delete(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, config);
19
+ }
20
+ catch (error) {
21
+ console.error('Error fetching deleteById:', error);
22
+ throw error;
23
+ }
24
+ });
25
+ };
@@ -0,0 +1,57 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { generateQueryParamsStr } from "../../utils/apiUtils";
11
+ import axiosInstance from "../axiosInstance";
12
+ const GET_SET_ORDER = 'api/v2/order';
13
+ export const getList = function (params) {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ try {
16
+ const config = {
17
+ headers: { Authorization: `Bearer ${this.apiToken}` }
18
+ };
19
+ const queryParams = generateQueryParamsStr([
20
+ 'storeId',
21
+ 'status',
22
+ 'name',
23
+ 'phone',
24
+ 'email',
25
+ 'fromDate',
26
+ 'toDate',
27
+ 'sequence',
28
+ 'pageNum',
29
+ 'limit',
30
+ 'sequenceSort',
31
+ 'cleanedDateTime',
32
+ 'readyDateTime',
33
+ 'collectedDateTime',
34
+ 'q',
35
+ ], params);
36
+ return yield axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
37
+ }
38
+ catch (error) {
39
+ console.error('Error fetching getList orders:', error);
40
+ throw error;
41
+ }
42
+ });
43
+ };
44
+ export const getById = function (id) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ try {
47
+ const config = {
48
+ headers: { Authorization: `Bearer ${this.apiToken}` }
49
+ };
50
+ return yield axiosInstance.get(`${GET_SET_ORDER}/${id}`, config);
51
+ }
52
+ catch (error) {
53
+ console.error('Error fetching:', error);
54
+ throw error;
55
+ }
56
+ });
57
+ };
@@ -0,0 +1,4 @@
1
+ export * as deleteModule from './delete';
2
+ export * as getModule from './get';
3
+ export * as postModule from './post';
4
+ export * as putModule from './put';
@@ -0,0 +1,25 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import axiosInstance from "../axiosInstance";
11
+ const GET_SET_ORDER_PAYMENTLINES = (orderId) => `/api/v2/order/${orderId}/paymentLines`;
12
+ export const createPaymentLine = function (id, data) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ try {
15
+ const config = {
16
+ headers: { Authorization: `Bearer ${this.apiToken}` }
17
+ };
18
+ return yield axiosInstance.post(`${GET_SET_ORDER_PAYMENTLINES(id)}`, data, config);
19
+ }
20
+ catch (error) {
21
+ console.error('Error fetching create:', error);
22
+ throw error;
23
+ }
24
+ });
25
+ };
@@ -0,0 +1,40 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import axiosInstance from "../axiosInstance";
11
+ const GET_SET_ORDER = 'api/v2/order';
12
+ const GET_SET_ORDER_PAYMENTLINES = (orderId) => `/api/v2/order/${orderId}/paymentLines`;
13
+ export const updateById = function (id, data) {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ try {
16
+ const config = {
17
+ headers: { Authorization: `Bearer ${this.apiToken}` }
18
+ };
19
+ return yield axiosInstance.put(`${GET_SET_ORDER}/${id}`, data, config);
20
+ }
21
+ catch (error) {
22
+ console.error('Error fetching updateById:', error);
23
+ throw error;
24
+ }
25
+ });
26
+ };
27
+ export const updatePaymentLineById = function (orderId, id, data) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ try {
30
+ const config = {
31
+ headers: { Authorization: `Bearer ${this.apiToken}` }
32
+ };
33
+ return yield axiosInstance.put(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, data, config);
34
+ }
35
+ catch (error) {
36
+ console.error('Error fetching updateById:', error);
37
+ throw error;
38
+ }
39
+ });
40
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.72",
3
+ "version": "0.0.74",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/api/index.ts CHANGED
@@ -7,7 +7,6 @@ import { getCompanyById } from "./companies/get";
7
7
  import { updateCFDIOrgLogo, updateCompanyTaxInfoCertificates } from "./companies/post";
8
8
  import { updateCompanyById, updateCompanyLogoById, updateCompanyTaxInfoById } from "./companies/put";
9
9
  import { getCountries } from "./countries/get";
10
- import { getCustomerById, getCustomerHighlightsById } from "./customers/get";
11
10
  import { getAutomaticDiscountById, getAutomaticDiscounts, getDiscountCodeById, getDiscountCodes, verifyDiscountCode } from './discounts/get';
12
11
  import { createAutomaticDiscount, createDiscountCode } from "./discounts/post";
13
12
  import { deleteAutomaticDiscountById, deleteDiscountCodeById } from "./discounts/put";
@@ -29,152 +28,127 @@ import * as sectionsEndpoints from './sections';
29
28
  import * as productsEndpoints from './products';
30
29
  import * as customersEndpoints from './customers';
31
30
  import * as csvExportEndpoints from './csv';
31
+ import * as ordersEndpoints from './order';
32
32
 
33
33
  type WashdayClientConstructor = {
34
- new(apiToken: string): {
35
- apiToken: string;
36
- };
34
+ new(apiToken: string): WashdayClientInstance
37
35
  };
38
36
 
39
37
  const WashdayClient: WashdayClientConstructor = function WashdayClient(this: WashdayClientInstance, apiToken: string) {
40
38
  this.apiToken = apiToken;
41
- WashdayClient.prototype.customers.apiToken = apiToken;
42
- WashdayClient.prototype.stores.apiToken = apiToken;
43
- WashdayClient.prototype.products.apiToken = apiToken;
44
- WashdayClient.prototype.users.apiToken = apiToken;
45
- WashdayClient.prototype.countries.apiToken = apiToken;
46
- WashdayClient.prototype.companies.apiToken = apiToken;
47
- WashdayClient.prototype.stripe.apiToken = apiToken;
48
- WashdayClient.prototype.staff.apiToken = apiToken;
49
- WashdayClient.prototype.cashierboxes.apiToken = apiToken;
50
- WashdayClient.prototype.discountCodes.apiToken = apiToken;
51
- WashdayClient.prototype.automaticDiscount.apiToken = apiToken;
52
- WashdayClient.prototype.sections.apiToken = apiToken;
53
- WashdayClient.prototype.supplies.apiToken = apiToken;
54
- WashdayClient.prototype.inventory.apiToken = apiToken;
55
- WashdayClient.prototype.csv.apiToken = apiToken;
39
+ this.orders = {
40
+ getList: ordersEndpoints.getModule.getList,
41
+ getById: ordersEndpoints.getModule.getById,
42
+ updateById: ordersEndpoints.putModule.updateById,
43
+ updatePaymentLineById: ordersEndpoints.putModule.updatePaymentLineById,
44
+ createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
45
+ deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
46
+ };
47
+ this.customers = {
48
+ getCustomers: customersEndpoints.getModule.getList,
49
+ getCustomerById: customersEndpoints.getModule.getCustomerById,
50
+ getCustomerHighlightsById: customersEndpoints.getModule.getCustomerHighlightsById,
51
+ getCustomerOrders: customersEndpoints.getModule.getCustomerOrders,
52
+ create: customersEndpoints.postModule.create,
53
+ updateById: customersEndpoints.putModule.updateById,
54
+ deleteById: customersEndpoints.deleteModule.deleteById,
55
+ };
56
+ this.stores = {
57
+ getStores: getStores,
58
+ getStoreById: getStoreById,
59
+ getStoreImages: getStoreImages,
60
+ createStore: createStore,
61
+ copyStore: copyStore,
62
+ updateStoreById: updateStoreById,
63
+ createStoreImage: createStoreImage,
64
+ getStoreReviewLink: getStoreReviewLink,
65
+ deleteStoreById: deleteStoreById,
66
+ };
67
+ this.products = {
68
+ getById: productsEndpoints.getModule.getById,
69
+ create: productsEndpoints.postModule.create,
70
+ createProductSupply: productsEndpoints.postModule.createProductSupply,
71
+ deleteById: productsEndpoints.deleteModule.deleteById,
72
+ deleteProductSupplyById: productsEndpoints.deleteModule.deleteProductSupplyById,
73
+ updateById: productsEndpoints.putModule.updateById,
74
+ bulkUpdate: productsEndpoints.putModule.bulkUpdate
75
+ };
76
+ this.users = {
77
+ updateUserById: updateUserById,
78
+ };
79
+ this.countries = {
80
+ getCountries: getCountries,
81
+ };
82
+ this.supplies = {
83
+ getSupplies: getSupplies,
84
+ getSupplyById: getSupplyById,
85
+ getSupplyHistory: getSupplyHistory,
86
+ createSupply: createSupply,
87
+ updateSupplyById: updateSupplyById,
88
+ addSupplyStock: addSupplyStock,
89
+ deleteSupplyById: deleteSupplyById,
90
+ };
91
+ this.sections = {
92
+ getSections: sectionsEndpoints.getModule.getList,
93
+ getById: sectionsEndpoints.getModule.getById,
94
+ create: sectionsEndpoints.postModule.create,
95
+ deleteById: sectionsEndpoints.deleteModule.deleteById,
96
+ updateById: sectionsEndpoints.putModule.updateById,
97
+ };
98
+ this.inventory = {
99
+ getInventory: inventoryEndpoints.getModule.getInventory,
100
+ getById: inventoryEndpoints.getModule.getInventoryById,
101
+ getHistoryById: inventoryEndpoints.getModule.getHistoryById,
102
+ create: inventoryEndpoints.postModule.create,
103
+ deleteById: inventoryEndpoints.deleteModule.deleteById,
104
+ updateById: inventoryEndpoints.putModule.updateById,
105
+ addStock: inventoryEndpoints.putModule.addStock,
106
+ };
107
+ this.cashierboxes = {
108
+ getCashierboxesByStoreId: getCashierboxesByStoreId,
109
+ getCashierboxesById: getCashierboxesById,
110
+ getCashierBoxMovementsHistory: getCashierBoxMovementsHistory,
111
+ createCashierBox: createCashierBox,
112
+ updateCashierBoxById: updateCashierBoxById,
113
+ deleteCashierBoxById: deleteCashierBoxById,
114
+ addCashierBoxMovement: addCashierBoxMovement,
115
+ };
116
+ this.companies = {
117
+ getCompanyById: getCompanyById,
118
+ updateCompanyById: updateCompanyById,
119
+ updateCompanyLogoById: updateCompanyLogoById,
120
+ updateCompanyTaxInfoById: updateCompanyTaxInfoById,
121
+ updateCompanyTaxInfoCertificates: updateCompanyTaxInfoCertificates,
122
+ updateCFDIOrgLogo: updateCFDIOrgLogo
123
+ };
124
+ this.stripe = {
125
+ createCreateSuscriptionCheckoutSession: createCreateSuscriptionCheckoutSession,
126
+ createCFDISuscrptionCheckoutSession: createCFDISuscrptionCheckoutSession,
127
+ createCustomerPortalSession: createCustomerPortalSession
128
+ };
129
+ this.staff = {
130
+ getStoreStaff: getStoreStaff,
131
+ getStoreStaffById: getStoreStaffById,
132
+ updateStoreStaffById: updateStoreStaffById,
133
+ createStoreStaff: createStoreStaff,
134
+ deleteStoreStaffById: deleteStoreStaffById,
135
+ };
136
+ this.discountCodes = {
137
+ getDiscountCodes: getDiscountCodes,
138
+ getDiscountCodeById: getDiscountCodeById,
139
+ verifyDiscountCode: verifyDiscountCode,
140
+ createDiscountCode: createDiscountCode,
141
+ deleteDiscountCodeById: deleteDiscountCodeById,
142
+ };
143
+ this.automaticDiscount = {
144
+ getAutomaticDiscounts: getAutomaticDiscounts,
145
+ getAutomaticDiscountById: getAutomaticDiscountById,
146
+ createAutomaticDiscount: createAutomaticDiscount,
147
+ deleteAutomaticDiscountById: deleteAutomaticDiscountById,
148
+ };
149
+ this.csv = {
150
+ exportCustomersList: csvExportEndpoints.getModule.exportCustomersList,
151
+ };
56
152
  } as any;
57
153
 
58
- WashdayClient.prototype.customers = {
59
- getCustomers: customersEndpoints.getModule.getList,
60
- getCustomerById: customersEndpoints.getModule.getCustomerById,
61
- getCustomerHighlightsById: customersEndpoints.getModule.getCustomerHighlightsById,
62
- getCustomerOrders: customersEndpoints.getModule.getCustomerOrders,
63
- create: customersEndpoints.postModule.create,
64
- updateById: customersEndpoints.putModule.updateById,
65
- deleteById: customersEndpoints.deleteModule.deleteById,
66
- };
67
-
68
- WashdayClient.prototype.stores = {
69
- getStores: getStores,
70
- getStoreById: getStoreById,
71
- getStoreImages: getStoreImages,
72
- createStore: createStore,
73
- copyStore: copyStore,
74
- updateStoreById: updateStoreById,
75
- createStoreImage: createStoreImage,
76
- getStoreReviewLink: getStoreReviewLink,
77
- deleteStoreById: deleteStoreById,
78
- };
79
-
80
-
81
- WashdayClient.prototype.products = {
82
- getById: productsEndpoints.getModule.getById,
83
- create: productsEndpoints.postModule.create,
84
- createProductSupply: productsEndpoints.postModule.createProductSupply,
85
- deleteById: productsEndpoints.deleteModule.deleteById,
86
- deleteProductSupplyById: productsEndpoints.deleteModule.deleteProductSupplyById,
87
- updateById: productsEndpoints.putModule.updateById,
88
- bulkUpdate: productsEndpoints.putModule.bulkUpdate
89
- };
90
-
91
- WashdayClient.prototype.users = {
92
- updateUserById: updateUserById,
93
- };
94
-
95
- WashdayClient.prototype.countries = {
96
- getCountries: getCountries,
97
- };
98
-
99
- WashdayClient.prototype.supplies = {
100
- getSupplies: getSupplies,
101
- getSupplyById: getSupplyById,
102
- getSupplyHistory: getSupplyHistory,
103
- createSupply: createSupply,
104
- updateSupplyById: updateSupplyById,
105
- addSupplyStock: addSupplyStock,
106
- deleteSupplyById: deleteSupplyById,
107
- };
108
-
109
- WashdayClient.prototype.sections = {
110
- getSections: sectionsEndpoints.getModule.getList,
111
- getById: sectionsEndpoints.getModule.getById,
112
- create: sectionsEndpoints.postModule.create,
113
- deleteById: sectionsEndpoints.deleteModule.deleteById,
114
- updateById: sectionsEndpoints.putModule.updateById,
115
- };
116
-
117
- WashdayClient.prototype.inventory = {
118
- getInventory: inventoryEndpoints.getModule.getInventory,
119
- getById: inventoryEndpoints.getModule.getInventoryById,
120
- getHistoryById: inventoryEndpoints.getModule.getHistoryById,
121
- create: inventoryEndpoints.postModule.create,
122
- deleteById: inventoryEndpoints.deleteModule.deleteById,
123
- updateById: inventoryEndpoints.putModule.updateById,
124
- addStock: inventoryEndpoints.putModule.addStock,
125
- };
126
-
127
- WashdayClient.prototype.cashierboxes = {
128
- getCashierboxesByStoreId: getCashierboxesByStoreId,
129
- getCashierboxesById: getCashierboxesById,
130
- getCashierBoxMovementsHistory: getCashierBoxMovementsHistory,
131
- createCashierBox: createCashierBox,
132
- updateCashierBoxById: updateCashierBoxById,
133
- deleteCashierBoxById: deleteCashierBoxById,
134
- addCashierBoxMovement: addCashierBoxMovement,
135
- };
136
-
137
- WashdayClient.prototype.companies = {
138
- getCompanyById: getCompanyById,
139
- updateCompanyById: updateCompanyById,
140
- updateCompanyLogoById: updateCompanyLogoById,
141
- updateCompanyTaxInfoById: updateCompanyTaxInfoById,
142
- updateCompanyTaxInfoCertificates: updateCompanyTaxInfoCertificates,
143
- updateCFDIOrgLogo: updateCFDIOrgLogo
144
- };
145
-
146
- WashdayClient.prototype.stripe = {
147
- createCreateSuscriptionCheckoutSession: createCreateSuscriptionCheckoutSession,
148
- createCFDISuscrptionCheckoutSession: createCFDISuscrptionCheckoutSession,
149
- createCustomerPortalSession: createCustomerPortalSession
150
- };
151
-
152
- WashdayClient.prototype.staff = {
153
- getStoreStaff: getStoreStaff,
154
- getStoreStaffById: getStoreStaffById,
155
- updateStoreStaffById: updateStoreStaffById,
156
- createStoreStaff: createStoreStaff,
157
- deleteStoreStaffById: deleteStoreStaffById,
158
- };
159
-
160
- WashdayClient.prototype.discountCodes = {
161
- getDiscountCodes: getDiscountCodes,
162
- getDiscountCodeById: getDiscountCodeById,
163
- verifyDiscountCode: verifyDiscountCode,
164
- createDiscountCode: createDiscountCode,
165
- deleteDiscountCodeById: deleteDiscountCodeById,
166
- };
167
-
168
- WashdayClient.prototype.automaticDiscount = {
169
- getAutomaticDiscounts: getAutomaticDiscounts,
170
- getAutomaticDiscountById: getAutomaticDiscountById,
171
- createAutomaticDiscount: createAutomaticDiscount,
172
- deleteAutomaticDiscountById: deleteAutomaticDiscountById,
173
- };
174
-
175
-
176
- WashdayClient.prototype.csv = {
177
- exportCustomersList: csvExportEndpoints.getModule.exportCustomersList,
178
- };
179
-
180
- export default WashdayClient;
154
+ export default WashdayClient;
@@ -0,0 +1,15 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+ const GET_SET_ORDER_PAYMENTLINES = (orderId: string) => `/api/v2/order/${orderId}/paymentLines`;
4
+
5
+ export const deletePaymentLineById = async function (this: WashdayClientInstance, orderId: string, id: string): Promise<any> {
6
+ try {
7
+ const config = {
8
+ headers: { Authorization: `Bearer ${this.apiToken}` }
9
+ };
10
+ return await axiosInstance.delete(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, config);
11
+ } catch (error) {
12
+ console.error('Error fetching deleteById:', error);
13
+ throw error;
14
+ }
15
+ };
@@ -0,0 +1,62 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import { IOrder } from "../../interfaces/Order";
3
+ import { generateQueryParamsStr } from "../../utils/apiUtils";
4
+ import axiosInstance from "../axiosInstance";
5
+ const GET_SET_ORDER = 'api/v2/order';
6
+
7
+ export const getList = async function (this: WashdayClientInstance, params: {
8
+ storeId: string | undefined,
9
+ status: string | undefined,
10
+ name: string | undefined,
11
+ phone: string | undefined,
12
+ email: string | undefined,
13
+ fromDate: string | undefined,
14
+ toDate: string | undefined,
15
+ sequence: string | undefined,
16
+ pageNum: string | undefined,
17
+ limit: string | undefined,
18
+ sequenceSort: string,
19
+ cleanedDateTime: string | undefined,
20
+ readyDateTime: string | undefined,
21
+ collectedDateTime: string | undefined,
22
+ q: string | undefined
23
+ }): Promise<any> {
24
+ try {
25
+ const config = {
26
+ headers: { Authorization: `Bearer ${this.apiToken}` }
27
+ };
28
+ const queryParams = generateQueryParamsStr([
29
+ 'storeId',
30
+ 'status',
31
+ 'name',
32
+ 'phone',
33
+ 'email',
34
+ 'fromDate',
35
+ 'toDate',
36
+ 'sequence',
37
+ 'pageNum',
38
+ 'limit',
39
+ 'sequenceSort',
40
+ 'cleanedDateTime',
41
+ 'readyDateTime',
42
+ 'collectedDateTime',
43
+ 'q',
44
+ ], params);
45
+ return await axiosInstance.get(`${GET_SET_ORDER}?${queryParams}`, config);
46
+ } catch (error) {
47
+ console.error('Error fetching getList orders:', error);
48
+ throw error;
49
+ }
50
+ };
51
+
52
+ export const getById = async function (this: WashdayClientInstance, id: string): Promise<IOrder> {
53
+ try {
54
+ const config = {
55
+ headers: { Authorization: `Bearer ${this.apiToken}` }
56
+ };
57
+ return await axiosInstance.get(`${GET_SET_ORDER}/${id}`, config);
58
+ } catch (error) {
59
+ console.error('Error fetching:', error);
60
+ throw error;
61
+ }
62
+ }
@@ -0,0 +1,4 @@
1
+ export * as deleteModule from './delete';
2
+ export * as getModule from './get';
3
+ export * as postModule from './post';
4
+ export * as putModule from './put';
@@ -0,0 +1,20 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+ const GET_SET_ORDER_PAYMENTLINES = (orderId: string) => `/api/v2/order/${orderId}/paymentLines`;
4
+
5
+ export const createPaymentLine = async function (this: WashdayClientInstance, id: string, data: {
6
+ amountPaid: number,
7
+ cashierBox: string,
8
+ paymentMethod: string
9
+ paymentDate: Date
10
+ }): Promise<any> {
11
+ try {
12
+ const config = {
13
+ headers: { Authorization: `Bearer ${this.apiToken}` }
14
+ };
15
+ return await axiosInstance.post(`${GET_SET_ORDER_PAYMENTLINES(id)}`, data, config);
16
+ } catch (error) {
17
+ console.error('Error fetching create:', error);
18
+ throw error;
19
+ }
20
+ };
@@ -0,0 +1,53 @@
1
+ import { WashdayClientInstance } from "../../interfaces/Api";
2
+ import axiosInstance from "../axiosInstance";
3
+ const GET_SET_ORDER = 'api/v2/order';
4
+ const GET_SET_ORDER_PAYMENTLINES = (orderId: string) => `/api/v2/order/${orderId}/paymentLines`;
5
+
6
+ export const updateById = async function (this: WashdayClientInstance, id: string, data: {
7
+ status?: string,
8
+ products?: any[],
9
+ buyAndGetProducts?: any[],
10
+ customer?: string,
11
+ discountCode?: string | null,
12
+ notes?: string,
13
+ privateNotes?: string,
14
+ delivery?: boolean,
15
+ pickup?: boolean,
16
+ express?: boolean,
17
+ deliveryInfo?: {
18
+ date: Date,
19
+ fromTime: string,
20
+ toTime?: string
21
+ },
22
+ pickupInfo?: {
23
+ date: Date,
24
+ fromTime: string,
25
+ toTime?: string
26
+ },
27
+ notifyBy?: string,
28
+ }): Promise<any> {
29
+ try {
30
+ const config = {
31
+ headers: { Authorization: `Bearer ${this.apiToken}` }
32
+ };
33
+ return await axiosInstance.put(`${GET_SET_ORDER}/${id}`, data, config);
34
+ } catch (error) {
35
+ console.error('Error fetching updateById:', error);
36
+ throw error;
37
+ }
38
+ };
39
+
40
+ export const updatePaymentLineById = async function (this: WashdayClientInstance, orderId: string, id: string, data: {
41
+ amountPaid: number
42
+ updatedDate: Date
43
+ }): Promise<any> {
44
+ try {
45
+ const config = {
46
+ headers: { Authorization: `Bearer ${this.apiToken}` }
47
+ };
48
+ return await axiosInstance.put(`${GET_SET_ORDER_PAYMENTLINES(orderId)}/${id}`, data, config);
49
+ } catch (error) {
50
+ console.error('Error fetching updateById:', error);
51
+ throw error;
52
+ }
53
+ };
@@ -1,3 +1,147 @@
1
- export type WashdayClientInstance = {
1
+ import { deleteCashierBoxById } from "../api/cashierbox/delete";
2
+ import { getCashierBoxMovementsHistory, getCashierboxesById, getCashierboxesByStoreId } from "../api/cashierbox/get";
3
+ import { addCashierBoxMovement, createCashierBox } from "../api/cashierbox/post";
4
+ import { updateCashierBoxById } from "../api/cashierbox/put";
5
+ import { getCompanyById } from "../api/companies/get";
6
+ import { updateCFDIOrgLogo, updateCompanyTaxInfoCertificates } from "../api/companies/post";
7
+ import { updateCompanyById, updateCompanyLogoById, updateCompanyTaxInfoById } from "../api/companies/put";
8
+ import { getCountries } from "../api/countries/get";
9
+ import { getAutomaticDiscountById, getAutomaticDiscounts, getDiscountCodeById, getDiscountCodes, verifyDiscountCode } from '../api/discounts/get';
10
+ import { createAutomaticDiscount, createDiscountCode } from "../api/discounts/post";
11
+ import { deleteAutomaticDiscountById, deleteDiscountCodeById } from "../api/discounts/put";
12
+ import { deleteStoreStaffById } from "../api/staff/delete";
13
+ import { getStoreStaff, getStoreStaffById } from "../api/staff/get";
14
+ import { createStoreStaff } from "../api/staff/post";
15
+ import { updateStoreStaffById } from "../api/staff/put";
16
+ import { getStoreById, getStoreImages, getStoreReviewLink, getStores } from "../api/stores/get";
17
+ import { copyStore, createStore, createStoreImage } from "../api/stores/post";
18
+ import { deleteStoreById, updateStoreById } from "../api/stores/put";
19
+ import { createCFDISuscrptionCheckoutSession, createCreateSuscriptionCheckoutSession, createCustomerPortalSession } from "../api/stripe/post";
20
+ import { deleteSupplyById } from "../api/supplies/delete";
21
+ import { getSupplies, getSupplyById, getSupplyHistory } from "../api/supplies/get";
22
+ import { createSupply } from "../api/supplies/post";
23
+ import { addSupplyStock, updateSupplyById } from "../api/supplies/put";
24
+ import { updateUserById } from "../api/users/put";
25
+ import * as inventoryEndpoints from '../api/inventory';
26
+ import * as sectionsEndpoints from '../api/sections';
27
+ import * as productsEndpoints from '../api/products';
28
+ import * as customersEndpoints from '../api/customers';
29
+ import * as csvExportEndpoints from '../api/csv';
30
+ import * as ordersEndpoints from '../api/order';
31
+
32
+ export interface WashdayClientInstance {
2
33
  apiToken: string;
3
- };
34
+ orders: {
35
+ getList: typeof ordersEndpoints.getModule.getList;
36
+ getById: typeof ordersEndpoints.getModule.getById;
37
+ updateById: typeof ordersEndpoints.putModule.updateById;
38
+ updatePaymentLineById: typeof ordersEndpoints.putModule.updatePaymentLineById;
39
+ createPaymentLine: typeof ordersEndpoints.postModule.createPaymentLine;
40
+ deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
41
+ };
42
+ customers: {
43
+ getCustomers: typeof customersEndpoints.getModule.getList;
44
+ getCustomerById: typeof customersEndpoints.getModule.getCustomerById;
45
+ getCustomerHighlightsById: typeof customersEndpoints.getModule.getCustomerHighlightsById;
46
+ getCustomerOrders: typeof customersEndpoints.getModule.getCustomerOrders;
47
+ create: typeof customersEndpoints.postModule.create;
48
+ updateById: typeof customersEndpoints.putModule.updateById;
49
+ deleteById: typeof customersEndpoints.deleteModule.deleteById;
50
+ };
51
+ stores: {
52
+ getStores: typeof getStores;
53
+ getStoreById: typeof getStoreById;
54
+ getStoreImages: typeof getStoreImages;
55
+ createStore: typeof createStore;
56
+ copyStore: typeof copyStore;
57
+ updateStoreById: typeof updateStoreById;
58
+ createStoreImage: typeof createStoreImage;
59
+ getStoreReviewLink: typeof getStoreReviewLink;
60
+ deleteStoreById: typeof deleteStoreById;
61
+ };
62
+ products: {
63
+ getById: typeof productsEndpoints.getModule.getById;
64
+ create: typeof productsEndpoints.postModule.create;
65
+ createProductSupply: typeof productsEndpoints.postModule.createProductSupply;
66
+ deleteById: typeof productsEndpoints.deleteModule.deleteById;
67
+ deleteProductSupplyById: typeof productsEndpoints.deleteModule.deleteProductSupplyById;
68
+ updateById: typeof productsEndpoints.putModule.updateById;
69
+ bulkUpdate: typeof productsEndpoints.putModule.bulkUpdate;
70
+ };
71
+ users: {
72
+ updateUserById: typeof updateUserById;
73
+ };
74
+ countries: {
75
+ getCountries: typeof getCountries;
76
+ };
77
+ supplies: {
78
+ getSupplies: typeof getSupplies;
79
+ getSupplyById: typeof getSupplyById;
80
+ getSupplyHistory: typeof getSupplyHistory;
81
+ createSupply: typeof createSupply;
82
+ updateSupplyById: typeof updateSupplyById;
83
+ addSupplyStock: typeof addSupplyStock;
84
+ deleteSupplyById: typeof deleteSupplyById;
85
+ };
86
+ sections: {
87
+ getSections: typeof sectionsEndpoints.getModule.getList;
88
+ getById: typeof sectionsEndpoints.getModule.getById;
89
+ create: typeof sectionsEndpoints.postModule.create;
90
+ deleteById: typeof sectionsEndpoints.deleteModule.deleteById;
91
+ updateById: typeof sectionsEndpoints.putModule.updateById;
92
+ };
93
+ inventory: {
94
+ getInventory: typeof inventoryEndpoints.getModule.getInventory;
95
+ getById: typeof inventoryEndpoints.getModule.getInventoryById;
96
+ getHistoryById: typeof inventoryEndpoints.getModule.getHistoryById;
97
+ create: typeof inventoryEndpoints.postModule.create;
98
+ deleteById: typeof inventoryEndpoints.deleteModule.deleteById;
99
+ updateById: typeof inventoryEndpoints.putModule.updateById;
100
+ addStock: typeof inventoryEndpoints.putModule.addStock;
101
+ };
102
+ cashierboxes: {
103
+ getCashierboxesByStoreId: typeof getCashierboxesByStoreId;
104
+ getCashierboxesById: typeof getCashierboxesById;
105
+ getCashierBoxMovementsHistory: typeof getCashierBoxMovementsHistory;
106
+ createCashierBox: typeof createCashierBox;
107
+ updateCashierBoxById: typeof updateCashierBoxById;
108
+ deleteCashierBoxById: typeof deleteCashierBoxById;
109
+ addCashierBoxMovement: typeof addCashierBoxMovement;
110
+ };
111
+ companies: {
112
+ getCompanyById: typeof getCompanyById;
113
+ updateCompanyById: typeof updateCompanyById;
114
+ updateCompanyLogoById: typeof updateCompanyLogoById;
115
+ updateCompanyTaxInfoById: typeof updateCompanyTaxInfoById;
116
+ updateCompanyTaxInfoCertificates: typeof updateCompanyTaxInfoCertificates;
117
+ updateCFDIOrgLogo: typeof updateCFDIOrgLogo;
118
+ };
119
+ stripe: {
120
+ createCreateSuscriptionCheckoutSession: typeof createCreateSuscriptionCheckoutSession;
121
+ createCFDISuscrptionCheckoutSession: typeof createCFDISuscrptionCheckoutSession;
122
+ createCustomerPortalSession: typeof createCustomerPortalSession;
123
+ };
124
+ staff: {
125
+ getStoreStaff: typeof getStoreStaff;
126
+ getStoreStaffById: typeof getStoreStaffById;
127
+ updateStoreStaffById: typeof updateStoreStaffById;
128
+ createStoreStaff: typeof createStoreStaff;
129
+ deleteStoreStaffById: typeof deleteStoreStaffById;
130
+ };
131
+ discountCodes: {
132
+ getDiscountCodes: typeof getDiscountCodes;
133
+ getDiscountCodeById: typeof getDiscountCodeById;
134
+ verifyDiscountCode: typeof verifyDiscountCode;
135
+ createDiscountCode: typeof createDiscountCode;
136
+ deleteDiscountCodeById: typeof deleteDiscountCodeById;
137
+ };
138
+ automaticDiscount: {
139
+ getAutomaticDiscounts: typeof getAutomaticDiscounts;
140
+ getAutomaticDiscountById: typeof getAutomaticDiscountById;
141
+ createAutomaticDiscount: typeof createAutomaticDiscount;
142
+ deleteAutomaticDiscountById: typeof deleteAutomaticDiscountById;
143
+ };
144
+ csv: {
145
+ exportCustomersList: typeof csvExportEndpoints.getModule.exportCustomersList;
146
+ };
147
+ }