washday-sdk 0.0.138 → 0.0.139
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 +13 -0
- package/src/api/index.ts +1 -0
- package/src/interfaces/Api.ts +1 -0
package/dist/api/auth/post.js
CHANGED
|
@@ -70,3 +70,15 @@ export const regularUserLogin = function (params) {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
+
export const regularUserTokenLogin = function (params) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
try {
|
|
76
|
+
const config = {};
|
|
77
|
+
return yield axiosInstance.post(`${REGULAR_USER_AUTH}/tokenLogin`, params, config);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
console.error('Error fetching regularUserTokenLogin:', error);
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -79,6 +79,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
79
79
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
80
80
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
81
81
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
82
|
+
regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
|
|
82
83
|
});
|
|
83
84
|
this.orders = bindMethods(this, {
|
|
84
85
|
getList: ordersEndpoints.getModule.getList,
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -83,3 +83,16 @@ export const regularUserLogin = async function (this: WashdayClientInstance, par
|
|
|
83
83
|
throw error;
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
export const regularUserTokenLogin = async function (this: WashdayClientInstance, params: {
|
|
89
|
+
token: string
|
|
90
|
+
}): Promise<any> {
|
|
91
|
+
try {
|
|
92
|
+
const config = {};
|
|
93
|
+
return await axiosInstance.post(`${REGULAR_USER_AUTH}/tokenLogin`, params, config);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error('Error fetching regularUserTokenLogin:', error);
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
};
|
package/src/api/index.ts
CHANGED
|
@@ -85,6 +85,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
85
85
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
86
86
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
87
87
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
|
88
|
+
regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
|
|
88
89
|
});
|
|
89
90
|
this.orders = bindMethods(this, {
|
|
90
91
|
getList: ordersEndpoints.getModule.getList,
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface WashdayClientInstance {
|
|
|
61
61
|
customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
|
|
62
62
|
customerSignUp: typeof authEndpoints.postModule.customerSignUp;
|
|
63
63
|
regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
|
|
64
|
+
regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
|
|
64
65
|
}
|
|
65
66
|
review: {
|
|
66
67
|
getList: typeof reviewsEndpoints.getModule.getList;
|