@bprotsyk/aso-core 1.2.98 → 1.2.100
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/flash/flash-app.d.ts +2 -15
- package/lib/flash/flash-app.js +1 -44
- package/lib/utils/keitaro-utils.js +47 -49
- package/package.json +1 -1
- package/src/flash/flash-app.ts +2 -49
- package/src/utils/keitaro-utils.ts +48 -48
package/lib/flash/flash-app.d.ts
CHANGED
|
@@ -12,11 +12,7 @@ export interface IFlashApp extends Document {
|
|
|
12
12
|
trackingUrl?: string;
|
|
13
13
|
bundle: string;
|
|
14
14
|
pushesEnabled?: boolean;
|
|
15
|
-
|
|
16
|
-
plugType: PlugType;
|
|
17
|
-
plugContent: string;
|
|
18
|
-
plugStatus: FlashAppPlugStatus;
|
|
19
|
-
plugAccountId: number;
|
|
15
|
+
sourceUrl?: string;
|
|
20
16
|
reservePlugId?: string;
|
|
21
17
|
reservePlugType?: PlugType;
|
|
22
18
|
reservePlugContent?: string;
|
|
@@ -77,8 +73,6 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
77
73
|
id: number;
|
|
78
74
|
bundle: string;
|
|
79
75
|
trackingUrl: string;
|
|
80
|
-
plugId: string;
|
|
81
|
-
plugType: string;
|
|
82
76
|
geos: string;
|
|
83
77
|
onesignalAppId: string;
|
|
84
78
|
onesignalRestApiKey: string;
|
|
@@ -87,14 +81,7 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
87
81
|
developerOrganization: string;
|
|
88
82
|
name?: string | undefined;
|
|
89
83
|
pushesEnabled?: boolean | undefined;
|
|
90
|
-
|
|
91
|
-
reservePlugAccountId?: number | undefined;
|
|
92
|
-
plugContent?: string | undefined;
|
|
93
|
-
plugStatus?: string | undefined;
|
|
94
|
-
reservePlugId?: string | undefined;
|
|
95
|
-
reservePlugType?: string | undefined;
|
|
96
|
-
reservePlugContent?: string | undefined;
|
|
97
|
-
reservePlugStatus?: string | undefined;
|
|
84
|
+
sourceUrl?: string | undefined;
|
|
98
85
|
policyUrl?: string | undefined;
|
|
99
86
|
generationOptions?: {
|
|
100
87
|
splashActivityClassName: string;
|
package/lib/flash/flash-app.js
CHANGED
|
@@ -38,50 +38,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
|
|
|
38
38
|
default: null
|
|
39
39
|
},
|
|
40
40
|
pushesEnabled: Boolean,
|
|
41
|
-
|
|
42
|
-
type: String,
|
|
43
|
-
// unique: true,
|
|
44
|
-
required: true
|
|
45
|
-
},
|
|
46
|
-
plugType: {
|
|
47
|
-
type: String,
|
|
48
|
-
enum: PlugType,
|
|
49
|
-
default: PlugType.PASTEBIN,
|
|
50
|
-
required: true
|
|
51
|
-
},
|
|
52
|
-
plugContent: {
|
|
53
|
-
type: String,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
plugStatus: {
|
|
57
|
-
type: String,
|
|
58
|
-
enum: FlashAppPlugStatus,
|
|
59
|
-
default: FlashAppPlugStatus.DISABLED,
|
|
60
|
-
required: false
|
|
61
|
-
},
|
|
62
|
-
plugAccountId: Number,
|
|
63
|
-
reservePlugId: {
|
|
64
|
-
type: String,
|
|
65
|
-
// unique: true,
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
reservePlugType: {
|
|
69
|
-
type: String,
|
|
70
|
-
enum: PlugType,
|
|
71
|
-
default: PlugType.PASTEBIN,
|
|
72
|
-
required: false
|
|
73
|
-
},
|
|
74
|
-
reservePlugContent: {
|
|
75
|
-
type: String,
|
|
76
|
-
required: false
|
|
77
|
-
},
|
|
78
|
-
reservePlugStatus: {
|
|
79
|
-
type: String,
|
|
80
|
-
enum: FlashAppPlugStatus,
|
|
81
|
-
default: FlashAppPlugStatus.DISABLED,
|
|
82
|
-
required: false
|
|
83
|
-
},
|
|
84
|
-
reservePlugAccountId: Number,
|
|
41
|
+
sourceUrl: String,
|
|
85
42
|
policyUrl: {
|
|
86
43
|
type: String,
|
|
87
44
|
// unique: true,
|
|
@@ -27,8 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.createFlashCampaigns = exports.createOWStreamPartialPayload = exports.prepareOWCampaignParameters = exports.createOrFindFlashRedirectCampaign = exports.removeGeosFromAllRedirectCampaigns = exports.addGeosToAllRedirectCampaigns = exports.TRAFFIC_SOURCE_ID_FLASH_AI = void 0;
|
|
30
|
-
const flash_app_1 = require("../flash/flash-app");
|
|
31
|
-
const flash_app_type_1 = require("../flash/flash-app-type");
|
|
32
30
|
const keitaro_service_1 = require("../network/keitaro/keitaro-service");
|
|
33
31
|
const sleep_promise_1 = __importDefault(require("sleep-promise"));
|
|
34
32
|
const fs = require("fs");
|
|
@@ -45,47 +43,47 @@ const COST_TYPE_CPC = "CPC";
|
|
|
45
43
|
const COST_VALUE = 0;
|
|
46
44
|
const COST_CURRENCY_USD = "USD";
|
|
47
45
|
// clear campaigns from unused / wrong streams
|
|
48
|
-
let sampleApp = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
46
|
+
// let sampleApp: IFlashApp = {
|
|
47
|
+
// id: 96,
|
|
48
|
+
// bundle: "com.dynastyof.desert",
|
|
49
|
+
// name: "Room of Fortuna",
|
|
50
|
+
// plugId: "https://pastebin.com/raw/AR2u7dSD",
|
|
51
|
+
// plugType: PlugType.PASTEBIN,
|
|
52
|
+
// plugContent: "",
|
|
53
|
+
// plugStatus: FlashAppPlugStatus.DISABLED,
|
|
54
|
+
// plugAccountId: 1,
|
|
55
|
+
// reservePlugId: "none",
|
|
56
|
+
// reservePlugType: PlugType.OTHER,
|
|
57
|
+
// reservePlugContent: "",
|
|
58
|
+
// reservePlugStatus: FlashAppPlugStatus.DISABLED,
|
|
59
|
+
// reservePlugAccountId: 1,
|
|
60
|
+
// type: FlashAppType.GAMBLING,
|
|
61
|
+
// developerEmail: "bolly.dreams@yahoo.com",
|
|
62
|
+
// developerName: "Serhii Bolsky",
|
|
63
|
+
// developerOrganization: "S.I.B FOP",
|
|
64
|
+
// onesignalAppId: "e66658af-91c3-44bc-8123-ec64b1969cbd",
|
|
65
|
+
// onesignalRestApiKey: "MDk2NjZlNTMtMzBhYi00MjEzLTg0ZGItOWVmZWZhMTczMzI0",
|
|
66
|
+
// generationOptions: {
|
|
67
|
+
// splashActivityClassName: "SplashActivity",
|
|
68
|
+
// mainActivityClassName: "YourActivity",
|
|
69
|
+
// linkName: "likn",
|
|
70
|
+
// savedName: "isOk",
|
|
71
|
+
// paranoidSeed: 228143750
|
|
72
|
+
// },
|
|
73
|
+
// geos: "RU,UA,KZ,ES,BR,PT,CL,MX",
|
|
74
|
+
// keitaroData: {
|
|
75
|
+
// redirectCampaignId: 0,
|
|
76
|
+
// redirectCampaignName: "",
|
|
77
|
+
// redirectDomainId: 0,
|
|
78
|
+
// redirectDomainName: "",
|
|
79
|
+
// trackingCampaignId: 0,
|
|
80
|
+
// trackingCampaignName: "",
|
|
81
|
+
// trackingDomainId: 0,
|
|
82
|
+
// trackingDomainName: "",
|
|
83
|
+
// clickIdParameterName: "p",
|
|
84
|
+
// offerIdParameterName: "i",
|
|
85
|
+
// }
|
|
86
|
+
// } as IFlashApp
|
|
89
87
|
let addGeosToAllRedirectCampaigns = async (geosToAdd) => {
|
|
90
88
|
let allCampaigns = await keitaro_service_1.KeitaroService.getAllCampaigns();
|
|
91
89
|
let regexp = new RegExp(`^F #`);
|
|
@@ -438,12 +436,12 @@ let gatherInfoForFlashApps = async () => {
|
|
|
438
436
|
// if (!clickIdParameterName && app && ow) console.log(`No click id parameter for #${id}`)
|
|
439
437
|
// if (!offerIdParameterName && app && ow) console.log(`No offer id parameter for #${id}`)
|
|
440
438
|
// let trackingLink = tracking?.trackingUrl
|
|
441
|
-
app.plugStatus = paste.status
|
|
442
|
-
app.plugContent = paste.content
|
|
443
|
-
app.plugType =
|
|
444
|
-
app.plugId = paste.paste_id
|
|
445
|
-
app.reservePlugType =
|
|
446
|
-
app.plugAccountId = parseInt(paste.accountId)
|
|
439
|
+
// app.plugStatus = paste.status
|
|
440
|
+
// app.plugContent = paste.content
|
|
441
|
+
// app.plugType = PlugType.PASTEBIN
|
|
442
|
+
// app.plugId = paste.paste_id
|
|
443
|
+
// app.reservePlugType = PlugType.PASTEBIN
|
|
444
|
+
// app.plugAccountId = parseInt(paste.accountId)
|
|
447
445
|
// app.keitaroData.redirectDomainName = redirectDomain || "none"
|
|
448
446
|
// app.keitaroData.redirectDomainId = redirectDomainId || 0
|
|
449
447
|
// app.keitaroData.redirectCampaignId = redirectCampaignId || 0
|
package/package.json
CHANGED
package/src/flash/flash-app.ts
CHANGED
|
@@ -16,11 +16,7 @@ export interface IFlashApp extends Document {
|
|
|
16
16
|
bundle: string
|
|
17
17
|
|
|
18
18
|
pushesEnabled?: boolean
|
|
19
|
-
|
|
20
|
-
plugType: PlugType
|
|
21
|
-
plugContent: string
|
|
22
|
-
plugStatus: FlashAppPlugStatus
|
|
23
|
-
plugAccountId: number
|
|
19
|
+
sourceUrl?: string,
|
|
24
20
|
reservePlugId?: string
|
|
25
21
|
reservePlugType?: PlugType
|
|
26
22
|
reservePlugContent?: string
|
|
@@ -103,50 +99,7 @@ export const FlashAppSchema = new Schema({
|
|
|
103
99
|
},
|
|
104
100
|
|
|
105
101
|
pushesEnabled: Boolean,
|
|
106
|
-
|
|
107
|
-
type: String,
|
|
108
|
-
// unique: true,
|
|
109
|
-
required: true
|
|
110
|
-
},
|
|
111
|
-
plugType: {
|
|
112
|
-
type: String,
|
|
113
|
-
enum: PlugType,
|
|
114
|
-
default: PlugType.PASTEBIN,
|
|
115
|
-
required: true
|
|
116
|
-
},
|
|
117
|
-
plugContent: {
|
|
118
|
-
type: String,
|
|
119
|
-
required: false
|
|
120
|
-
},
|
|
121
|
-
plugStatus: {
|
|
122
|
-
type: String,
|
|
123
|
-
enum: FlashAppPlugStatus,
|
|
124
|
-
default: FlashAppPlugStatus.DISABLED,
|
|
125
|
-
required: false
|
|
126
|
-
},
|
|
127
|
-
plugAccountId: Number,
|
|
128
|
-
reservePlugId: {
|
|
129
|
-
type: String,
|
|
130
|
-
// unique: true,
|
|
131
|
-
required: false
|
|
132
|
-
},
|
|
133
|
-
reservePlugType: {
|
|
134
|
-
type: String,
|
|
135
|
-
enum: PlugType,
|
|
136
|
-
default: PlugType.PASTEBIN,
|
|
137
|
-
required: false
|
|
138
|
-
},
|
|
139
|
-
reservePlugContent: {
|
|
140
|
-
type: String,
|
|
141
|
-
required: false
|
|
142
|
-
},
|
|
143
|
-
reservePlugStatus: {
|
|
144
|
-
type: String,
|
|
145
|
-
enum: FlashAppPlugStatus,
|
|
146
|
-
default: FlashAppPlugStatus.DISABLED,
|
|
147
|
-
required: false
|
|
148
|
-
},
|
|
149
|
-
reservePlugAccountId: Number,
|
|
102
|
+
sourceUrl: String,
|
|
150
103
|
policyUrl: {
|
|
151
104
|
type: String,
|
|
152
105
|
// unique: true,
|
|
@@ -23,48 +23,48 @@ const COST_CURRENCY_USD = "USD"
|
|
|
23
23
|
|
|
24
24
|
// clear campaigns from unused / wrong streams
|
|
25
25
|
|
|
26
|
-
let sampleApp: IFlashApp = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} as IFlashApp
|
|
26
|
+
// let sampleApp: IFlashApp = {
|
|
27
|
+
// id: 96,
|
|
28
|
+
// bundle: "com.dynastyof.desert",
|
|
29
|
+
// name: "Room of Fortuna",
|
|
30
|
+
// plugId: "https://pastebin.com/raw/AR2u7dSD",
|
|
31
|
+
// plugType: PlugType.PASTEBIN,
|
|
32
|
+
// plugContent: "",
|
|
33
|
+
// plugStatus: FlashAppPlugStatus.DISABLED,
|
|
34
|
+
// plugAccountId: 1,
|
|
35
|
+
// reservePlugId: "none",
|
|
36
|
+
// reservePlugType: PlugType.OTHER,
|
|
37
|
+
// reservePlugContent: "",
|
|
38
|
+
// reservePlugStatus: FlashAppPlugStatus.DISABLED,
|
|
39
|
+
// reservePlugAccountId: 1,
|
|
40
|
+
// type: FlashAppType.GAMBLING,
|
|
41
|
+
// developerEmail: "bolly.dreams@yahoo.com",
|
|
42
|
+
// developerName: "Serhii Bolsky",
|
|
43
|
+
// developerOrganization: "S.I.B FOP",
|
|
44
|
+
// onesignalAppId: "e66658af-91c3-44bc-8123-ec64b1969cbd",
|
|
45
|
+
// onesignalRestApiKey: "MDk2NjZlNTMtMzBhYi00MjEzLTg0ZGItOWVmZWZhMTczMzI0",
|
|
46
|
+
|
|
47
|
+
// generationOptions: {
|
|
48
|
+
// splashActivityClassName: "SplashActivity",
|
|
49
|
+
// mainActivityClassName: "YourActivity",
|
|
50
|
+
// linkName: "likn",
|
|
51
|
+
// savedName: "isOk",
|
|
52
|
+
// paranoidSeed: 228143750
|
|
53
|
+
// },
|
|
54
|
+
// geos: "RU,UA,KZ,ES,BR,PT,CL,MX",
|
|
55
|
+
// keitaroData: {
|
|
56
|
+
// redirectCampaignId: 0,
|
|
57
|
+
// redirectCampaignName: "",
|
|
58
|
+
// redirectDomainId: 0,
|
|
59
|
+
// redirectDomainName: "",
|
|
60
|
+
// trackingCampaignId: 0,
|
|
61
|
+
// trackingCampaignName: "",
|
|
62
|
+
// trackingDomainId: 0,
|
|
63
|
+
// trackingDomainName: "",
|
|
64
|
+
// clickIdParameterName: "p",
|
|
65
|
+
// offerIdParameterName: "i",
|
|
66
|
+
// }
|
|
67
|
+
// } as IFlashApp
|
|
68
68
|
|
|
69
69
|
export let addGeosToAllRedirectCampaigns = async (geosToAdd: string) => {
|
|
70
70
|
let allCampaigns = await KeitaroService.getAllCampaigns()
|
|
@@ -460,12 +460,12 @@ let gatherInfoForFlashApps = async () => {
|
|
|
460
460
|
|
|
461
461
|
// let trackingLink = tracking?.trackingUrl
|
|
462
462
|
|
|
463
|
-
app.plugStatus = paste.status
|
|
464
|
-
app.plugContent = paste.content
|
|
465
|
-
app.plugType = PlugType.PASTEBIN
|
|
466
|
-
app.plugId = paste.paste_id
|
|
467
|
-
app.reservePlugType = PlugType.PASTEBIN
|
|
468
|
-
app.plugAccountId = parseInt(paste.accountId)
|
|
463
|
+
// app.plugStatus = paste.status
|
|
464
|
+
// app.plugContent = paste.content
|
|
465
|
+
// app.plugType = PlugType.PASTEBIN
|
|
466
|
+
// app.plugId = paste.paste_id
|
|
467
|
+
// app.reservePlugType = PlugType.PASTEBIN
|
|
468
|
+
// app.plugAccountId = parseInt(paste.accountId)
|
|
469
469
|
|
|
470
470
|
// app.keitaroData.redirectDomainName = redirectDomain || "none"
|
|
471
471
|
// app.keitaroData.redirectDomainId = redirectDomainId || 0
|