@voyantjs/bookings-react 0.80.1 → 0.80.2
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.
|
@@ -14,6 +14,11 @@ export interface UpdateBookingStatusInput {
|
|
|
14
14
|
* sending. Lets the operator confirm a booking silently.
|
|
15
15
|
*/
|
|
16
16
|
suppressNotifications?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* When true and the status change falls through to override-status, keep
|
|
19
|
+
* the audit event but skip verb-specific lifecycle events.
|
|
20
|
+
*/
|
|
21
|
+
suppressLifecycleEvents?: boolean;
|
|
17
22
|
}
|
|
18
23
|
export declare function useBookingStatusMutation(bookingId: string): import("@tanstack/react-query").UseMutationResult<{
|
|
19
24
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-booking-status-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-status-mutation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,eAAe,CAAA;AAEzE,KAAK,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AAE5C,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE,aAAa,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-booking-status-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-status-mutation.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,eAAe,CAAA;AAEzE,KAAK,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AAE5C,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE,aAAa,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CA8BzD;AAED,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAiC3C"}
|
|
@@ -10,7 +10,10 @@ export function useBookingStatusMutation(bookingId) {
|
|
|
10
10
|
const queryClient = useQueryClient();
|
|
11
11
|
return useMutation({
|
|
12
12
|
mutationFn: async (input) => {
|
|
13
|
-
const target = dispatchBookingStatusChange(bookingId, input.currentStatus, input.status, input.note, {
|
|
13
|
+
const target = dispatchBookingStatusChange(bookingId, input.currentStatus, input.status, input.note, {
|
|
14
|
+
suppressNotifications: input.suppressNotifications,
|
|
15
|
+
suppressLifecycleEvents: input.suppressLifecycleEvents,
|
|
16
|
+
});
|
|
14
17
|
const { data } = await fetchWithValidation(target.path, bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(target.body) });
|
|
15
18
|
return data;
|
|
16
19
|
},
|
|
@@ -32,9 +35,10 @@ export function useBookingStatusByIdMutation() {
|
|
|
32
35
|
const { baseUrl, fetcher } = useVoyantBookingsContext();
|
|
33
36
|
const queryClient = useQueryClient();
|
|
34
37
|
return useMutation({
|
|
35
|
-
mutationFn: async ({ bookingId, currentStatus, status, note, suppressNotifications, }) => {
|
|
38
|
+
mutationFn: async ({ bookingId, currentStatus, status, note, suppressNotifications, suppressLifecycleEvents, }) => {
|
|
36
39
|
const target = dispatchBookingStatusChange(bookingId, currentStatus, status, note, {
|
|
37
40
|
suppressNotifications,
|
|
41
|
+
suppressLifecycleEvents,
|
|
38
42
|
});
|
|
39
43
|
const { data } = await fetchWithValidation(target.path, bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(target.body) });
|
|
40
44
|
return data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/bookings-react",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/bookings": "0.80.
|
|
44
|
+
"@voyantjs/bookings": "0.80.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/bookings": "0.80.
|
|
56
|
-
"@voyantjs/react": "0.80.
|
|
55
|
+
"@voyantjs/bookings": "0.80.2",
|
|
56
|
+
"@voyantjs/react": "0.80.2",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.80.
|
|
60
|
+
"@voyantjs/react": "0.80.2"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|