@bprotsyk/aso-core 1.1.16 → 1.1.17

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 (33) hide show
  1. package/lib/aso/config/aso-config-v0.d.ts +4 -4
  2. package/lib/aso/config/aso-config-v1.d.ts +26 -27
  3. package/lib/aso/config/aso-config-v1.js +3 -3
  4. package/lib/aso/config/aso-config-v2.d.ts +24 -24
  5. package/lib/aso/config/aso-config-v2.js +3 -3
  6. package/lib/aso/config/aso-config-v3.d.ts +23 -23
  7. package/lib/aso/config/aso-config-v3.js +3 -3
  8. package/lib/aso/config/aso-config-v4.d.ts +26 -26
  9. package/lib/aso/config/aso-config-v4.js +3 -3
  10. package/lib/aso/config/aso-config-v5.d.ts +26 -27
  11. package/lib/aso/config/aso-config-v5.js +3 -3
  12. package/lib/aso/config/aso-default-config.d.ts +1 -1
  13. package/lib/aso/config/aso-single-response.d.ts +2 -2
  14. package/lib/aso/offer/config/aso-config-v0.d.ts +22 -22
  15. package/lib/aso/offer/config/aso-config-v1.d.ts +21 -21
  16. package/lib/aso/offer/config/aso-config-v2.d.ts +20 -20
  17. package/lib/aso/offer/config/aso-config-v3.d.ts +20 -20
  18. package/lib/aso/offer/config/aso-config-v4.d.ts +23 -23
  19. package/lib/aso/usage-logs/aso-config-fetch-entry.d.ts +28 -0
  20. package/lib/aso/usage-logs/aso-config-fetch-entry.js +2 -0
  21. package/lib/index.d.ts +6 -4
  22. package/lib/index.js +7 -9
  23. package/package.json +1 -1
  24. package/src/aso/config/aso-config-v0.ts +6 -6
  25. package/src/aso/config/aso-config-v1.ts +29 -26
  26. package/src/aso/config/aso-config-v2.ts +26 -24
  27. package/src/aso/config/aso-config-v3.ts +25 -23
  28. package/src/aso/config/aso-config-v4.ts +27 -26
  29. package/src/aso/config/aso-config-v5.ts +26 -26
  30. package/src/aso/config/aso-default-config.ts +1 -1
  31. package/src/aso/config/aso-single-response.ts +2 -2
  32. package/src/aso/usage-logs/aso-config-fetch-entry.ts +31 -0
  33. package/src/index.ts +8 -5
@@ -1,6 +1,6 @@
1
- import { ASODefaultConfig } from "./aso-default-config";
1
+ import { IASODefaultConfig } from "./aso-default-config";
2
2
 
