washday-sdk 0.0.117 → 0.0.119
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/auth/post.js +12 -0
- package/dist/api/index.js +1 -0
- package/package.json +1 -1
- package/src/api/auth/post.ts +20 -0
- package/src/api/customers/post.ts +1 -0
- package/src/api/customers/put.ts +3 -0
- package/src/api/index.ts +1 -0
- package/src/api/order/put.ts +2 -1
- package/src/interfaces/Api.ts +1 -0
package/dist/api/auth/post.js
CHANGED
|
@@ -45,3 +45,15 @@ export const customerSignUp = function (params) {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
+
export const googleLogin = function (params) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
try {
|
|
51
|
+
const config = {};
|
|
52
|
+
return yield axiosInstance.post(`${GET_AUTH}/google`, params, config);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('Error fetching googleLogin:', error);
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -72,6 +72,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
72
72
|
closeStoreRoutes: routesEndpoints.putModule.closeStoreRoutes,
|
|
73
73
|
});
|
|
74
74
|
this.auth = bindMethods(this, {
|
|
75
|
+
googleLogin: authEndpoints.postModule.googleLogin,
|
|
75
76
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
76
77
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
77
78
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -48,4 +48,24 @@ export const customerSignUp = async function (this: WashdayClientInstance, param
|
|
|
48
48
|
console.error('Error fetching customerSignUp:', error);
|
|
49
49
|
throw error;
|
|
50
50
|
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const googleLogin = async function (this: WashdayClientInstance, params: {
|
|
54
|
+
companyId: string;
|
|
55
|
+
storeId: string;
|
|
56
|
+
credentials: {
|
|
57
|
+
email: string;
|
|
58
|
+
verified_email: boolean;
|
|
59
|
+
name: string;
|
|
60
|
+
give_name: string;
|
|
61
|
+
locale: string;
|
|
62
|
+
},
|
|
63
|
+
}): Promise<any> {
|
|
64
|
+
try {
|
|
65
|
+
const config = {};
|
|
66
|
+
return await axiosInstance.post(`${GET_AUTH}/google`, params, config);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error('Error fetching googleLogin:', error);
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
51
71
|
};
|
package/src/api/customers/put.ts
CHANGED
|
@@ -17,6 +17,7 @@ const GET_SET_CUSTOMERS_APP = 'api/v2/washdayapp/customers';
|
|
|
17
17
|
|
|
18
18
|
export const updateById = async function (this: WashdayClientInstance, id: string, data: {
|
|
19
19
|
name?: string;
|
|
20
|
+
lastName?: string;
|
|
20
21
|
phone?: string;
|
|
21
22
|
email?: string;
|
|
22
23
|
address?: string;
|
|
@@ -45,9 +46,11 @@ export const updateById = async function (this: WashdayClientInstance, id: strin
|
|
|
45
46
|
|
|
46
47
|
export const updateByIdCustomersApp = async function (this: WashdayClientInstance, id: string, data: {
|
|
47
48
|
name?: string;
|
|
49
|
+
lastName?: string;
|
|
48
50
|
phone?: string;
|
|
49
51
|
address?: string;
|
|
50
52
|
notes?: string;
|
|
53
|
+
customersAppPushNotificationToken?: string;
|
|
51
54
|
}): Promise<any> {
|
|
52
55
|
try {
|
|
53
56
|
const config = {
|
package/src/api/index.ts
CHANGED
|
@@ -78,6 +78,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
78
78
|
closeStoreRoutes: routesEndpoints.putModule.closeStoreRoutes,
|
|
79
79
|
});
|
|
80
80
|
this.auth = bindMethods(this, {
|
|
81
|
+
googleLogin: authEndpoints.postModule.googleLogin,
|
|
81
82
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
82
83
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
83
84
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
package/src/api/order/put.ts
CHANGED
|
@@ -95,7 +95,8 @@ export const setOrderCleanedBySequence = async function (this: WashdayClientInst
|
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
export const setOrderCollectedBySequence = async function (this: WashdayClientInstance, sequence: string, storeId: string, data: {
|
|
98
|
-
collectedDateTime: string
|
|
98
|
+
collectedDateTime: string;
|
|
99
|
+
collectWithAmountDue?: boolean
|
|
99
100
|
}): Promise<any> {
|
|
100
101
|
try {
|
|
101
102
|
const config = {
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface WashdayClientInstance {
|
|
|
54
54
|
cancelCFDI: typeof cfdiEndpoints.deleteModule.cancelCFDI
|
|
55
55
|
}
|
|
56
56
|
auth: {
|
|
57
|
+
googleLogin: typeof authEndpoints.postModule.googleLogin;
|
|
57
58
|
appleLogin: typeof authEndpoints.postModule.appleLogin;
|
|
58
59
|
customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
|
|
59
60
|
customerSignUp: typeof authEndpoints.postModule.customerSignUp;
|