@gomusdev/web-components 1.33.1 → 1.35.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.
Files changed (40) hide show
  1. package/dist-js/components/couponRedemption/CouponRedemption.svelte.d.ts +1 -0
  2. package/dist-js/components/couponRedemption/entry.d.ts +0 -0
  3. package/dist-js/components/couponRedemption/lib.d.ts +2 -0
  4. package/dist-js/components/forms/ui/generic/FormDetails.svelte.d.ts +14 -1
  5. package/dist-js/components/forms/ui/specs/onsubmit.spec.d.ts +1 -0
  6. package/dist-js/components/profile/details/Details.spec.d.ts +1 -0
  7. package/dist-js/components/profile/details/Details.svelte.d.ts +1 -0
  8. package/dist-js/components/profile/entry.d.ts +0 -0
  9. package/dist-js/components/profile/overview/Overview.spec.d.ts +1 -0
  10. package/dist-js/components/profile/overview/Overview.svelte.d.ts +1 -0
  11. package/dist-js/components/profile/password/Password.spec.d.ts +1 -0
  12. package/dist-js/components/profile/password/Password.svelte.d.ts +1 -0
  13. package/dist-js/components/ticketSelection/TicketSelectionDetails.svelte.d.ts +4 -4
  14. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/{TicketSegmentDetails.svelte.d.ts → SegmentDetails.svelte.d.ts} +15 -6
  15. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/TicketSegmentEmpty.svelte.d.ts +1 -0
  16. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/annualTickets.svelte.d.ts +2 -2
  17. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/dayTickets.svelte.d.ts +2 -2
  18. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.spec.d.ts +1 -0
  19. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_ScaledPriceTickets.svelte.d.ts +2 -0
  20. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.d.ts +2 -0
  21. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/event_Tickets.svelte.spec.d.ts +1 -0
  22. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.spec.d.ts +1 -0
  23. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/events/events_ScaledPriceTickets.svelte.d.ts +2 -0
  24. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/timeslotTickets.svelte.d.ts +2 -2
  25. package/dist-js/factories/DateFactories.d.ts +161 -0
  26. package/dist-js/factories/ScalingPriceFactories.d.ts +11 -0
  27. package/dist-js/gomus-webcomponents.css +25 -36
  28. package/dist-js/gomus-webcomponents.iife.js +699 -237
  29. package/dist-js/gomus-webcomponents.js +699 -237
  30. package/dist-js/lib/models/cart/cart.svelte.d.ts +10 -2
  31. package/dist-js/lib/models/scalePrice/UIScaledPrice.svelte.d.ts +5 -5
  32. package/dist-js/lib/stores/auth.svelte.d.ts +1 -1
  33. package/dist-js/lib/stores/shop.svelte.d.ts +89 -3
  34. package/dist-js/mocks/MSWMocks.d.ts +1 -0
  35. package/dist-js/mocks/mocks.d.ts +15 -3
  36. package/package.json +1 -1
  37. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventScaledPriceTickets.svelte.d.ts +0 -2
  38. package/dist-js/components/ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventTickets.svelte.d.ts +0 -2
  39. /package/dist-js/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventScaledPriceTickets.spec.d.ts → couponRedemption/CouponRedemption.spec.d.ts} +0 -0
  40. /package/dist-js/components/{ticketSelection/subcomponents/tickets/subcomponents/segment/lib/event/eventTickets.svelte.spec.d.ts → forms/ui/specs/fill.spec.d.ts} +0 -0
@@ -2,6 +2,7 @@ import { CartItem, Product } from './types.ts';
2
2
  export type Cart = ReturnType<typeof createCart>;
