@soltech/fluid-common 0.4.16 → 0.4.18

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/lib/index.d.ts CHANGED
@@ -161,13 +161,13 @@ export declare enum TransactionState {
161
161
  export interface ProviderTransactionError {
162
162
  code: string;
163
163
  text: string;
164
- action: Action;
164
+ action: ErrorAction;
165
165
  }
166
- export declare enum Action {
167
- RESTART_PRESERVING_DETAILS = "RESTART_PRESERVING_DETAILS",
168
- RESTART_CLEARING_DETAILS = "RESTART_CLEARING_DETAILS",
169
- SHOW_DETAILS_STEP_PRESERVING_DETAILS = "SHOW_DETAILS_STEP_PRESERVING_DETAILS",
170
- SHOW_DETAILS_STEP_CLEARING_DETAILS = "SHOW_DETAILS_STEP_CLEARING_DETAILS"
166
+ export declare enum ErrorAction {
167
+ RETURN_STEP1 = "RETURN_STEP1",
168
+ RETURN_STEP1_FORCE_NEW_METHOD = "RETURN_STEP1_FORCE_NEW_METHOD",
169
+ RETURN_STEP2 = "RETURN_STEP2",
170
+ BLOCK_DEPOSITS = "BLOCK_DEPOSITS"
171
171
  }
172
172
  export interface PendingWithdrawal {
173
173
  amount: string;
@@ -188,3 +188,48 @@ export interface BonusPaymentMethod {
188
188
  providerType: string;
189
189
  service?: string;
190
190
  }
191
+ export declare enum TrackingEventId {
192
+ AMOUNT_EDITED = "amount-edited",
193
+ AMOUNT_EDIT_CLICK = "amount-edit-click",
194
+ AMOUNT_PILL_CLICK = "amount-pill-click",
195
+ BONUS_EDITED = "bonus-edited",
196
+ BONUS_EDIT_CLICK = "bonus-edit-click",
197
+ INPUT_FIELD_VALUE_CHANGED = "input-field-value-changed",
198
+ PAYMENT_METHOD_CHANGE = "payment-method-change",
199
+ PLAY_NOW_CLICK = "play-now-click",
200
+ STEP_BACK = "step-back",
201
+ STEP_UP = "step-up",
202
+ STORED_METHOD_CLICK = "stored-method-click",
203
+ TRANSACTION_STATUS = "transaction-status",
204
+ WALLET_CLOSED = "wallet-closed",
205
+ WALLET_OPEN = "wallet-open"
206
+ }
207
+ export interface TrackingEventData {
208
+ amount?: number;
209
+ amountOptionClicked?: number;
210
+ bonusesAvailable?: boolean;
211
+ currentMethod?: string;
212
+ errorCode?: string;
213
+ fieldId?: string;
214
+ hasStoredMethods?: boolean;
215
+ ipAddress?: string;
216
+ isStored?: boolean;
217
+ isValid?: boolean;
218
+ playNowLink?: string;
219
+ preselectedAmount?: number;
220
+ previousAmount?: number;
221
+ previousBonus?: string;
222
+ previousMethod?: string;
223
+ replacedAmount?: number;
224
+ selectedBonus?: string;
225
+ selectedMethod?: string;
226
+ stepName?: string;
227
+ suggestedAmounts?: number[];
228
+ transactionStatus?: string;
229
+ transactionType?: string;
230
+ userAgent?: string;
231
+ }
232
+ export interface TrackingEvent {
233
+ eventId: TrackingEventId;
234
+ data: TrackingEventData;
235
+ }
package/lib/index.js CHANGED
@@ -30,15 +30,32 @@ export var TransactionState;
30
30
  TransactionState["WAITING_APPROVAL"] = "WAITING_APPROVAL";
31
31
  TransactionState["WAITING_INPUT"] = "WAITING_INPUT";
32
32
  })(TransactionState || (TransactionState = {}));
33
- export var Action;
34
- (function (Action) {
35
- Action["RESTART_PRESERVING_DETAILS"] = "RESTART_PRESERVING_DETAILS";
36
- Action["RESTART_CLEARING_DETAILS"] = "RESTART_CLEARING_DETAILS";
37
- Action["SHOW_DETAILS_STEP_PRESERVING_DETAILS"] = "SHOW_DETAILS_STEP_PRESERVING_DETAILS";
38
- Action["SHOW_DETAILS_STEP_CLEARING_DETAILS"] = "SHOW_DETAILS_STEP_CLEARING_DETAILS";
39
- })(Action || (Action = {}));
33
+ export var ErrorAction;
34
+ (function (ErrorAction) {
35
+ ErrorAction["RETURN_STEP1"] = "RETURN_STEP1";
36
+ ErrorAction["RETURN_STEP1_FORCE_NEW_METHOD"] = "RETURN_STEP1_FORCE_NEW_METHOD";
37
+ ErrorAction["RETURN_STEP2"] = "RETURN_STEP2";
38
+ ErrorAction["BLOCK_DEPOSITS"] = "BLOCK_DEPOSITS";
39
+ })(ErrorAction || (ErrorAction = {}));
40
40
  export var WithdrawalState;
41
41
  (function (WithdrawalState) {
42
42
  WithdrawalState["REQUESTED"] = "REQUESTED";
43
43
  WithdrawalState["PROCESSING"] = "PROCESSING";
44
44
  })(WithdrawalState || (WithdrawalState = {}));
45
+ export var TrackingEventId;
46
+ (function (TrackingEventId) {
47
+ TrackingEventId["AMOUNT_EDITED"] = "amount-edited";
48
+ TrackingEventId["AMOUNT_EDIT_CLICK"] = "amount-edit-click";
49
+ TrackingEventId["AMOUNT_PILL_CLICK"] = "amount-pill-click";
50
+ TrackingEventId["BONUS_EDITED"] = "bonus-edited";
51
+ TrackingEventId["BONUS_EDIT_CLICK"] = "bonus-edit-click";
52
+ TrackingEventId["INPUT_FIELD_VALUE_CHANGED"] = "input-field-value-changed";
53
+ TrackingEventId["PAYMENT_METHOD_CHANGE"] = "payment-method-change";
54
+ TrackingEventId["PLAY_NOW_CLICK"] = "play-now-click";
55
+ TrackingEventId["STEP_BACK"] = "step-back";
56
+ TrackingEventId["STEP_UP"] = "step-up";
57
+ TrackingEventId["STORED_METHOD_CLICK"] = "stored-method-click";
58
+ TrackingEventId["TRANSACTION_STATUS"] = "transaction-status";
59
+ TrackingEventId["WALLET_CLOSED"] = "wallet-closed";
60
+ TrackingEventId["WALLET_OPEN"] = "wallet-open";
61
+ })(TrackingEventId || (TrackingEventId = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend and API commons",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -186,14 +186,14 @@ export enum TransactionState {
186
186
  export interface ProviderTransactionError {
187
187
  code: string;
188
188
  text: string;
189
- action: Action;
189
+ action: ErrorAction;
190
190
  }
191
191
 
192
- export enum Action {
193
- RESTART_PRESERVING_DETAILS = 'RESTART_PRESERVING_DETAILS',
194
- RESTART_CLEARING_DETAILS = 'RESTART_CLEARING_DETAILS',
195
- SHOW_DETAILS_STEP_PRESERVING_DETAILS = 'SHOW_DETAILS_STEP_PRESERVING_DETAILS',
196
- SHOW_DETAILS_STEP_CLEARING_DETAILS = 'SHOW_DETAILS_STEP_CLEARING_DETAILS',
192
+ export enum ErrorAction {
193
+ RETURN_STEP1 = 'RETURN_STEP1',
194
+ RETURN_STEP1_FORCE_NEW_METHOD = 'RETURN_STEP1_FORCE_NEW_METHOD',
195
+ RETURN_STEP2 = 'RETURN_STEP2',
196
+ BLOCK_DEPOSITS = 'BLOCK_DEPOSITS'
197
197
  }
198
198
 
199
199
  export interface PendingWithdrawal {
@@ -218,3 +218,51 @@ export interface BonusPaymentMethod {
218
218
  providerType: string;
219
219
  service?: string;
220
220
  }
221
+
222
+ export enum TrackingEventId {
223
+ AMOUNT_EDITED = 'amount-edited',
224
+ AMOUNT_EDIT_CLICK = 'amount-edit-click',
225
+ AMOUNT_PILL_CLICK = 'amount-pill-click',
226
+ BONUS_EDITED = 'bonus-edited',
227
+ BONUS_EDIT_CLICK = 'bonus-edit-click',
228
+ INPUT_FIELD_VALUE_CHANGED = 'input-field-value-changed',
229
+ PAYMENT_METHOD_CHANGE = 'payment-method-change',
230
+ PLAY_NOW_CLICK = 'play-now-click',
231
+ STEP_BACK = 'step-back',
232
+ STEP_UP = 'step-up',
233
+ STORED_METHOD_CLICK = 'stored-method-click',
234
+ TRANSACTION_STATUS = 'transaction-status',
235
+ WALLET_CLOSED = 'wallet-closed',
236
+ WALLET_OPEN = 'wallet-open',
237
+ }
238
+
239
+ export interface TrackingEventData {
240
+ amount?: number;
241
+ amountOptionClicked?: number;
242
+ bonusesAvailable?: boolean;
243
+ currentMethod?: string;
244
+ errorCode?: string;
245
+ fieldId?: string;
246
+ hasStoredMethods?: boolean;
247
+ ipAddress?: string;
248
+ isStored?: boolean;
249
+ isValid?: boolean;
250
+ playNowLink?: string;
251
+ preselectedAmount?: number;
252
+ previousAmount?: number;
253
+ previousBonus?: string;
254
+ previousMethod?: string;
255
+ replacedAmount?: number;
256
+ selectedBonus?: string;
257
+ selectedMethod?: string;
258
+ stepName?: string;
259
+ suggestedAmounts?: number[];
260
+ transactionStatus?: string;
261
+ transactionType?: string;
262
+ userAgent?: string;
263
+ }
264
+
265
+ export interface TrackingEvent {
266
+ eventId: TrackingEventId;
267
+ data: TrackingEventData;
268
+ }