@raclettejs/core 0.1.14 → 0.1.16

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/CHANGELOG.md CHANGED
@@ -7,7 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.1.14] - 02.11.2025 <a href="https://gitlab.com/raclettejs/core/-/compare/v0.1.13...v0.1.14" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
10
+ ## [0.1.16] - 05.11.2025 <a href="https://gitlab.com/raclettejs/core/-/compare/v0.1.15...v0.1.16" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
11
+
12
+ ### Fixed
13
+
14
+ - Frontend: axios Delete handling
15
+
16
+ ### Added
17
+
18
+ - Frontend: added i18n keys
19
+ - Backend: getAll routes for core datatypes do now respect set filters
20
+
21
+ ## [0.1.15] - 02.11.2025 <a href="https://gitlab.com/raclettejs/core/-/compare/v0.1.13...v0.1.15" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
11
22
 
12
23
  ### Fixed
13
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raclettejs/core",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "racletteJS core package",
5
5
  "repository": "https://gitlab.com/raclettejs/core",
6
6
  "author": "Pacifico Digital Explorations GmbH <info@raclettejs.com>",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@eslint/js": "9.35.0",
72
- "@raclettejs/types": "0.1.14",
72
+ "@raclettejs/types": "0.1.16",
73
73
  "@types/fs-extra": "11.0.4",
74
74
  "@types/js-yaml": "4.0.9",
75
75
  "@types/node": "24.5.1",
