@gomusdev/web-components 1.52.0 → 1.53.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.
@@ -2,6 +2,11 @@ import { Product } from './types.ts';
2
2
  interface Options {
3
3
  quantity?: number;
4
4
  time?: string;
5
+ display: {
6
+ discounted: boolean;
7
+ reference_uuid: string;
8
+ originalPrice: number;
9
+ };
5
10
  }
6
11
  export declare function createCartItem<T extends Product>(product: T, options?: Partial<Options>): {
7
12
  type: import('./types.ts').ProductType;
@@ -13,14 +18,14 @@ export declare function createCartItem<T extends Product>(product: T, options?:
13
18
  shipped_with_merchandise_id: null;
14
19
  shipping_mode: string;
15
20
  id: number;
16
- time: string;
17
- quantity: number;
21
+ time: string | undefined;
22
+ quantity: number | undefined;
18
23
  } | {
19
24
  shipped_with_merchandise_id: null;
20
25
  shipping_mode: string;
21
26
  id: number;
22
27
  quantities: {
23
- [x: number]: number;
28
+ [x: number]: number | undefined;
24
29
  };
25
30
  };
26
31
  uuid: string;
@@ -32,7 +37,12 @@ export declare function createCartItem<T extends Product>(product: T, options?:
32
37
  final_price_formatted: string;
33
38
  total_price_cents: number;
34
39
  total_price_formatted: string;
35
- quantity: number;
36
- time: string;
40
+ quantity?: number | undefined;
41
+ time?: string | undefined;
42
+ display?: {
43
+ discounted: boolean;
44
+ reference_uuid: string;
45
+ originalPrice: number;
46
+ } | undefined;
37
47
  };
38
48
  export {};
@@ -20,14 +20,14 @@ export declare function createCart(products?: Product[], contingent?: number): {
20
20
  shipped_with_merchandise_id: null;
21
21
  shipping_mode: string;
22
22
  id: number;
23
- time: string;
24
- quantity: number;
23
+ time: string | undefined;
24
+ quantity: number | undefined;
25
25
  } | {
26
26
  shipped_with_merchandise_id: null;
27
27
  shipping_mode: string;
28
28
  id: number;
29
29
  quantities: {
30
- [x: number]: number;
30
+ [x: number]: number | undefined;
31
31
  };
32
32
  };
33
33
  }[];
@@ -71,14 +71,14 @@ export declare function createMainCart(): {
71
71
  shipped_with_merchandise_id: null;
72
72
  shipping_mode: string;
73
73
  id: number;
74
- time: string;
75
- quantity: number;
74
+ time: string | undefined;
75
+ quantity: number | undefined;
76
76
  } | {
77
77
  shipped_with_merchandise_id: null;
78
78
  shipping_mode: string;
79
79
  id: number;
80
80
  quantities: {
81
- [x: number]: number;
81
+ [x: number]: number | undefined;
82
82
  };
83
83
  };
84
84
  }[];
@@ -1,6 +1,5 @@
1
1
  import { Cart } from './cart.svelte.ts';
2
2
  import { CartItem } from './types.ts';
3
- export declare function updateLocalStorage(cart: Cart): string;
4
3
  /**
5
4
  * Generates a cart item based on the provided json object.
6
5
  *
@@ -6,7 +6,7 @@ import { Auth } from './auth.svelte.ts';
6
6
  import { User } from './user.svelte.ts';
7
7
  import { OpenApiClient } from '@gomus/api';
8
8
  import { TicketsAndQuotasParams, TicketsCalendarParams, TicketsParams } from '@gomus/api/lib/types.ts';
9
- import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, PasswordUpdateResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour, ValidateTokenResponse } from '@gomus/types';
9
+ import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour, ValidateTokenResponse } from '@gomus/types';
10
10
  export type ShopKind = 'angular' | 'jmb';
11
11
  export declare class Shop {
12
12
  #private;
@@ -89,14 +89,14 @@ export declare class Shop {
89
89
  shipped_with_merchandise_id: null;
90
90
  shipping_mode: string;
91
91
  id: number;
92
- time: string;
93
- quantity: number;
92
+ time: string | undefined;
93
+ quantity: number | undefined;
94
94
  } | {
95
95
  shipped_with_merchandise_id: null;
96
96
  shipping_mode: string;
97
97
  id: number;
98
98
  quantities: {
99
- [x: number]: number;
99
+ [x: number]: number | undefined;
100
100
  };
101
101
  };
102
102
  }[];
@@ -351,6 +351,7 @@ export declare class Shop {
351
351
  email: string;
352
352
  }): Promise<PasswordResetResponse>;
353
353
  checkout(params: CheckoutParams): Promise<CheckoutResponse>;
354
+ createCart(params: PostCartParams): Promise<PostCartResponse>;
354
355
  order(token: string): {
355
356
  id: number;
356
357
  billing_address_id: number;
@@ -498,7 +499,7 @@ export declare class Shop {
498
499
  id: number;
499
500
  is_valid: boolean;
500
501
  is_voucher_for: number | null;
501
- value_cents: number;
502
+ value_cents: number | null;
502
503
  value_action: string | null;
503
504
  value: number | null;
504
505
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.52.0",
7
+ "version": "1.53.0",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",
@@ -20,12 +20,12 @@
20
20
  "build": "vite build",
21
21
  "preview": "vite preview",
22
22
  "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json",
23
+ "open-test": "vite build && vite --open src/test.html",
23
24
  "=== W E B C O M P O N E N T S ===": "",
24
25
  "build-web-components-and-copy": "pnpm build-web-components; pnpm copy-web-components",
25
26
  "build-web-components": "vite build;",
26
27
  "copy-web-components": "cp ./dist-js/gomus-paypal.iife.js ../../../gomus-shop/src/assets/javascript",
27
28
  "build:standard-components": "pnpm vite -c vite.standard-components.config.ts build; cp dist-js/standard-components.js ../../../gomus-shop/src/assets/javascript",
28
- "open-test": "vite build && vite --open src/test.html",
29
29
  "=== E 2 E ===": "",
30
30
  "e2e:static": "vite build && npx playwright test --config=playwright-static.config.ts",
31
31
  "e2e:static:no-build": "npx playwright test --config=playwright-static.config.ts",