@teamnovu/kit-shopware-composables 0.0.11 → 0.0.13

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.
@@ -3,7 +3,6 @@ import { Schemas } from '../../query/types/operations';
3
3
  import { BrandedSchema } from '../types/schema';
4
4
  import { GenericRecord, components } from '../../../api-types/storeApiTypes';
5
5
  export declare function useOrderPayment(order: MaybeRef<Schemas['Order'] | null | undefined>): {
6
- isAsynchronous: ComputedRef<any>;
7
6
  activeTransaction: ComputedRef<{
8
7
  amount: {
9
8
  calculatedTaxes?: GenericRecord;
@@ -1,5 +1,6 @@
1
- import { Schemas, components } from '../../../api-types/storeApiTypes.d.ts';
1
+ import { Schemas } from '../../query/types/operations';
2
2
  import { ComputedRef, Ref } from 'vue';
3
+ import { BrandedSchema } from '../types/schema';
3
4
  import { TierPrice } from '@shopware/helpers';
4
5
  /**
5
6
  * The purpose of the `useProductPrice` function is to abstract the logic
@@ -9,53 +10,13 @@ import { TierPrice } from '@shopware/helpers';
9
10
  * @category Product
10
11
  */
11
12
  export declare function useProductPrice(product: Ref<Schemas['Product'] | undefined>): {
12
- price: ComputedRef<{
13
- apiAlias: "calculated_price";
14
- calculatedTaxes: {
15
- apiAlias: "cart_tax_calculated";
16
- price: number;
17
- tax: number;
18
- taxRate: number;
19
- }[];
20
- hasRange: boolean;
21
- listPrice: components["schemas"]["CartListPrice"] | null;
22
- netPrice: number;
23
- positionPrice: number;
24
- quantity: number;
25
- rawTotal: number;
26
- referencePrice: components["schemas"]["CartPriceReference"] | null;
27
- regulationPrice: {
28
- apiAlias?: "cart_regulation_price";
29
- price?: number;
30
- } | null;
31
- taxRules: {
32
- name?: string;
33
- taxRate?: number;
34
- }[];
35
- taxStatus: "net" | "tax-free";
36
- totalPrice: number;
37
- unitPrice: number;
38
- variantId?: string | null;
39
- } | undefined>;
13
+ price: ComputedRef<BrandedSchema<"CalculatedPrice"> | undefined>;
40
14
  totalPrice: ComputedRef<number | undefined>;
41
15
  unitPrice: ComputedRef<number | undefined>;
42
16
  displayFromVariants: ComputedRef<number | false | undefined>;
43
17
  displayFrom: ComputedRef<boolean>;
44
18
  tierPrices: ComputedRef< TierPrice[]>;
45
- referencePrice: ComputedRef<{
46
- apiAlias: "cart_price_reference";
47
- hasRange: boolean;
48
- listPrice: components["schemas"]["CartListPrice"] | null;
49
- price?: number;
50
- purchaseUnit?: number;
51
- referenceUnit?: number;
52
- regulationPrice: {
53
- apiAlias?: "cart_regulation_price";
54
- price?: number;
55
- } | null;
56
- unitName: string;
57
- variantId?: string | null;
58
- } | null | undefined>;
19
+ referencePrice: ComputedRef<BrandedSchema<"CartPriceReference"> | null | undefined>;
59
20
  isListPrice: ComputedRef<boolean>;
60
21
  regulationPrice: ComputedRef<number | undefined>;
61
22
  };