@bprotsyk/aso-core 1.2.98 → 1.2.101

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.
@@ -12,11 +12,7 @@ export interface IFlashApp extends Document {
12
12
  trackingUrl?: string;
13
13
  bundle: string;
14
14
  pushesEnabled?: boolean;
15
- plugId: string;
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
- plugAccountId?: number | undefined;
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;
@@ -38,50 +38,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
38
38
  default: null
39
39
  },
40
40
  pushesEnabled: Boolean,
41
- plugId: {
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,
@@ -3,9 +3,7 @@ export interface IUpsertFlashAppRequest {
3
3
  id: number;
4
4
  name: string;
5
5
  bundle: string;
6
- plugContent?: string;
7
- plugId?: string;
8
- plugAccountId: number;
6
+ sourceUrl?: string;
9
7
  onesignalAppId: string;
10
8
  onesignalRestApiKey: string;
11
9
  developerName: string;
@@ -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
- id: 96,
50
- bundle: "com.dynastyof.desert",
51
- name: "Room of Fortuna",
52
- plugId: "https://pastebin.com/raw/AR2u7dSD",
53
- plugType: flash_app_1.PlugType.PASTEBIN,
54
- plugContent: "",
55
- plugStatus: flash_app_1.FlashAppPlugStatus.DISABLED,
56
- plugAccountId: 1,
57
- reservePlugId: "none",
58
- reservePlugType: flash_app_1.PlugType.OTHER,
59
- reservePlugContent: "",
60
- reservePlugStatus: flash_app_1.FlashAppPlugStatus.DISABLED,
61
- reservePlugAccountId: 1,
62
- type: flash_app_type_1.FlashAppType.GAMBLING,
63
- developerEmail: "bolly.dreams@yahoo.com",
64
- developerName: "Serhii Bolsky",
65
- developerOrganization: "S.I.B FOP",
66
- onesignalAppId: "e66658af-91c3-44bc-8123-ec64b1969cbd",
67
- onesignalRestApiKey: "MDk2NjZlNTMtMzBhYi00MjEzLTg0ZGItOWVmZWZhMTczMzI0",
68
- generationOptions: {
69
- splashActivityClassName: "SplashActivity",
70
- mainActivityClassName: "YourActivity",
71
- linkName: "likn",
72
- savedName: "isOk",
73
- paranoidSeed: 228143750
74
- },
75
- geos: "RU,UA,KZ,ES,BR,PT,CL,MX",
76
- keitaroData: {
77
- redirectCampaignId: 0,
78
- redirectCampaignName: "",
79
- redirectDomainId: 0,
80
- redirectDomainName: "",
81
- trackingCampaignId: 0,
82
- trackingCampaignName: "",
83
- trackingDomainId: 0,
84
- trackingDomainName: "",
85
- clickIdParameterName: "p",
86
- offerIdParameterName: "i",
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 = flash_app_1.PlugType.PASTEBIN;
444
- app.plugId = paste.paste_id;
445
- app.reservePlugType = flash_app_1.PlugType.PASTEBIN;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.98",
3
+ "version": "1.2.101",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -16,11 +16,7 @@ export interface IFlashApp extends Document {
16
16
  bundle: string
17
17
 
18
18
  pushesEnabled?: boolean
19
- plugId: string
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
- plugId: {
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,
@@ -5,9 +5,7 @@ export interface IUpsertFlashAppRequest {
5
5
  id: number
6
6
  name: string
7
7
  bundle: string
8
- plugContent?: string,
9
- plugId?: string,
10
- plugAccountId: number,
8
+ sourceUrl?: string,
11
9
 
12
10
  onesignalAppId: string
13
11
  onesignalRestApiKey: string
@@ -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
- 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
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