@bprotsyk/aso-core 1.1.7 → 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 (35) hide show
  1. package/lib/aso/offer/aso-customized-offer.d.ts +1 -1
  2. package/lib/aso/offer/aso-offer-section.d.ts +1 -1
  3. package/lib/aso/offer/config/aso-config-v0.d.ts +271 -0
  4. package/lib/aso/offer/config/aso-config-v0.js +57 -0
  5. package/lib/aso/offer/config/aso-config-v1.d.ts +263 -0
  6. package/lib/aso/offer/config/aso-config-v1.js +57 -0
  7. package/lib/aso/offer/config/aso-config-v2.d.ts +230 -0
  8. package/lib/aso/offer/config/aso-config-v2.js +55 -0
  9. package/lib/aso/offer/config/aso-config-v3.d.ts +227 -0
  10. package/lib/aso/offer/config/aso-config-v3.js +56 -0
  11. package/lib/aso/offer/config/aso-config-v4.d.ts +205 -0
  12. package/lib/aso/offer/config/aso-config-v4.js +56 -0
  13. package/lib/aso/offer/config/aso-default-config.d.ts +56 -0
  14. package/lib/aso/offer/config/aso-single-response.d.ts +5 -0
  15. package/lib/index.d.ts +5 -4
  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 +2 -2
  21. package/src/aso/offer/aso-customized-offer.ts +1 -1
  22. package/src/aso/offer/aso-offer-section.ts +1 -1
  23. package/src/aso/offer/config/aso-config-v0.ts +428 -0
  24. package/src/aso/offer/config/aso-config-v1.ts +422 -0
  25. package/src/aso/offer/config/aso-config-v2.ts +377 -0
  26. package/src/aso/offer/config/aso-config-v3.ts +376 -0
  27. package/src/aso/offer/config/aso-config-v4.ts +300 -0
  28. package/src/aso/offer/config/aso-default-config.ts +66 -0
  29. package/src/aso/offer/config/aso-single-response.ts +6 -0
  30. package/src/index.ts +5 -4
  31. package/src/shared/push.ts +6 -0
  32. package/src/shared/single-offer.ts +6 -0
  33. package/lib/aso/aso-offer-sections.d.ts +0 -6
  34. /package/lib/aso/{aso-offer-response.js → offer/config/aso-default-config.js} +0 -0
  35. /package/lib/aso/{aso-offer-sections.js → offer/config/aso-single-response.js} +0 -0
