@timum/timum_pdk 2.0.2 → 2.0.6

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 CHANGED
@@ -1,45 +1,51 @@
1
1
  {
2
- "name": "@timum/timum_pdk",
3
- "version": "2.0.2",
4
- "license": "MIT",
5
- "description": "Contains timum public and general api endpoints",
6
- "homepage": "https://www.timum.de",
7
- "main": "dist/main.js",
8
- "module": "src/index.js",
9
- "dependencies": {
10
- "@reduxjs/toolkit": "^1.8.0",
11
- "np": "^7.6.2",
12
- "react": "^18.2.0",
13
- "react-dom": "^18.2.0",
14
- "react-redux": "^8.0.2",
15
- "reactjs-localstorage": "^1.0.1"
16
- },
17
- "scripts": {
18
- "lint": "eslint .",
19
- "lint:fix": "eslint --fix .",
20
- "np:publish": "np --no-yarn",
21
- "build": "webpack --mode=production",
22
- "buildDev": "webpack --mode=development",
23
- "test": "echo \"No tests yet\""
24
- },
25
- "browserslist": {
26
- "production": [
27
- ">0.2%",
28
- "not dead",
29
- "not op_mini all"
30
- ],
31
- "development": [
32
- "last 1 chrome version",
33
- "last 1 firefox version",
34
- "last 1 safari version"
35
- ]
36
- },
37
- "devDependencies": {
38
- "eslint": "^8.17.0",
39
- "eslint-config-prettier": "^8.5.0",
40
- "eslint-plugin-prettier": "^4.0.0",
41
- "eslint-plugin-react": "^7.30.0",
42
- "webpack": "^5.70.0",
43
- "webpack-cli": "^4.10.0"
44
- }
2
+ "name": "@timum/timum_pdk",
3
+ "version": "2.0.6",
4
+ "next_version": "2.0.6",
5
+ "current_major_version": "2",
6
+ "license": "MIT",
7
+ "description": "Contains timum public and general api endpoints",
8
+ "homepage": "https://www.timum.de",
9
+ "main": "dist/main.js",
10
+ "module": "src/index.js",
11
+ "dependencies": {
12
+ "@reduxjs/toolkit": "^1.8.0",
13
+ "np": "^7.6.2",
14
+ "react": "^18.2.0",
15
+ "react-dom": "^18.2.0",
16
+ "react-redux": "^8.0.2",
17
+ "reactjs-localstorage": "^1.0.1"
18
+ },
19
+ "scripts": {
20
+ "lint": "eslint .",
21
+ "lint:fix": "eslint --fix .",
22
+ "s3:deleteCurrentVersionStage": "aws s3 rm \"s3://staging-cdn.timum/timum_pdk/%npm_package_current_major_version%/%npm_package_next_version%\" --recursive",
23
+ "s3:deleteLatestStage": "aws s3 rm \"s3://staging-cdn.timum/timum_pdk/%npm_package_current_major_version%/\" --exclude \"*\" --include \"*.*\" --exclude \"*/*\" --recursive",
24
+ "s3:publishToStage": "yarn build && yarn s3:deleteCurrentVersionStage && aws s3 sync ./dist/ \"s3://staging-cdn.timum/timum_pdk/%npm_package_current_major_version%/%npm_package_next_version%/\" && yarn s3:deleteLatestStage && aws s3 sync ./dist/ \"s3://staging-cdn.timum/timum_pdk/%npm_package_current_major_version%/\"",
25
+ "s3:deleteLatestProd": "aws s3 rm \"s3://cdn.timum/timum_pdk/%npm_package_current_major_version%\" --exclude \"*\" --include \"*.*\" --exclude \"*/*\" --recursive",
26
+ "s3:publishToProd": "yarn build && np --no-yarn --no-cleanup && aws s3 sync ./dist/ \"s3://cdn.timum/timum_pdk/%npm_package_current_major_version%/%npm_package_version%/\" && yarn s3:deleteLatestProd && aws s3 sync ./dist/ \"s3://cdn.timum/timum_pdk/%npm_package_current_major_version%/\"",
27
+ "build": "webpack --mode=production",
28
+ "buildDev": "webpack --mode=development",
29
+ "test": "echo \"No tests yet\""
30
+ },
31
+ "browserslist": {
32
+ "production": [
33
+ ">0.2%",
34
+ "not dead",
35
+ "not op_mini all"
36
+ ],
37
+ "development": [
38
+ "last 1 chrome version",
39
+ "last 1 firefox version",
40
+ "last 1 safari version"
41
+ ]
42
+ },
43
+ "devDependencies": {
44
+ "eslint": "^8.17.0",
45
+ "eslint-config-prettier": "^8.5.0",
46
+ "eslint-plugin-prettier": "^4.0.0",
47
+ "eslint-plugin-react": "^7.30.0",
48
+ "webpack": "^5.70.0",
49
+ "webpack-cli": "^4.10.0"
50
+ }
45
51
  }
package/src/index.js CHANGED
@@ -88,7 +88,15 @@ export const timumApiSlice = createApi({
88
88
  body: props.body,
89
89
  headers: props.headers,
90
90
  }),
91
- invalidatesTags: (/* result, error, arg */) => [{ type: "Timeslot" }],
91
+ invalidatesTags: (result, error, arg) => {
92
+ const invalidatedTags = [{ type: "Timeslot" }];
93
+
94
+ if(arg.shouldInvalidateCustomerIdentification) {
95
+ invalidatedTags.push("IdentifiedCustomer");
96
+ }
97
+
98
+ return invalidatedTags;
99
+ },
92
100
  }),
93
101
 
94
102
  removeCustomerFromAppointment: builder.mutation({
@@ -151,6 +159,7 @@ export const timumApiSlice = createApi({
151
159
  ),
152
160
  headers: props.headers,
153
161
  }),
162
+ providesTags: "IdentifiedCustomer", //
154
163
  keepUnusedDataFor: 9999999, // once identified it's not going to change
155
164
  }),
156
165
 
@@ -291,7 +300,9 @@ export const {
291
300
  // ##########################################
292
301
 
293
302
  useUpcomingBookablesQuery,
303
+ useLazyUpcomingBookablesQuery,
294
304
  useActiveProductsQuery,
305
+ useLazyActiveProductsQuery,
295
306
  useCreateAppointmentWithConsumerMutation,
296
307
  useIdentifyCustomerQuery,
297
308
  useLazyIdentifyCustomerQuery,
@@ -308,9 +319,12 @@ export const {
308
319
  // ##########################################
309
320
  useCreateAccountMutation,
310
321
  useGetAccountQuery,
322
+ useLazyGetAccountQuery,
311
323
  useGetProvidersQuery,
324
+ useLazyGetProvidersQuery,
312
325
  useCreateProviderMutation,
313
326
  // useLoginUserViaApiQuery,
314
327
  useCreateUserMutation,
315
328
  useGetUserQuery,
329
+ useLazyGetUserQuery,
316
330
  } = timumApiSlice;