@gomusdev/web-components 1.9.0 → 1.10.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.
@@ -28,6 +28,9 @@ declare const ANGULAR_URLS: {
28
28
  tours: () => string;
29
29
  toursGroup: typeof toursGroupUrl;
30
30
  cart: () => string;
31
+ annualTicketPersonalizationForm: (token: string, ticketSaleId: number) => string;
32
+ annualTicketPersonalizationList: (token: string) => string;
33
+ annualTicketPersonalizationFormSubmit: (token: string) => string;
31
34
  };
32
35
  export declare function shopUrlProvider(type: 'angular' | 'jmb'): {
33
36
  account: () => string;
@@ -58,6 +61,9 @@ export declare function shopUrlProvider(type: 'angular' | 'jmb'): {
58
61
  tours: () => string;
59
62
  toursGroup: typeof toursGroupUrl;
60
63
  cart: () => string;
64
+ annualTicketPersonalizationForm: (token: string, ticketSaleId: number) => string;
65
+ annualTicketPersonalizationList: (token: string) => string;
66
+ annualTicketPersonalizationFormSubmit: (token: string) => string;
61
67
  };
62
68
  declare function eventGroupUrl(id: number): string;
63
69
  declare function toursGroupUrl(id: number): string;
@@ -3,7 +3,7 @@ import { ShopUrls } from '../helpers/urls';
3
3
  import { User } from './user.svelte.ts';
4
4
  import { OpenApiClient } from '@gomus/api';
5
5
  import { TicketsAndQuotasParams, TicketsCalendarParams, TicketsParams } from '@gomus/api/lib/types.ts';
6
- import { CheckoutParams, CheckoutResponse, Country, Event, Exhibition, LocaleOptions, Merchandise, Museum, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
6
+ import { CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
7
7
  export type ShopKind = 'angular' | 'jmb';
8
8
  export declare class Shop {
9
9
  #private;
@@ -188,6 +188,72 @@ export declare class Shop {
188
188
  signIn(params: SignInParams): Promise<SignInResponse>;
189
189
  signUp(params: SignUpParams, asGuest?: boolean): Promise<SignUpResponse>;
190
190
  checkout(params: CheckoutParams): Promise<CheckoutResponse>;
191
+ order(token: string): {
192
+ id: number;
193
+ billing_address_id: number;
194
+ shipping_address_id: number | null;
195
+ korona_customer_number: string | null;
196
+ cash_point_comment: string | null;
197
+ customer_comment: string | null;
198
+ token: string;
199
+ is_valid: boolean;
200
+ total_price_cents: number;
201
+ payment_status: number;
202
+ comment: string | null;
203
+ reference: string | null;
204
+ rating: string | null;
205
+ invoice: boolean;
206
+ updateable_by_cash_point: boolean;
207
+ canceled: boolean;
208
+ splitable: boolean;
209
+ reserved_until: string | null;
210
+ created_at: string;
211
+ canceled_at: string | null;
212
+ source: string;
213
+ payment_mode: {
214
+ id?: number;
215
+ name?: string;
216
+ };
217
+ payment: {
218
+ payment_id?: number | null;
219
+ provider_id?: number | null;
220
+ provider_name?: string | null;
221
+ message?: string | null;
222
+ };
223
+ donations: {
224
+ id: number;
225
+ donation_cents: number;
226
+ }[];
227
+ customer: import('@gomus/types').components["schemas"]["customer"];
228
+ items: {
229
+ id: number;
230
+ type: string;
231
+ splitable?: boolean;
232
+ price_cents: number;
233
+ vat_pct: number;
234
+ tax_included: boolean;
235
+ canceled: boolean;
236
+ attributes: import('@gomus/types').components["schemas"]["ticket_sale"] | import('@gomus/types').components["schemas"]["coupon_sale"];
237
+ }[];
238
+ };
239
+ annualOrder(token: string): {
240
+ id: number;
241
+ token: string;
242
+ shipping_address_id: number;
243
+ customer: {
244
+ id: number;
245
+ name: string;
246
+ surname: string;
247
+ email: string;
248
+ customer_salutation_id: number | null;
249
+ personalization_token: string;
250
+ date_of_birth: string | null;
251
+ language_id: number | null;
252
+ addresses: import('@gomus/types').components["schemas"]["address"][];
253
+ };
254
+ ticket_sales: import('@gomus/types').components["schemas"]["ticket_sale_personalization"][];
255
+ } | undefined;
256
+ finalizePersonalizations(token: string, params: FinalizePersonalizationParams): Promise<FinalizePersonalizationResponse>;
191
257
  /**
192
258
  * Returns a reactive value that will contain the fetched data, no need to await.
193
259
  *
@@ -202,6 +268,7 @@ export declare class Shop {
202
268
  fetchAndCache<T>(endpoint: `/api${string}`, dataKey: string, responseKey: string, options?: {
203
269
  query?: Record<string, unknown>;
204
270
  cache?: number | undefined;
271
+ path?: Record<string, unknown>;
205
272
  }): T;
206
273
  get museums(): {
207
274
  id: number;
@@ -407,11 +474,14 @@ export declare class Shop {
407
474
  tours: () => string;
408
475
  toursGroup: (id: number) => string;
409
476
  cart: () => string;
477
+ annualTicketPersonalizationForm: (token: string, ticketSaleId: number) => string;
478
+ annualTicketPersonalizationList: (token: string) => string;
479
+ annualTicketPersonalizationFormSubmit: (token: string) => string;
410
480
  } | undefined;
411
481
  apiPost<T>(path: string, { body }: {
412
482
  body: Record<string, any>;
413
- }): Promise<T>;
483
+ }, params?: Record<string, unknown>): Promise<T>;
414
484
  waitForAllFetches(...variables: unknown[]): Promise<void>;
415
- apiGet(path: `/api${string}`, query?: Record<string, unknown>): Promise<unknown>;
485
+ apiGet(path: `/api${string}`, query?: Record<string, unknown>, pathOptions?: Record<string, unknown>): Promise<unknown>;
416
486
  }
417
487
  export declare const shop: Shop;
@@ -1755,4 +1755,83 @@ export function getGetTourCategories200Response(): {
1755
1755
  filtername: string;
1756
1756
  }[];
1757
1757
  };
1758
+ export function getAnnualOrder200Response(): {
1759
+ order: {
1760
+ id: number;
1761
+ token: string;
1762
+ customer: {
1763
+ id: number;
1764
+ name: string;
1765
+ surname: string;
1766
+ email: string;
1767
+ customer_salutation_id: number;
1768
+ personalization_token: string;
1769
+ date_of_birth: string;
1770
+ language_id: number;
1771
+ addresses: {
1772
+ id: number;
1773
+ zip: string;
1774
+ street: string;
1775
+ country_id: number;
1776
+ city: string;
1777
+ }[];
1778
+ };
1779
+ shipping_address_id: number;
1780
+ ticket_sales: {
1781
+ id: number;
1782
+ title: string;
1783
+ description: string;
1784
+ start_at: string;
1785
+ sent_at: null;
1786
+ status: string;
1787
+ auto_send: boolean;
1788
+ is_personalizable: boolean;
1789
+ reminder_enabled: boolean;
1790
+ photo_mandatory: string;
1791
+ personalizations: {
1792
+ id: number;
1793
+ ready: boolean;
1794
+ customer: null;
1795
+ address_id: null;
1796
+ reminder_enabled: boolean;
1797
+ dispatch_mode_id: null;
1798
+ photo_url: string;
1799
+ }[];
1800
+ }[];
1801
+ };
1802
+ };
1803
+ export function postAnnualTicketsFinalize200Response(): {
1804
+ data: {
1805
+ ticket_sales: {
1806
+ id: number;
1807
+ title: string;
1808
+ description: string;
1809
+ start_at: string;
1810
+ sent_at: null;
1811
+ status: string;
1812
+ auto_send: boolean;
1813
+ is_personalizable: boolean;
1814
+ reminder_enabled: boolean;
1815
+ photo_mandatory: string;
1816
+ personalizations: {
1817
+ id: number;
1818
+ ready: boolean;
1819
+ customer: {
1820
+ customer_salutation_id: null;
1821
+ date_of_birth: null;
1822
+ email: string;
1823
+ id: number;
1824
+ language_id: number;
1825
+ name: string;
1826
+ personalization_token: string;
1827
+ surname: string;
1828
+ };
1829
+ address_id: null;
1830
+ reminder_enabled: boolean;
1831
+ dispatch_mode_id: null;
1832
+ photo_url: string;
1833
+ }[];
1834
+ };
1835
+ };
1836
+ };
1758
1837
  export const handlers: import('msw').HttpHandler[];
@@ -8,4 +8,7 @@ export declare const MSWMocks: {
8
8
  mockSignInFailure: () => void;
9
9
  mockOrderSuccess: () => void;
10
10
  mockSalutations: () => void;
11
+ mockAnnualOrder: () => void;
12
+ mockCountries: () => void;
13
+ mockPersonalizationFormSubmit: () => void;
11
14
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.9.0",
7
+ "version": "1.10.0",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",