@tripian/core 9.1.29 → 9.1.32

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.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tripian/core",
3
- "version": "9.1.29",
3
+ "version": "9.1.32",
4
4
  "description": "Tripian Inc Web SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "dependencies": {
8
- "@tripian/model": "9.1.29",
8
+ "@tripian/model": "9.1.32",
9
9
  "adyen-encryption": "^0.1.1",
10
10
  "axios": "^0.19.1",
11
11
  "cross-fetch": "^3.1.6",
@@ -0,0 +1,47 @@
1
+ import { Providers } from '@tripian/model';
2
+ declare class API {
3
+ private static instance;
4
+ private axios;
5
+ private proxyURL;
6
+ private apiUrl;
7
+ private apiToken;
8
+ private apiSecret;
9
+ private static cache;
10
+ private readonly CACHE_DURATION;
11
+ constructor(apiUrl: string, apiToken: string, proxyURL: string);
12
+ static getInstance(apiUrl: string, apiToken: string, proxyURL: string): API;
13
+ /**
14
+ * Generates an HMAC-SHA256 signature for authentication.
15
+ */
16
+ private generateSignature;
17
+ /**
18
+ * Constructs headers for API requests.
19
+ */
20
+ private getHeaders;
21
+ private static getCacheKey;
22
+ private getFromCache;
23
+ private static setCache;
24
+ /**
25
+ * Fetches events based on latitude, longitude, and optional date filters.
26
+ */
27
+ events: (lat: number, lon: number, startDate?: string, endDate?: string) => Promise<Providers.Victory.Event[]>;
28
+ /**
29
+ * Fetches event details by event ID.
30
+ */
31
+ eventDetails: (eventid: string) => Promise<Providers.Victory.EventDetail>;
32
+ /**
33
+ * Fetches venue details by venue ID.
34
+ */
35
+ venue: (venueid: string) => Promise<Providers.Victory.Venue>;
36
+ /**
37
+ * Fetches list of ticket groups by event ID.
38
+ */
39
+ listTicketGroups: (eventid: string) => Promise<Providers.Victory.TicketResponse>;
40
+ /**
41
+ * Fetches ticket info by ticket ID.
42
+ */
43
+ ticketInfo: (ticketid: string) => Promise<Providers.Victory.TicketGroup>;
44
+ clientsCreate: (request: Providers.Victory.ClientsCreateRequest) => Promise<Providers.Victory.ClientsData>;
45
+ order: (request: Providers.Victory.ClientsCreateRequest) => Promise<Providers.Victory.OrdersResponse>;
46
+ }
47
+ export default API;