@tripian/core 4.6.1 → 5.0.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.
@@ -1,51 +1,82 @@
1
- interface ApiConst {
2
- METHOD: string;
3
- PATH: string;
4
- DATA_KEY: string;
5
- CALL_BACK?: {
6
- METHOD: string;
7
- PATH: string;
8
- DATA_KEY?: string;
9
- };
10
- }
11
- interface ApiConstModel {
12
- CITIES: ApiConst;
13
- CITY: ApiConst;
14
- POI_CATEGORIES: ApiConst;
15
- POIS: ApiConst;
16
- POI: ApiConst;
17
- QUESTIONS: ApiConst;
18
- REGISTER: ApiConst;
19
- LOGIN: ApiConst;
20
- REFRESH_TOKEN: ApiConst;
21
- USER: ApiConst;
22
- USER_UPDATE: ApiConst;
23
- FAVORITES: ApiConst;
24
- FAVORITE_ADD: ApiConst;
25
- FAVORITE_DELETE: ApiConst;
26
- COMPANIONS: ApiConst;
27
- COMPANION_ADD: ApiConst;
28
- COMPANION_UPDATE: ApiConst;
29
- COMPANION_DELETE: ApiConst;
30
- TRIPS: ApiConst;
31
- TRIP_WITH_HASH: ApiConst;
32
- TRIP: ApiConst;
33
- TRIP_ADD: ApiConst;
34
- TRIP_UPDATE: ApiConst;
35
- TRIP_DELETE: ApiConst;
36
- PLAN: ApiConst;
37
- PLAN_UPDATE: ApiConst;
38
- STEP_ADD: ApiConst;
39
- STEP_UPDATE: ApiConst;
40
- STEP_DELETE: ApiConst;
41
- RESERVATIONS: ApiConst;
42
- RESERVATION_ADD: ApiConst;
43
- RESERVATION_UPDATE: ApiConst;
44
- RESERVATION_DELETE: ApiConst;
45
- REACTIONS: ApiConst;
46
- REACTION_ADD: ApiConst;
47
- REACTION_UPDATE: ApiConst;
48
- REACTION_DELETE: ApiConst;
49
- TOP_TEN: ApiConst;
50
- }
51
- export { ApiConst, ApiConstModel };
1
+ interface ApiConst {
2
+ METHOD: string;
3
+ PATH: string;
4
+ DATA_KEY: string;
5
+ CALL_BACK?: {
6
+ METHOD: string;
7
+ PATH: string;
8
+ DATA_KEY?: string;
9
+ };
10
+ }
11
+ interface ApiConstModel {
12
+ CITIES: ApiConst;
13
+ CITY: ApiConst;
14
+ POI_CATEGORIES: ApiConst;
15
+ POIS: ApiConst;
16
+ POI: ApiConst;
17
+ TOP_TEN: ApiConst;
18
+ REGISTER: ApiConst;
19
+ LOGIN_COGNITO: ApiConst;
20
+ LOGIN: ApiConst;
21
+ LOGOUT: ApiConst;
22
+ USER: ApiConst;
23
+ USER_UPDATE: ApiConst;
24
+ USER_DELETE: ApiConst;
25
+ REFRESH_TOKEN: ApiConst;
26
+ USER_RESET_PASSWORD: ApiConst;
27
+ USER_UPDATE_PASSWORD: ApiConst;
28
+ NOTIFICATIONS: ApiConst;
29
+ NOTIFICATIONS_UNSEEN: ApiConst;
30
+ NOTIFICATIONS_UPDATE_UNSEEN: ApiConst;
31
+ NOTIFICATIONS_SETTINGS: ApiConst;
32
+ NOTIFICATIONS_UPDATE_SETTINGS: ApiConst;
33
+ COMPANIONS: ApiConst;
34
+ COMPANION_ADD: ApiConst;
35
+ COMPANION_UPDATE: ApiConst;
36
+ COMPANION_DELETE: ApiConst;
37
+ FAVORITES: ApiConst;
38
+ FAVORITE_ADD: ApiConst;
39
+ FAVORITE_DELETE: ApiConst;
40
+ REACTIONS: ApiConst;
41
+ REACTION_ADD: ApiConst;
42
+ REACTION_UPDATE: ApiConst;
43
+ REACTION_DELETE: ApiConst;
44
+ PLAN: ApiConst;
45
+ PLAN_UPDATE: ApiConst;
46
+ STEP_ALTERNATIVES: ApiConst;
47
+ STEP_ADD: ApiConst;
48
+ STEP_UPDATE: ApiConst;
49
+ STEP_DELETE: ApiConst;
50
+ QUESTIONS: ApiConst;
51
+ TRIPS: ApiConst;
52
+ TRIP_WITH_HASH: ApiConst;
53
+ TRIP: ApiConst;
54
+ TRIP_ADD: ApiConst;
55
+ TRIP_UPDATE: ApiConst;
56
+ TRIP_DELETE: ApiConst;
57
+ RESERVATIONS: ApiConst;
58
+ RESERVATION_ADD: ApiConst;
59
+ RESERVATION_UPDATE: ApiConst;
60
+ RESERVATION_DELETE: ApiConst;
61
+ OFFER_PRODUCT_TYPES: ApiConst;
62
+ OFFERS: ApiConst;
63
+ OFFER: ApiConst;
64
+ OFFER_UPDATE: ApiConst;
65
+ OFFER_DELETE: ApiConst;
66
+ OFFERS_OPT_IN: ApiConst;
67
+ BUSINESS_SEARCH: ApiConst;
68
+ BUSINESS_USER_ASSIGN: ApiConst;
69
+ BUSINESS_VERIFY_START: ApiConst;
70
+ BUSINESS_VERIFY_CHECK: ApiConst;
71
+ BUSINESS: ApiConst;
72
+ BUSINESS_UPDATE: ApiConst;
73
+ BUSINESS_OFFERS: ApiConst;
74
+ BUSINESS_OFFER_ADD: ApiConst;
75
+ BUSINESS_OFFER: ApiConst;
76
+ BUSINESS_OFFER_UPDATE: ApiConst;
77
+ BUSINESS_OFFER_DELETE: ApiConst;
78
+ BUSINESS_OFFER_CUSTOMERS: ApiConst;
79
+ BUSINESS_OFFER_FILE_UPLOAD: ApiConst;
80
+ RECOMMENDATIONS: ApiConst;
81
+ }
82
+ export { ApiConst, ApiConstModel };
package/data/data.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { DataModel } from './dataModel';
2
- /**
3
- * data
4
- */
5
- declare const data: DataModel;
6
- export default data;
1
+ import { DataModel } from './dataModel';
2
+ /**
3
+ * data
4
+ */
5
+ declare const data: DataModel;
6
+ export default data;
@@ -1,2 +1,2 @@
1
- declare const dataClear: () => void;
2
- export default dataClear;
1
+ declare const dataClear: () => void;
2
+ export default dataClear;
@@ -1,43 +1,40 @@
1
- import Model from '@tripian/model';
2
- export interface DataModel {
3
- initialised: boolean;
4
- hasError: boolean;
5
- errors: any[];
6
- logs: any[];
7
- cities?: Model.City[];
8
- poiCategories?: Model.PoiCategory[];
9
- pois: Model.Poi[];
10
- questions: Model.Question[];
11
- questionsTrip: Model.Question[];
12
- questionsProfile: Model.Question[];
13
- questionsCompanion: Model.Question[];
14
- recommendations?: Model.Recommendation[];
15
- register?: Model.User;
16
- token?: Model.Token;
17
- user?: Model.User;
18
- favorites: {
19
- cityId: number;
20
- favoritePois: Model.Favorite[];
21
- }[];
22
- companions?: Model.Companion[];
23
- reservations: {
24
- cityId: number;
25
- userReservations: Model.UserReservation[];
26
- }[];
27
- userReactions: {
28
- tripHash: string;
29
- userReactions: Model.UserReaction[];
30
- }[];
31
- tripRefs?: Model.TripReference[];
32
- trips: Model.Trip[];
33
- trip?: Model.Trip;
34
- topTens: {
35
- cityId: number;
36
- topTen: Model.TopTen[];
37
- }[];
38
- poisAll: {
39
- cityId: number;
40
- categoryGroup: Model.POI_CATEGORY_GROUP;
41
- pois: Model.DataPayload<Model.Poi[]>;
42
- }[];
43
- }
1
+ import Model from '@tripian/model';
2
+ export interface DataModel {
3
+ initialised: boolean;
4
+ hasError: boolean;
5
+ errors: any[];
6
+ logs: any[];
7
+ cities?: Model.City[];
8
+ poiCategories: Model.PoiCategory[] | undefined;
9
+ pois: Model.Poi[];
10
+ questions: Model.Question[];
11
+ questionsTrip: Model.Question[];
12
+ questionsProfile: Model.Question[];
13
+ questionsCompanion: Model.Question[];
14
+ topTens: {
15
+ cityId: number;
16
+ topTen: Model.TopTen[];
17
+ }[];
18
+ user?: Model.User;
19
+ favorites: {
20
+ cityId: number;
21
+ favoritePois: Model.Favorite[];
22
+ }[];
23
+ companions?: Model.Companion[];
24
+ reservations: {
25
+ cityId: number;
26
+ userReservations: Model.UserReservation[];
27
+ }[];
28
+ userReactions: {
29
+ tripHash: string;
30
+ userReactions: Model.UserReaction[];
31
+ }[];
32
+ tripRefs?: Model.TripReference[];
33
+ trips: Model.Trip[];
34
+ trip?: Model.Trip;
35
+ poisAll: {
36
+ cityId: number;
37
+ categoryGroup: Model.POI_CATEGORY_GROUP;
38
+ pois: Model.DataPayload<Model.Poi[]>;
39
+ }[];
40
+ }
package/easy/easy.d.ts CHANGED
@@ -1,35 +1,35 @@
1
- import MainModel from '@tripian/model';
2
- declare const easy: {
3
- /**
4
- * Replace stringQuery, param.key with param.value.
5
- * @param {string} stringQuery
6
- * @param {object} param { key, value }
7
- * @returns {string} stringQuery.replace(`{${param.key}}`, param.value)
8
- */
9
- setParameter: (stringQuery: string, param: {
10
- key: string;
11
- value: string;
12
- }) => string;
13
- /**
14
- * Replace stringQuery, '{id}' with id
15
- * @param {string} stringQuery
16
- * @param {number} id
17
- * @returns {string} stringQuery.replace('{id}', id);
18
- */
19
- setParameterId: (stringQuery: string, id: number) => string;
20
- /**
21
- * Replace stringQuery, all param.key with all param.value foreach params parameter
22
- * @param {string} stringQuery
23
- * @param {object} params [{ key, value }, { key, value } ...]
24
- * @returns {string} stringQuery.replace(`{${param.key}}`, param.value)
25
- */
26
- setParameters: (stringQuery: string, params: {
27
- key: string;
28
- value: string;
29
- }[]) => string;
30
- parseAccessToken: (accessToken: string) => MainModel.TokenPayload | undefined;
31
- parseToken: (token: MainModel.Token) => MainModel.TokenPayload | undefined;
32
- accessTokenExpSecond: (tokenPayload: MainModel.TokenPayload) => number;
33
- refreshTokenExpSecond: (tokenPayload: MainModel.TokenPayload) => number;
34
- };
35
- export default easy;
1
+ import Model from '@tripian/model';
2
+ declare const easy: {
3
+ /**
4
+ * Replace stringQuery, param.key with param.value.
5
+ * @param {string} stringQuery
6
+ * @param {object} param { key, value }
7
+ * @returns {string} stringQuery.replace(`{${param.key}}`, param.value)
8
+ */
9
+ setParameter: (stringQuery: string, param: {
10
+ key: string;
11
+ value: string;
12
+ }) => string;
13
+ /**
14
+ * Replace stringQuery, '{id}' with id
15
+ * @param {string} stringQuery
16
+ * @param {number} id
17
+ * @returns {string} stringQuery.replace('{id}', id);
18
+ */
19
+ setParameterId: (stringQuery: string, id: number, key: string) => string;
20
+ /**
21
+ * Replace stringQuery, all param.key with all param.value foreach params parameter
22
+ * @param {string} stringQuery
23
+ * @param {object} params [{ key, value }, { key, value } ...]
24
+ * @returns {string} stringQuery.replace(`{${param.key}}`, param.value)
25
+ */
26
+ setParameters: (stringQuery: string, params: {
27
+ key: string;
28
+ value: string;
29
+ }[]) => string;
30
+ parseAccessToken: (idToken: string) => Model.TokenPayload | undefined;
31
+ parseToken: (token: Model.Token) => Model.TokenPayload | undefined;
32
+ accessTokenExpSecond: (tokenPayload: Model.TokenPayload) => number;
33
+ refreshTokenExpSecond: (tokenPayload: Model.TokenPayload) => number;
34
+ };
35
+ export default easy;
@@ -1,87 +1,93 @@
1
- import Model from '@tripian/model';
2
- declare class Cached {
3
- /**
4
- ******************************************************************************
5
- *
6
- * Cities
7
- *
8
- */
9
- static cities: () => Model.City[] | undefined;
10
- static city: (cityId: number) => Model.City | undefined;
11
- /**
12
- ******************************************************************************
13
- *
14
- * POIS Categories
15
- *
16
- */
17
- static poiCategories: () => Model.PoiCategory[] | undefined;
18
- /**
19
- ******************************************************************************
20
- *
21
- * POI
22
- *
23
- */
24
- static poi: (poiId: number) => Model.Poi | undefined;
25
- static pois: (poiIds: number[]) => Model.Poi[] | undefined;
26
- static poisAll: (cityId: number, category: string) => Model.DataPayload<Model.Poi[]> | undefined;
27
- /**
28
- ******************************************************************************
29
- *
30
- * User
31
- *
32
- */
33
- static user: () => Model.User | undefined;
34
- /**
35
- ******************************************************************************
36
- *
37
- * Favorites
38
- *
39
- */
40
- static favorites: (cityId?: number | undefined) => Model.Favorite[] | undefined;
41
- /**
42
- ******************************************************************************
43
- *
44
- * Companions
45
- *
46
- */
47
- static companions: () => Model.Companion[] | undefined;
48
- /**
49
- ******************************************************************************
50
- *
51
- * Reservations
52
- *
53
- */
54
- static reservations: (cityId?: number | undefined) => Model.UserReservation[] | undefined;
55
- /**
56
- ******************************************************************************
57
- *
58
- * User-Reactions
59
- *
60
- */
61
- static userReactions: (tripHash?: string) => Model.UserReaction[] | undefined;
62
- /**
63
- ******************************************************************************
64
- *
65
- * Questions
66
- *
67
- */
68
- static questions: (category: string) => Model.Question[] | undefined;
69
- /**
70
- ******************************************************************************
71
- *
72
- * TripRefs
73
- *
74
- */
75
- static tripRefs: () => Model.TripReference[] | undefined;
76
- static tripRef: (tripHash: string) => Model.TripReference | undefined;
77
- /**
78
- ******************************************************************************
79
- *
80
- * Trip
81
- *
82
- */
83
- static trip: (tripHash: string, minDayIndex: number) => Model.Trip | undefined;
84
- static plan: (planId: number) => Model.Plan | undefined;
85
- static topTen: (cityId: number) => Model.TopTen[] | undefined;
86
- }
87
- export default Cached;
1
+ import Model from '@tripian/model';
2
+ declare class Cached {
3
+ /**
4
+ ******************************************************************************
5
+ *
6
+ * Cities
7
+ *
8
+ */
9
+ static cities: () => Model.City[] | undefined;
10
+ static city: (cityId: number) => Model.City | undefined;
11
+ /**
12
+ ******************************************************************************
13
+ *
14
+ * POIS Categories
15
+ *
16
+ */
17
+ static poiCategories: () => Model.PoiCategory[] | undefined;
18
+ /**
19
+ ******************************************************************************
20
+ *
21
+ * POI
22
+ *
23
+ */
24
+ static poi: (poiId: number) => Model.Poi | undefined;
25
+ static pois: (poiIds: number[]) => Model.Poi[] | undefined;
26
+ static poisAll: (cityId: number, category: string) => Model.DataPayload<Model.Poi[]> | undefined;
27
+ /**
28
+ ******************************************************************************
29
+ *
30
+ * User
31
+ *
32
+ */
33
+ static user: () => Model.User | undefined;
34
+ /**
35
+ ******************************************************************************
36
+ *
37
+ * Favorites
38
+ *
39
+ */
40
+ static favorites: (cityId?: number | undefined) => Model.Favorite[] | undefined;
41
+ /**
42
+ ******************************************************************************
43
+ *
44
+ * Companions
45
+ *
46
+ */
47
+ static companions: () => Model.Companion[] | undefined;
48
+ /**
49
+ ******************************************************************************
50
+ *
51
+ * Notifications
52
+ *
53
+ */
54
+ /**
55
+ ******************************************************************************
56
+ *
57
+ * Reservations
58
+ *
59
+ */
60
+ static reservations: (cityId?: number | undefined) => Model.UserReservation[] | undefined;
61
+ /**
62
+ ******************************************************************************
63
+ *
64
+ * User-Reactions
65
+ *
66
+ */
67
+ static userReactions: (tripHash?: string) => Model.UserReaction[] | undefined;
68
+ /**
69
+ ******************************************************************************
70
+ *
71
+ * Questions
72
+ *
73
+ */
74
+ static questions: (category: string) => Model.Question[] | undefined;
75
+ /**
76
+ ******************************************************************************
77
+ *
78
+ * TripRefs
79
+ *
80
+ */
81
+ static tripRefs: () => Model.TripReference[] | undefined;
82
+ static tripRef: (tripHash: string) => Model.TripReference | undefined;
83
+ /**
84
+ ******************************************************************************
85
+ *
86
+ * Trip
87
+ *
88
+ */
89
+ static trip: (tripHash: string, minDayIndex: number) => Model.Trip | undefined;
90
+ static plan: (planId: number) => Model.Plan | undefined;
91
+ static topTen: (cityId: number) => Model.TopTen[] | undefined;
92
+ }
93
+ export default Cached;
@@ -1,9 +1,9 @@
1
- import Model from '@tripian/model';
2
- /**
3
- *
4
- * @param responseData
5
- * @param dataKey
6
- * @param params important note: use params?. params can be undefined!
7
- */
8
- declare const cache: <T>(responseData: T, dataKey: string, params?: any, pagination?: Model.Pagination) => void;
9
- export default cache;
1
+ import Model from '@tripian/model';
2
+ /**
3
+ *
4
+ * @param responseData
5
+ * @param dataKey
6
+ * @param params important note: use params?. params can be undefined!
7
+ */
8
+ declare const cache: <T>(responseData: T, dataKey: string, params?: any, pagination?: Model.Pagination) => void;
9
+ export default cache;
@@ -1,2 +1,2 @@
1
- declare const allQuestionsData: () => void;
2
- export { allQuestionsData };
1
+ declare const allQuestionsData: () => void;
2
+ export { allQuestionsData };