washday-sdk 0.0.117 → 0.0.118

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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.117",
3
+ "version": "0.0.118",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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/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,
@@ -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;