@bprotsyk/aso-core 2.1.223 → 2.1.225
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/app/app.d.ts +237 -362
- package/lib/app/app.js +93 -175
- package/lib/general/cloudflare-domain.d.ts +1 -0
- package/lib/general/domain.d.ts +82 -0
- package/lib/general/domain.js +5 -0
- package/lib/index.d.ts +5 -2
- package/lib/index.js +21 -17
- package/lib/keitaro/keitaro-campaign.d.ts +0 -1
- package/lib/keitaro/keitaro-offer.d.ts +3 -14
- package/lib/network/keitaro/http.js +1 -1
- package/lib/network/keitaro/keitaro-service.d.ts +37 -51
- package/lib/network/keitaro/keitaro-service.js +442 -192
- package/lib/offers/list.d.ts +18 -18
- package/lib/offers/offer.d.ts +4 -0
- package/lib/offers/offer.js +1 -0
- package/lib/panel/app/upsert-flash-app-request.d.ts +14 -14
- package/lib/server/server.d.ts +140 -0
- package/lib/server/server.js +36 -0
- package/lib/utils/keitaro-utils.d.ts +1 -1
- package/lib/utils/keitaro-utils.js +9 -722
- package/package.json +1 -1
- package/src/app/app.ts +316 -307
- package/src/general/cloudflare-domain.ts +1 -0
- package/src/general/domain.ts +8 -0
- package/src/index.ts +27 -30
- package/src/keitaro/keitaro-campaign.ts +0 -1
- package/src/keitaro/keitaro-offer.ts +3 -14
- package/src/network/keitaro/http.ts +1 -1
- package/src/network/keitaro/keitaro-service.ts +533 -232
- package/src/offers/offer.ts +2 -0
- package/src/panel/app/upsert-flash-app-request.ts +48 -0
- package/src/server/server.ts +57 -0
- package/src/utils/keitaro-utils.ts +24 -0
package/package.json
CHANGED
package/src/app/app.ts
CHANGED
|
@@ -1,341 +1,350 @@
|
|
|
1
|
-
import { Document, Schema } from "mongoose";
|
|
1
|
+
import mongoose, { Document, Schema } from "mongoose";
|
|
2
|
+
import { AppType } from "./app-type";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
campaign_id: number
|
|
5
|
-
id: number
|
|
6
|
-
method: "GET" | "POST"
|
|
7
|
-
statuses: string[]
|
|
8
|
-
url: string
|
|
9
|
-
notes?: string
|
|
10
|
-
}
|
|
4
|
+
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
DIRECT = "direct"
|
|
6
|
+
export enum AppMode {
|
|
7
|
+
OFFERWALL = 'offerwall',
|
|
8
|
+
WEBVIEW = 'webview',
|
|
16
9
|
}
|
|
17
10
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
NONE = "none",
|
|
24
|
-
POLICY = "policy",
|
|
25
|
-
OFFER_STUB = "offer_stub",
|
|
26
|
-
WEB = "web",
|
|
27
|
-
BANNER = "banner",
|
|
28
|
-
PWA = "pwa"
|
|
11
|
+
export enum AppStatus {
|
|
12
|
+
ARCHIVED = "ARCHIVED",
|
|
13
|
+
IN_DEVELOPMENT = "IN_DEVELOPMENT",
|
|
14
|
+
READY = "READY",
|
|
15
|
+
DISABLED = "DISABLED"
|
|
29
16
|
}
|
|
30
17
|
|
|
31
|
-
// @deprecated - Platform enum (no longer used)
|
|
32
18
|
export enum EPlatform {
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
GENERAL = '@',
|
|
20
|
+
HUAWEI = 'hw',
|
|
21
|
+
SAMSUNG = 'sm',
|
|
22
|
+
ruSTORE = 'rs',
|
|
23
|
+
XIAOMI = 'xm',
|
|
24
|
+
APKPURE = 'ap',
|
|
25
|
+
TELEGRAM = 'tg',
|
|
26
|
+
AMAZON = 'am',
|
|
27
|
+
TEST = 'test'
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
// @deprecated - Direct type enum
|
|
38
30
|
export enum EDirectType {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
KEITARO_OFFER = "keitaro_offer",
|
|
42
|
-
OFFER_DIRECT = "offer_direct"
|
|
31
|
+
KEITARO_OFFER = 'keitaroOffer',
|
|
32
|
+
OFFER_DIRECT = 'offerDirect'
|
|
43
33
|
}
|
|
44
34
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
params?: any
|
|
50
|
-
newPlatform?: boolean
|
|
51
|
-
direct?: {
|
|
52
|
-
keitaroData?: IAppKeitaroData | boolean
|
|
53
|
-
addDefaultStreams?: boolean
|
|
54
|
-
directType?: EDirectType | string
|
|
55
|
-
enabled?: boolean
|
|
56
|
-
trackingUrl?: string
|
|
57
|
-
}
|
|
58
|
-
offerwall?: {
|
|
59
|
-
keitaroData?: IAppKeitaroData | boolean
|
|
60
|
-
}
|
|
61
|
-
appsflyerParams?: any
|
|
62
|
-
keitaroData?: IAppKeitaroData | boolean
|
|
63
|
-
metricaParams?: any
|
|
64
|
-
adjustParams?: any
|
|
65
|
-
geo?: string
|
|
35
|
+
export enum PlugType {
|
|
36
|
+
PASTEBIN = "PASTEBIN",
|
|
37
|
+
GIST = "GIST",
|
|
38
|
+
OTHER = "OTHER"
|
|
66
39
|
}
|
|
67
40
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
41
|
+
export enum IntegrationVersion {
|
|
42
|
+
NONE = "MVVM",
|
|
43
|
+
POLICY = "POLICY",
|
|
44
|
+
OFFER_STUB = "OFFER_STUB",
|
|
45
|
+
WEB = "WEB",
|
|
46
|
+
WEB_DIRECT = "WEB_DIRECT",
|
|
47
|
+
BANNER = "BANNER",
|
|
48
|
+
PWA = "PWA",
|
|
49
|
+
OFFERWALL = "OFFERWALL"
|
|
73
50
|
}
|
|
74
51
|
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
export
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export enum AlternativeSourceType { DEFAULT = "default" }
|
|
83
|
-
export enum AlternativeStorageType { DEFAULT = "default" }
|
|
84
|
-
|
|
85
|
-
// Upsert request interface
|
|
86
|
-
export interface IUpsertAppRequest {
|
|
87
|
-
id: number
|
|
88
|
-
enabled?: boolean
|
|
89
|
-
bundle?: string
|
|
90
|
-
name?: string
|
|
91
|
-
|
|
92
|
-
// Integration type - offerwall or direct
|
|
93
|
-
integrationType?: IntegrationType
|
|
94
|
-
|
|
95
|
-
// Keitaro campaigns
|
|
96
|
-
offerwallCampaign?: IAppKeitaroData | null
|
|
97
|
-
directCampaign?: IAppKeitaroData | null
|
|
98
|
-
|
|
99
|
-
domainParams?: Partial<IDomainParams>
|
|
100
|
-
policyPath?: string
|
|
101
|
-
status?: AppStatus
|
|
102
|
-
file?: any
|
|
103
|
-
|
|
104
|
-
// @deprecated fields
|
|
105
|
-
keitaroData?: any
|
|
106
|
-
bannerParams?: any
|
|
107
|
-
offersStubParams?: any
|
|
108
|
-
platforms?: { [key: string]: IPlatformParams }
|
|
109
|
-
ech?: any
|
|
110
|
-
appmetricaApiKey?: string
|
|
111
|
-
appmetricaAppId?: string | number
|
|
112
|
-
integrationVersion?: IntegrationVersion
|
|
113
|
-
geos?: string[]
|
|
52
|
+
// ─── Attribution interfaces ───────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
export interface IAdjustEventIds {
|
|
55
|
+
lead: string
|
|
56
|
+
hold: string
|
|
57
|
+
sale: string
|
|
58
|
+
rejected: string
|
|
114
59
|
}
|
|
115
60
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
61
|
+
export interface IAppsflyerParams {
|
|
62
|
+
apiToken: string
|
|
63
|
+
eventIds?: Record<string, string>
|
|
64
|
+
appId?: string
|
|
65
|
+
devKey: string
|
|
66
|
+
}
|
|
121
67
|
|
|
122
|
-
export interface
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
name: string
|
|
126
|
-
bundle: string
|
|
127
|
-
status: AppStatus
|
|
128
|
-
|
|
129
|
-
// Integration type - offerwall is default
|
|
130
|
-
integrationType: IntegrationType
|
|
131
|
-
|
|
132
|
-
// Keitaro campaigns - one or both can be set
|
|
133
|
-
offerwallCampaign: IAppKeitaroData | null
|
|
134
|
-
directCampaign: IAppKeitaroData | null
|
|
135
|
-
|
|
136
|
-
// OneSignal
|
|
137
|
-
onesignalAppId: string
|
|
138
|
-
onesignalRestApiKey: string
|
|
139
|
-
|
|
140
|
-
// AppsFlyer
|
|
141
|
-
appsflyerParams?: IAppsflyerParams
|
|
142
|
-
|
|
143
|
-
// Domain
|
|
144
|
-
domainParams: IDomainParams
|
|
145
|
-
|
|
146
|
-
// Policy
|
|
147
|
-
policyPath: string
|
|
148
|
-
|
|
149
|
-
// Postbacks
|
|
150
|
-
postbacks?: IAppsflyerPostback[]
|
|
151
|
-
|
|
152
|
-
// @deprecated - use offerwallCampaign/directCampaign instead
|
|
153
|
-
keitaroData?: IAppKeitaroData | null
|
|
154
|
-
platforms?: { [key: string]: IPlatformParams }
|
|
155
|
-
bannerParams?: any
|
|
156
|
-
offersStubParams?: any
|
|
157
|
-
ech?: any
|
|
158
|
-
offerwallParams?: any
|
|
159
|
-
appmetricaApiKey?: string
|
|
160
|
-
appmetricaAppId?: string
|
|
161
|
-
integrationVersion?: IntegrationVersion
|
|
162
|
-
geos?: string[]
|
|
68
|
+
export interface IAdjustParams {
|
|
69
|
+
appId: string
|
|
70
|
+
eventIds: IAdjustEventIds
|
|
163
71
|
}
|
|
164
72
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
73
|
+
// ─── Campaign ─────────────────────────────────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
export interface IKeitaroDirectTrackingParams {
|
|
76
|
+
naming: string
|
|
77
|
+
firebase_app_instance_id: string
|
|
78
|
+
firebase_user_id: string
|
|
79
|
+
firebase_device_language_code: string
|
|
80
|
+
firebase_push_token: string
|
|
81
|
+
bundle_id: string
|
|
82
|
+
advertising_id: string
|
|
83
|
+
appsflyer_device_id: string
|
|
84
|
+
campaign: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Single campaign object — replaces keitaroData / offerwallCampaign / directCampaign */
|
|
88
|
+
export interface IAppCampaign {
|
|
89
|
+
campaignId: number
|
|
90
|
+
campaignName: string
|
|
91
|
+
campaignAlias: string
|
|
92
|
+
campaignToken?: string
|
|
93
|
+
domainId: number
|
|
94
|
+
domainName: string
|
|
95
|
+
trackingParams?: IKeitaroDirectTrackingParams
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @deprecated Use IAppCampaign instead */
|
|
99
|
+
export interface IAppKeitaroData {
|
|
100
|
+
trackingCampaignId: number
|
|
101
|
+
trackingCampaignName: string
|
|
102
|
+
trackingCampaignAlias: string
|
|
103
|
+
trackingDomainId: number
|
|
104
|
+
trackingDomainName: string
|
|
105
|
+
campingToken?: string
|
|
106
|
+
trackingParams?: IKeitaroDirectTrackingParams
|
|
170
107
|
}
|
|
171
108
|
|
|
109
|
+
// ─── Domain params ────────────────────────────────────────────────────────────
|
|
110
|
+
|
|
172
111
|
export interface IDomainParams {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
112
|
+
name: string
|
|
113
|
+
clouflareZone: string
|
|
114
|
+
ready: boolean
|
|
176
115
|
}
|
|
177
116
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
117
|
+
// ─── Offerwall ────────────────────────────────────────────────────────────────
|
|
118
|
+
|
|
119
|
+
export interface IOfferwallParams {
|
|
120
|
+
path: string
|
|
121
|
+
version?: number | string
|
|
122
|
+
sectionsListId?: number
|
|
182
123
|
}
|
|
183
124
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
appsflyer_device_id: string
|
|
193
|
-
campaign: string
|
|
125
|
+
// ─── Webview config ───────────────────────────────────────────────────────────
|
|
126
|
+
|
|
127
|
+
export interface IWebviewPostParams {
|
|
128
|
+
appsflyerIdKey: string
|
|
129
|
+
deviceIdKey: string
|
|
130
|
+
advertisingIdKey: string
|
|
131
|
+
sessionIdKey: string
|
|
132
|
+
bundleIdKey: string
|
|
194
133
|
}
|
|
195
134
|
|
|
196
|
-
export interface
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
135
|
+
export interface IWebviewConfig {
|
|
136
|
+
/** Obfuscated template: { param_name: assembled_value }. Values are link parts at runtime, stub values at rest. */
|
|
137
|
+
template: Record<string, string>
|
|
138
|
+
/** GPT-generated static fallback data returned when no offer link is available */
|
|
139
|
+
stubData: Record<string, any>
|
|
140
|
+
/** Generated endpoint path that receives POST from mobile app, e.g. "/xk3m9p" */
|
|
141
|
+
postPath: string
|
|
142
|
+
/** Obfuscated POST body field names for the 5 critical IDs */
|
|
143
|
+
postParams: IWebviewPostParams
|
|
204
144
|
}
|
|
205
145
|
|
|
146
|
+
// ─── Postbacks ────────────────────────────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
export interface IAppsflyerPostback {
|
|
149
|
+
campaign_id: number
|
|
150
|
+
id: number
|
|
151
|
+
method: "GET" | "POST"
|
|
152
|
+
statuses: string[]
|
|
153
|
+
url: string
|
|
154
|
+
notes?: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// ─── Main IApp interface ──────────────────────────────────────────────────────
|
|
158
|
+
|
|
159
|
+
export interface IApp extends Document {
|
|
160
|
+
id: number
|
|
161
|
+
enabled: boolean
|
|
162
|
+
name: string
|
|
163
|
+
bundle: string
|
|
164
|
+
status: AppStatus
|
|
165
|
+
/** Technical integration mode */
|
|
166
|
+
appMode: AppMode
|
|
167
|
+
/** Content type classification (gambling / finances) */
|
|
168
|
+
appType?: AppType
|
|
169
|
+
geos?: string[]
|
|
170
|
+
|
|
171
|
+
/** Single Keitaro campaign for this app */
|
|
172
|
+
campaign: IAppCampaign | null
|
|
173
|
+
|
|
174
|
+
/** AppsFlyer attribution (was platforms[key].appsflyerParams) */
|
|
175
|
+
appsflyerParams?: IAppsflyerParams
|
|
176
|
+
|
|
177
|
+
/** Adjust attribution (was platforms[key].adjustParams) */
|
|
178
|
+
adjustParams?: IAdjustParams
|
|
179
|
+
|
|
180
|
+
/** Offerwall-specific config (only when appMode === OFFERWALL) */
|
|
181
|
+
offerwallParams?: IOfferwallParams
|
|
182
|
+
|
|
183
|
+
domainParams: IDomainParams
|
|
184
|
+
policyPath: string
|
|
185
|
+
postbacks?: IAppsflyerPostback[]
|
|
186
|
+
|
|
187
|
+
/** Webview-specific config (only when appMode === WEBVIEW) */
|
|
188
|
+
webviewConfig?: IWebviewConfig
|
|
189
|
+
|
|
190
|
+
/** Reference to IServer._id (webview apps only) */
|
|
191
|
+
serverId?: string
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// ─── Mongoose schema ──────────────────────────────────────────────────────────
|
|
195
|
+
|
|
206
196
|
export const AppSchema = new Schema({
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
campaign: String
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
appsflyerParams: {
|
|
280
|
-
apiToken: String,
|
|
281
|
-
eventIds: Object,
|
|
282
|
-
appId: String,
|
|
283
|
-
devKey: String
|
|
284
|
-
},
|
|
285
|
-
domainParams: {
|
|
286
|
-
name: {
|
|
287
|
-
type: String,
|
|
288
|
-
unique: true
|
|
289
|
-
},
|
|
290
|
-
clouflareZone: String,
|
|
291
|
-
ready: Boolean
|
|
292
|
-
},
|
|
293
|
-
policyPath: {
|
|
294
|
-
type: String,
|
|
295
|
-
default: "none"
|
|
296
|
-
},
|
|
297
|
-
postbacks: [{
|
|
298
|
-
campaign_id: {
|
|
299
|
-
type: Number,
|
|
300
|
-
required: true
|
|
301
|
-
},
|
|
302
|
-
id: {
|
|
303
|
-
type: Number,
|
|
304
|
-
required: true
|
|
305
|
-
},
|
|
306
|
-
method: {
|
|
307
|
-
type: String,
|
|
308
|
-
enum: ["GET", "POST"],
|
|
309
|
-
required: true
|
|
310
|
-
},
|
|
311
|
-
statuses: [{
|
|
312
|
-
type: String,
|
|
313
|
-
required: true
|
|
314
|
-
}],
|
|
315
|
-
url: {
|
|
316
|
-
type: String,
|
|
317
|
-
required: true
|
|
318
|
-
},
|
|
319
|
-
notes: {
|
|
320
|
-
type: String,
|
|
321
|
-
required: false
|
|
322
|
-
}
|
|
323
|
-
}],
|
|
324
|
-
// @deprecated fields for backwards compatibility
|
|
325
|
-
keitaroData: {
|
|
326
|
-
trackingCampaignId: Number,
|
|
327
|
-
trackingCampaignName: String,
|
|
328
|
-
trackingCampaignAlias: String,
|
|
329
|
-
trackingDomainId: Number,
|
|
330
|
-
trackingDomainName: String,
|
|
331
|
-
campingToken: String,
|
|
332
|
-
trackingParams: Schema.Types.Mixed
|
|
333
|
-
},
|
|
334
|
-
platforms: Schema.Types.Mixed,
|
|
335
|
-
bannerParams: Schema.Types.Mixed,
|
|
336
|
-
offersStubParams: Schema.Types.Mixed,
|
|
337
|
-
ech: Schema.Types.Mixed,
|
|
338
|
-
offerwallParams: Schema.Types.Mixed,
|
|
339
|
-
appmetricaApiKey: String,
|
|
340
|
-
appmetricaAppId: String
|
|
197
|
+
id: {
|
|
198
|
+
type: Number,
|
|
199
|
+
unique: true,
|
|
200
|
+
required: true
|
|
201
|
+
},
|
|
202
|
+
enabled: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
required: true,
|
|
205
|
+
default: false
|
|
206
|
+
},
|
|
207
|
+
status: {
|
|
208
|
+
type: String,
|
|
209
|
+
enum: Object.values(AppStatus),
|
|
210
|
+
default: AppStatus.IN_DEVELOPMENT
|
|
211
|
+
},
|
|
212
|
+
appMode: {
|
|
213
|
+
type: String,
|
|
214
|
+
enum: Object.values(AppMode),
|
|
215
|
+
default: AppMode.OFFERWALL
|
|
216
|
+
},
|
|
217
|
+
appType: {
|
|
218
|
+
type: String,
|
|
219
|
+
required: false
|
|
220
|
+
},
|
|
221
|
+
bundle: {
|
|
222
|
+
type: String,
|
|
223
|
+
unique: true,
|
|
224
|
+
required: true
|
|
225
|
+
},
|
|
226
|
+
name: String,
|
|
227
|
+
geos: [String],
|
|
228
|
+
|
|
229
|
+
campaign: {
|
|
230
|
+
campaignId: { type: Number, default: 0 },
|
|
231
|
+
campaignName: { type: String, default: 'none' },
|
|
232
|
+
campaignAlias: { type: String, default: 'none' },
|
|
233
|
+
campaignToken: { type: String },
|
|
234
|
+
domainId: { type: Number, default: 0 },
|
|
235
|
+
domainName: { type: String, default: 'none' },
|
|
236
|
+
trackingParams: { type: Object }
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
appsflyerParams: { type: Object },
|
|
240
|
+
adjustParams: { type: Object },
|
|
241
|
+
|
|
242
|
+
offerwallParams: { type: Object },
|
|
243
|
+
|
|
244
|
+
domainParams: {
|
|
245
|
+
name: { type: String, unique: true },
|
|
246
|
+
clouflareZone: { type: String },
|
|
247
|
+
ready: { type: Boolean, default: false }
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
policyPath: {
|
|
251
|
+
type: String,
|
|
252
|
+
default: 'none'
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
postbacks: [{
|
|
256
|
+
campaign_id: { type: Number, required: true },
|
|
257
|
+
id: { type: Number, required: true },
|
|
258
|
+
method: { type: String, enum: ['GET', 'POST'], required: true },
|
|
259
|
+
statuses: [{ type: String, required: true }],
|
|
260
|
+
url: { type: String, required: true },
|
|
261
|
+
notes: { type: String, required: false }
|
|
262
|
+
}],
|
|
263
|
+
|
|
264
|
+
webviewConfig: { type: Object },
|
|
265
|
+
serverId: { type: String }
|
|
341
266
|
})
|
|
267
|
+
|
|
268
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
269
|
+
|
|
270
|
+
export const getPlatformName = (platform: EPlatform | undefined): string | false => {
|
|
271
|
+
switch (platform) {
|
|
272
|
+
case EPlatform.SAMSUNG: return "samsung";
|
|
273
|
+
case EPlatform.HUAWEI: return "huawei";
|
|
274
|
+
case EPlatform.ruSTORE: return "ruStore";
|
|
275
|
+
case EPlatform.XIAOMI: return "xiaomi";
|
|
276
|
+
case EPlatform.APKPURE: return "apkpure";
|
|
277
|
+
case EPlatform.TELEGRAM: return "telegram";
|
|
278
|
+
case EPlatform.AMAZON: return "amazon";
|
|
279
|
+
default: return false;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// ─── Legacy stubs (kept for compatibility with keitaro-service.ts utilities) ──
|
|
284
|
+
|
|
285
|
+
/** @deprecated */
|
|
286
|
+
export interface IPlatformParams {
|
|
287
|
+
enabled: boolean
|
|
288
|
+
adjustParams?: IAdjustParams
|
|
289
|
+
direct?: {
|
|
290
|
+
enabled: boolean
|
|
291
|
+
keitaroData: IAppKeitaroData | boolean
|
|
292
|
+
directType?: EDirectType
|
|
293
|
+
addDefaultStreams?: boolean
|
|
294
|
+
}
|
|
295
|
+
appsflyerParams?: IAppsflyerParams
|
|
296
|
+
proxied?: boolean
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** @deprecated */
|
|
300
|
+
export interface IBannerParams {
|
|
301
|
+
dataPath: string
|
|
302
|
+
imagePath: string
|
|
303
|
+
imageParam: string
|
|
304
|
+
linkParam: string
|
|
305
|
+
showStubOnError?: boolean
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** @deprecated */
|
|
309
|
+
export interface IOffersStubParams {
|
|
310
|
+
offersPath: string
|
|
311
|
+
imagesPath: string
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** @deprecated */
|
|
315
|
+
export interface IRemovalInfo {
|
|
316
|
+
reason: string
|
|
317
|
+
date: number
|
|
318
|
+
status: string
|
|
319
|
+
images: string[]
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/** @deprecated */
|
|
323
|
+
export interface IPrivacyPolicyParams {
|
|
324
|
+
showButtonQuery: string
|
|
325
|
+
button?: { text: string }
|
|
326
|
+
mustRead: boolean
|
|
327
|
+
dark: boolean
|
|
328
|
+
path: string
|
|
329
|
+
advertisingIdQuery: string
|
|
330
|
+
confirmFunctionName: string
|
|
331
|
+
redirectFunctionName: string
|
|
332
|
+
redirect: boolean
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** @deprecated */
|
|
336
|
+
export interface IRemoveDataParams {
|
|
337
|
+
buttonText: string
|
|
338
|
+
resultText: string
|
|
339
|
+
errorText: string
|
|
340
|
+
inputHint: string
|
|
341
|
+
dark: boolean
|
|
342
|
+
path: string
|
|
343
|
+
callbackFunctionName: string
|
|
344
|
+
toSplashAfterSuccess: boolean
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** @deprecated stub — ETeam was referenced in some legacy export */
|
|
348
|
+
export enum ETeam {
|
|
349
|
+
MAIN = 'main'
|
|
350
|
+
}
|