@wix/headless-bookings 1.0.13 → 1.0.14
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 +4 -0
- package/cjs/dist/services/booking/book-action/types.d.ts +6 -0
- package/cjs/dist/services/booking/booking.d.ts +6 -0
- package/cjs/dist/services/booking/booking.js +1 -0
- package/dist/services/booking/book-action/buildBookingRequest.js +4 -0
- package/dist/services/booking/book-action/types.d.ts +6 -0
- package/dist/services/booking/booking.d.ts +6 -0
- package/dist/services/booking/booking.js +1 -0
- package/package.json +2 -2
|
@@ -64,6 +64,10 @@ function buildBookingRequest(params) {
|
|
|
64
64
|
deriveSelectedPaymentOption(item.service),
|
|
65
65
|
// Participants
|
|
66
66
|
totalParticipants: item.totalParticipants || 1,
|
|
67
|
+
// App that created the booking (used to filter bookings by source app).
|
|
68
|
+
...(params.appSourceId && {
|
|
69
|
+
bookingSource: { appDefId: params.appSourceId },
|
|
70
|
+
}),
|
|
67
71
|
// Booked entity slot
|
|
68
72
|
bookedEntity: {
|
|
69
73
|
slot: {
|
|
@@ -46,6 +46,12 @@ export interface BookActionParams {
|
|
|
46
46
|
timezone?: string;
|
|
47
47
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
48
48
|
appId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional app source ID. When provided, sets the created booking's
|
|
51
|
+
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
52
|
+
* allowing bookings to be filtered by source app later.
|
|
53
|
+
*/
|
|
54
|
+
appSourceId?: string;
|
|
49
55
|
/**
|
|
50
56
|
* Optional consumer-selected payment option. When provided, overrides the
|
|
51
57
|
* heuristic derived from `service.payment.options` in `buildBookingRequest`
|
|
@@ -148,6 +148,12 @@ export interface BookingServiceConfig {
|
|
|
148
148
|
selectedPaymentOption?: SelectedPaymentOption;
|
|
149
149
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
150
150
|
appId?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Optional app source ID. When provided, sets the created booking's
|
|
153
|
+
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
154
|
+
* allowing bookings to be filtered by source app later.
|
|
155
|
+
*/
|
|
156
|
+
appSourceId?: string;
|
|
151
157
|
}
|
|
152
158
|
/**
|
|
153
159
|
* Implementation of BookingService
|
|
@@ -61,6 +61,10 @@ export function buildBookingRequest(params) {
|
|
|
61
61
|
deriveSelectedPaymentOption(item.service),
|
|
62
62
|
// Participants
|
|
63
63
|
totalParticipants: item.totalParticipants || 1,
|
|
64
|
+
// App that created the booking (used to filter bookings by source app).
|
|
65
|
+
...(params.appSourceId && {
|
|
66
|
+
bookingSource: { appDefId: params.appSourceId },
|
|
67
|
+
}),
|
|
64
68
|
// Booked entity slot
|
|
65
69
|
bookedEntity: {
|
|
66
70
|
slot: {
|
|
@@ -46,6 +46,12 @@ export interface BookActionParams {
|
|
|
46
46
|
timezone?: string;
|
|
47
47
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
48
48
|
appId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional app source ID. When provided, sets the created booking's
|
|
51
|
+
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
52
|
+
* allowing bookings to be filtered by source app later.
|
|
53
|
+
*/
|
|
54
|
+
appSourceId?: string;
|
|
49
55
|
/**
|
|
50
56
|
* Optional consumer-selected payment option. When provided, overrides the
|
|
51
57
|
* heuristic derived from `service.payment.options` in `buildBookingRequest`
|
|
@@ -148,6 +148,12 @@ export interface BookingServiceConfig {
|
|
|
148
148
|
selectedPaymentOption?: SelectedPaymentOption;
|
|
149
149
|
/** Optional app ID override for the catalog reference. Defaults to the bookings app ID. */
|
|
150
150
|
appId?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Optional app source ID. When provided, sets the created booking's
|
|
153
|
+
* `bookingSource.appDefId` (the ID of the app that created the booking),
|
|
154
|
+
* allowing bookings to be filtered by source app later.
|
|
155
|
+
*/
|
|
156
|
+
appSourceId?: string;
|
|
151
157
|
}
|
|
152
158
|
/**
|
|
153
159
|
* Implementation of BookingService
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
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": "a46181a3961b30abe8eff9e922340b833ee536437f39b21c18667c07"
|
|
95
95
|
}
|