@tripian/core 9.0.4 → 9.0.7

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,7 +3,8 @@ 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;
@@ -109,10 +110,10 @@ declare class API {
109
110
  * Questions
110
111
  */
111
112
  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[]>;
113
+ questionsTrip: (cityId?: number) => Promise<Model.Question[]>;
114
+ questionsProfile: (cityId?: number) => Promise<Model.Question[]>;
115
+ questionsCompanion: (cityId?: number) => Promise<Model.Question[]>;
116
+ questionsAll: (cityId?: number) => Promise<Model.Question[]>;
116
117
  /**
117
118
  * Trips
118
119
  */
@@ -154,6 +155,8 @@ declare class API {
154
155
  offer: (offerId: number) => Promise<Model.Offer>;
155
156
  offerUpdateOptIn: (offerId: number, optInDate: string) => Promise<Model.DeleteUpdateResponse>;
156
157
  offerDelete: (offerId: number) => Promise<Model.DeleteUpdateResponse>;
158
+ offerRedeemStatusUpdate: (offerId: number, status: 'waiting' | 'pending' | 'completed') => Promise<'waiting' | 'pending' | 'completed'>;
159
+ offerRedeemStatus: (offerId: number) => Promise<'waiting' | 'pending' | 'completed'>;
157
160
  /**
158
161
  * Small Business Tools
159
162
  */
@@ -173,6 +176,8 @@ declare class API {
173
176
  businessOfferFileUpload: (file: string) => Promise<{
174
177
  url: string;
175
178
  }>;
179
+ businessOfferRedeemStatusUpdate: (offerId: number, userId: number, status: 'waiting' | 'pending' | 'completed') => Promise<'waiting' | 'pending' | 'completed'>;
180
+ businessOfferRedeemStatus: (offerId: number, userId: number) => Promise<'waiting' | 'pending' | 'completed'>;
176
181
  /**
177
182
  * Business Pre Registers
178
183
  */
@@ -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;
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;