@timum/timum_pdk 1.0.7 → 1.0.8
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/package.json +1 -1
- package/src/index.js +32 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -71,11 +71,40 @@ export const timumApiSlice = createApi({
|
|
|
71
71
|
identifyCustomer: builder.query({
|
|
72
72
|
query: (props) => ({
|
|
73
73
|
url: constructUrl(
|
|
74
|
-
`/resources/${props.resourceId}/customers/${props.personId}/identify`
|
|
74
|
+
`/crms/${props.crmSlug}/resources/${props.resourceId}/customers/${props.personId}/identify`
|
|
75
75
|
),
|
|
76
76
|
}),
|
|
77
77
|
}),
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* body must contain:
|
|
81
|
+
* provider_id,
|
|
82
|
+
* resource_id,
|
|
83
|
+
* product_id,
|
|
84
|
+
* from (ISO format),
|
|
85
|
+
* to (ISO format)
|
|
86
|
+
*/
|
|
87
|
+
reserveAppoinment: builder.mutation({
|
|
88
|
+
query: (props) => ({
|
|
89
|
+
url: constructUrl(`/resources/${props.resourceId}/reserve_appointment`),
|
|
90
|
+
method: "post",
|
|
91
|
+
body: props.body,
|
|
92
|
+
}),
|
|
93
|
+
}),
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* body must contain:
|
|
97
|
+
* placeholder_id (id created for ephemeral customer during call to),
|
|
98
|
+
* appointment_id
|
|
99
|
+
*/
|
|
100
|
+
revokeAppointmentReservation: builder.mutation({
|
|
101
|
+
query: (props) => ({
|
|
102
|
+
url: constructUrl(`/resources/${props.resourceId}/revoke_reservation`),
|
|
103
|
+
method: "post",
|
|
104
|
+
body: props.body,
|
|
105
|
+
}),
|
|
106
|
+
}),
|
|
107
|
+
|
|
79
108
|
// ##########################################
|
|
80
109
|
// # CRM API requests (general api)
|
|
81
110
|
// ##########################################
|
|
@@ -176,6 +205,8 @@ export const {
|
|
|
176
205
|
useLazyIdentifyCustomerQuery,
|
|
177
206
|
usePublicContactDataQuery,
|
|
178
207
|
useLazyPublicContactDataQuery,
|
|
208
|
+
useReserveAppoinmentMutation,
|
|
209
|
+
useRevokeAppointmentReservationMutation,
|
|
179
210
|
|
|
180
211
|
// ##########################################
|
|
181
212
|
// # CRM API requests (general api)
|