3
- export interface ASOConfig_v4 {
3
+ export interface IConfig {
4
4
  name: string,
5
5
  email: string,
6
6
  id: number,
@@ -28,14 +28,14 @@ export interface ASOConfig_v4 {
28
28
  smscLogin: string,
29
29
  smscPassword: string,
30
30
 
31
- localization?: LocalizationMap | Localization,
32
- localizationMapping: LocalizationMapping,
33
- authorizationActionMapping: AuthorizationActionMapping,
31
+ localization?: ILocalizationMap | ILocalization,
32
+ localizationMapping: ILocalizationMapping,
33
+ authorizationActionMapping: IAuthorizationActionMapping,
34
34
  offerSectionMapping: IOfferSectionMapping,
35
35
  offerResultMapping: IOfferResultMapping,
36
- configMapping: ConfigMapping,
37
- coloredStringMapping: ColoredStringMapping,
38
- coloredSpanMapping: ColoredSpanMapping,
36
+ configMapping: IConfigMapping,
37
+ coloredStringMapping: IColoredStringMapping,
38
+ coloredSpanMapping: IColoredSpanMapping,
39
39
 
40
40
  configEndpoint: string,
41
41
  offersEndpoint: string,
@@ -77,7 +77,7 @@ export interface ASOConfig_v4 {
77
77
  version: number
78
78
  }
79
79
 
80
- export interface AuthorizationActionMapping {
80
+ export interface IAuthorizationActionMapping {
81
81
  hasNextAction: string,
82
82
  nextActionIn: string,
83
83
  changeNumberCaption: string,
@@ -90,8 +90,8 @@ export interface AuthorizationActionMapping {
90
90
  authorized: string
91
91
  }
92
92
 
93
- interface LocalizationMap {
94
- [key: string]: Localization
93
+ export interface ILocalizationMap {
94
+ [key: string]: ILocalization
95
95
  }
96
96
 
97
97
  export interface IOfferSectionMapping {
@@ -115,7 +115,7 @@ export interface LocalizedString {
115
115
  ru: string
116
116
  }
117
117
 
118
- export interface Localization {
118
+ export interface ILocalization {
119
119
  numberWillReceiveACallPattern: string,
120
120
  numberReceivedACallPattern: string,
121
121
  numberReceivedASmsPattern: string,
@@ -158,39 +158,40 @@ export interface Localization {
158
158
  game_min_rate_error_pattern: string,
159
159
  game_yourLevel: string,
160
160
 
161
- auth_title: ColoredString,
162
- auth_subtitle: ColoredString
161
+ auth_title: IColoredString,
162
+ auth_subtitle: IColoredString
163
163
  auth_changeNumber: string,
164
164
  auth_getAccess: string,
165
165
  auth_enterAsGuest: string,
166
166
  auth_privacyPolicyAcceptance: string,
167
- auth_privacyPolicy: ColoredString
167
+ auth_privacyPolicy: IColoredString
168
168
  }
169
169
 
170
- export interface ColoredString {
170
+ export interface IColoredString {
171
171
  text: string,
172
- colors: ColoredSpan[]
172
+ colors: IColoredSpan[]
173
173
  mappingName: string
174
174
  }
175
175
 
176
- interface ColoredSpan {
176
+ interface IColoredSpan {
177
177
  from: number,
178
178
  to: number,
179
179
  color: string
180
180
  }
181
181
 
182
- export interface ColoredStringMapping {
182
+ export interface IColoredStringMapping {
183
183
  text: string,
184
184
  colors: string,
185
- internal: [string, ColoredSpanMapping][]
185
+ internal: [string, IColoredSpanMapping][]
186
186
  }
187
187
 
188
- export interface ColoredSpanMapping {
188
+ export interface IColoredSpanMapping {
189
189
  from: string,
190
190
  to: string,
191
191
  color: string
192
192
  }
193
- export interface ConfigMapping {
193
+
194
+ export interface IConfigMapping {
194
195
  fullAccess: string,
195
196
  appsflyerKey: string,
196
197
  onesignalKey: string,
@@ -200,10 +201,10 @@ export interface ConfigMapping {
200
201
  privacyPolicyUrl: string,
201
202
  localization: string,
202
203
 
203
- internal: [string, LocalizationMapping][],
204
+ internal: [string, ILocalizationMapping][],
204
205
  }
205
206
 
206
- export interface LocalizationMapping {
207
+ export interface ILocalizationMapping {
207
208
  game_spin: string,
208
209
  game_balance_pattern: string,
209
210
  game_win_pattern: string
@@ -236,10 +237,10 @@ export interface LocalizationMapping {
236
237
  auth_privacyPolicyAcceptance: string,
237
238
  auth_privacyPolicy: string,
238
239
 
239
- internal: [string, ColoredStringMapping][]
240
+ internal: [string, IColoredStringMapping][]
240
241
  }
241
242
 
242
- export let asoConfigToDefault_v4 = (config: ASOConfig_v4): ASODefaultConfig => {
243
+ export let toDefault = (config: IConfig): IASODefaultConfig => {
243
244
  return {
244
245
  id: config.id,
245
246
  bundle: config.bundle,
@@ -1,6 +1,6 @@
1
- import { ASODefaultConfig } from "./aso-default-config";
1
+ import { IASODefaultConfig } from "./aso-default-config";
2
2
 
3
- export interface ASOConfig_v5 {
3
+ export interface IConfig {
4
4
  name: string,
5
5
  email: string,
6
6
  id: number,
@@ -28,14 +28,14 @@ export interface ASOConfig_v5 {
28
28
  smscLogin: string,
29
29
  smscPassword: string,
30
30
 
31
- localization?: LocalizationMap | Localization,
32
- localizationMapping: LocalizationMapping,
33
- authorizationActionMapping: AuthorizationActionMapping,
31
+ localization?: ILocalizationMap | ILocalization,
32
+ localizationMapping: ILocalizationMapping,
33
+ authorizationActionMapping: IAuthorizationActionMapping,
34
34
  offerSectionMapping: IOfferSectionMapping,
35
35
  offerResultMapping: IOfferResultMapping,
36
- configMapping: ConfigMapping,
37
- coloredStringMapping: ColoredStringMapping,
38
- coloredSpanMapping: ColoredSpanMapping,
36
+ configMapping: IConfigMapping,
37
+ coloredStringMapping: IColoredStringMapping,
38
+ coloredSpanMapping: IColoredSpanMapping,
39
39
 
40
40
  configEndpoint: string,
41
41
  offersEndpoint: string,
@@ -82,7 +82,7 @@ export interface ASOConfig_v5 {
82
82
  version: number
83
83
  }
84
84
 
85
- export interface AuthorizationActionMapping {
85
+ export interface IAuthorizationActionMapping {
86
86
  hasNextAction: string,
87
87
  nextActionIn: string,
88
88
  changeNumberCaption: string,
@@ -95,8 +95,8 @@ export interface AuthorizationActionMapping {
95
95
  authorized: string
96
96
  }
97
97
 
98
- interface LocalizationMap {
99
- [key: string]: Localization
98
+ export interface ILocalizationMap {
99
+ [key: string]: ILocalization
100
100
  }
101
101
 
102
102
  export interface IOfferSectionMapping {
@@ -120,7 +120,7 @@ export interface LocalizedString {
120
120
  ru: string
121
121
  }
122
122
 
123
- export interface Localization {
123
+ export interface ILocalization {
124
124
  numberWillReceiveACallPattern: string,
125
125
  numberReceivedACallPattern: string,
126
126
  numberReceivedASmsPattern: string,
@@ -168,41 +168,41 @@ export interface Localization {
168
168
  game_min_rate_error_pattern: string,
169
169
  game_yourLevel: string,
170
170
 
171
- auth_title: ColoredString,
172
- auth_subtitle: ColoredString
171
+ auth_title: IColoredString,
172
+ auth_subtitle: IColoredString
173
173
  auth_changeNumber: string,
174
174
  auth_getAccess: string,
175
175
  auth_enterAsGuest: string,
176
176
  auth_privacyPolicyAcceptance: string,
177
- auth_privacyPolicy: ColoredString,
177
+ auth_privacyPolicy: IColoredString,
178
178
 
179
179
  homeHint: string
180
180
  }
181
181
 
182
- export interface ColoredString {
182
+ export interface IColoredString {
183
183
  text: string,
184
- colors: ColoredSpan[]
184
+ colors: IColoredSpan[]
185
185
  mappingName: string
186
186
  }
187
187
 
188
- interface ColoredSpan {
188
+ export interface IColoredSpan {
189
189
  from: number,
190
190
  to: number,
191
191
  color: string
192
192
  }
193
193
 
194
- export interface ColoredStringMapping {
194
+ export interface IColoredStringMapping {
195
195
  text: string,
196
196
  colors: string,
197
- internal: [string, ColoredSpanMapping][]
197
+ internal: [string, IColoredSpanMapping][]
198
198
  }
199
199
 
200
- export interface ColoredSpanMapping {
200
+ export interface IColoredSpanMapping {
201
201
  from: string,
202
202
  to: string,
203
203
  color: string
204
204
  }
205
- export interface ConfigMapping {
205
+ export interface IConfigMapping {
206
206
  fullAccess: string,
207
207
  appsflyerKey: string,
208
208
  onesignalKey: string,
@@ -217,10 +217,10 @@ export interface ConfigMapping {
217
217
  homeOnBackPressEnabled: string,
218
218
  homeButtonEnabled: string,
219
219
 
220
- internal: [string, LocalizationMapping][],
220
+ internal: [string, ILocalizationMapping][],
221
221
  }
222
222
 
223
- export interface LocalizationMapping {
223
+ export interface ILocalizationMapping {
224
224
  game_spin: string,
225
225
  game_balance_pattern: string,
226
226
  game_win_pattern: string
@@ -260,10 +260,10 @@ export interface LocalizationMapping {
260
260
 
261
261
  homeHint: string,
262
262
 
263
- internal: [string, ColoredStringMapping][]
263
+ internal: [string, IColoredStringMapping][]
264
264
  }
265
265
 
266
- export let asoConfigToDefault_v5 = (config: ASOConfig_v5): ASODefaultConfig => {
266
+ export let toDefault = (config: IConfig): IASODefaultConfig => {
267
267
  return {
268
268
  id: config.id,
269
269
  bundle: config.bundle,
@@ -1,4 +1,4 @@
1
- export interface ASODefaultConfig {
1
+ export interface IASODefaultConfig {
2
2
  id: number,
3
3
  bundle: string,
4
4
  name: string,
@@ -1,6 +1,6 @@
1
- import { ASODefaultConfig } from "./aso-default-config";
1
+ import { IASODefaultConfig } from "./aso-default-config";
2
2
 
3
3
  export interface IConfigResponse {
4
- default: ASODefaultConfig,
4
+ default: IASODefaultConfig,
5
5
  plain: any
6
6
  }
@@ -0,0 +1,31 @@
1
+ import { Document } from "mongoose"
2
+
3
+ export interface IASOUsageLogEntry extends Document {
4
+ countryCode: string,
5
+ ip: string,
6
+ timestamp: number,
7
+ phone: string
8
+ }
9
+
10
+ export interface IASOUsageLogRequest {
11
+ from: number,
12
+ to: number,
13
+ first: number,
14
+ last: number,
15
+ count: number
16
+ }
17
+
18
+ interface IASOCountryInfo {
19
+ all: number,
20
+ authorized: number
21
+ }
22
+
23
+ export interface IASOUsageLogResponse {
24
+ countriesInfo: {
25
+ [key: string]: IASOCountryInfo
26
+ },
27
+ first: number,
28
+ last: number,
29
+ entries: IASOUsageLogEntry[],
30
+ newEntries: IASOUsageLogEntry[]
31
+ }
package/src/index.ts CHANGED
@@ -2,10 +2,11 @@ export { IAsoCustomizedOffer } from "./aso/offer/aso-customized-offer"
2
2
  export { IAsoOfferResponse } from "./aso/offer/aso-offer-response"
3
3
  export { IAsoSection } from "./aso/offer/aso-offer-section"
4
4
  export * as ASO_v0 from "./aso/config/aso-config-v0"
5
- export {ASOConfig_v1, asoConfigToDefault_v1} from "./aso/config/aso-config-v1"
6
- export {ASOConfig_v2, asoConfigToDefault_v2} from "./aso/config/aso-config-v2"
7
- export {ASOConfig_v3, asoConfigToDefault_v3} from "./aso/config/aso-config-v3"
8
- export {ASOConfig_v4, asoConfigToDefault_v4} from "./aso/config/aso-config-v4"
5
+ export * as ASO_v1 from "./aso/config/aso-config-v1"
6
+ export * as ASO_v2 from "./aso/config/aso-config-v2"
7
+ export * as ASO_v3 from "./aso/config/aso-config-v3"
8
+ export * as ASO_v4 from "./aso/config/aso-config-v4"
9
+ export * as ASO_v5 from "./aso/config/aso-config-v5"
9
10
  export {IPush} from "./shared/push"
10
11
 
11
12
  export { IOffer } from "./shared/offer"
@@ -14,4 +15,6 @@ export {IOfferWallSection} from "./aso/offerwall/offerwall-section"
14
15
  export {IOfferWallOffer} from "./aso/offerwall/offerwall-offer"
15
16
  export {IOfferWallResponse} from "./aso/offerwall/offerwall-response"
16
17
 
17
- export {IFlashApp, FlashAppSchema} from "./flash/flash-app"
18
+ export {IFlashApp, FlashAppSchema} from "./flash/flash-app"
19
+
20
+ export * as ASOConfigFetch from "./aso/usage-logs/aso-config-fetch-entry"