@bprotsyk/aso-core 1.1.8 → 1.1.9

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.
Files changed (30) hide show
  1. package/lib/aso/offer/config/aso-config-v0.d.ts +271 -0
  2. package/lib/aso/offer/config/aso-config-v0.js +57 -0
  3. package/lib/aso/offer/config/aso-config-v1.d.ts +263 -0
  4. package/lib/aso/offer/config/aso-config-v1.js +57 -0
  5. package/lib/aso/offer/config/aso-config-v2.d.ts +230 -0
  6. package/lib/aso/offer/config/aso-config-v2.js +55 -0
  7. package/lib/aso/offer/config/aso-config-v3.d.ts +227 -0
  8. package/lib/aso/offer/config/aso-config-v3.js +56 -0
  9. package/lib/aso/offer/config/aso-config-v4.d.ts +205 -0
  10. package/lib/aso/offer/config/aso-config-v4.js +56 -0
  11. package/lib/aso/offer/config/aso-default-config.d.ts +56 -0
  12. package/lib/aso/offer/config/aso-default-config.js +2 -0
  13. package/lib/aso/offer/config/aso-single-response.d.ts +5 -0
  14. package/lib/aso/offer/config/aso-single-response.js +2 -0
  15. package/lib/index.d.ts +1 -0
  16. package/lib/shared/push.d.ts +6 -0
  17. package/lib/shared/push.js +2 -0
  18. package/lib/shared/single-offer.d.ts +6 -0
  19. package/lib/shared/single-offer.js +2 -0
  20. package/package.json +1 -1
  21. package/src/aso/offer/config/aso-config-v0.ts +428 -0
  22. package/src/aso/offer/config/aso-config-v1.ts +422 -0
  23. package/src/aso/offer/config/aso-config-v2.ts +377 -0
  24. package/src/aso/offer/config/aso-config-v3.ts +376 -0
  25. package/src/aso/offer/config/aso-config-v4.ts +300 -0
  26. package/src/aso/offer/config/aso-default-config.ts +66 -0
  27. package/src/aso/offer/config/aso-single-response.ts +6 -0
  28. package/src/index.ts +1 -0
  29. package/src/shared/push.ts +6 -0
  30. package/src/shared/single-offer.ts +6 -0
