@timum/timum_pdk 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +31 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timum/timum_pdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "license": "MIT",
5
5
  "description": "Contains timum public and general api endpoints",
6
6
  "homepage": "https://www.timum.de",
package/src/index.js CHANGED
@@ -62,9 +62,28 @@ export const timumApiSlice = createApi({
62
62
  invalidatesTags: (/* result, error, arg */) => [{ type: "Timeslot" }],
63
63
  }),
64
64
 
65
- publicContactData: builder.query({
65
+ /**
66
+ * Returns an object with the following makeup:
67
+ * {
68
+ * contact: {
69
+ * name,
70
+ * email,
71
+ * mobile,
72
+ * phone
73
+ * },
74
+ * resource: {
75
+ * name,
76
+ * description,
77
+ * msgHelpText
78
+ * },
79
+ * provider: {
80
+ * name
81
+ * }
82
+ * }
83
+ */
84
+ publicData: builder.query({
66
85
  query: (props) => ({
67
- url: constructUrl(`/resources/${props.resourceId}/public_contact_data`),
86
+ url: constructUrl(`/resources/${props.resourceId}/public_data`),
68
87
  }),
69
88
  }),
70
89
 
@@ -74,15 +93,18 @@ export const timumApiSlice = createApi({
74
93
  `/crms/${props.crmSlug}/resources/${props.resourceId}/customers/${props.personId}/identify`
75
94
  ),
76
95
  }),
96
+ keepUnusedDataFor: 9999999, // once identifoed it's not going to change
77
97
  }),
78
98
 
79
99
  /**
80
- * body must contain:
100
+ * body contain:
101
+ * resource_id*,
102
+ * product_id*,
81
103
  * provider_id,
82
- * resource_id,
83
- * product_id,
84
- * from (ISO format),
85
- * to (ISO format)
104
+ * timeslotUuid (if available)
105
+ * from* (ISO format),
106
+ * to* (ISO format)
107
+ * -> * marks those which are required.
86
108
  */
87
109
  reserveAppoinment: builder.mutation({
88
110
  query: (props) => ({
@@ -203,8 +225,8 @@ export const {
203
225
  useCreateAppointmentWithConsumerMutation,
204
226
  useIdentifyCustomerQuery,
205
227
  useLazyIdentifyCustomerQuery,
206
- usePublicContactDataQuery,
207
- useLazyPublicContactDataQuery,
228
+ usePublicDataQuery,
229
+ useLazyPublicDataQuery,
208
230
  useReserveAppoinmentMutation,
209
231
  useRevokeAppointmentReservationMutation,
210
232