@teamnovu/kit-shopware-composables 0.0.28 → 0.0.29

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.
@@ -1,9 +1,11 @@
1
1
  import { MaybeRef, ComputedRef } from 'vue';
2
+ import { OperationOptions } from '../../query';
2
3
  import { BrandedSchema } from '../types/schema';
3
4
  import { UseQueryReturnType } from '@tanstack/vue-query';
4
5
  import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
5
6
  import { Operations } from '../..';
6
- export declare function useOrderDetails(orderId: MaybeRef<string>, criteria?: BrandedSchema<'Criteria'>): {
7
+ type Criteria = OperationOptions<'readOrder post /order'>;
8
+ export declare function useOrderDetails(orderId: MaybeRef<string>, criteria?: Criteria): {
7
9
  order: ComputedRef<BrandedSchema<"Order"> | undefined>;
8
10
  status: ComputedRef<string | undefined>;
9
11
  statusTechnicalName: ComputedRef<string | undefined>;
@@ -22,3 +24,4 @@ export declare function useOrderDetails(orderId: MaybeRef<string>, criteria?: Br
22
24
  paymentChangeable: ComputedRef<boolean>;
23
25
  orderQuery: UseQueryReturnType<BrandedResponse<Operations, "readOrder post /order">, Error>;
24
26
  };
27
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-shopware-composables",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "A collection of composables for the Shopware API",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -1,11 +1,14 @@
1
1
  import type { MaybeRef } from 'vue'
2
2
  import { computed, unref } from 'vue'
3
+ import type { OperationOptions } from '../../query'
3
4
  import { useReadOrderQuery } from '../../query/order'
4
5
  import type { BrandedSchema } from '../types/schema'
5
6
 
7
+ type Criteria = OperationOptions<'readOrder post /order'>
8
+
6
9
  export function useOrderDetails(
7
10
  orderId: MaybeRef<string>,
8
- criteria?: BrandedSchema<'Criteria'>,
11
+ criteria?: Criteria,
9
12
  ) {
10
13
  // Create reactive order query options
11
14
  const orderQueryOptions = computed(() => {
@@ -23,8 +26,8 @@ export function useOrderDetails(
23
26
  ],
24
27
  ...criteria,
25
28
  checkPromotion: true,
26
- } as BrandedSchema<'Criteria'>,
27
- }
29
+ },
30
+ } as Criteria
28
31
  })
29
32
 
30
33
  // Create order query