@vario-software/vario-app-framework-backend 2026.6.0 → 2026.8.0

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/api/Api.js CHANGED
@@ -26,7 +26,6 @@ class Api
26
26
  formData,
27
27
  outputStream,
28
28
  headers,
29
- useInternalApi,
30
29
  secret,
31
30
  ...restOptions
32
31
  } = {})
@@ -37,7 +36,6 @@ class Api
37
36
  this.timeout = timeout;
38
37
  this.timer = performance.now();
39
38
  this.outputStream = outputStream;
40
- this.useInternalApi = useInternalApi;
41
39
  this.secret = secret;
42
40
  this.restOptions = restOptions;
43
41
  this.suppressLogs = suppressLogs;
package/api/ErpApi.js CHANGED
@@ -47,14 +47,7 @@ class ErpApi extends Api
47
47
 
48
48
  this.setAuthorization(Authorization);
49
49
 
50
- if (this.useInternalApi)
51
- {
52
- this.setBaseUrl(`${baseUrl}/api/vario`);
53
- }
54
- else
55
- {
56
- this.setBaseUrl(`${baseUrl}/api/vario/community/${this.app.version}`);
57
- }
50
+ this.setBaseUrl(`${baseUrl}/api/vario`);
58
51
  }
59
52
 
60
53
  async onResponse()