3
3
  export declare function createCart(products?: Product[], contingent?: number): {
4
4
  items: CartItem[];
5
+ coupons: string[];
5
6
  contingent: number;
6
7
  uid: string;
7
8
  readonly nonEmptyItems: CartItem[];
@@ -33,7 +34,7 @@ export declare function createCart(products?: Product[], contingent?: number): {
33
34
  comment: null;
34
35
  reference: null;
35
36
  payment_mode_id: string;
36
- coupons: never[];
37
+ coupons: string[];
37
38
  donations: never[];
38
39
  affiliate: {};
39
40
  total: number;
@@ -44,10 +45,14 @@ export declare function createCart(products?: Product[], contingent?: number): {
44
45
  addItem(item: CartItem): void;
45
46
  addItems(items: CartItem[]): void;
46
47
  addProducts(products: Product[]): void;
48
+ addCoupon(token: string): void;
49
+ removeCoupon(token: string): void;
50
+ clearCoupons(): void;
47
51
  };
48
52
  export declare function formatCurrency(priceCents: number): string;
49
53
  export declare function createMainCart(): {
50
54
  items: CartItem[];
55
+ coupons: string[];
51
56
  contingent: number;
52
57
  uid: string;
53
58
  readonly nonEmptyItems: CartItem[];
@@ -79,7 +84,7 @@ export declare function createMainCart(): {
79
84
  comment: null;
80
85
  reference: null;
81
86
  payment_mode_id: string;
82
- coupons: never[];
87
+ coupons: string[];
83
88
  donations: never[];
84
89
  affiliate: {};
85
90
  total: number;
@@ -90,4 +95,7 @@ export declare function createMainCart(): {
90
95
  addItem(item: CartItem): void;
91
96
  addItems(items: CartItem[]): void;
92
97
  addProducts(products: Product[]): void;
98
+ addCoupon(token: string): void;
99
+ removeCoupon(token: string): void;
100
+ clearCoupons(): void;
93
101
  };
@@ -6,11 +6,11 @@ interface Options {
6
6
  quantity?: number;
7
7
  event_title: string;
8
8
  }
9
- type UIEventTicketTypes = 'scale';
10
- export declare function isUIEventTicket(x: Product): x is UIEventTicket;
11
- export type UIEventTicket = ReturnType<typeof createUIEventTicket>;
12
- export declare function createUIEventTicket(apiTicket: EventScalePriceTicket, dateId: number, options?: Options): {
13
- type: UIEventTicketTypes;
9
+ type UIScaledPricesTicketTypes = 'scale';
10
+ export declare function isUIScaledPricesTicket(x: Product): x is UIScaledPricesTicket;
11
+ export type UIScaledPricesTicket = ReturnType<typeof createUIScaledPricesTicket>;
12
+ export declare function createUIScaledPricesTicket(apiTicket: EventScalePriceTicket, dateId: number, options?: Options): {
13
+ type: UIScaledPricesTicketTypes;
14
14
  minAvailableCapacity: number;
15
15
  selectedTime: string;
16
16
  quantity: number;
@@ -1,7 +1,7 @@
1
1
  export declare class Auth {
2
2
  #private;
3
3
  constructor();
4
- customerLevel(): 20 | 10 | undefined;
4
+ customerLevel(): 10 | 20 | undefined;
5
5
  isAuthenticated(): boolean;
6
6
  isLoggedIn(): boolean;
7
7
  isGuest(): boolean;
@@ -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, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
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';
10
10
  export type ShopKind = 'angular' | 'jmb';
11
11
  export declare class Shop {
12
12
  #private;
@@ -88,6 +88,7 @@ export declare class Shop {
88
88
  };
89
89
  get cart(): {
90
90
  items: import('../models/cart/types').CartItem[];
91
+ coupons: string[];
91
92
  contingent: number;
92
93
  uid: string;
93
94
  readonly nonEmptyItems: import('../models/cart/types').CartItem[];
@@ -116,7 +117,7 @@ export declare class Shop {
116
117
  comment: null;
117
118
  reference: null;
118
119
  payment_mode_id: string;
119
- coupons: never[];
120
+ coupons: string[];
120
121
  donations: never[];
121
122
  affiliate: {};
122
123
  total: number;
@@ -127,6 +128,9 @@ export declare class Shop {
127
128
  addItem(item: import('../models/cart/types').CartItem): void;
128
129
  addItems(items: import('../models/cart/types').CartItem[]): void;
129
130
  addProducts(products: import('../models/cart/types').Product[]): void;
131
+ addCoupon(token: string): void;
132
+ removeCoupon(token: string): void;
133
+ clearCoupons(): void;
130
134
  } | undefined;
131
135
  get auth(): Auth;
132
136
  get currentUser(): User | undefined;
@@ -242,6 +246,7 @@ export declare class Shop {
242
246
  auth?: Auth;
243
247
  capacityManager?: CapacityManager;
244
248
  };
249
+ validateToken(): ValidateTokenResponse;
245
250
  ticketsCalendar(params: TicketsCalendarParams): CalendarDatesDepthAvailabilityStatus;
246
251
  calendar(params: TicketsCalendarParams): CalendarDates;
247
252
  ticketsAndQuotas(params: TicketsAndQuotasParams): {
@@ -300,6 +305,63 @@ export declare class Shop {
300
305
  }[];
301
306
  signIn(params: SignInParams): Promise<SignInResponse>;
302
307
  signUp(params: SignUpParams, asGuest?: boolean): Promise<SignUpResponse>;
308
+ getDates(query: {
309
+ q?: string;
310
+ by_bookable?: boolean;
311
+ by_museum_ids?: number[];
312
+ by_exhibition_ids?: number[];
313
+ by_event_ids?: number[];
314
+ by_language_ids?: number[];
315
+ by_category_ids?: number[];
316
+ by_catch_word_ids?: number[];
317
+ start_at?: string;
318
+ end_at?: string;
319
+ per_page?: number;
320
+ page?: number;
321
+ }): {
322
+ id?: number;
323
+ event_id?: number;
324
+ exhibition_id?: number | null;
325
+ museum_id?: number | null;
326
+ foreign_id?: number | null;
327
+ category?: import('@gomus/types').components["schemas"]["category"];
328
+ bookable?: boolean;
329
+ registerable?: boolean;
330
+ entry_fee?: number;
331
+ title?: string | null;
332
+ sub_title?: string | null;
333
+ description?: string | null;
334
+ meeting_point?: string | null;
335
+ event_title?: string;
336
+ event_sub_title?: string | null;
337
+ start_time?: string;
338
+ duration?: number;
339
+ vat_pct?: number;
340
+ seats?: {
341
+ min?: number;
342
+ max?: number;
343
+ booked?: number;
344
+ available?: number;
345
+ max_per_registration?: number | null;
346
+ overbook?: boolean;
347
+ };
348
+ created_at?: string;
349
+ updated_at?: string;
350
+ language?: import('@gomus/types').components["schemas"]["language"];
351
+ location?: import('@gomus/types').components["schemas"]["location"];
352
+ prices?: import('@gomus/types').components["schemas"]["price"][];
353
+ status?: "booked" | "cancelled";
354
+ discount?: number;
355
+ tax_included?: boolean;
356
+ seatings?: Record<string, never>[];
357
+ comment?: string | null;
358
+ guides?: Record<string, never>[] | null;
359
+ }[];
360
+ updatePassword(params: {
361
+ password: string;
362
+ password_confirmation: string;
363
+ current_password: string;
364
+ }): Promise<PasswordUpdateResponse>;
303
365
  passwordReset(params: {
304
366
  email: string;
305
367
  }): Promise<PasswordResetResponse>;
@@ -450,6 +512,14 @@ export declare class Shop {
450
512
  content: Record<string, never>;
451
513
  };
452
514
  getTicketCapacities(date: string, ticketIds: number[]): Promise<CapacitiesResponse>;
515
+ getCouponSaleByBarcode(token: string): {
516
+ id: number;
517
+ is_valid: boolean;
518
+ is_voucher_for: number | null;
519
+ value_cents: number;
520
+ value_action: string | null;
521
+ value: number | null;
522
+ };
453
523
  getEventDetailsOnDate(eventId: number, dateId: number): {
454
524
  id?: number;
455
525
  event_id?: number;
@@ -650,12 +720,28 @@ export declare class Shop {
650
720
  params?: Record<string, unknown>;
651
721
  requiredFields?: string[];
652
722
  }): Promise<T>;
723
+ apiPut<T>(path: string, options: {
724
+ body: Record<string, any>;
725
+ params?: Record<string, unknown>;
726
+ requiredFields?: string[];
727
+ }): Promise<T>;
728
+ apiDELETE<T>(path: string, options: {
729
+ body: Record<string, any>;
730
+ params?: Record<string, unknown>;
731
+ requiredFields?: string[];
732
+ }): Promise<T>;
733
+ apiCall<T>(path: string, options: {
734
+ method: 'POST' | 'PUT' | 'DELETE';
735
+ body: Record<string, any>;
736
+ params?: Record<string, unknown>;
737
+ requiredFields?: string[];
738
+ }): Promise<T>;
653
739
  /**
654
740
  * Executes the provided method asynchronously, waits for all dependent fetch operations to complete,
655
741
  * and returns the result of the method execution.
656
742
  */
657
743
  asyncFetch<T>(method: () => T): Promise<T>;
658
744
  waitForAllFetches(...variables: unknown[]): Promise<void>;
659
- apiGet(path: `/api${string}`, query?: Record<string, unknown>, pathOptions?: Record<string, unknown>): Promise<unknown>;
745
+ apiGet(path: `/api${string}`, query?: Record<string, unknown>, pathOptions?: Record<string, unknown>): Promise<{}>;
660
746
  }
661
747
  export declare const shop: Shop;
@@ -8,6 +8,7 @@ export declare const MSWMocks: {
8
8
  mockSignInFailure: () => void;
9
9
  mockOrderSuccess: () => void;
10
10
  mockSalutations: () => void;
11
+ mockLocales: () => void;
11
12
  mockAnnualOrder: () => void;
12
13
  mockCountries: () => void;
13
14
  mockPersonalizationFormSubmit: () => void;
@@ -1094,6 +1094,7 @@ export declare const UIAnnualTicketMocks: {
1094
1094
  export declare const CartMocks: {
1095
1095
  cartOneItem: () => {
1096
1096
  items: import('../lib/models/cart/types').CartItem[];
1097
+ coupons: string[];
1097
1098
  contingent: number;
1098
1099
  uid: string;
1099
1100
  readonly nonEmptyItems: import('../lib/models/cart/types').CartItem[];
@@ -1122,7 +1123,7 @@ export declare const CartMocks: {
1122
1123
  comment: null;
1123
1124
  reference: null;
1124
1125
  payment_mode_id: string;
1125
- coupons: never[];
1126
+ coupons: string[];
1126
1127
  donations: never[];
1127
1128
  affiliate: {};
1128
1129
  total: number;
@@ -1133,9 +1134,13 @@ export declare const CartMocks: {
1133
1134
  addItem(item: import('../lib/models/cart/types').CartItem): void;
1134
1135
  addItems(items: import('../lib/models/cart/types').CartItem[]): void;
1135
1136
  addProducts(products: import('../lib/models/cart/types').Product[]): void;
1137
+ addCoupon(token: string): void;
1138
+ removeCoupon(token: string): void;
1139
+ clearCoupons(): void;
1136
1140
  };
1137
1141
  cartTwoItems: () => {
1138
1142
  items: import('../lib/models/cart/types').CartItem[];
1143
+ coupons: string[];
1139
1144
  contingent: number;
1140
1145
  uid: string;
1141
1146
  readonly nonEmptyItems: import('../lib/models/cart/types').CartItem[];
@@ -1164,7 +1169,7 @@ export declare const CartMocks: {
1164
1169
  comment: null;
1165
1170
  reference: null;
1166
1171
  payment_mode_id: string;
1167
- coupons: never[];
1172
+ coupons: string[];
1168
1173
  donations: never[];
1169
1174
  affiliate: {};
1170
1175
  total: number;
@@ -1175,9 +1180,13 @@ export declare const CartMocks: {
1175
1180
  addItem(item: import('../lib/models/cart/types').CartItem): void;
1176
1181
  addItems(items: import('../lib/models/cart/types').CartItem[]): void;
1177
1182
  addProducts(products: import('../lib/models/cart/types').Product[]): void;
1183
+ addCoupon(token: string): void;
1184
+ removeCoupon(token: string): void;
1185
+ clearCoupons(): void;
1178
1186
  };
1179
1187
  cartThreeItems: () => {
1180
1188
  items: import('../lib/models/cart/types').CartItem[];
1189
+ coupons: string[];
1181
1190
  contingent: number;
1182
1191
  uid: string;
1183
1192
  readonly nonEmptyItems: import('../lib/models/cart/types').CartItem[];
@@ -1206,7 +1215,7 @@ export declare const CartMocks: {
1206
1215
  comment: null;
1207
1216
  reference: null;
1208
1217
  payment_mode_id: string;
1209
- coupons: never[];
1218
+ coupons: string[];
1210
1219
  donations: never[];
1211
1220
  affiliate: {};
1212
1221
  total: number;
@@ -1217,6 +1226,9 @@ export declare const CartMocks: {
1217
1226
  addItem(item: import('../lib/models/cart/types').CartItem): void;
1218
1227
  addItems(items: import('../lib/models/cart/types').CartItem[]): void;
1219
1228
  addProducts(products: import('../lib/models/cart/types').Product[]): void;
1229
+ addCoupon(token: string): void;
1230
+ removeCoupon(token: string): void;
1231
+ clearCoupons(): void;
1220
1232
  };
1221
1233
  };
1222
1234
  export declare const CartItemMocks: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.33.1",
7
+ "version": "1.35.0",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",
@@ -1,2 +0,0 @@
1
- import { TicketSegmentDetails } from '../../TicketSegmentDetails.svelte.ts';
2
- export declare function loadEventScaledPricesTickets(segment: TicketSegmentDetails): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { TicketSegmentDetails } from '../../TicketSegmentDetails.svelte.ts';
2
- export declare function loadEventTickets(segment: TicketSegmentDetails): Promise<void>;