@tripian/core 9.0.6 → 9.0.8

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/api/API.d.ts CHANGED
@@ -3,11 +3,13 @@ import IXhrOptions from '../xhr/IXhrOptions';
3
3
  declare class API {
4
4
  private xhr;
5
5
  private forceRequest;
6
- constructor(apiSettings: IXhrOptions, useCache: boolean);
6
+ private lang;
7
+ constructor(apiSettings: IXhrOptions, useCache: boolean, lang: string);
7
8
  getToken: () => Model.Token | undefined;
8
9
  setToken: (token: Model.Token) => void;
9
10
  removeToken: () => void;
10
11
  configList: () => Promise<Model.ConfigList>;
12
+ setLang: (langCode: string) => void;
11
13
  /**
12
14
  ******************************************************************************
13
15
  *
@@ -109,10 +111,10 @@ declare class API {
109
111
  * Questions
110
112
  */
111
113
  private questions;
112
- questionsTrip: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
113
- questionsProfile: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
114
- questionsCompanion: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
115
- questionsAll: (cityId?: number, languageCode?: string) => Promise<Model.Question[]>;
114
+ questionsTrip: (cityId?: number) => Promise<Model.Question[]>;
115
+ questionsProfile: (cityId?: number) => Promise<Model.Question[]>;
116
+ questionsCompanion: (cityId?: number) => Promise<Model.Question[]>;
117
+ questionsAll: (cityId?: number) => Promise<Model.Question[]>;
116
118
  /**
117
119
  * Trips
118
120
  */
@@ -154,6 +156,8 @@ declare class API {
154
156
  offer: (offerId: number) => Promise<Model.Offer>;
155
157
  offerUpdateOptIn: (offerId: number, optInDate: string) => Promise<Model.DeleteUpdateResponse>;
156
158
  offerDelete: (offerId: number) => Promise<Model.DeleteUpdateResponse>;
159
+ offerRedeemStatusUpdate: (offerId: number, status: 'waiting' | 'pending' | 'completed') => Promise<'waiting' | 'pending' | 'completed'>;
160
+ offerRedeemStatus: (offerId: number) => Promise<'waiting' | 'pending' | 'completed'>;
157
161
  /**
158
162
  * Small Business Tools
159
163
  */
@@ -173,6 +177,8 @@ declare class API {
173
177
  businessOfferFileUpload: (file: string) => Promise<{
174
178
  url: string;
175
179
  }>;
180
+ businessOfferRedeemStatusUpdate: (offerId: number, userId: number, status: 'waiting' | 'pending' | 'completed') => Promise<'waiting' | 'pending' | 'completed'>;
181
+ businessOfferRedeemStatus: (offerId: number, userId: number) => Promise<'waiting' | 'pending' | 'completed'>;
176
182
  /**
177
183
  * Business Pre Registers
178
184
  */
@@ -208,6 +214,10 @@ declare class API {
208
214
  campaignReportPay: (campaignId: number, id: number) => Promise<Model.CampaignReport>;
209
215
  campaignCustomerReport: (campaignId: number) => Promise<Model.CampaignCustomerReport>;
210
216
  businessReport: () => Promise<Model.BusinessReport>;
217
+ /**
218
+ * Translations
219
+ */
220
+ translationList: () => Promise<Model.TranslationList>;
211
221
  /**
212
222
  * Logs
213
223
  */
@@ -78,6 +78,8 @@ interface ApiConstModel {
78
78
  OFFER_UPDATE: ApiConst;
79
79
  OFFER_DELETE: ApiConst;
80
80
  OFFERS_OPT_IN: ApiConst;
81
+ OFFER_REDEEM_STATUS_UPDATE: ApiConst;
82
+ OFFER_REDEEM_STATUS: ApiConst;
81
83
  BUSINESS_PRE_REGISTER: ApiConst;
82
84
  BUSINESS_SEARCH: ApiConst;
83
85
  BUSINESS_USER_ASSIGN: ApiConst;
@@ -92,6 +94,8 @@ interface ApiConstModel {
92
94
  BUSINESS_OFFER_DELETE: ApiConst;
93
95
  BUSINESS_OFFER_CUSTOMERS: ApiConst;
94
96
  BUSINESS_OFFER_FILE_UPLOAD: ApiConst;
97
+ BUSINESS_OFFER_REDEEM_STATUS_UPDATE: ApiConst;
98
+ BUSINESS_OFFER_REDEEM_STATUS: ApiConst;
95
99
  RECOMMENDATIONS: ApiConst;
96
100
  BUSINESS_CAMPAIGNS: ApiConst;
97
101
  BUSINESS_CAMPAIGN: ApiConst;
@@ -108,6 +112,7 @@ interface ApiConstModel {
108
112
  CAMPAIGN_REPORT_PAY: ApiConst;
109
113
  CAMPAIGN_CUSTOMER_REPORT: ApiConst;
110
114
  BUSINESS_REPORT: ApiConst;
115
+ TRANSLATIONS: ApiConst;
111
116
  LOGS: ApiConst;
112
117
  }
113
118
  export { ApiConst, ApiConstModel };
package/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare let api: API;
12
12
  /**
13
13
  * This function initilize for web sdk.
14
14
  */
15
- declare const init: (url: string, xApiKey: string, token?: Model.Token, useCahce?: boolean) => void;
15
+ declare const init: (url: string, xApiKey: string, token?: Model.Token, useCahce?: boolean, lang?: string) => void;
16
16
  type Providers = {
17
17
  yelp?: ProvidersYelpAPI;
18
18
  gyg?: ProvidersGygAPI;