@@ -18,7 +18,6 @@ async function vql({ statement, variableSubstitutions = [], limit = null, offset
18
18
  }
19
19
 
20
20
  const result = await this.fetch('/cmn/computed-queries/execute', {
21
- useInternalApi: true,
22
21
  method: 'POST',
23
22
  body: JSON.stringify(payload),
24
23
  });
@@ -1,3 +1,5 @@
1
+ const { getApp } = require('#backend/utils/context.js');
2
+
1
3
  const Eav = class
2
4
  {
3
5
  constructor(ApiAdapter)
@@ -7,7 +9,9 @@ const Eav = class
7
9
 
8
10
  getGroup = async function(groupKey)
9
11
  {
10
- const { data: eavGroup } = await this.ApiAdapter.fetch(`/cmn/eav-groups/by-key/${groupKey}`, {
12
+ const app = getApp();
13
+
14
+ const { data: eavGroup } = await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups/by-key/${groupKey}`, {
11
15
  method: 'GET',
12
16
  });
13
17
 
@@ -25,7 +29,9 @@ const Eav = class
25
29
  return eavGroup;
26
30
  }
27
31
 
28
- eavGroup = await this.ApiAdapter.fetch('/cmn/eav-groups', {
32
+ const app = getApp();
33
+
34
+ eavGroup = await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups`, {
29
35
  method: 'POST',
30
36
  body: JSON.stringify(eavGroup),
31
37
  });
@@ -37,9 +43,11 @@ const Eav = class
37
43
  {
38
44
  let eavGroup = await this.getGroup(groupKey);
39
45
 
46
+ const app = getApp();
47
+
40
48
  eavGroup = callback(eavGroup);
41
49
 
42
- eavGroup = await this.ApiAdapter.fetch(`/cmn/eav-groups/${eavGroup.id}`, {
50
+ eavGroup = await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups/${eavGroup.id}`, {
43
51
  method: 'PUT',
44
52
  body: JSON.stringify(eavGroup),
45
53
  });
@@ -50,13 +58,14 @@ const Eav = class
50
58
  deleteGroup = async function (groupKey)
51
59
  {
52
60
  const eavGroup = await this.getGroup(groupKey);
61
+ const app = getApp();
53
62
 
54
- await this.ApiAdapter.fetch(`/cmn/eav-groups/${eavGroup.id}/remove-data`, {
63
+ await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups/${eavGroup.id}/remove-data`, {
55
64
  method: 'POST',
56
65
  body: JSON.stringify({ entities: eavGroup.entities }),
57
66
  });
58
67
 
59
- await this.ApiAdapter.fetch(`/cmn/eav-groups/${eavGroup.id}`, {
68
+ await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups/${eavGroup.id}`, {
60
69
  method: 'DELETE',
61
70
  });
62
71
 
@@ -66,12 +75,13 @@ const Eav = class
66
75
  removeDataFromGroup = async function (groupKey, attributeKeys = [])
67
76
  {
68
77
  const eavGroup = await this.getGroup(groupKey);
78
+ const app = getApp();
69
79
 
70
80
  const attributeId = attributeKeys
71
81
  .map(attrKey => eavGroup.attributes?.find(({ key }) => key === attrKey)?.id)
72
82
  .filter(id => id !== null || id !== undefined);
73
83
 
74
- await this.ApiAdapter.fetch(`/cmn/eav-groups/${eavGroup.id}/remove-data`, {
84
+ await this.ApiAdapter.fetch(`/community/${app.version}/cmn/eav-groups/${eavGroup.id}/remove-data`, {
75
85
  method: 'POST',
76
86
  body: JSON.stringify({ entities: eavGroup.entities, attributeId }),
77
87
  });
@@ -69,7 +69,7 @@ ${identifier ? `AND identifier = '${identifier}'` : ''}
69
69
  {
70
70
  const app = getApp();
71
71
 
72
- const { data: response } = await this.ApiAdapter.fetch('/cmn/system/app-migration', {
72
+ const { data: response } = await this.ApiAdapter.fetch(`/community/${app.version}/cmn/system/app-migration`, {
73
73
  body: {
74
74
  appIdentifier: app.client.appIdentifier,
75
75
  identifier,
@@ -84,7 +84,9 @@ ${identifier ? `AND identifier = '${identifier}'` : ''}
84
84
 
85
85
  delete = async function(id)
86
86
  {
87
- const { data: response } = await this.ApiAdapter.fetch(`/cmn/system/app-migration/${id}`, {
87
+ const app = getApp();
88
+
89
+ const { data: response } = await this.ApiAdapter.fetch(`/community/${app.version}/cmn/system/app-migration/${id}`, {
88
90
  method: 'delete',
89
91
  });
90
92
 
@@ -19,7 +19,6 @@ const PermittedToken = class
19
19
  }),
20
20
  secret: true,
21
21
  secretsToMask: ['bearerToken'],
22
- useInternalApi: true,
23
22
  });
24
23
 
25
24
  return data;
@@ -1,3 +1,5 @@
1
+ const { getApp } = require('#backend/utils/context.js');
2
+
1
3
  const TextEnum = class
2
4
  {
3
5
  constructor(ApiAdapter)
@@ -62,8 +64,10 @@ const TextEnum = class
62
64
 
63
65
  createGroup = async function(textEnumGroup)
64
66
  {
67
+ const app = getApp();
68
+
65
69
  const response = await this.ApiAdapter.fetch(
66
- '/cmn/masterdata/text-enum-groups',
70
+ `/community/${app.version}/cmn/masterdata/text-enum-groups`,
67
71
  {
68
72
  body: JSON.stringify(textEnumGroup),
69
73
  method: 'POST',
@@ -114,8 +118,10 @@ const TextEnum = class
114
118
 
115
119
  removeEnum = async function(textEnum)
116
120
  {
121
+ const app = getApp();
122
+
117
123
  return this.ApiAdapter.fetch(
118
- `/cmn/masterdata/text-enums/${textEnum.id}`,
124
+ `/community/${app.version}/cmn/masterdata/text-enums/${textEnum.id}`,
119
125
  {
120
126
  method: 'DELETE',
121
127
  },
@@ -136,8 +142,10 @@ const TextEnum = class
136
142
 
137
143
  createEnum = async function(textEnum)
138
144
  {
145
+ const app = getApp();
146
+
139
147
  await this.ApiAdapter.fetch(
140
- '/cmn/masterdata/text-enums',
148
+ `/community/${app.version}/cmn/masterdata/text-enums`,
141
149
  {
142
150
  body: JSON.stringify(textEnum),
143
151
  method: 'POST',
@@ -14,7 +14,7 @@ const Webhook = class
14
14
 
15
15
  const app = getApp();
16
16
 
17
- await this.ApiAdapter.fetch('/cmn/system/app-message-webhook/register', {
17
+ await this.ApiAdapter.fetch(`/community/${app.version}/cmn/system/app-message-webhook/register`, {
18
18
  method: 'POST',
19
19
  body: JSON.stringify({
20
20
  url: `${apiUrl}${url}`,
@@ -31,7 +31,7 @@ const Webhook = class
31
31
 
32
32
  const app = getApp();
33
33
 
34
- await this.ApiAdapter.fetch('/cmn/system/app-message-webhook/deregister', {
34
+ await this.ApiAdapter.fetch(`/community/${app.version}/cmn/system/app-message-webhook/deregister`, {
35
35
  method: 'POST',
36
36
  body: JSON.stringify({
37
37
  url: `${apiUrl}${url}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vario-software/vario-app-framework-backend",
3
- "version": "2026.06.0",
3
+ "version": "2026.08.0",
4
4
  "repository": "https://github.com/vario-software/vario-app-framework",
5
5
  "author": "VARIO Software AG",
6
6
  "homepage": "https://www.vario.ag",
package/utils/licenses.js CHANGED
@@ -46,9 +46,7 @@ async function getLicenses()
46
46
 
47
47
  const app = getApp();
48
48
 
49
- const { data } = await app.erp.fetch('/cmn/systems/licenses/', {
50
- useInternalApi: true,
51
- });
49
+ const { data } = await app.erp.fetch('/cmn/systems/licenses/');
52
50
 
53
51
  return data.map(({ licenseKey }) => licenseKey);
54
52
  }
package/utils/migrator.js CHANGED
@@ -160,7 +160,7 @@ const Migrator = class
160
160
 
161
161
  createSalesChannelBackend: async (label, validChannelTypes) =>
162
162
  {
163
- const { data: salesChannelBackend } = await this.ApiAdapter.fetch('/erp/sales-channels/backend', {
163
+ const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/sales-channels/backend`, {
164
164
  method: 'POST',
165
165
  body: JSON.stringify({
166
166
  appId: this.app.client.appIdentifier,
@@ -178,7 +178,7 @@ const Migrator = class
178
178
 
179
179
  changeSalesChannelBackend: async body =>
180
180
  {
181
- const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/erp/sales-channels/backend/${body.id}`, {
181
+ const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/sales-channels/backend/${body.id}`, {
182
182
  method: 'PUT',
183
183
  body: JSON.stringify(body),
184
184
  });
@@ -190,7 +190,7 @@ const Migrator = class
190
190
 
191
191
  createSalesChannel: async (salesChannelBackend, label, description, channelType = 'ECOMMERCE') =>
192
192
  {
193
- const { data: salesChannel } = await this.ApiAdapter.fetch('/erp/sales-channels', {
193
+ const { data: salesChannel } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/sales-channels`, {
194
194
  method: 'POST',
195
195
  body: JSON.stringify({
196
196
  label,
@@ -238,7 +238,7 @@ const Migrator = class
238
238
 
239
239
  getSalesChannelBackend: async salesChannelBackendId =>
240
240
  {
241
- const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/erp/sales-channels/backend/${salesChannelBackendId}`);
241
+ const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/sales-channels/backend/${salesChannelBackendId}`);
242
242
 
243
243
  if (salesChannelBackend)
244
244
  {
@@ -250,7 +250,7 @@ const Migrator = class
250
250
 
251
251
  activateSalesChannelBackend: async salesChannelBackend =>
252
252
  {
253
- await this.ApiAdapter.fetch(`/erp/sales-channels/backend/${salesChannelBackend.id}/activate`, {
253
+ await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/sales-channels/backend/${salesChannelBackend.id}/activate`, {
254
254
  method: 'PUT',
255
255
  body: '{}',
256
256
  });
@@ -261,7 +261,6 @@ const Migrator = class
261
261
  const { data: importMultipartPreset } = await this.ApiAdapter.fetch(
262
262
  '/cmn/data-import/runs/multi-part',
263
263
  {
264
- useInternalApi: true,
265
264
  method: 'POST',
266
265
  body: JSON.stringify(importMultipartPresetTemplate),
267
266
  });
@@ -273,7 +272,7 @@ const Migrator = class
273
272
 
274
273
  createFinanceBackend: async label =>
275
274
  {
276
- const { data: finance } = await this.ApiAdapter.fetch('/erp/finance/backend', {
275
+ const { data: finance } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/finance/backend`, {
277
276
  method: 'POST',
278
277
  body: JSON.stringify({
279
278
  label,
@@ -312,12 +311,11 @@ const Migrator = class
312
311
  '/cmn/computed-queries/finance-export/backends',
313
312
  {
314
313
  method: 'POST',
315
- useInternalApi: true,
316
314
  body,
317
315
  },
318
316
  );
319
317
 
320
- const { data: finance } = await this.ApiAdapter.fetch(`/erp/finance/backend/${financeBackend?.data?.[0].id}`, {
318
+ const { data: finance } = await this.ApiAdapter.fetch(`/community/${this.app.version}/erp/finance/backend/${financeBackend?.data?.[0].id}`, {
321
319
  method: 'PUT',
322
320
  body: JSON.stringify({
323
321
  label,
@@ -337,7 +335,6 @@ const Migrator = class
337
335
  const { data: importMultipartPreset } = await this.app.erp.fetch(
338
336
  `/cmn/data-import/runs/multi-part/${id}`,
339
337
  {
340
- useInternalApi: true,
341
338
  method: 'PUT',
342
339
  body: JSON.stringify(importMultipartPresetTemplate),
343
340
  });
@@ -361,7 +358,6 @@ const Migrator = class
361
358
  const { data: existingGroups } = await this.ApiAdapter.fetch(
362
359
  '/cmn/computed-queries/scripting/script-module-groups',
363
360
  {
364
- useInternalApi: true,
365
361
  method: 'POST',
366
362
  body: {
367
363
  adhocPreset: {
@@ -391,7 +387,6 @@ const Migrator = class
391
387
  const { data: newGroup } = await this.ApiAdapter.fetch(
392
388
  '/cmn/scripting/module-groups',
393
389
  {
394
- useInternalApi: true,
395
390
  method: 'POST',
396
391
  body: { name: this.app.client.appIdentifier },
397
392
  },
@@ -402,7 +397,6 @@ const Migrator = class
402
397
  const { data: scriptModule } = await this.ApiAdapter.fetch(
403
398
  '/cmn/scripting/modules/presettings',
404
399
  {
405
- useInternalApi: true,
406
400
  method: 'POST',
407
401
  body: {
408
402
  name: triggerId,
@@ -417,9 +411,8 @@ const Migrator = class
417
411
  );
418
412
 
419
413
  await this.ApiAdapter.fetch(
420
- '/community/latest/cmn/system/app-scripting-proxy',
414
+ `/community/${this.app.version}/cmn/system/app-scripting-proxy`,
421
415
  {
422
- useInternalApi: true,
423
416
  method: 'POST',
424
417
  body: {
425
418
  appIdentifier: this.app.client.appIdentifier,
@@ -440,9 +433,8 @@ const Migrator = class
440
433
  }
441
434
 
442
435
  const { data: proxy } = await this.ApiAdapter.fetch(
443
- `/community/latest/cmn/system/app-scripting-proxy/${id}`,
436
+ `/community/${this.app.version}/cmn/system/app-scripting-proxy/${id}`,
444
437
  {
445
- useInternalApi: true,
446
438
  method: 'GET',
447
439
  },
448
440
  );
@@ -459,7 +451,6 @@ const Migrator = class
459
451
  const { data: existingScriptModule } = await this.ApiAdapter.fetch(
460
452
  `/cmn/scripting/modules/${scriptModuleId}/presettings`,
461
453
  {
462
- useInternalApi: true,
463
454
  method: 'GET',
464
455
  },
465
456
  );
@@ -467,7 +458,6 @@ const Migrator = class
467
458
  await this.ApiAdapter.fetch(
468
459
  `/cmn/scripting/modules/${scriptModuleId}/presettings`,
469
460
  {
470
- useInternalApi: true,
471
461
  method: 'PUT',
472
462
  body: {
473
463
  ...existingScriptModule,
package/utils/token.js CHANGED
@@ -100,7 +100,6 @@ async function refreshAppToken()
100
100
  const { data } = await app.erp.fetch(`/cmn/apps/${app.client.appIdentifier}/refresh-token`, {
101
101
  method: 'POST',
102
102
  body: appToken,
103
- useInternalApi: true,
104
103
  headers: {
105
104
  'Content-Type': 'text/plain',
106
105
  },