@@ -0,0 +1,428 @@
1
+ import { DefaultConfig } from "./aso-default-config"
2
+
3
+ export interface ASOConfig_v0 {
4
+ id: number,
5
+ name: string,
6
+ email: string,
7
+ bundle: string,
8
+ skipping?: boolean,
9
+ alghoritm?: string,
10
+ ip: string,
11
+ sshPassword: string,
12
+ trackingLink: string,
13
+ clientSideValidation: boolean,
14
+ host: string,
15
+ fullAccess: boolean,
16
+
17
+ appsflyerKey: string,
18
+ onesignalKey: string,
19
+ onesignalRestApiKey?: string,
20
+
21
+ showVideo: boolean,
22
+ appsflyerEnabled: boolean,
23
+ singleFirst: boolean,
24
+ authAdEnabled: boolean,
25
+ allowedCountries: string,
26
+ excludedCountries: string,
27
+ supportUrl?: string,
28
+ support?: { [key: string]: string }
29
+ privacyPolicyUrl: string,
30
+ callCoolDown: number,
31
+ smsCoolDown: number,
32
+ maxSmsTries: number,
33
+ maxCallTries: number,
34
+ smscLogin: string,
35
+ smscPassword: string,
36
+ autoSmsCodeCatch: boolean,
37
+ autoCallCodeCatch: boolean,
38
+
39
+ localization: LocalizationMap | Localization,
40
+ authorizationActionMapping: AuthorizationActionMapping,
41
+ offersSectionMapping: IOfferSectionMapping
42
+ configMapping: ConfigMapping,
43
+
44
+ configEndpoint: string,
45
+ offersEndpoint: string,
46
+ offerEndpoint: string,
47
+ nextActionEndpoint: string,
48
+ currentActionEndpoint: string,
49
+ codeValidationEndpoint: string,
50
+ changeNumberEndpoint: string,
51
+ imageEndpoint: string,
52
+
53
+ categoriesQuery: string,
54
+ phoneQuery: string,
55
+ nameQuery: string,
56
+ codeQuery: string
57
+ validityQuery: string,
58
+ resetUserQuery: string,
59
+ oldPhoneQuery: string,
60
+ newPhoneQuery: string,
61
+ appsflyerDataQuery: string,
62
+ offerIdParameter: string,
63
+ countryCodeParameter?: string,
64
+
65
+ redirectHtmlName: string,
66
+ redirectJsName: string,
67
+ redirectFolderName?: string,
68
+ redirectJsCustomNumberParameter?: string,
69
+
70
+ apiPrefix?: string,
71
+ emptyEmojiRequired?: boolean,
72
+
73
+ skipCode: boolean,
74
+ externalIpGeo: boolean,
75
+ exportedTranslations?: boolean,
76
+ readyForPanel?: boolean,
77
+
78
+ version: number
79
+ }
80
+
81
+ interface AuthorizationActionMapping {
82
+ hasNextAction: string,
83
+ nextActionIn: string,
84
+ changeNumberCaption: string,
85
+ nextActionCaption: string,
86
+ nextActionPatternCaption: string,
87
+ actualTitlePattern: string,
88
+ expiredTitlePattern: string,
89
+ subtitle: string,
90
+ when: string,
91
+ authorized: string,
92
+ canChangeNumber: string
93
+ }
94
+
95
+
96
+ interface LocalizationMap {
97
+ [key: string]: Localization
98
+ }
99
+
100
+ interface ISectionPalette {
101
+ titleBorder: string
102
+ titleText: string
103
+ offerBorder: string
104
+ buttonBorder: string
105
+ buttonBackground: string
106
+ buttonBackgroundPressed: string
107
+ buttonText: string,
108
+ emojiBackground: string,
109
+ emojiBorder: string,
110
+ emojiCaptionBorder: string,
111
+ emojiCaptionBackground: string,
112
+ emojiCaption: string
113
+ }
114
+
115
+ interface IOfferResult {
116
+ id: string,
117
+ backgroundImage: string,
118
+ foregroundImage: string,
119
+ emoji: IOfferResultEmoji | null,
120
+ buttonText: string
121
+ }
122
+
123
+ interface IOfferResultEmoji {
124
+ emoji: string | null,
125
+ caption: string | null,
126
+ }
127
+
128
+ interface IOffersSection {
129
+ id: number,
130
+ offers: IOfferResult[]
131
+ title: string
132
+ palette: ISectionPalette
133
+ }
134
+
135
+ interface ISectionPaletteMapping {
136
+ titleBorder: string
137
+ titleText: string
138
+ offerBorder: string
139
+ buttonBorder: string
140
+ buttonBackground: string
141
+ buttonBackgroundPressed: string
142
+ buttonText: string,
143
+ emojiBackground: string,
144
+ emojiBorder: string,
145
+ emojiCaptionBorder: string,
146
+ emojiCaptionBackground: string,
147
+ emojiCaption: string
148
+ }
149
+
150
+ interface IOfferSectionMapping {
151
+ id: string,
152
+ offers: string
153
+ title: string
154
+ palette: string,
155
+ internal: [string, any][]
156
+ }
157
+
158
+ interface IOfferResultMapping {
159
+ id: string,
160
+ backgroundImage: string,
161
+ foregroundImage: string,
162
+ emoji: string,
163
+ emojiCaption: string,
164
+ buttonText: string,
165
+ mappingName: string,
166
+ }
167
+
168
+ interface Localization {
169
+ numberWillReceiveACallPattern: string,
170
+ numberReceivedACallPattern: string,
171
+ numberReceivedASmsPattern: string,
172
+ numberWillReceiveASmsPattern: string,
173
+ enterLastFourDigits: string,
174
+ enterCodeFromSms: string,
175
+ callAgainSPattern: string,
176
+ callAgain: string,
177
+ smsAgain: string,
178
+ smsAgainSPattern: string,
179
+ changeNumber: string,
180
+ sendSms: string,
181
+ sendSmsSPattern: string,
182
+ hhMm: string,
183
+ unfortunatelyYourTriesLeft: string,
184
+
185
+ introDialog_title: string,
186
+ introDialog_message: string,
187
+ introDialog_exit: string
188
+ introDialog_yes: string,
189
+ introDialog_cancel: string,
190
+
191
+ error_phone: string,
192
+ error_name: string,
193
+ error_server: string,
194
+ error_invalidCode: string
195
+
196
+ changeNumber_title: string,
197
+ changeNumber_message: string,
198
+ changeNumber_no: string,
199
+ changeNumber_yes: string,
200
+
201
+ next_title: string,
202
+ next_message: string,
203
+ next_yes: string,
204
+ next_no: string,
205
+
206
+ yes: string,
207
+ no: string,
208
+ cancel: string,
209
+ mainButton: string,
210
+ codeButton: string,
211
+ getFullAccess: string,
212
+ guestPlay: string,
213
+ guestLocked: string,
214
+ yourLevel: string,
215
+ supportCaption: string,
216
+ somethingWentWrong: string
217
+
218
+ game_spin: string,
219
+ game_balance: string,
220
+ game_balance_pattern: string,
221
+ game_win: string,
222
+ game_win_pattern: string,
223
+ game_authorize: string,
224
+ game_demo_welcome: string,
225
+ game_demo_available_after_auth: string,
226
+ game_min_rate_error_pattern: string,
227
+
228
+ auth_changeTitle: string,
229
+ auth_changeMessage: string,
230
+
231
+ auth_titleTop: ColoredString,
232
+ auth_titleBottom: ColoredString,
233
+ auth_getAccess: string,
234
+ auth_subtitle: ColoredString
235
+ auth_cantBeEmpty: string,
236
+ auth_nameHint: string,
237
+ auth_changeNumber: ColoredString,
238
+ auth_enterAsGuest: string,
239
+ auth_privacyPolicyAcceptance: string,
240
+ auth_privacyPolicy: ColoredString,
241
+ }
242
+
243
+ interface ColoredString {
244
+ text: string,
245
+ colors: ColoredSpan[]
246
+ mappingName: string
247
+ }
248
+
249
+ interface ColoredSpan {
250
+ from: number,
251
+ to: number,
252
+ color: string
253
+ }
254
+
255
+ interface ColoredStringMapping {
256
+ text: string,
257
+ colors: string,
258
+ internal: [string, ColoredSpanMapping][]
259
+ }
260
+
261
+ interface ColoredSpanMapping {
262
+ from: string,
263
+ to: string,
264
+ color: string
265
+ }
266
+
267
+ interface ConfigMapping {
268
+ id: string,
269
+ fullAccess: string,
270
+ showVideo: string,
271
+ skipping?: string,
272
+ alghoritm?: string,
273
+ appsflyerEnabled: string,
274
+ appsflyerKey: string,
275
+ onesignalKey: string,
276
+ singleFirst: string,
277
+ allowedCountries: string,
278
+ excludedCountries: string,
279
+ supportUrl: string,
280
+ privacyPolicyUrl: string,
281
+ callCoolDown: string,
282
+ smsCoolDown: string,
283
+ maxSmsTries: string,
284
+ maxCallTries: string,
285
+ smscLogin: string,
286
+ smscPassword: string,
287
+ autoSmsCodeCatch: string,
288
+ autoCallCodeCatch: string,
289
+ localization: string,
290
+ internal: [string, LocalizationMapping][],
291
+ }
292
+
293
+ interface LocalizationMapping {
294
+ numberWillReceiveACallPattern: string,
295
+ numberReceivedACallPattern: string,
296
+ numberReceivedASmsPattern: string,
297
+ numberWillReceiveASmsPattern: string,
298
+ enterLastFourDigits: string,
299
+ enterCodeFromSms: string,
300
+ callAgainSPattern: string,
301
+ callAgain: string,
302
+ smsAgain: string,
303
+ smsAgainSPattern: string,
304
+ sendSms: string,
305
+ sendSmsSPattern: string,
306
+ hhMm: string,
307
+ unfortunatelyYourTriesLeft: string
308
+
309
+ game_spin: string,
310
+ game_balance: string,
311
+ game_balance_pattern: string,
312
+ game_win: string,
313
+ game_win_pattern: string
314
+ game_authorize: string,
315
+ game_demo_welcome: string,
316
+ game_demo_available_after_auth: string,
317
+ game_min_rate_error_pattern: string,
318
+
319
+ introDialog_title: string,
320
+ introDialog_message: string,
321
+ introDialog_yes: string,
322
+ introDialog_exit: string
323
+ introDialog_cancel: string,
324
+
325
+ error_phone: string,
326
+ error_name: string,
327
+ error_server: string,
328
+ error_invalidCode: string
329
+
330
+ changeNumber_title: string,
331
+ changeNumber_message: string,
332
+ changeNumber_no: string,
333
+ changeNumber_yes: string,
334
+
335
+ next_title: string,
336
+ next_message: string,
337
+ next_yes: string,
338
+ next_no: string,
339
+
340
+ yes: string,
341
+ no: string,
342
+ cancel: string,
343
+ getFullAccess: string,
344
+ guestPlay: string,
345
+ guestLocked: string,
346
+ yourLevel: string,
347
+ supportCaption: string,
348
+ somethingWentWrong: string
349
+
350
+ auth_changeTitle: string,
351
+ auth_changeMessage: string,
352
+ auth_titleTop: string,
353
+ auth_titleBottom: string,
354
+ auth_getAccess: string,
355
+ auth_cantBeEmpty: string,
356
+ auth_subtitle: string,
357
+ auth_nameHint: string,
358
+ auth_changeNumber: string,
359
+ auth_enterAsGuest: string,
360
+ auth_privacyPolicyAcceptance: string,
361
+ auth_privacyPolicy: string,
362
+
363
+ internal: [string, ColoredStringMapping][]
364
+ }
365
+
366
+ export let asoConfigToDefault_v0 = (config: ASOConfig_v0): DefaultConfig => {
367
+ return {
368
+ id: config.id,
369
+ bundle: config.bundle,
370
+ name: config.name,
371
+ email: config.email,
372
+ host: config.host,
373
+ ip: config.ip,
374
+ sshPassword: config.sshPassword,
375
+ trackingLink: config.trackingLink,
376
+
377
+ fullAccess: config.fullAccess,
378
+ appsflyerKey: config.appsflyerKey,
379
+ onesignalKey: config.onesignalKey,
380
+ onesignalRestApiKey: config.onesignalRestApiKey,
381
+ allowedCountries: config.allowedCountries,
382
+ excludedCountries: config.excludedCountries,
383
+
384
+ support: config.support,
385
+
386
+ callCoolDown: config.callCoolDown,
387
+ smsCoolDown: config.smsCoolDown,
388
+ maxSmsTries: config.maxSmsTries,
389
+ maxCallTries: config.maxCallTries,
390
+ smscLogin: config.smscLogin,
391
+ smscPassword: config.sshPassword,
392
+
393
+ configMapping: config.configMapping,
394
+ offerSectionMapping: config.offersSectionMapping,
395
+ authorizationActionMapping: config.authorizationActionMapping,
396
+
397
+ configEndpoint: config.configEndpoint,
398
+ offersEndpoint: config.offersEndpoint,
399
+ nextActionEndpoint: config.nextActionEndpoint,
400
+ currentActionEndpoint: config.currentActionEndpoint,
401
+ validationEndpoint: config.codeValidationEndpoint,
402
+ imageEndpoint: config.imageEndpoint,
403
+
404
+ sectionsParameter: config.categoriesQuery,
405
+ phoneParameter: config.phoneQuery,
406
+ codeParameter: config.codeQuery,
407
+ validityParameter: config.validityQuery,
408
+ appsflyerIdParameter: "none",
409
+ advertisingIdParameter: "none",
410
+ onesignalIdParameter: "none",
411
+ offerIdParameter: config.offerIdParameter,
412
+ countryCodeParameter: config.countryCodeParameter,
413
+
414
+ redirectHtmlName: config.redirectHtmlName,
415
+ redirectJsName: config.redirectJsName,
416
+ redirectFolderName: config.redirectFolderName,
417
+ redirectJsCustomNumberParameter: config.redirectJsCustomNumberParameter,
418
+
419
+ apiPrefix: config.apiPrefix,
420
+
421
+ skipCode: config.skipCode,
422
+ externalIpGeo: config.externalIpGeo,
423
+ exportedTranslations: config.exportedTranslations,
424
+ readyForPanel: config.readyForPanel,
425
+
426
+ version: 0
427
+ }
428
+ }