@shopware-ag/acceptance-test-suite 1.1.1 → 1.1.2

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/dist/index.d.mts CHANGED
@@ -484,9 +484,7 @@ declare const getThemeId: (technicalName: string, adminApiContext: AdminApiConte
484
484
  declare const getSalutationId: (salutationKey: string, adminApiContext: AdminApiContext) => Promise<string>;
485
485
  declare const getStateMachineId: (technicalName: string, adminApiContext: AdminApiContext) => Promise<string>;
486
486
  declare const getStateMachineStateId: (stateMachineId: string, adminApiContext: AdminApiContext) => Promise<string>;
487
- declare const getFlowId: (eventName: string, adminApiContext: AdminApiContext) => Promise<{
488
- id: string;
489
- }>;
487
+ declare const getFlowId: (flowName: string, adminApiContext: AdminApiContext) => Promise<string>;
490
488
  declare const getOrderTransactionId: (orderId: string, adminApiContext: AdminApiContext) => Promise<{
491
489
  id: string;
492
490
  }>;
package/dist/index.d.ts CHANGED
@@ -484,9 +484,7 @@ declare const getThemeId: (technicalName: string, adminApiContext: AdminApiConte
484
484
  declare const getSalutationId: (salutationKey: string, adminApiContext: AdminApiContext) => Promise<string>;
485
485
  declare const getStateMachineId: (technicalName: string, adminApiContext: AdminApiContext) => Promise<string>;
486
486
  declare const getStateMachineStateId: (stateMachineId: string, adminApiContext: AdminApiContext) => Promise<string>;
487
- declare const getFlowId: (eventName: string, adminApiContext: AdminApiContext) => Promise<{
488
- id: string;
489
- }>;
487
+ declare const getFlowId: (flowName: string, adminApiContext: AdminApiContext) => Promise<string>;
490
488
  declare const getOrderTransactionId: (orderId: string, adminApiContext: AdminApiContext) => Promise<{
491
489
  id: string;
492
490
  }>;
package/dist/index.mjs CHANGED
@@ -157,20 +157,19 @@ const getStateMachineStateId = async (stateMachineId, adminApiContext) => {
157
157
  const result = await resp.json();
158
158
  return result.data[0].id;
159
159
  };
160
- const getFlowId = async (eventName, adminApiContext) => {
161
- const resp = await adminApiContext.post("search-ids/flow", {
160
+ const getFlowId = async (flowName, adminApiContext) => {
161
+ const resp = await adminApiContext.post("./search/flow", {
162
162
  data: {
163
- query: [{
164
- query: {
165
- type: "contains",
166
- field: "flow.eventName",
167
- value: eventName
168
- }
163
+ limit: 1,
164
+ filter: [{
165
+ type: "equals",
166
+ field: "name",
167
+ value: flowName
169
168
  }]
170
169
  }
171
170
  });
172
171
  const result = await resp.json();
173
- return result.data[0];
172
+ return result.data[0].id;
174
173
  };
175
174
  const getOrderTransactionId = async (orderId, adminApiContext) => {
176
175
  const orderTransactionResponse = await adminApiContext.get(`order/${orderId}/transactions?_response`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",