@gomusdev/web-components 3.10.2 → 3.12.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.
@@ -1,3 +1,6 @@
1
+ import { OrdersResult, ValidateTokenResult } from '../../lib/stores/shop.svelte.ts';
2
+ import { OrdersParams } from '@gomus/types';
3
+ export type { OrdersResult, ValidateTokenResult } from '../../lib/stores/shop.svelte.ts';
1
4
  export type Command = {
2
5
  method: 'load' | 'config' | 'init';
3
6
  options: Record<string, unknown>;
@@ -13,4 +16,14 @@ export declare const go: {
13
16
  api: string;
14
17
  locale: string;
15
18
  }) => Promise<void>;
19
+ api: {
20
+ getCustomer: () => Promise<ValidateTokenResult>;
21
+ getOrders: (params?: OrdersParams) => Promise<OrdersResult>;
22
+ };
16
23
  };
24
+ export type Go = typeof go;
25
+ declare global {
26
+ interface Window {
27
+ go?: Go;
28
+ }
29
+ }
@@ -6,8 +6,10 @@ import { Auth } from '../../../lib/stores/auth.svelte.ts';
6
6
  import { User } from '../../../lib/stores/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, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, TicketContentEntry, Tour, UploadPersonalizationPhotoResponse, ValidateTokenResponse, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
9
+ import { CapacitiesResponse, CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, OrdersParams, OrdersSuccess, PasswordResetResponse, PasswordUpdateResponse, PostCartParams, PostCartResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, TicketContentEntry, Tour, UploadPersonalizationPhotoResponse, ValidateTokenSuccess, WithdrawalParams, WithdrawalResponse } from '@gomus/types';
10
10
  export type ShopKind = 'angular' | 'jmb';
11
+ export type ValidateTokenResult = ValidateTokenSuccess | NotSignedIn | undefined;
12
+ export type OrdersResult = OrdersSuccess | NotSignedIn | undefined;
11
13
  type ParseAs = 'json' | 'text' | 'blob' | 'arrayBuffer' | 'stream';
12
14
  export declare class Shop {
13
15
  #private;
@@ -313,7 +315,8 @@ export declare class Shop {
313
315
  auth?: Auth;
314
316
  capacityManager?: CapacityManager;
315
317
  };
316
- validateToken(): ValidateTokenResponse;
318
+ getCustomer(): ValidateTokenResult;
319
+ getOrders(params?: OrdersParams): OrdersResult;
317
320
  ticketsCalendar(params: TicketsCalendarParams): CalendarDatesDepthAvailabilityStatus;
318
321
  calendar(params: TicketsCalendarParams): CalendarDates;
319
322
  ticketsAndQuotas(params: TicketsAndQuotasParams): {
@@ -1,5 +1,2 @@
1
- declare const app: {
2
- $on?(type: string, callback: (e: any) => void): () => void;
3
- $set?(props: Partial<Record<string, any>>): void;
4
- } & Record<string, any>;
1
+ declare const app: Record<string, any>;
5
2
  export default app;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "3.10.2",
7
+ "version": "3.12.0",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",