@gomusdev/web-components 1.51.1 → 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 {};
@@ -5,6 +5,7 @@ export declare function createCart(products?: Product[], contingent?: number): {
5
5
  coupons: string[];
6
6
  contingent: number;
7
7
  uid: string;
8
+ paymentModeId: string | undefined;
8
9
  readonly nonEmptyItems: CartItem[];
9
10
  readonly totalPriceCents: number;
10
11
  readonly totalQuantity: number;
@@ -19,14 +20,14 @@ export declare function createCart(products?: Product[], contingent?: number): {
19
20
  shipped_with_merchandise_id: null;
20
21
  shipping_mode: string;
21
22
  id: number;
22
- time: string;
23
- quantity: number;
23
+ time: string | undefined;
24
+ quantity: number | undefined;
24
25
  } | {
25
26
  shipped_with_merchandise_id: null;
26
27
  shipping_mode: string;
27
28
  id: number;
28
29
  quantities: {
29
- [x: number]: number;
30
+ [x: number]: number | undefined;
30
31
  };
31
32
  };
32
33
  }[];
@@ -55,6 +56,7 @@ export declare function createMainCart(): {
55
56
  coupons: string[];
56
57
  contingent: number;
57
58
  uid: string;
59
+ paymentModeId: string | undefined;
58
60
  readonly nonEmptyItems: CartItem[];
59
61
  readonly totalPriceCents: number;
60
62
  readonly totalQuantity: number;
@@ -69,14 +71,14 @@ export declare function createMainCart(): {
69
71
  shipped_with_merchandise_id: null;
70
72
  shipping_mode: string;
71
73
  id: number;
72
- time: string;
73
- quantity: number;
74
+ time: string | undefined;
75
+ quantity: number | undefined;
74
76
  } | {
75
77
  shipped_with_merchandise_id: null;
76
78
  shipping_mode: string;
77
79
  id: number;
78
80
  quantities: {
79
- [x: number]: number;
81
+ [x: number]: number | undefined;
80
82
  };
81
83
  };
82
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;
@@ -77,6 +77,7 @@ export declare class Shop {
77
77
  coupons: string[];
78
78
  contingent: number;
79
79
  uid: string;
80
+ paymentModeId: string | undefined;
80
81
  readonly nonEmptyItems: import('../models/cart/types').CartItem[];
81
82
  readonly totalPriceCents: number;
82
83
  readonly totalQuantity: number;
@@ -88,14 +89,14 @@ export declare class Shop {
88
89
  shipped_with_merchandise_id: null;
89
90
  shipping_mode: string;
90
91
  id: number;
91
- time: string;
92
- quantity: number;
92
+ time: string | undefined;
93
+ quantity: number | undefined;
93
94
  } | {
94
95
  shipped_with_merchandise_id: null;
95
96
  shipping_mode: string;
96
97
  id: number;
97
98
  quantities: {
98
- [x: number]: number;
99
+ [x: number]: number | undefined;
99
100
  };
100
101
  };
101
102
  }[];
@@ -170,12 +171,10 @@ export declare class Shop {
170
171
  };
171
172
  };
172
173
  get payment_modes(): {
173
- [key: string]: {
174
- id: number;
175
- name: string;
176
- icons: string[];
177
- };
178
- };
174
+ id: number;
175
+ name: string;
176
+ icons: string[];
177
+ }[];
179
178
  get content(): {
180
179
  [key: string]: string;
181
180
  };
@@ -352,6 +351,7 @@ export declare class Shop {
352
351
  email: string;
353
352
  }): Promise<PasswordResetResponse>;
354
353
  checkout(params: CheckoutParams): Promise<CheckoutResponse>;
354
+ createCart(params: PostCartParams): Promise<PostCartResponse>;
355
355
  order(token: string): {
356
356
  id: number;
357
357
  billing_address_id: number;
@@ -499,7 +499,7 @@ export declare class Shop {
499
499
  id: number;
500
500
  is_valid: boolean;
501
501
  is_voucher_for: number | null;
502
- value_cents: number;
502
+ value_cents: number | null;
503
503
  value_action: string | null;
504
504
  value: number | null;
505
505
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.51.1",
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",