@@ -94,11 +94,12 @@ export class CompositionService {
94
94
  */
95
95
  async _readAllCompositions(
96
96
  fastify: PluginFastifyInstance,
97
+ filters: Record<string, any> = {},
97
98
  ): Promise<CompositionType[]> {
98
99
  try {
99
100
  return await this.compositionModel
100
101
  .find({
101
- isDeleted: false,
102
+ ...filters,
102
103
  })
103
104
  .lean()
104
105
  } catch (error: any) {
@@ -113,8 +114,9 @@ export class CompositionService {
113
114
  async getAllCompositions(
114
115
  fastify: PluginFastifyInstance,
115
116
  requestData: FrontendPayloadRequestData,
117
+ filters: Record<string, any> = {},
116
118
  ): Promise<FrontendPayload<CompositionType[]>> {
117
- const compositions = await this._readAllCompositions(fastify)
119
+ const compositions = await this._readAllCompositions(fastify, filters)
118
120
 
119
121
  return createCompositionPayload(fastify, compositions, requestData)
120
122
  }
@@ -9,6 +9,7 @@ export default (fastify: PluginFastifyInstance) => {
9
9
  const payload = await compositionService.getAllCompositions(
10
10
  fastify,
11
11
  req.requestParams,
12
+ req.query,
12
13
  )
13
14
 
14
15
  return payload
@@ -102,7 +102,6 @@ export class InteractionLinkService {
102
102
  try {
103
103
  return await this.interactionLinkModel
104
104
  .find({
105
- isDeleted: false,
106
105
  ...filters,
107
106
  })
108
107
  .lean()
@@ -9,6 +9,7 @@ export default (fastify: PluginFastifyInstance) => {
9
9
  const payload = await interactionLinkService.getAllInteractionLinks(
10
10
  fastify,
11
11
  req.requestParams,
12
+ req.query,
12
13
  )
13
14
 
14
15
  return payload
@@ -19,7 +19,7 @@ export default (fastify: PluginFastifyInstance) => {
19
19
  ) => {
20
20
  try {
21
21
  //TODO rework this once we have permission system in place
22
- const filter: any = { isDeleted: false }
22
+ const filter: any = { isDeleted: req.query?.isDeleted || false }
23
23
  if (req.query.account) {
24
24
  filter.account = req.query.account
25
25
  }
@@ -10,7 +10,6 @@ const createAxiosConfig = (appRequestCode, pluginItemRequestConfig) => {
10
10
  "app-request-code": appRequestCode,
11
11
  },
12
12
  }
13
-
14
13
  const channels = []
15
14
  if (pluginItemRequestConfig.broadcast) {
16
15
  channels.push("data")
@@ -77,6 +76,12 @@ const storeActions = {
77
76
  })
78
77
  },
79
78
  }
79
+ const getAxiosPromise = async (method, target, source, config) => {
80
+ if (method === "delete") {
81
+ return await $api.axios.delete(target, config, { data: { source } })
82
+ }
83
+ return await $api.axios[method](target, source, config)
84
+ }
80
85
  const writeData = async (actionId, operationDefinition, item, options) => {
81
86
  const type = operationDefinition.dataTypeName
82
87
  const cleanItem = removeCacheAttributes(item)
@@ -112,7 +117,8 @@ const writeData = async (actionId, operationDefinition, item, options) => {
112
117
  config,
113
118
  )
114
119
  }
115
- return await $api.axios[operationDefinition.method](
120
+ return await getAxiosPromise(
121
+ operationDefinition.method,
116
122
  validTarget,
117
123
  cleanItem,
118
124
  config,
@@ -124,7 +130,8 @@ const writeData = async (actionId, operationDefinition, item, options) => {
124
130
  })
125
131
  .catch((e) => reportError(e))
126
132
  } else {
127
- return await $api.axios[operationDefinition.method](
133
+ return await getAxiosPromise(
134
+ operationDefinition.method,
128
135
  validTarget,
129
136
  cleanItem,
130
137
  config,
@@ -44,13 +44,6 @@ const queriesEffects = (store) => {
44
44
  if (updatedQuery) {
45
45
  const { item, itemBefore } = updatedQuery
46
46
  const { actionId } = action
47
- if (!actionId || !item) {
48
- log.store("effect queries/setCacheKey no Item or ActionId", {
49
- updatedQuery,
50
- action,
51
- })
52
- return
53
- }
54
47
  if (itemBefore?.cacheKey && itemBefore?.cacheKey !== item?.cacheKey) {
55
48
  store.dispatch({
56
49
  type: "queriesCache/remove",
@@ -72,6 +72,8 @@
72
72
  "noAccountYet": "Noch kein Konto?",
73
73
  "moreInformation": "Weitere Informationen"
74
74
  },
75
+ "showDeleted": "Zeige gelöschte",
76
+ "hideDeleted": "Verstecke gelöschte",
75
77
  "cancel": "Abbrechen",
76
78
  "close": "Schließen",
77
79
  "clear": "Leeren",
@@ -72,6 +72,8 @@
72
72
  "noAccountYet": "Don't have an account yet?",
73
73
  "moreInformation": "More information"
74
74
  },
75
+ "showDeleted": "Show deleted",
76
+ "hideDeleted": "Hide deleted",
75
77
  "cancel": "Cancel",
76
78
  "close": "Close",
77
79
  "clear": "Clear",
@@ -72,6 +72,8 @@
72
72
  "noAccountYet": "Ešte nemáte účet?",
73
73
  "moreInformation": "Viac informácií"
74
74
  },
75
+ "showDeleted": "relácia vymazaná",
76
+ "hideDeleted": "skryť odstránené",
75
77
  "cancel": "Zrušiť",
76
78
  "close": "Zavrieť",
77
79
  "clear": "Vyčistiť",
package/yarn.lock CHANGED
@@ -295,10 +295,10 @@
295
295
  resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b"
296
296
  integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==
297
297
 
298
- "@raclettejs/types@^0.1.14":
299
- version "0.1.14"
300
- resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.14.tgz#585958921aaecab98dc301be4e1ce7207e90aeae"
301
- integrity sha512-Uh3006SOIUDQw5LFvPj2ewLKglBnORNY+9IE9cqsDFHXZo++/9eBwaEGPvQKTJ6XbjpJPxUezKvbtaaE8MMIFg==
298
+ "@raclettejs/types@^0.1.16":
299
+ version "0.1.16"
300
+ resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.16.tgz#9b8e6122c831b98822ec35bf90430dfb9a482aa6"
301
+ integrity sha512-HUkh4CP5yny3IwgYIHSh3zbpzakJgzmuRO3obtutVADO8tmRi9SAnQQMXK5X+3A51ZicdB9VPuhmw1r/Iv1SZA==
302
302
  dependencies:
303
303
  "@types/node" "24.5.2"
304
304
  fastify "5.6.0"