@vario-software/vario-app-framework-backend 2025.43.0 → 2025.44.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/migrator.js +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vario-software/vario-app-framework-backend",
3
- "version": "2025.43.0",
3
+ "version": "2025.44.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/migrator.js CHANGED
@@ -124,7 +124,7 @@ const Migrator = class
124
124
  await this.methods.log(`Webhook for destination "${destinationQueue}" deregistered\n`);
125
125
  },
126
126
 
127
- createSalesChannelBackend: async label =>
127
+ createSalesChannelBackend: async (label, validChannelTypes) =>
128
128
  {
129
129
  const { data: salesChannelBackend } = await this.ApiAdapter.fetch('/erp/sales-channels/backend', {
130
130
  method: 'POST',
@@ -132,6 +132,7 @@ const Migrator = class
132
132
  appId: this.app.client.appIdentifier,
133
133
  label,
134
134
  type: 'APP',
135
+ validChannelTypes,
135
136
  active: true,
136
137
  }),
137
138
  });
@@ -141,6 +142,18 @@ const Migrator = class
141
142
  return salesChannelBackend;
142
143
  },
143
144
 
145
+ changeSalesChannelBackend: async body =>
146
+ {
147
+ const { data: salesChannelBackend } = await this.ApiAdapter.fetch(`/erp/sales-channels/backend/${body.id}`, {
148
+ method: 'PUT',
149
+ body: JSON.stringify(body),
150
+ });
151
+
152
+ await this.methods.log(`Sales-Channel-Backend with id "${salesChannelBackend.id}" successfully updated\n`);
153
+
154
+ return salesChannelBackend;
155
+ },
156
+
144
157
  createSalesChannel: async (salesChannelBackend, label, description, channelType = 'ECOMMERCE') =>
145
158
  {
146
159
  const { data: salesChannel } = await this.ApiAdapter.fetch('/erp/sales-channels', {