@teamnovu/kit-shopware-composables 0.0.23 → 0.0.24

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.mjs CHANGED
@@ -69,10 +69,11 @@ const F = {
69
69
  body: e
70
70
  }
71
71
  ],
72
- detail: (e) => [
72
+ detail: (e, s) => [
73
73
  ...A.details(),
74
+ e,
74
75
  {
75
- body: e
76
+ body: s
76
77
  }
77
78
  ],
78
79
  search: (e) => [
@@ -914,7 +915,7 @@ function _t(e) {
914
915
  }
915
916
  const st = "readProductDetail post /product/{productId}";
916
917
  function rt(e, s) {
917
- const t = g(), n = A.detail(s);
918
+ const t = g(), n = A.detail(e, s);
918
919
  return C({
919
920
  queryKey: n,
920
921
  queryFn: async ({ signal: r }) => {
package/dist/keys.d.ts CHANGED
@@ -40,7 +40,7 @@ export declare const productKeys: {
40
40
  headlessDetail: (body: MaybeRef<unknown>) => readonly ["product", "detail", {
41
41
  readonly body: unknown;
42
42
  }];
43
- detail: (body: MaybeRef<unknown>) => readonly ["product", "detail", {
43
+ detail: (productId: MaybeRef<string>, body: MaybeRef<unknown>) => readonly ["product", "detail", MaybeRef<string>, {
44
44
  readonly body: unknown;
45
45
  }];
46
46
  search: (body: MaybeRef<unknown>) => readonly ["product", "search", {
@@ -4,10 +4,10 @@ import { UndefinedInitialQueryOptions, UseQueryReturnType } from '@tanstack/vue-
4
4
  import { BrandedResponse } from '@teamnovu/kit-shopware-api-client';
5
5
  import { Operations } from '..';
6
6
  declare const readProductDetailOperation = "readProductDetail post /product/{productId}";
7
- export declare function useReadProductDetailQueryOptions(productId: MaybeRef<string>, body?: OperationOptions<typeof readProductDetailOperation, 'params'>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "readProductDetail post /product/{productId}">, Error, BrandedResponse<Operations, "readProductDetail post /product/{productId}">, readonly ["product", "detail", {
7
+ export declare function useReadProductDetailQueryOptions(productId: MaybeRef<string>, body?: OperationOptions<typeof readProductDetailOperation, 'params'>): UndefinedInitialQueryOptions<BrandedResponse<Operations, "readProductDetail post /product/{productId}">, Error, BrandedResponse<Operations, "readProductDetail post /product/{productId}">, readonly ["product", "detail", MaybeRef<string>, {
8
8
  readonly body: unknown;
9
9
  }]> & {
10
- queryKey: readonly ["product", "detail", {
10
+ queryKey: readonly ["product", "detail", MaybeRef<string>, {
11
11
  readonly body: unknown;
12
12
  }] & {
13
13
  [dataTagSymbol]: BrandedResponse<Operations, "readProductDetail post /product/{productId}">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamnovu/kit-shopware-composables",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "A collection of composables for the Shopware API",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
package/src/keys.ts CHANGED
@@ -73,9 +73,10 @@ export const productKeys = {
73
73
  body,
74
74
  },
75
75
  ] as const,
76
- detail: (body: MaybeRef<unknown>) =>
76
+ detail: (productId: MaybeRef<string>, body: MaybeRef<unknown>) =>
77
77
  [
78
78
  ...productKeys.details(),
79
+ productId,
79
80
  {
80
81
  body,
81
82
  },
@@ -12,7 +12,7 @@ export function useReadProductDetailQueryOptions(
12
12
  body?: OperationOptions<typeof readProductDetailOperation, 'params'>,
13
13
  ) {
14
14
  const client = useShopwareQueryClient()
15
- const queryKey = productKeys.detail(body)
15
+ const queryKey = productKeys.detail(productId, body)
16
16
 
17
17
  return queryOptions({
18
18
  queryKey,