washday-sdk 0.0.143 → 0.0.144
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/customers/delete.js +15 -0
- package/dist/api/index.js +1 -0
- package/package.json +1 -1
- package/src/api/customers/delete.ts +14 -0
- package/src/api/index.ts +1 -0
- package/src/interfaces/Api.ts +1 -0
|
@@ -9,6 +9,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import axiosInstance from "../axiosInstance";
|
|
11
11
|
const GET_SET_CUSTOMERS = 'api/customer';
|
|
12
|
+
const GET_SET_CUSTOMERS_APP = 'api/v2/washdayapp/customers';
|
|
13
|
+
export const deleteByIdCustomersApp = function (id) {
|
|
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.delete(`${GET_SET_CUSTOMERS_APP}/${id}`, config);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error('Error fetching deleteByIdCustomersApp:', error);
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
12
27
|
export const deleteById = function (id) {
|
|
13
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14
29
|
try {
|
package/dist/api/index.js
CHANGED
|
@@ -120,6 +120,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
120
120
|
create: customersEndpoints.postModule.create,
|
|
121
121
|
updateById: customersEndpoints.putModule.updateById,
|
|
122
122
|
deleteById: customersEndpoints.deleteModule.deleteById,
|
|
123
|
+
deleteByIdCustomersApp: customersEndpoints.deleteModule.deleteByIdCustomersApp,
|
|
123
124
|
updateByIdCustomersApp: customersEndpoints.putModule.updateByIdCustomersApp,
|
|
124
125
|
});
|
|
125
126
|
this.stores = bindMethods(this, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
2
|
import axiosInstance from "../axiosInstance";
|
|
3
3
|
const GET_SET_CUSTOMERS = 'api/customer';
|
|
4
|
+
const GET_SET_CUSTOMERS_APP = 'api/v2/washdayapp/customers';
|
|
5
|
+
|
|
6
|
+
export const deleteByIdCustomersApp = async function (this: WashdayClientInstance, id: string): Promise<any> {
|
|
7
|
+
try {
|
|
8
|
+
const config = {
|
|
9
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
10
|
+
};
|
|
11
|
+
return await axiosInstance.delete(`${GET_SET_CUSTOMERS_APP}/${id}`, config);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error('Error fetching deleteByIdCustomersApp:', error);
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
4
18
|
|
|
5
19
|
export const deleteById = async function (this: WashdayClientInstance, id: string): Promise<any> {
|
|
6
20
|
try {
|
package/src/api/index.ts
CHANGED
|
@@ -126,6 +126,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
126
126
|
create: customersEndpoints.postModule.create,
|
|
127
127
|
updateById: customersEndpoints.putModule.updateById,
|
|
128
128
|
deleteById: customersEndpoints.deleteModule.deleteById,
|
|
129
|
+
deleteByIdCustomersApp: customersEndpoints.deleteModule.deleteByIdCustomersApp,
|
|
129
130
|
updateByIdCustomersApp: customersEndpoints.putModule.updateByIdCustomersApp,
|
|
130
131
|
});
|
|
131
132
|
this.stores = bindMethods(this, {
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -112,6 +112,7 @@ export interface WashdayClientInstance {
|
|
|
112
112
|
create: typeof customersEndpoints.postModule.create;
|
|
113
113
|
updateById: typeof customersEndpoints.putModule.updateById;
|
|
114
114
|
deleteById: typeof customersEndpoints.deleteModule.deleteById;
|
|
115
|
+
deleteByIdCustomersApp: typeof customersEndpoints.deleteModule.deleteByIdCustomersApp;
|
|
115
116
|
updateByIdCustomersApp: typeof customersEndpoints.putModule.updateByIdCustomersApp;
|
|
116
117
|
};
|
|
117
118
|
stores: {
|