washday-sdk 0.0.155 → 0.0.157
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 +14 -0
- package/src/api/index.ts +1 -0
- package/src/interfaces/Api.ts +1 -0
- package/src/interfaces/Store.ts +38 -0
package/dist/api/auth/post.js
CHANGED
|
@@ -34,6 +34,18 @@ export const appleLogin = function (params) {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
+
export const facebookLogin = function (params) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
try {
|
|
40
|
+
const config = {};
|
|
41
|
+
return yield axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/facebook`, params, config);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
console.error('Error fetching facebookLogin:', error);
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
37
49
|
export const customerRegularLogin = function (params) {
|
|
38
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
51
|
try {
|
package/dist/api/index.js
CHANGED
|
@@ -78,6 +78,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
78
78
|
customerLoginToken: authEndpoints.postModule.customerLoginToken,
|
|
79
79
|
googleLogin: authEndpoints.postModule.googleLogin,
|
|
80
80
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
81
|
+
facebookLogin: authEndpoints.postModule.facebookLogin,
|
|
81
82
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
82
83
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
83
84
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -31,6 +31,20 @@ export const appleLogin = async function (this: WashdayClientInstance, params: {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
export const facebookLogin = async function (this: WashdayClientInstance, params: {
|
|
35
|
+
companyId: string;
|
|
36
|
+
storeId: string;
|
|
37
|
+
accessToken: string,
|
|
38
|
+
}): Promise<any> {
|
|
39
|
+
try {
|
|
40
|
+
const config = {};
|
|
41
|
+
return await axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/facebook`, params, config);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error('Error fetching facebookLogin:', error);
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
34
48
|
export const customerRegularLogin = async function (this: WashdayClientInstance, params: {
|
|
35
49
|
companyId: string;
|
|
36
50
|
storeId: string;
|
package/src/api/index.ts
CHANGED
|
@@ -85,6 +85,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
85
85
|
customerLoginToken: authEndpoints.postModule.customerLoginToken,
|
|
86
86
|
googleLogin: authEndpoints.postModule.googleLogin,
|
|
87
87
|
appleLogin: authEndpoints.postModule.appleLogin,
|
|
88
|
+
facebookLogin: authEndpoints.postModule.facebookLogin,
|
|
88
89
|
customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
|
|
89
90
|
customerSignUp: authEndpoints.postModule.customerSignUp,
|
|
90
91
|
regularUserLogin: authEndpoints.postModule.regularUserLogin,
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -60,6 +60,7 @@ export interface WashdayClientInstance {
|
|
|
60
60
|
customerLoginToken: typeof authEndpoints.postModule.customerLoginToken;
|
|
61
61
|
googleLogin: typeof authEndpoints.postModule.googleLogin;
|
|
62
62
|
appleLogin: typeof authEndpoints.postModule.appleLogin;
|
|
63
|
+
facebookLogin: typeof authEndpoints.postModule.facebookLogin;
|
|
63
64
|
customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
|
|
64
65
|
customerSignUp: typeof authEndpoints.postModule.customerSignUp;
|
|
65
66
|
regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
|
package/src/interfaces/Store.ts
CHANGED
|
@@ -4,6 +4,43 @@ import { IStoreImage } from "./StoreImage"
|
|
|
4
4
|
import { IUser, IStaff } from "./User"
|
|
5
5
|
import { IOrder, IOrderPaymentLines } from "./Order"
|
|
6
6
|
|
|
7
|
+
export interface ITimeSlot {
|
|
8
|
+
start: string; // Representing the start time in 24-hour format or any format you prefer
|
|
9
|
+
end: string; // Representing the end time in the same format as start
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Define the Availability type for each day
|
|
13
|
+
export interface IAvailability {
|
|
14
|
+
monday: ITimeSlot[]; // Array of time slots for Monday
|
|
15
|
+
tuesday: ITimeSlot[]; // Array of time slots for Tuesday
|
|
16
|
+
wednesday: ITimeSlot[]; // Array of time slots for Wednesday
|
|
17
|
+
thursday: ITimeSlot[]; // Array of time slots for Thursday
|
|
18
|
+
friday: ITimeSlot[]; // Array of time slots for Friday
|
|
19
|
+
saturday: ITimeSlot[]; // Array of time slots for Saturday
|
|
20
|
+
sunday: ITimeSlot[]; // Array of time slots for Sunday
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ICustomersAppConfig {
|
|
24
|
+
showInApp: boolean,
|
|
25
|
+
allowProductSelection: boolean,
|
|
26
|
+
notifyOrderRequestedByEmail: boolean,
|
|
27
|
+
notifyOrderRequestedByPushNotification: boolean,
|
|
28
|
+
requestedOrderNotificationEmails: string;
|
|
29
|
+
availability: IAvailability; // Reference the IAvailability type
|
|
30
|
+
homeCards: {
|
|
31
|
+
type: 'redirect' | 'copyText' | 'openModal',
|
|
32
|
+
title: string,
|
|
33
|
+
subTitle: string,
|
|
34
|
+
buttonText: string,
|
|
35
|
+
cardBackgroundColor: string,
|
|
36
|
+
buttonBackgroundColor: string,
|
|
37
|
+
titleTextColor: string,
|
|
38
|
+
subTitleTextColor: string,
|
|
39
|
+
buttonTextColor: string,
|
|
40
|
+
onButtonClick: string
|
|
41
|
+
}[]
|
|
42
|
+
}
|
|
43
|
+
|
|
7
44
|
export interface IStore {
|
|
8
45
|
name: string,
|
|
9
46
|
streetAddress?: string,
|
|
@@ -26,6 +63,7 @@ export interface IStore {
|
|
|
26
63
|
paymentConfig: IPaymentConfig,
|
|
27
64
|
orderPageConfig: IOrderPageConfig,
|
|
28
65
|
printingConfig: IPrintingConfig,
|
|
66
|
+
customersAppConfig: ICustomersAppConfig
|
|
29
67
|
notificationConfig: INotificationConfig,
|
|
30
68
|
schedule?: ISchedule,
|
|
31
69
|
pickupDeliverySchedule?: IPickupDeliverySchedule,
|