@tripian/core 4.2.0 → 4.6.1

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,66 +1,28 @@
1
- {
2
- "name": "@tripian/core",
3
- "version": "4.02.000",
4
- "description": "Tripian Inc Web SDK",
5
- "main": "index.js",
6
- "types": "index.d.ts",
7
- "scripts": {
8
- "npm": "npm publish --access public"
9
- },
10
- "dependencies": {
11
- "@tripian/model": "4.02.000",
12
- "adyen-encryption": "^0.1.1",
13
- "axios": "^0.19.1",
14
- "moment": "^2.29.0"
15
- },
16
- "devDependencies": {
17
- "@babel/cli": "^7.7.7",
18
- "@babel/core": "^7.7.7",
19
- "@babel/preset-env": "^7.7.7",
20
- "@babel/preset-typescript": "^7.10.4",
21
- "@tripian/eslint-config-tripian": "^1.1.0",
22
- "@types/jest": "^26.0.13",
23
- "@types/node": "^13.1.7",
24
- "@types/npm": "^2.0.31",
25
- "@typescript-eslint/eslint-plugin": "^2.16.0",
26
- "babel-jest": "^24.9.0",
27
- "babel-loader": "^8.0.6",
28
- "eslint": "^6.8.0",
29
- "eslint-config-airbnb": "^18.0.1",
30
- "eslint-config-airbnb-typescript": "^6.3.1",
31
- "eslint-config-prettier": "^6.9.0",
32
- "eslint-plugin-import": "^2.20.0",
33
- "eslint-plugin-jest": "^23.6.0",
34
- "eslint-plugin-jsx-a11y": "^6.2.3",
35
- "eslint-plugin-prettier": "^3.1.2",
36
- "eslint-plugin-react": "^7.17.0",
37
- "eslint-plugin-react-hooks": "^2.3.0",
38
- "jest": "^24.9.0",
39
- "prettier": "^1.19.1",
40
- "ts-loader": "^6.2.1",
41
- "typedoc": "^0.19.1",
42
- "typedoc-plugin-external-module-name": "^4.0.3",
43
- "typescript": "^4.0.2",
44
- "webpack": "^4.41.5",
45
- "webpack-cli": "^3.3.10"
46
- },
47
- "keywords": [
48
- "tripian",
49
- "core",
50
- "web sdk"
51
- ],
52
- "repository": {
53
- "type": "git",
54
- "url": "git+https://github.com/Tripian-inc/ui-tripian-core.git"
55
- },
56
- "author": "Penguen Umut",
57
- "license": "MIT",
58
- "bugs": {
59
- "url": "https://github.com/Tripian-inc/ui-tripian-core/issues"
60
- },
61
- "homepage": "https://tripian-inc.github.io/ui-tripian-core/globals.html",
62
- "eslintConfig": {
63
- "extends": "@tripian/eslint-config-tripian"
64
- },
65
- "prettier": "@tripian/eslint-config-tripian/prettier.js"
66
- }
1
+ {
2
+ "name": "@tripian/core",
3
+ "version": "4.6.1",
4
+ "description": "Tripian Inc Web SDK",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "dependencies": {
8
+ "@tripian/model": "4.6.0",
9
+ "adyen-encryption": "^0.1.1",
10
+ "axios": "^0.19.1",
11
+ "moment": "^2.29.0"
12
+ },
13
+ "keywords": [
14
+ "tripian",
15
+ "core",
16
+ "web sdk"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/Tripian-inc/ui-tripian-core.git"
21
+ },
22
+ "author": "Penguen Umut",
23
+ "license": "MIT",
24
+ "bugs": {
25
+ "url": "https://github.com/Tripian-inc/ui-tripian-core/issues"
26
+ },
27
+ "homepage": "https://tripian-inc.github.io/ui-tripian-core/globals.html"
28
+ }
@@ -1,19 +1,20 @@
1
- import { Providers } from '@tripian/model';
2
- declare class API {
3
- private axios;
4
- private sandbox;
5
- private apiKey;
6
- private token;
7
- private tripianProxyURL;
8
- private sandboxUrl;
9
- private sandboxApiKey;
10
- private prodUrl;
11
- private prodApiKey;
12
- constructor(sandbox?: boolean);
13
- private getImgUrl;
14
- login: () => Promise<void>;
15
- searchActivities: (startDate: string, endDate: string) => Promise<Providers.Bb.SearchActivitiesResponse>;
16
- activityInfo: (offerKey: string) => Promise<Providers.Bb.ActivityInfo>;
17
- searchAccommodation: (startDate: string, endDate: string, adults: number, bounds: number[]) => Promise<Providers.Bb.SearchAccommodationResponse>;
18
- }
19
- export default API;
1
+ import { Providers } from '@tripian/model';
2
+ declare class API {
3
+ private axios;
4
+ private sandbox;
5
+ private apiKey;
6
+ private token;
7
+ private tripianProxyURL;
8
+ private sandboxUrl;
9
+ private sandboxApiKey;
10
+ private prodUrl;
11
+ private prodApiKey;
12
+ constructor(sandbox?: boolean);
13
+ private getImgUrl;
14
+ login: () => Promise<void>;
15
+ searchActivities: (startDate: string, endDate: string) => Promise<Providers.Bb.SearchActivitiesResponse>;
16
+ activityInfo: (offerKey: string) => Promise<Providers.Bb.ActivityInfo>;
17
+ searchAccommodation: (startDate: string, endDate: string, adults: number, bounds: number[]) => Promise<Providers.Bb.SearchAccommodationResponse>;
18
+ searchCarRent: (pickUpDateTime: string, dropOffDateTime: string, driverAge?: number, pickUpCityId?: number, dropOffCityId?: number) => Promise<Providers.Bb.SearchCarRentOffer[]>;
19
+ }
20
+ export default API;
@@ -1,15 +1,15 @@
1
- import { Providers } from '@tripian/model';
2
- declare class API {
3
- private axios;
4
- private baseURL;
5
- private tripianTravelerXApiKey;
6
- private tripianFakeDeviceId;
7
- private sandbox;
8
- private token?;
9
- constructor(sandbox?: boolean);
10
- login: () => Promise<Providers.Glx.Token>;
11
- checkLogin: () => Promise<boolean>;
12
- booking: (id: string) => Promise<Providers.Glx.Booking>;
13
- catalog: (cityName: string, demo?: boolean) => Promise<Providers.Glx.Catalog>;
14
- }
15
- export default API;
1
+ import { Providers } from '@tripian/model';
2
+ declare class API {
3
+ private axios;
4
+ private baseURL;
5
+ private tripianTravelerXApiKey;
6
+ private tripianFakeDeviceId;
7
+ private sandbox;
8
+ private token?;
9
+ constructor(sandbox?: boolean);
10
+ login: () => Promise<Providers.Glx.Token>;
11
+ checkLogin: () => Promise<boolean>;
12
+ booking: (id: string) => Promise<Providers.Glx.Booking>;
13
+ catalog: (cityName: string, demo?: boolean) => Promise<Providers.Glx.Catalog>;
14
+ }
15
+ export default API;
@@ -1,3 +1,3 @@
1
- declare const montrealCatalogExcludeItemIds: string[];
2
- declare const catalogGroupsApprovedTitles: string[];
3
- export { montrealCatalogExcludeItemIds, catalogGroupsApprovedTitles };
1
+ declare const montrealCatalogExcludeItemIds: string[];
2
+ declare const catalogGroupsApprovedTitles: string[];
3
+ export { montrealCatalogExcludeItemIds, catalogGroupsApprovedTitles };
@@ -1,8 +1,8 @@
1
- import { AxiosError } from 'axios';
2
- interface GlxErrorResponse {
3
- errorCode: number;
4
- errorMessage: string;
5
- traceId: string;
6
- }
7
- declare const handleHttpResponseErrorForGlx: (errorResponse: AxiosError<GlxErrorResponse>, dataKey: string, params?: any) => never;
8
- export { handleHttpResponseErrorForGlx };
1
+ import { AxiosError } from 'axios';
2
+ interface GlxErrorResponse {
3
+ errorCode: number;
4
+ errorMessage: string;
5
+ traceId: string;
6
+ }
7
+ declare const handleHttpResponseErrorForGlx: (errorResponse: AxiosError<GlxErrorResponse>, dataKey: string, params?: any) => never;
8
+ export { handleHttpResponseErrorForGlx };
@@ -1,25 +1,25 @@
1
- import Model, { Providers } from '@tripian/model';
2
- declare class API {
3
- private axios;
4
- private tripianProxyURL;
5
- private baseURL;
6
- private baseURL_TEST;
7
- private access_token_test;
8
- private access_token_prod;
9
- constructor(test?: boolean);
10
- categories: (limit?: number, language?: string, currency?: string) => Promise<Providers.Gyg.Category[]>;
11
- category: (categoryId: number, language?: string, currency?: string) => Promise<Providers.Gyg.Category>;
12
- tours: (cityName: string, cityCoordinate?: Model.Coordinate | undefined, radius?: number, date?: Providers.Gyg.TourDateRange | undefined, categoryIds?: number[] | undefined, unique?: boolean, limit?: number, preformatted?: string, language?: string, currency?: string) => Promise<Providers.Gyg.CatalogGroup[]>;
13
- tour: (tourId: number, language?: string, currency?: string, preformatted?: string) => Promise<Providers.Gyg.Tour>;
14
- tourAvailabilities: (tourId: number, startDate: string, endDate?: string | undefined, language?: string, currency?: string) => Promise<Providers.Gyg.TourAvailability[]>;
15
- options: (tourId: number, language?: string, currency?: string) => Promise<Providers.Gyg.TourOption[]>;
16
- optionAvailabilities: (optionId: number, startDate: string, endDate?: string | undefined, language?: string, currency?: string) => Promise<Providers.Gyg.TourAvailability[]>;
17
- optionPricings: (optionId: number, language?: string, currency?: string) => Promise<Providers.Gyg.TourOptionPricing>;
18
- bookingAdd: (tourBookingRequest: Providers.Gyg.TourBookingRequest) => Promise<Providers.Gyg.TourBooking>;
19
- booking: (bookingHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBookingInfo[]>;
20
- bookingDelete: (bookingHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBooking[]>;
21
- cartAdd: (tourBookingCartRequest: Providers.Gyg.TourBookingCartRequest) => Promise<Providers.Gyg.TourBookingCart>;
22
- cart: (shoppingCartHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBookingCart>;
23
- paymentConfiguration: (language?: string, currency?: string, country?: string) => Promise<Providers.Gyg.PaymentConfiguration[]>;
24
- }
25
- export default API;
1
+ import Model, { Providers } from '@tripian/model';
2
+ declare class API {
3
+ private axios;
4
+ private tripianProxyURL;
5
+ private baseURL;
6
+ private baseURL_TEST;
7
+ private access_token_test;
8
+ private access_token_prod;
9
+ constructor(test?: boolean);
10
+ categories: (limit?: number, language?: string, currency?: string) => Promise<Providers.Gyg.Category[]>;
11
+ category: (categoryId: number, language?: string, currency?: string) => Promise<Providers.Gyg.Category>;
12
+ tours: (cityName: string, cityCoordinate?: Model.Coordinate, radius?: number, date?: Providers.Gyg.TourDateRange, categoryIds?: number[], unique?: boolean, limit?: number, preformatted?: string, language?: string, currency?: string) => Promise<Providers.Gyg.CatalogGroup[]>;
13
+ tour: (tourId: number, language?: string, currency?: string, preformatted?: string) => Promise<Providers.Gyg.Tour>;
14
+ tourAvailabilities: (tourId: number, startDate: string, endDate?: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourAvailability[]>;
15
+ options: (tourId: number, language?: string, currency?: string) => Promise<Providers.Gyg.TourOption[]>;
16
+ optionAvailabilities: (optionId: number, startDate: string, endDate?: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourAvailability[]>;
17
+ optionPricings: (optionId: number, language?: string, currency?: string) => Promise<Providers.Gyg.TourOptionPricing>;
18
+ bookingAdd: (tourBookingRequest: Providers.Gyg.TourBookingRequest) => Promise<Providers.Gyg.TourBooking>;
19
+ booking: (bookingHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBookingInfo[]>;
20
+ bookingDelete: (bookingHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBooking[]>;
21
+ cartAdd: (tourBookingCartRequest: Providers.Gyg.TourBookingCartRequest) => Promise<Providers.Gyg.TourBookingCart>;
22
+ cart: (shoppingCartHash: string, language?: string, currency?: string) => Promise<Providers.Gyg.TourBookingCart>;
23
+ paymentConfiguration: (language?: string, currency?: string, country?: string) => Promise<Providers.Gyg.PaymentConfiguration[]>;
24
+ }
25
+ export default API;
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const allCategories: Providers.Gyg.Category[];
3
- export default allCategories;
1
+ import { Providers } from '@tripian/model';
2
+ declare const allCategories: Providers.Gyg.Category[];
3
+ export default allCategories;
@@ -1,6 +1,6 @@
1
- declare const uniqueTour = false;
2
- declare const titleCategoryIds: {
3
- title: string;
4
- categoryIds: number[];
5
- }[];
6
- export { uniqueTour, titleCategoryIds };
1
+ declare const uniqueTour = false;
2
+ declare const titleCategoryIds: {
3
+ title: string;
4
+ categoryIds: number[];
5
+ }[];
6
+ export { uniqueTour, titleCategoryIds };
@@ -1,16 +1,16 @@
1
- import { AxiosError } from 'axios';
2
- interface GygErrorResponse {
3
- apiVersion: string;
4
- date: string;
5
- descriptor: string;
6
- errors: {
7
- errorCode: number;
8
- errorMessage: string;
9
- }[];
10
- helpURL: string;
11
- method: string;
12
- query: string;
13
- status: string;
14
- }
15
- declare const handleHttpResponseErrorForGyg: (errorResponse: AxiosError<GygErrorResponse>, dataKey: string, params?: any) => never;
16
- export { handleHttpResponseErrorForGyg };
1
+ import { AxiosError } from 'axios';
2
+ interface GygErrorResponse {
3
+ apiVersion: string;
4
+ date: string;
5
+ descriptor: string;
6
+ errors: {
7
+ errorCode: number;
8
+ errorMessage: string;
9
+ }[];
10
+ helpURL: string;
11
+ method: string;
12
+ query: string;
13
+ status: string;
14
+ }
15
+ declare const handleHttpResponseErrorForGyg: (errorResponse: AxiosError<GygErrorResponse>, dataKey: string, params?: any) => never;
16
+ export { handleHttpResponseErrorForGyg };
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const mockTour: Providers.Gyg.Tour;
3
- export default mockTour;
1
+ import { Providers } from '@tripian/model';
2
+ declare const mockTour: Providers.Gyg.Tour;
3
+ export default mockTour;
@@ -1,16 +1,16 @@
1
- import { Providers } from '@tripian/model';
2
- declare class API {
3
- private axios;
4
- private baseURL;
5
- private sandboxToken;
6
- private prodToken;
7
- private sandbox;
8
- constructor(sandbox?: boolean);
9
- business: (id: string) => Promise<Providers.Yelp.Business>;
10
- openings: (openings: Providers.Yelp.OpeningsRequest) => Promise<Providers.Yelp.Openings>;
11
- hold: (hold: Providers.Yelp.HoldRequest) => Promise<Providers.Yelp.Hold>;
12
- reservationStatus: (reservationId: string) => Promise<Providers.Yelp.ReservationStatusResponse>;
13
- reservationCancel: (reservationId: string) => Promise<any>;
14
- reservation: (reservation: Providers.Yelp.ReservationRequest) => Promise<Providers.Yelp.Reservation>;
15
- }
16
- export default API;
1
+ import { Providers } from '@tripian/model';
2
+ declare class API {
3
+ private axios;
4
+ private baseURL;
5
+ private sandboxToken;
6
+ private prodToken;
7
+ private sandbox;
8
+ constructor(sandbox?: boolean);
9
+ business: (id: string) => Promise<Providers.Yelp.Business>;
10
+ openings: (openings: Providers.Yelp.OpeningsRequest) => Promise<Providers.Yelp.Openings>;
11
+ hold: (hold: Providers.Yelp.HoldRequest) => Promise<Providers.Yelp.Hold>;
12
+ reservationStatus: (reservationId: string) => Promise<Providers.Yelp.ReservationStatusResponse>;
13
+ reservationCancel: (reservationId: string) => Promise<any>;
14
+ reservation: (reservation: Providers.Yelp.ReservationRequest) => Promise<Providers.Yelp.Reservation>;
15
+ }
16
+ export default API;
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const testBusiness: Providers.Yelp.Business;
3
- export default testBusiness;
1
+ import { Providers } from '@tripian/model';
2
+ declare const testBusiness: Providers.Yelp.Business;
3
+ export default testBusiness;
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const hold: Providers.Yelp.Hold;
3
- export default hold;
1
+ import { Providers } from '@tripian/model';
2
+ declare const hold: Providers.Yelp.Hold;
3
+ export default hold;
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const openings: Providers.Yelp.Openings;
3
- export default openings;
1
+ import { Providers } from '@tripian/model';
2
+ declare const openings: Providers.Yelp.Openings;
3
+ export default openings;
@@ -1,3 +1,3 @@
1
- import { Providers } from '@tripian/model';
2
- declare const reservation: Providers.Yelp.Reservation;
3
- export default reservation;
1
+ import { Providers } from '@tripian/model';
2
+ declare const reservation: Providers.Yelp.Reservation;
3
+ export default reservation;