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