@tripian/core 4.6.0 → 5.0.2

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/Random.d.ts CHANGED
@@ -1,111 +1,117 @@
1
- import Model from '@tripian/model';
2
- declare class Random {
3
- private constructor();
4
- /**
5
- * random object in array
6
- * @param {array} any array
7
- * @returns {object} random array item
8
- */
9
- static random: <T>(array: T[]) => T;
10
- /**
11
- * random coordinate on the world
12
- * @returns {object} random coordinate on the world { lat: [(-90)-(90)], lng: [(-180)-(180)] }
13
- */
14
- static randomCoordinate: () => Model.Coordinate;
15
- /**
16
- * random adult count
17
- * @returns {number} random adult count between 1-12
18
- */
19
- static randomAdultCount: () => number;
20
- /**
21
- * random children count
22
- * @returns {number} random children count between 0-12
23
- */
24
- static randomChildrenCount: () => number;
25
- /**
26
- * random adult age
27
- * @returns {number} random adult count age 18-115
28
- */
29
- static randomAdultAge: () => number;
30
- /**
31
- * random children age
32
- * @returns {number} random children count age 0-17
33
- */
34
- static randomChildAge: () => number;
35
- /**
36
- * random answers array
37
- * @returns {array} random sub array of [5, 6, 16, 18, 27, 35, 12, 13, 25, 32, 33, 34, 1, 2, 41, 9, 10, 22, 40]
38
- */
39
- static randomAnswers: () => Array<number>;
40
- /**
41
- * random username
42
- * @returns {string} random username start with `Uu` and length is 9 chars
43
- */
44
- static randomUsername: () => string;
45
- /**
46
- * add days param times day to date
47
- * @param {Date} increase this date
48
- * @param {number} number days for increase
49
- * @return {Date} increased date
50
- */
51
- static addDays: (date: Date, days: number) => Date;
52
- /**
53
- * If chars's length is 2 return chars, if chars's length is 1 return `0${chars}`
54
- * @param {string} chars any string
55
- * @return {string} 2 chars string
56
- */
57
- static extend2Chars: (chars: string) => string;
58
- /**
59
- * random date range
60
- * @returns {object} random date range for create a trip { arrivalDate: YYYY-MM-DD, departureDate: YYYY-MM-DD } Maximum range is 14.
61
- */
62
- static randomDateRange: () => {
63
- arrivalDate: string;
64
- departureDate: string;
65
- };
66
- /**
67
- * random time
68
- * @returns {string} random time between `00:00` and `23:59`
69
- */
70
- static randomTime: () => string;
71
- /**
72
- * random time range
73
- * @returns { startTime: string; endTime: string } random time range for create a trip { startTime: hh:mm, endTime: hh:mm }
74
- */
75
- static randomTimeRange: () => {
76
- startTime: string;
77
- endTime: string;
78
- };
79
- /**
80
- * random ordered array
81
- * @param {Array<T>} array
82
- * @returns {Array<T>} random ordered array of param array items.
83
- */
84
- static randomOrder: <T>(array: T[]) => T[];
85
- /**
86
- * random companion
87
- *
88
- */
89
- static randomNewCompanion: (answers?: number[]) => Model.CompanionRequest;
90
- /**
91
- * random trip profile
92
- *
93
- */
94
- static randomTripProfile: (cityId?: number, allAnswers?: number[]) => Model.TripProfile;
95
- /**
96
- * random reservation
97
- *
98
- */
99
- static randomNewUserReservation: (poiId: number, tripHash?: string) => Model.UserReservationRequest;
100
- /**
101
- * random user update request.
102
- *
103
- */
104
- static randomUser: (allAnswers?: number[]) => Model.UserUpdateRequest;
105
- /**
106
- * random password
107
- * @returns {string} random username start with pass
108
- */
109
- static randomPassword: () => string;
110
- }
111
- export default Random;
1
+ import Model from '@tripian/model';
2
+ declare class Random {
3
+ private constructor();
4
+ /**
5
+ * random object in array
6
+ * @param {array} any array
7
+ * @returns {object} random array item
8
+ */
9
+ static random: <T>(array: T[]) => T;
10
+ /**
11
+ * random coordinate on the world
12
+ * @returns {object} random coordinate on the world { lat: [(-90)-(90)], lng: [(-180)-(180)] }
13
+ */
14
+ static randomCoordinate: () => Model.Coordinate;
15
+ /**
16
+ * random adult count
17
+ * @returns {number} random adult count between 1-12
18
+ */
19
+ static randomAdultCount: () => number;
20
+ /**
21
+ * random children count
22
+ * @returns {number} random children count between 0-12
23
+ */
24
+ static randomChildrenCount: () => number;
25
+ /**
26
+ * random adult age
27
+ * @returns {number} random adult count age 18-115
28
+ */
29
+ static randomAdultAge: () => number;
30
+ /**
31
+ * random children age
32
+ * @returns {number} random children count age 0-17
33
+ */
34
+ static randomChildAge: () => number;
35
+ /**
36
+ * random answers array
37
+ * @returns {array} random sub array of [5, 6, 16, 18, 27, 35, 12, 13, 25, 32, 33, 34, 1, 2, 41, 9, 10, 22, 40]
38
+ */
39
+ static randomAnswers: () => Array<number>;
40
+ /**
41
+ * random username
42
+ * @returns {string} random username start with `Uu` and length is 9 chars
43
+ */
44
+ static randomUsername: () => string;
45
+ /**
46
+ * add days param times day to date
47
+ * @param {Date} increase this date
48
+ * @param {number} number days for increase
49
+ * @return {Date} increased date
50
+ */
51
+ static addDays: (date: Date, days: number) => Date;
52
+ /**
53
+ * If chars's length is 2 return chars, if chars's length is 1 return `0${chars}`
54
+ * @param {string} chars any string
55
+ * @return {string} 2 chars string
56
+ */
57
+ static extend2Chars: (chars: string) => string;
58
+ /**
59
+ * random date range
60
+ * @returns {object} random date range for create a trip { arrivalDate: YYYY-MM-DD, departureDate: YYYY-MM-DD } Maximum range is 14.
61
+ */
62
+ static randomDateRange: () => {
63
+ arrivalDate: string;
64
+ departureDate: string;
65
+ };
66
+ /**
67
+ * random time
68
+ * @returns {string} random time between `00:00` and `23:59`
69
+ */
70
+ static randomTime: () => string;
71
+ /**
72
+ * random time range
73
+ * @returns { startTime: string; endTime: string } random time range for create a trip { startTime: hh:mm, endTime: hh:mm }
74
+ */
75
+ static randomTimeRange: () => {
76
+ startTime: string;
77
+ endTime: string;
78
+ };
79
+ /**
80
+ * random ordered array
81
+ * @param {Array<T>} array
82
+ * @returns {Array<T>} random ordered array of param array items.
83
+ */
84
+ static randomOrder: <T>(array: T[]) => T[];
85
+ /**
86
+ * random companion
87
+ *
88
+ */
89
+ static randomNewCompanion: (answers?: number[]) => Model.CompanionRequest;
90
+ /**
91
+ * random trip profile
92
+ *
93
+ */
94
+ static randomTripProfile: (cityId?: number) => Model.TripProfile;
95
+ /**
96
+ * random reservation
97
+ *
98
+ */
99
+ static randomNewUserReservation: (poiId: number, tripHash: string) => Model.UserReservationRequest;
100
+ /**
101
+ * random password
102
+ * @returns {string} random username start with pass
103
+ */
104
+ static randomPassword: () => string;
105
+ /**
106
+ * random user update request.
107
+ *
108
+ */
109
+ static randomUser: (allAnswers?: number[]) => Model.UserUpdateRequest;
110
+ static randomUserPassword: () => Model.UserUpdateRequest;
111
+ /**
112
+ * random register request.
113
+ *
114
+ */
115
+ static randomNewUser: () => Model.RegisterRequest;
116
+ }
117
+ export default Random;
package/api/API.d.ts CHANGED
@@ -1,173 +1,203 @@
1
- import Model from '@tripian/model';
2
- import IXhrOptions from '../xhr/IXhrOptions';
3
- declare class API {
4
- private xhr;
5
- private forceRequest;
6
- constructor(apiSettings: IXhrOptions, useCache: boolean);
7
- getToken: () => Model.Token | undefined;
8
- setToken: (token: Model.Token) => void;
9
- removeToken: () => void;
10
- /**
11
- ******************************************************************************
12
- *
13
- * Cities
14
- *
15
- */
16
- citiesPage: (page: number, limit?: number) => Promise<Model.DataPayload<Model.City[]>>;
17
- citiesAll: () => Promise<Model.City[]>;
18
- city: (cityId: number) => Promise<Model.City>;
19
- /**
20
- * POI
21
- */
22
- poiCategories: (limit?: number) => Promise<Model.PoiCategory[]>;
23
- poisSearch: (poisRequest: Model.PoisRequest) => Promise<Model.DataPayload<Model.Poi[]>>;
24
- poisNameSearch: ({ cityId, name, poiCategories, limit, page }: Model.PoisRequestName) => Promise<Model.DataPayload<Model.Poi[]>>;
25
- poisCoordinateSearch: ({ poiCategories, coordinate, distance, bounds, limit }: Model.PoisRequestCoordinate) => Promise<Model.Poi[]>;
26
- poisMustTrySearch: ({ cityId, mustTryIds, limit }: Model.PoisRequestMustTry) => Promise<Model.Poi[]>;
27
- pois: (poiIds: number[]) => Promise<Model.Poi[]>;
28
- poi: (poiId: number) => Promise<Model.Poi>;
29
- /**
30
- * Questions
31
- */
32
- private questions;
33
- questionsTrip: (languageCode?: string) => Promise<Model.Question[]>;
34
- questionsProfile: (languageCode?: string) => Promise<Model.Question[]>;
35
- questionsCompanion: (languageCode?: string) => Promise<Model.Question[]>;
36
- questionsAll: (languageCode?: string) => Promise<Model.Question[]>;
37
- /**
38
- * Recommendations
39
- */
40
- /**
41
- * Registers
42
- */
43
- private register;
44
- registerEmail: (email: string, password: string, firstName?: string, lastName?: string, profile?: Model.UserProfile) => Promise<Model.User>;
45
- registerUsername: (uniqueUserId: string, firstName?: string, lastName?: string, profile?: Model.UserProfile) => Promise<Model.User>;
46
- /**
47
- * Logins
48
- */
49
- refreshToken: (force?: boolean) => Promise<Model.Token>;
50
- private login;
51
- loginEmail: (email: string, password: string) => Promise<Model.Token>;
52
- loginUsername: (uniqueUserId: string) => Promise<Model.Token>;
53
- loginTripHash: (tripHash: string) => Promise<Model.Token>;
54
- /**
55
- * User
56
- */
57
- user: (force?: boolean) => Promise<Model.User>;
58
- userUpdate: (userUpdateRequest: Model.UserUpdateRequest) => Promise<Model.User>;
59
- /**
60
- * Favorites
61
- */
62
- favorites: (cityId: number) => Promise<Model.Favorite[]>;
63
- favoriteAdd: (hash: string, poiId: number) => Promise<Model.Favorite>;
64
- favoriteDelete: (favoriteId: number) => Promise<number>;
65
- /**
66
- * Companions
67
- */
68
- companions: (force?: boolean) => Promise<Model.Companion[]>;
69
- companionAdd: (newCompanion: Model.CompanionRequest) => Promise<Model.Companion>;
70
- companionUpdate: (companion: Model.Companion) => Promise<Model.Companion>;
71
- companionDelete: (companionId: number) => Promise<number>;
72
- /**
73
- * Trips
74
- */
75
- tripRefs: (limit?: number) => Promise<Model.TripReference[]>;
76
- tripRef: (hash: string) => Promise<Model.TripReference>;
77
- trip: (hash: string, minDayIndex?: number, force?: boolean, sleepMs?: number) => Promise<Model.Trip>;
78
- tripAdd: (tripProfile: Model.TripProfile, minDayIndex?: number) => Promise<Model.Trip>;
79
- tripUpdate: (tripHash: string, tripProfile: Model.TripProfile, minDayIndex?: number) => Promise<Model.Trip>;
80
- tripDelete: (hash: string) => Promise<number>;
81
- /**
82
- * Plan
83
- */
84
- plan: (planId: number, generate?: boolean, sleepMs?: number) => Promise<Model.Plan>;
85
- private planUpdate;
86
- planUpdateOrders: (planId: number, orders: number[]) => Promise<Model.Plan>;
87
- planUpdateTime: (planId: number, startTime: string, endTime: string) => Promise<Model.Plan>;
88
- /**
89
- * Step
90
- */
91
- stepAdd: (planId: number, poiId: number) => Promise<Model.Step>;
92
- stepReplace: (stepId: number, newPoiId: number) => Promise<Model.Step>;
93
- stepDelete: (stepId: number) => Promise<number>;
94
- /**
95
- * Reservations
96
- */
97
- reservations: (cityId?: number, hash?: string, poiId?: number, provider?: string, from?: string, to?: string, limit?: number) => Promise<Model.UserReservation[]>;
98
- reservationAdd: (reservationRequest: Model.UserReservationRequest) => Promise<Model.UserReservation>;
99
- reservationUpdate: (reservation: Model.UserReservation) => Promise<Model.UserReservation>;
100
- reservationDelete: (reservationId: number) => Promise<number>;
101
- /**
102
- * Reactions
103
- */
104
- reactions: (hash: string, reaction?: Model.REACTION, from?: string, to?: string, page?: number) => Promise<Model.UserReaction[]>;
105
- reactionAdd: (reactionRequest: Model.UserReactionRequest) => Promise<Model.UserReaction>;
106
- reactionUpdate: (reaction: Model.UserReaction) => Promise<Model.UserReaction>;
107
- reactionDelete: (reactionId: number) => Promise<number>;
108
- /**
109
- * Top 10
110
- */
111
- topTen: (cityId: number, categoryIds?: number[]) => Promise<Model.TopTen[]>;
112
- /**
113
- * Alternatives (TODO)
114
- */
115
- /**
116
- * Feedback
117
- */
118
- logout: () => void;
119
- combo: {
120
- /**
121
- *
122
- *
123
- * Trip Combo
124
- */
125
- tripDelete: (tripHash: string, tripRefsLimit?: number) => Promise<Model.TripReference[]>;
126
- /**
127
- *
128
- *
129
- * Step Combo
130
- */
131
- stepAdd: (planId: number, poiId: number, tripHash: string) => Promise<Model.Trip>;
132
- stepReplace: (stepId: number, newPoiId: number, tripHash: string) => Promise<Model.Trip>;
133
- stepDelete: (stepId: number, tripHash: string) => Promise<Model.Trip>;
134
- /**
135
- *
136
- *
137
- * Plan Combo
138
- */
139
- planUpdateOrders: (planId: number, orders: number[], tripHash: string) => Promise<Model.Trip>;
140
- planUpdateTime: (planId: number, startTime: string, endTime: string, tripHash: string) => Promise<Model.Trip>;
141
- /**
142
- *
143
- *
144
- * Favorite Combo
145
- */
146
- favoriteAdd: (hash: string, poiId: number, cityId: number) => Promise<Model.Favorite[]>;
147
- favoriteDelete: (favoriteId: number, cityId: number) => Promise<Model.Favorite[]>;
148
- /**
149
- *
150
- *
151
- * Companion Combo
152
- */
153
- companionAdd: (newCompanion: Model.CompanionRequest, companionsForce?: boolean) => Promise<Model.Companion[]>;
154
- companionUpdate: (companion: Model.Companion, companionsForce?: boolean) => Promise<Model.Companion[]>;
155
- companionDelete: (companionId: number, companionsForce?: boolean) => Promise<Model.Companion[]>;
156
- /**
157
- *
158
- *
159
- * Reservation Combo
160
- */
161
- reservationAdd: (newReservation: Model.UserReservationRequest, cityId: number) => Promise<Model.UserReservation[]>;
162
- reservationUpdate: (reservation: Model.UserReservation, cityId: number) => Promise<Model.UserReservation[]>;
163
- reservationDelete: (reservationId: number, cityId: number) => Promise<Model.UserReservation[]>;
164
- /**
165
- *
166
- *
167
- * Reaction Combo
168
- */
169
- reactionAdd: (newReaction: Model.UserReactionRequest, tripHash: string) => Promise<Model.UserReaction[]>;
170
- reactionUpdate: (reaction: Model.UserReaction, tripHash: string) => Promise<Model.UserReaction[]>;
171
- };
172
- }
173
- export default API;
1
+ import Model from '@tripian/model';
2
+ import IXhrOptions from '../xhr/IXhrOptions';
3
+ declare class API {
4
+ private xhr;
5
+ private forceRequest;
6
+ constructor(apiSettings: IXhrOptions, useCache: boolean);
7
+ getToken: () => Model.Token | undefined;
8
+ setToken: (token: Model.Token) => void;
9
+ removeToken: () => void;
10
+ /**
11
+ ******************************************************************************
12
+ *
13
+ * Cities
14
+ *
15
+ */
16
+ citiesPage: (page: number, limit?: number) => Promise<Model.DataPayload<Model.City[]>>;
17
+ citiesAll: () => Promise<Model.City[]>;
18
+ city: (cityId: number) => Promise<Model.City>;
19
+ citiesSearch: (name: string) => Promise<Model.City[]>;
20
+ /**
21
+ * POI
22
+ */
23
+ poiCategories: (limit?: number) => Promise<Model.PoiCategory[]>;
24
+ poisSearch: (poisRequest: Model.PoisRequest) => Promise<Model.DataPayload<Model.Poi[]>>;
25
+ poisNameSearch: ({ cityId, search, poiCategories, limit, page, }: Model.PoisRequestName) => Promise<Model.DataPayload<Model.Poi[]>>;
26
+ poisCoordinateSearch: ({ poiCategories, coordinate, distance, bounds, limit }: Model.PoisRequestCoordinate) => Promise<Model.Poi[]>;
27
+ poisMustTrySearch: ({ cityId, mustTryIds, limit }: Model.PoisRequestMustTry) => Promise<Model.Poi[]>;
28
+ pois: (poiIds: number[], cityId?: number) => Promise<Model.Poi[]>;
29
+ poi: (poiId: number) => Promise<Model.Poi>;
30
+ /**
31
+ * Top 10
32
+ */
33
+ topTen: (cityId: number, poiCategories?: string) => Promise<Model.TopTen[]>;
34
+ /**
35
+ * Registers
36
+ */
37
+ register: (registerRequest: Model.RegisterRequest) => Promise<Model.Token>;
38
+ /**
39
+ * Logins
40
+ */
41
+ private login;
42
+ loginEmail: (email: string, password: string) => Promise<Model.Token>;
43
+ loginCognito: (code: string, redirectUrl: string, device: Model.Device) => Promise<Model.Token>;
44
+ logout: () => Promise<Model.DeleteUpdateResponse>;
45
+ refreshToken: (force?: boolean) => Promise<Model.Token>;
46
+ /**
47
+ * User
48
+ */
49
+ user: (force?: boolean) => Promise<Model.User>;
50
+ userUpdate: (userUpdateRequest: Model.UserUpdateRequest) => Promise<Model.User>;
51
+ userDelete: () => Promise<Model.DeleteUpdateResponse>;
52
+ userResetPassword: (email: string) => Promise<Model.UserResetPassword>;
53
+ userUpdatePassword: (password: string, hash: string) => Promise<Model.UserResetPassword>;
54
+ /**
55
+ * Notifications
56
+ */
57
+ notifications: () => Promise<Model.Notification[]>;
58
+ notificationsUnseen: () => Promise<Model.NotificationUnseen>;
59
+ notificationsUpdateUnseen: () => Promise<Model.DeleteUpdateResponse>;
60
+ notificationsSettings: () => Promise<Model.NotificationSettings[]>;
61
+ notificationsUpdateSettings: (settingId: number, checked: number) => Promise<Model.DeleteUpdateResponse>;
62
+ /**
63
+ * Companions
64
+ */
65
+ companions: (force?: boolean) => Promise<Model.Companion[]>;
66
+ companionAdd: (newCompanion: Model.CompanionRequest) => Promise<Model.Companion>;
67
+ companionUpdate: (companion: Model.Companion) => Promise<Model.Companion>;
68
+ companionDelete: (companionId: number) => Promise<number>;
69
+ /**
70
+ * Favorites
71
+ */
72
+ favorites: (cityId: number) => Promise<Model.Favorite[]>;
73
+ favoriteAdd: (poiId: number, tripHash?: string) => Promise<Model.Favorite>;
74
+ favoriteDelete: (favoriteId: number) => Promise<number>;
75
+ /**
76
+ * Reactions
77
+ */
78
+ reactions: (tripHash: string, reaction?: Model.REACTION, page?: number) => Promise<Model.UserReaction[]>;
79
+ reactionAdd: (reactionRequest: Model.UserReactionRequest) => Promise<Model.UserReaction>;
80
+ reactionUpdate: (id: number, comment: string) => Promise<Model.UserReaction>;
81
+ reactionDelete: (reactionId: number) => Promise<number>;
82
+ /**
83
+ * Plan
84
+ */
85
+ plan: (planId: number, generate?: boolean, sleepMs?: number) => Promise<Model.Plan>;
86
+ private planUpdate;
87
+ planUpdateOrders: (planId: number, stepOrders: number[]) => Promise<Model.Plan>;
88
+ planUpdateTime: (planId: number, startTime: string, endTime: string) => Promise<Model.Plan>;
89
+ /**
90
+ * Step
91
+ */
92
+ stepAdd: (planId: number, poiId: number) => Promise<Model.Step>;
93
+ stepReplace: (stepId: number, newPoiId: number) => Promise<Model.Step>;
94
+ stepDelete: (stepId: number) => Promise<number>;
95
+ /**
96
+ * Questions
97
+ */
98
+ private questions;
99
+ questionsTrip: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
100
+ questionsProfile: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
101
+ questionsCompanion: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
102
+ questionsAll: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
103
+ /**
104
+ * Trips
105
+ */
106
+ tripRefs: (limit?: number) => Promise<Model.TripReference[]>;
107
+ tripRef: (hash: string) => Promise<Model.TripReference>;
108
+ trip: (tripHash: string, minDayIndex?: number, force?: boolean, sleepMs?: number) => Promise<Model.Trip>;
109
+ tripAdd: (tripProfile: Model.TripProfile, minDayIndex?: number) => Promise<Model.Trip>;
110
+ tripUpdate: (tripHash: string, tripProfile: Model.TripProfile, minDayIndex?: number) => Promise<Model.Trip>;
111
+ tripDelete: (tripHash: string) => Promise<number>;
112
+ /**
113
+ * Reservations
114
+ */
115
+ reservations: (cityId?: number, tripHash?: string, poiId?: number, provider?: string, startDate?: string, endDate?: string, limit?: number) => Promise<Model.UserReservation[]>;
116
+ reservationAdd: (reservationRequest: Model.UserReservationRequest) => Promise<Model.UserReservation>;
117
+ reservationUpdate: (reservation: Model.UserReservation) => Promise<Model.UserReservation>;
118
+ reservationDelete: (reservationId: number) => Promise<number>;
119
+ /**
120
+ * Offers
121
+ */
122
+ productTypes: () => Promise<Model.OfferProductType[]>;
123
+ offerSearch: (dateFrom: string, dateTo: string, boundary: string) => Promise<Model.Poi[]>;
124
+ offerSearchNew: (dateFrom: string, dateTo: string, boundary: string) => Promise<Model.DataPayload<Model.Poi[]>>;
125
+ offers: (dateFrom?: string, dateTo?: string) => Promise<Model.Poi[]>;
126
+ offerUpdateOptIn: (offerId: number, offerClaimDate: string) => Promise<Model.DeleteUpdateResponse>;
127
+ offerDelete: (offerId: number) => Promise<Model.DeleteUpdateResponse>;
128
+ /**
129
+ * Small Business Tools
130
+ */
131
+ businessSearch: (q: string, bounds: string, cityId: number) => Promise<Model.BusinessSearch[]>;
132
+ startVerify: (to_: string, channel: Model.VERIFY_CHANNEL) => Promise<Model.BusinessVerify>;
133
+ checkVerify: (to_: string, channel: Model.VERIFY_CHANNEL, code: string) => Promise<Model.BusinessVerify>;
134
+ business: () => Promise<Model.Business>;
135
+ businessUpdate: (image: {
136
+ url: string;
137
+ }) => Promise<Model.Business>;
138
+ businessOffers: (status: Model.OFFER_STATUS, page?: number, limit?: number) => Promise<Model.DataPayload<Model.Offer[]>>;
139
+ businessOfferAdd: (offerAddRequest: Model.OfferAddRequest) => Promise<Model.Offer>;
140
+ businessOffer: (offerId: number) => Promise<Model.Offer>;
141
+ businessOfferUpdate: (offerId: number, status: Model.OFFER_STATUS) => Promise<Model.Offer>;
142
+ businessOfferDelete: (offerId: number) => Promise<Model.DeleteUpdateResponse>;
143
+ businessOfferCustomers: (offerId: number) => Promise<Model.OfferCustomer[]>;
144
+ businessOfferFileUpload: (file: string) => Promise<{
145
+ url: string;
146
+ }>;
147
+ /**
148
+ * COMBO
149
+ */
150
+ combo: {
151
+ /**
152
+ *
153
+ *
154
+ * Trip Combo
155
+ */
156
+ tripDelete: (tripHash: string, tripRefsLimit?: number) => Promise<Model.TripReference[]>;
157
+ /**
158
+ *
159
+ *
160
+ * Step Combo
161
+ */
162
+ stepAdd: (planId: number, poiId: number, tripHash: string) => Promise<Model.Trip>;
163
+ stepReplace: (stepId: number, newPoiId: number, tripHash: string) => Promise<Model.Trip>;
164
+ stepDelete: (stepId: number, tripHash: string) => Promise<Model.Trip>;
165
+ /**
166
+ *
167
+ *
168
+ * Plan Combo
169
+ */
170
+ planUpdateOrders: (planId: number, orders: number[], tripHash: string) => Promise<Model.Trip>;
171
+ planUpdateTime: (planId: number, startTime: string, endTime: string, tripHash: string) => Promise<Model.Trip>;
172
+ /**
173
+ *
174
+ *
175
+ * Favorite Combo
176
+ */
177
+ favoriteAdd: (tripHash: string, poiId: number, cityId: number) => Promise<Model.Favorite[]>;
178
+ favoriteDelete: (favoriteId: number, cityId: number) => Promise<Model.Favorite[]>;
179
+ /**
180
+ *
181
+ *
182
+ * Companion Combo
183
+ */
184
+ companionAdd: (newCompanion: Model.CompanionRequest, companionsForce?: boolean) => Promise<Model.Companion[]>;
185
+ companionUpdate: (companion: Model.Companion, companionsForce?: boolean) => Promise<Model.Companion[]>;
186
+ companionDelete: (companionId: number, companionsForce?: boolean) => Promise<Model.Companion[]>;
187
+ /**
188
+ *
189
+ *
190
+ * Reservation Combo
191
+ */
192
+ reservationAdd: (newReservation: Model.UserReservationRequest, cityId: number) => Promise<Model.UserReservation[]>;
193
+ reservationUpdate: (reservation: Model.UserReservation, cityId: number) => Promise<Model.UserReservation[]>;
194
+ reservationDelete: (reservationId: number, cityId: number) => Promise<Model.UserReservation[]>;
195
+ /**
196
+ *
197
+ *
198
+ * Reaction Combo
199
+ */
200
+ reactionAdd: (newReaction: Model.UserReactionRequest, tripHash: string) => Promise<Model.UserReaction[]>;
201
+ };
202
+ }
203
+ export default API;
@@ -1,3 +1,3 @@
1
- import { ApiConstModel } from './ApiConstModel';
2
- declare const API_CONST: ApiConstModel;
3
- export default API_CONST;
1
+ import { ApiConstModel } from './ApiConstModel';
2
+ declare const API_CONST: ApiConstModel;
3
+ export default API_CONST;