@wix/headless-bookings 1.0.14 → 1.0.15
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/cjs/dist/services/booking/book-action/buildBookingRequest.js +2 -2
- package/cjs/dist/services/booking/book-action/types.d.ts +2 -2
- package/cjs/dist/services/booking/booking.d.ts +2 -2
- package/cjs/dist/services/booking/booking.js +1 -1
- package/dist/services/booking/book-action/buildBookingRequest.js +2 -2
- package/dist/services/booking/book-action/types.d.ts +2 -2
- package/dist/services/booking/booking.d.ts +2 -2
- package/dist/services/booking/booking.js +1 -1
- package/package.json +2 -2
|
@@ -65,8 +65,8 @@ function buildBookingRequest(params) {
|
|
|
65
65
|
// Participants
|
|
66
66
|
totalParticipants: item.totalParticipants || 1,
|
|
67
67
|
// App that created the booking (used to filter bookings by source app).
|
|
68
|
-
...(params.
|
|
69
|
-
bookingSource: { appDefId: params.
|
|
68
|
+
...(params.sourceAppId && {
|
|
69
|
+
bookingSource: { appDefId: params.sourceAppId },
|
|
70
70
|
}),
|
|
71
71
|
// Booked entity slot
|
|
72
72
|
bookedEntity: {
|
|
@@ -47,11 +47,11 @@ export interface BookActionParams {
|
|
|
47
47
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
48
48
|
appId?: string;
|
|
49
49
|
/**
|
|
50
|
-
* Optional app
|
|
50
|
+
* Optional source app ID. When provided, sets the created booking's
|
|
51
51
|
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
52
52
|
* allowing bookings to be filtered by source app later.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
sourceAppId?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Optional consumer-selected payment option. When provided, overrides the
|
|
57
57
|
* heuristic derived from `service.payment.options` in `buildBookingRequest`
|
|
@@ -149,11 +149,11 @@ export interface BookingServiceConfig {
|
|
|
149
149
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
150
150
|
appId?: string;
|
|
151
151
|
/**
|
|
152
|
-
* Optional app
|
|
152
|
+
* Optional source app ID. When provided, sets the created booking's
|
|
153
153
|
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
154
154
|
* allowing bookings to be filtered by source app later.
|
|
155
155
|
*/
|
|
156
|
-
|
|
156
|
+
sourceAppId?: string;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Implementation of BookingService
|
|
@@ -203,7 +203,7 @@ exports.BookingService = services_definitions_1.implementService.withConfig()(ex
|
|
|
203
203
|
location,
|
|
204
204
|
timezone,
|
|
205
205
|
appId: config.appId,
|
|
206
|
-
|
|
206
|
+
sourceAppId: config.sourceAppId,
|
|
207
207
|
selectedPaymentOption,
|
|
208
208
|
allDay,
|
|
209
209
|
});
|
|
@@ -62,8 +62,8 @@ export function buildBookingRequest(params) {
|
|
|
62
62
|
// Participants
|
|
63
63
|
totalParticipants: item.totalParticipants || 1,
|
|
64
64
|
// App that created the booking (used to filter bookings by source app).
|
|
65
|
-
...(params.
|
|
66
|
-
bookingSource: { appDefId: params.
|
|
65
|
+
...(params.sourceAppId && {
|
|
66
|
+
bookingSource: { appDefId: params.sourceAppId },
|
|
67
67
|
}),
|
|
68
68
|
// Booked entity slot
|
|
69
69
|
bookedEntity: {
|
|
@@ -47,11 +47,11 @@ export interface BookActionParams {
|
|
|
47
47
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
48
48
|
appId?: string;
|
|
49
49
|
/**
|
|
50
|
-
* Optional app
|
|
50
|
+
* Optional source app ID. When provided, sets the created booking's
|
|
51
51
|
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
52
52
|
* allowing bookings to be filtered by source app later.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
sourceAppId?: string;
|
|
55
55
|
/**
|
|
56
56
|
* Optional consumer-selected payment option. When provided, overrides the
|
|
57
57
|
* heuristic derived from `service.payment.options` in `buildBookingRequest`
|
|
@@ -149,11 +149,11 @@ export interface BookingServiceConfig {
|
|
|
149
149
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
150
150
|
appId?: string;
|
|
151
151
|
/**
|
|
152
|
-
* Optional app
|
|
152
|
+
* Optional source app ID. When provided, sets the created booking's
|
|
153
153
|
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
154
154
|
* allowing bookings to be filtered by source app later.
|
|
155
155
|
*/
|
|
156
|
-
|
|
156
|
+
sourceAppId?: string;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Implementation of BookingService
|
|
@@ -200,7 +200,7 @@ export const BookingService = implementService.withConfig()(BookingServiceDefini
|
|
|
200
200
|
location,
|
|
201
201
|
timezone,
|
|
202
202
|
appId: config.appId,
|
|
203
|
-
|
|
203
|
+
sourceAppId: config.sourceAppId,
|
|
204
204
|
selectedPaymentOption,
|
|
205
205
|
allDay,
|
|
206
206
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"groupId": "com.wixpress.headless-components"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"falconPackageHash": "
|
|
94
|
+
"falconPackageHash": "30c97b748c123a110277b195e6a947df9be37975b528f81e4c51c9f2"
|
|
95
95
|
}
|