washday-sdk 1.2.0 → 1.2.1
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/cashierbox/get.js +3 -4
- package/dist/api/cashierbox/post.js +2 -3
- package/dist/api/cashierbox/put.js +2 -3
- package/dist/api/companies/get.js +1 -2
- package/dist/api/companies/post.js +2 -3
- package/dist/api/companies/put.js +3 -4
- package/dist/api/countries/get.js +1 -2
- package/dist/api/customers/get.js +2 -3
- package/dist/api/customers/post.js +2 -3
- package/dist/api/customers/put.js +1 -1
- package/dist/api/inventory/delete.js +1 -2
- package/dist/api/inventory/get.js +2 -3
- package/dist/api/inventory/post.js +1 -2
- package/dist/api/inventory/put.js +2 -3
- package/dist/api/products/delete.js +1 -2
- package/dist/api/products/post.js +4 -5
- package/dist/api/products/put.js +2 -3
- package/dist/api/sections/post.js +1 -2
- package/dist/api/staff/delete.js +1 -2
- package/dist/api/staff/get.js +1 -2
- package/dist/api/staff/post.js +1 -2
- package/dist/api/staff/put.js +1 -2
- package/dist/api/stores/get.js +6 -7
- package/dist/api/stores/post.js +3 -4
- package/dist/api/stores/put.js +2 -3
- package/dist/api/stripe/post.js +3 -4
- package/dist/api/supplies/delete.js +1 -2
- package/dist/api/supplies/get.js +2 -3
- package/dist/api/supplies/post.js +1 -2
- package/dist/api/supplies/put.js +2 -3
- package/dist/api/users/delete.js +1 -2
- package/dist/api/users/put.js +1 -2
- package/package.json +1 -1
- package/src/api/cashierbox/get.ts +3 -3
- package/src/api/cashierbox/post.ts +2 -2
- package/src/api/cashierbox/put.ts +2 -2
- package/src/api/companies/get.ts +1 -1
- package/src/api/companies/post.ts +2 -2
- package/src/api/companies/put.ts +3 -3
- package/src/api/countries/get.ts +1 -1
- package/src/api/customers/get.ts +2 -2
- package/src/api/customers/post.ts +2 -2
- package/src/api/customers/put.ts +1 -1
- package/src/api/inventory/delete.ts +1 -1
- package/src/api/inventory/get.ts +2 -2
- package/src/api/inventory/post.ts +1 -1
- package/src/api/inventory/put.ts +2 -2
- package/src/api/products/delete.ts +1 -1
- package/src/api/products/post.ts +4 -4
- package/src/api/products/put.ts +2 -2
- package/src/api/sections/post.ts +1 -1
- package/src/api/staff/delete.ts +1 -1
- package/src/api/staff/get.ts +1 -1
- package/src/api/staff/post.ts +1 -1
- package/src/api/staff/put.ts +1 -1
- package/src/api/stores/get.ts +6 -6
- package/src/api/stores/post.ts +3 -3
- package/src/api/stores/put.ts +2 -2
- package/src/api/stripe/post.ts +3 -3
- package/src/api/supplies/delete.ts +1 -1
- package/src/api/supplies/get.ts +2 -2
- package/src/api/supplies/post.ts +1 -1
- package/src/api/supplies/put.ts +2 -2
- package/src/api/users/delete.ts +1 -1
- package/src/api/users/put.ts +1 -1
package/src/api/stripe/post.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const createCreateSuscriptionCheckoutSession = async function (this: Wash
|
|
|
10
10
|
const config = {
|
|
11
11
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
12
12
|
};
|
|
13
|
-
const response = await axiosInstance.post(`${GET_SET_STRIPE}/create-subscription-checkout-session`, data, config);
|
|
13
|
+
const response = await this.axiosInstance.post(`${GET_SET_STRIPE}/create-subscription-checkout-session`, data, config);
|
|
14
14
|
return response;
|
|
15
15
|
} catch (error) {
|
|
16
16
|
console.error('Error fetching createCreateSuscriptionCheckoutSession:', error);
|
|
@@ -23,7 +23,7 @@ export const createCustomerPortalSession = async function (this: WashdayClientIn
|
|
|
23
23
|
const config = {
|
|
24
24
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
25
25
|
};
|
|
26
|
-
const response = await axiosInstance.post(`${GET_SET_STRIPE}/create-customer-portal-session`, data, config);
|
|
26
|
+
const response = await this.axiosInstance.post(`${GET_SET_STRIPE}/create-customer-portal-session`, data, config);
|
|
27
27
|
return response;
|
|
28
28
|
} catch (error) {
|
|
29
29
|
console.error('Error fetching createCustomerPortalSession:', error);
|
|
@@ -36,7 +36,7 @@ export const createCFDISuscrptionCheckoutSession = async function (this: Washday
|
|
|
36
36
|
const config = {
|
|
37
37
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
38
38
|
};
|
|
39
|
-
const response = await axiosInstance.post(`${GET_SET_STRIPE}/create-cfdi-subscription-checkout-session`, data, config);
|
|
39
|
+
const response = await this.axiosInstance.post(`${GET_SET_STRIPE}/create-cfdi-subscription-checkout-session`, data, config);
|
|
40
40
|
return response;
|
|
41
41
|
} catch (error) {
|
|
42
42
|
console.error('Error fetching createCFDISuscrptionCheckoutSession:', error);
|
|
@@ -7,7 +7,7 @@ export const deleteSupplyById = async function (this: WashdayClientInstance, sto
|
|
|
7
7
|
const config = {
|
|
8
8
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
9
9
|
};
|
|
10
|
-
const response = await axiosInstance.delete(`${GET_SET_SUPPLY(storeId)}/${id}`, config);
|
|
10
|
+
const response = await this.axiosInstance.delete(`${GET_SET_SUPPLY(storeId)}/${id}`, config);
|
|
11
11
|
return response;
|
|
12
12
|
} catch (error) {
|
|
13
13
|
console.error('Error fetching deleteSupplyById:', error);
|
package/src/api/supplies/get.ts
CHANGED
|
@@ -8,7 +8,7 @@ export const getSupplies = async function (this: WashdayClientInstance, storeId:
|
|
|
8
8
|
const config = {
|
|
9
9
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
10
10
|
};
|
|
11
|
-
const response = await axiosInstance.get(`${GET_SET_SUPPLY(storeId)}?${queryParams}`, config);
|
|
11
|
+
const response = await this.axiosInstance.get(`${GET_SET_SUPPLY(storeId)}?${queryParams}`, config);
|
|
12
12
|
return response;
|
|
13
13
|
} catch (error) {
|
|
14
14
|
console.error('Error fetching getSupplies:', error);
|
|
@@ -43,7 +43,7 @@ export const getSupplyHistory = async function (this: WashdayClientInstance, sto
|
|
|
43
43
|
if (params?.hasOwnProperty('limit')) {
|
|
44
44
|
queryParams += `&limit=${params?.limit}`
|
|
45
45
|
}
|
|
46
|
-
const response = await axiosInstance.get(`${GET_SET_SUPPLY(storeId)}/${id}/history?${queryParams}`, config);
|
|
46
|
+
const response = await this.axiosInstance.get(`${GET_SET_SUPPLY(storeId)}/${id}/history?${queryParams}`, config);
|
|
47
47
|
return response;
|
|
48
48
|
} catch (error) {
|
|
49
49
|
console.error('Error fetching getCashierBoxMovementsHistory:', error);
|
package/src/api/supplies/post.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const createSupply = async function (this: WashdayClientInstance, storeId
|
|
|
17
17
|
const config = {
|
|
18
18
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
19
19
|
};
|
|
20
|
-
const response = await axiosInstance.post(`${GET_SET_SUPPLY(storeId)}`, data, config);
|
|
20
|
+
const response = await this.axiosInstance.post(`${GET_SET_SUPPLY(storeId)}`, data, config);
|
|
21
21
|
return response;
|
|
22
22
|
} catch (error) {
|
|
23
23
|
console.error('Error fetching createSupply:', error);
|
package/src/api/supplies/put.ts
CHANGED
|
@@ -9,7 +9,7 @@ export const updateSupplyById = async function (this: WashdayClientInstance, sto
|
|
|
9
9
|
const config = {
|
|
10
10
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
11
11
|
};
|
|
12
|
-
const response = await axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}`, data, config);
|
|
12
|
+
const response = await this.axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}`, data, config);
|
|
13
13
|
return response;
|
|
14
14
|
} catch (error) {
|
|
15
15
|
console.error('Error fetching getStoreById:', error);
|
|
@@ -24,7 +24,7 @@ export const addSupplyStock = async function (this: WashdayClientInstance, store
|
|
|
24
24
|
const config = {
|
|
25
25
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
26
26
|
};
|
|
27
|
-
const response = await axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}/addStock`, data, config);
|
|
27
|
+
const response = await this.axiosInstance.put(`${GET_SET_SUPPLY(storeId)}/${id}/addStock`, data, config);
|
|
28
28
|
return response;
|
|
29
29
|
} catch (error) {
|
|
30
30
|
console.error('Error fetching addSupplyStock:', error);
|
package/src/api/users/delete.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const deleteUserById = async function (this: WashdayClientInstance, id: s
|
|
|
7
7
|
const config = {
|
|
8
8
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
9
9
|
};
|
|
10
|
-
const response = await axiosInstance.delete(`${GET_SET_USER}/${id}`, config);
|
|
10
|
+
const response = await this.axiosInstance.delete(`${GET_SET_USER}/${id}`, config);
|
|
11
11
|
return response;
|
|
12
12
|
} catch (error) {
|
|
13
13
|
console.error('Error fetching deleteUserById:', error);
|
package/src/api/users/put.ts
CHANGED
|
@@ -27,7 +27,7 @@ export const updateUserById = async function (this: WashdayClientInstance, userI
|
|
|
27
27
|
const config = {
|
|
28
28
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
29
29
|
};
|
|
30
|
-
const response = await axiosInstance.put(`${GET_SET_USER}/${userId}`, data, config);
|
|
30
|
+
const response = await this.axiosInstance.put(`${GET_SET_USER}/${userId}`, data, config);
|
|
31
31
|
return response.data || {}
|
|
32
32
|
} catch (error) {
|
|
33
33
|
console.error('Error fetching updateUserById:', error);
|