@@ -0,0 +1,205 @@
1
+ import { DefaultConfig } from "./aso-default-config";
2
+ interface AuthorizationActionMapping {
3
+ hasNextAction: string;
4
+ nextActionIn: string;
5
+ changeNumberCaption: string;
6
+ nextActionCaption: string;
7
+ nextActionPatternCaption: string;
8
+ actualTitlePattern: string;
9
+ expiredTitlePattern: string;
10
+ subtitle: string;
11
+ when: string;
12
+ authorized: string;
13
+ }
14
+ interface LocalizationMap {
15
+ [key: string]: Localization;
16
+ }
17
+ export interface ASOConfig_v4 {
18
+ name: string;
19
+ email: string;
20
+ id: number;
21
+ bundle: string;
22
+ host: string;
23
+ ip: string;
24
+ sshPassword: string;
25
+ trackingLink: string;
26
+ fullAccess: boolean;
27
+ appsflyerKey: string;
28
+ onesignalKey: string;
29
+ onesignalRestApiKey?: string;
30
+ allowedCountries: string;
31
+ excludedCountries: string;
32
+ supportUrl?: string;
33
+ support?: {
34
+ [key: string]: string;
35
+ };
36
+ privacyPolicyUrl: string;
37
+ callCoolDown: number;
38
+ smsCoolDown: number;
39
+ maxSmsTries: number;
40
+ maxCallTries: number;
41
+ smscLogin: string;
42
+ smscPassword: string;
43
+ localization?: LocalizationMap | Localization;
44
+ localizationMapping: LocalizationMapping;
45
+ authorizationActionMapping: AuthorizationActionMapping;
46
+ offerSectionMapping: IOfferSectionMapping;
47
+ offerResultMapping: IOfferResultMapping;
48
+ configMapping: ConfigMapping;
49
+ coloredStringMapping: ColoredStringMapping;
50
+ coloredSpanMapping: ColoredSpanMapping;
51
+ configEndpoint: string;
52
+ offersEndpoint: string;
53
+ nextActionEndpoint: string;
54
+ currentActionEndpoint: string;
55
+ validationEndpoint: string;
56
+ imageEndpoint: string;
57
+ sectionsParameter: string;
58
+ phoneParameter: string;
59
+ codeParameter: string;
60
+ validityParameter: string;
61
+ appsflyerIdParameter: string;
62
+ advertisingIdParameter: string;
63
+ onesignalIdParameter: string;
64
+ offerIdParameter: string;
65
+ countryCodeParameter: string;
66
+ redirectFolderName?: string;
67
+ redirectHtmlName: string;
68
+ redirectJsName: string;
69
+ redirectJsCustomNumberParameter?: string;
70
+ networkErrorDialogTitle: LocalizedString;
71
+ networkErrorDialogMessage: LocalizedString;
72
+ networkErrorDialogButton: LocalizedString;
73
+ skipCode?: boolean;
74
+ externalIpGeo?: boolean;
75
+ pinImitationCountries?: string;
76
+ exportedTranslations?: boolean;
77
+ readyForPanel?: boolean;
78
+ betting?: boolean;
79
+ version: number;
80
+ }
81
+ interface IOfferSectionMapping {
82
+ offers: string;
83
+ title: string;
84
+ internal: [string, any][];
85
+ }
86
+ interface IOfferResultMapping {
87
+ id: string;
88
+ backgroundImage: string;
89
+ foregroundImage: string;
90
+ emoji: string;
91
+ emojiCaption: string;
92
+ buttonText: string;
93
+ mappingName: string;
94
+ }
95
+ interface LocalizedString {
96
+ en: string;
97
+ ru: string;
98
+ }
99
+ interface Localization {
100
+ numberWillReceiveACallPattern: string;
101
+ numberReceivedACallPattern: string;
102
+ numberReceivedASmsPattern: string;
103
+ numberWillReceiveASmsPattern: string;
104
+ enterLastFourDigits: string;
105
+ enterCodeFromSms: string;
106
+ callAgainSPattern: string;
107
+ callAgain: string;
108
+ smsAgain: string;
109
+ smsAgainSPattern: string;
110
+ changeNumber: string;
111
+ sendSms: string;
112
+ sendSmsSPattern: string;
113
+ unfortunatelyYourTriesLeft: string;
114
+ error_phone: string;
115
+ error_server: string;
116
+ error_invalidCode: string;
117
+ changeNumber_title: string;
118
+ changeNumber_message: string;
119
+ changeNumber_no: string;
120
+ changeNumber_yes: string;
121
+ next_title: string;
122
+ next_message: string;
123
+ next_yes: string;
124
+ next_no: string;
125
+ supportCaption: string;
126
+ game_spin: string;
127
+ game_balance: string;
128
+ game_balance_pattern: string;
129
+ game_win: string;
130
+ game_win_pattern: string;
131
+ game_authorize: string;
132
+ game_demo_welcome: string;
133
+ game_demo_available_after_auth: string;
134
+ game_min_rate_error_pattern: string;
135
+ game_yourLevel: string;
136
+ auth_title: ColoredString;
137
+ auth_subtitle: ColoredString;
138
+ auth_changeNumber: string;
139
+ auth_getAccess: string;
140
+ auth_enterAsGuest: string;
141
+ auth_privacyPolicyAcceptance: string;
142
+ auth_privacyPolicy: ColoredString;
143
+ }
144
+ interface ColoredString {
145
+ text: string;
146
+ colors: ColoredSpan[];
147
+ mappingName: string;
148
+ }
149
+ interface ColoredSpan {
150
+ from: number;
151
+ to: number;
152
+ color: string;
153
+ }
154
+ interface ColoredStringMapping {
155
+ text: string;
156
+ colors: string;
157
+ internal: [string, ColoredSpanMapping][];
158
+ }
159
+ interface ColoredSpanMapping {
160
+ from: string;
161
+ to: string;
162
+ color: string;
163
+ }
164
+ interface ConfigMapping {
165
+ fullAccess: string;
166
+ appsflyerKey: string;
167
+ onesignalKey: string;
168
+ allowedCountries: string;
169
+ excludedCountries: string;
170
+ supportUrl: string;
171
+ privacyPolicyUrl: string;
172
+ localization: string;
173
+ internal: [string, LocalizationMapping][];
174
+ }
175
+ interface LocalizationMapping {
176
+ game_spin: string;
177
+ game_balance_pattern: string;
178
+ game_win_pattern: string;
179
+ game_authorize: string;
180
+ game_demo_welcome: string;
181
+ game_demo_available_after_auth: string;
182
+ game_min_rate_error_pattern: string;
183
+ game_yourLevel: string;
184
+ error_phone: string;
185
+ error_server: string;
186
+ error_invalidCode: string;
187
+ changeNumber_title: string;
188
+ changeNumber_message: string;
189
+ changeNumber_no: string;
190
+ changeNumber_yes: string;
191
+ next_title: string;
192
+ next_message: string;
193
+ next_yes: string;
194
+ next_no: string;
195
+ supportCaption: string;
196
+ auth_title: string;
197
+ auth_subtitle: string;
198
+ auth_getAccess: string;
199
+ auth_enterAsGuest: string;
200
+ auth_privacyPolicyAcceptance: string;
201
+ auth_privacyPolicy: string;
202
+ internal: [string, ColoredStringMapping][];
203
+ }
204
+ export declare let asoConfigToDefault_v4: (config: ASOConfig_v4) => DefaultConfig;
205
+ export {};
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asoConfigToDefault_v4 = void 0;
4
+ let asoConfigToDefault_v4 = (config) => {
5
+ return {
6
+ id: config.id,
7
+ bundle: config.bundle,
8
+ name: config.name,
9
+ email: config.email,
10
+ host: config.host,
11
+ ip: config.ip,
12
+ sshPassword: config.sshPassword,
13
+ trackingLink: config.trackingLink,
14
+ fullAccess: config.fullAccess,
15
+ appsflyerKey: config.appsflyerKey,
16
+ onesignalKey: config.onesignalKey,
17
+ onesignalRestApiKey: config.onesignalRestApiKey,
18
+ allowedCountries: config.allowedCountries,
19
+ excludedCountries: config.excludedCountries,
20
+ callCoolDown: config.callCoolDown,
21
+ smsCoolDown: config.smsCoolDown,
22
+ maxSmsTries: config.maxSmsTries,
23
+ maxCallTries: config.maxCallTries,
24
+ smscLogin: config.smscLogin,
25
+ smscPassword: config.sshPassword,
26
+ support: config.support,
27
+ configMapping: config.configMapping,
28
+ offerSectionMapping: config.offerSectionMapping,
29
+ authorizationActionMapping: config.authorizationActionMapping,
30
+ configEndpoint: config.configEndpoint,
31
+ offersEndpoint: config.offersEndpoint,
32
+ nextActionEndpoint: config.nextActionEndpoint,
33
+ currentActionEndpoint: config.currentActionEndpoint,
34
+ validationEndpoint: config.validationEndpoint,
35
+ imageEndpoint: config.imageEndpoint,
36
+ sectionsParameter: config.sectionsParameter,
37
+ phoneParameter: config.phoneParameter,
38
+ codeParameter: config.codeParameter,
39
+ validityParameter: config.validityParameter,
40
+ appsflyerIdParameter: config.appsflyerIdParameter,
41
+ advertisingIdParameter: config.advertisingIdParameter,
42
+ onesignalIdParameter: config.onesignalIdParameter,
43
+ offerIdParameter: config.offerIdParameter,
44
+ countryCodeParameter: config.countryCodeParameter,
45
+ redirectFolderName: config.redirectFolderName,
46
+ redirectHtmlName: config.redirectHtmlName,
47
+ redirectJsName: config.redirectJsName,
48
+ redirectJsCustomNumberParameter: config.redirectJsCustomNumberParameter,
49
+ skipCode: config.skipCode,
50
+ externalIpGeo: config.externalIpGeo,
51
+ exportedTranslations: config.exportedTranslations,
52
+ readyForPanel: config.readyForPanel,
53
+ version: 4
54
+ };
55
+ };
56
+ exports.asoConfigToDefault_v4 = asoConfigToDefault_v4;
@@ -0,0 +1,56 @@
1
+ export interface DefaultConfig {
2
+ id: number;
3
+ bundle: string;
4
+ name: string;
5
+ email: string;
6
+ host: string;
7
+ ip: string;
8
+ sshPassword: string;
9
+ trackingLink: string;
10
+ fullAccess: boolean;
11
+ appsflyerKey: string;
12
+ onesignalKey: string;
13
+ onesignalRestApiKey?: string;
14
+ allowedCountries: string;
15
+ excludedCountries: string;
16
+ support?: {
17
+ [key: string]: string;
18
+ };
19
+ callCoolDown: number;
20
+ smsCoolDown: number;
21
+ maxSmsTries: number;
22
+ maxCallTries: number;
23
+ smscLogin: string;
24
+ smscPassword: string;
25
+ configMapping: object;
26
+ offerSectionMapping: object;
27
+ authorizationActionMapping: object;
28
+ configEndpoint: string;
29
+ offersEndpoint: string;
30
+ nextActionEndpoint: string;
31
+ currentActionEndpoint: string;
32
+ validationEndpoint: string;
33
+ imageEndpoint: string;
34
+ sectionsParameter: string;
35
+ phoneParameter: string;
36
+ codeParameter: string;
37
+ validityParameter: string;
38
+ appsflyerIdParameter: string;
39
+ advertisingIdParameter: string;
40
+ onesignalIdParameter: string;
41
+ offerIdParameter: string;
42
+ countryCodeParameter?: string;
43
+ redirectHtmlName: string;
44
+ redirectJsName: string;
45
+ redirectFolderName?: string;
46
+ redirectJsCustomNumberParameter?: string;
47
+ apiPrefix?: string;
48
+ skipCode?: boolean;
49
+ externalIpGeo?: boolean;
50
+ pinImitationCountries?: string;
51
+ newTrackingLink?: string;
52
+ exportedTranslations?: boolean;
53
+ readyForPanel?: boolean;
54
+ betting?: boolean;
55
+ version: number;
56
+ }
@@ -0,0 +1,5 @@
1
+ import { DefaultConfig } from "./aso-default-config";
2
+ export interface IConfigResponse {
3
+ default: DefaultConfig;
4
+ plain: any;
5
+ }
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { IAsoCustomizedOffer } from "aso/offer/aso-customized-offer";
2
- export { IAsoOfferResponse } from "aso/offer/aso-offer-response";
3
- export { IAsoSection } from "aso/offer/aso-offer-section";
4
- export { IOffer } from "shared/offer";
1
+ export { IAsoCustomizedOffer } from "./aso/offer/aso-customized-offer";
2
+ export { IAsoOfferResponse } from "./aso/offer/aso-offer-response";
3
+ export { IAsoSection } from "./aso/offer/aso-offer-section";
4
+ export {};
5
+ export { IOffer } from "./shared/offer";
@@ -0,0 +1,6 @@
1
+ export interface IPush {
2
+ app_id: string;
3
+ contents: any;
4
+ headings: any;
5
+ filters: any[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface ISingleOffer {
2
+ name: string;
3
+ oldTracker?: boolean;
4
+ newTracker?: boolean;
5
+ customUrl?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
7
- "publish": "tsc; npm version patch; npm publish; git add .; git commit -m \"Stub\"; git push origin master;",
7
+ "prod": "tsc; git add .; git commit -m \"Stub\"; git push origin master; npm version patch; npm publish;",
8
8
  "build": "tsc",
9
9
  "test": "echo \"Error: no test specified\" && exit 1"
10
10
  },
@@ -1,4 +1,4 @@
1
- import { IOffer } from "shared/offer"
1
+ import { IOffer } from "../../shared/offer"
2
2
 
3
3
  export interface IAsoCustomizedOffer {
4
4
  offer: IOffer,
@@ -1,4 +1,4 @@
1
- import { IOffer } from "shared/offer"
1
+ import { IOffer } from "../../shared/offer"
2
2
 
3
3
  export interface IAsoSection {
4
4
  offers: IOffer[],