@bprotsyk/aso-core 1.2.97 → 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.
@@ -26,7 +26,10 @@ export declare enum AlternativeLayoutType {
26
26
  PROGRAMATICALLY = "Create in code"
27
27
  }
28
28
  export declare enum AlternativeSourceType {
29
- FIREBASE_REALTIME_DATABASE = "Firebase Realtime DB"
29
+ FIREBASE_REALTIME_DATABASE = "Firebase Realtime DB",
30
+ GET_RETROFIT = "From link via Retrofit",
31
+ GET_VOLLEY = "From link via Volley",
32
+ GET_HTTP_URL = "From link via HTTPUrlConnection"
30
33
  }
31
34
  export declare enum AlternativeOnBackPressed {
32
35
  OLD = "Old",
@@ -36,7 +36,9 @@ var AlternativeLayoutType;
36
36
  var AlternativeSourceType;
37
37
  (function (AlternativeSourceType) {
38
38
  AlternativeSourceType["FIREBASE_REALTIME_DATABASE"] = "Firebase Realtime DB";
39
- // FROM_LINK = "From link",
39
+ AlternativeSourceType["GET_RETROFIT"] = "From link via Retrofit";
40
+ AlternativeSourceType["GET_VOLLEY"] = "From link via Volley";
41
+ AlternativeSourceType["GET_HTTP_URL"] = "From link via HTTPUrlConnection";
40
42
  // WITHIN_WEBVIEW = "Within webview",
41
43
  })(AlternativeSourceType = exports.AlternativeSourceType || (exports.AlternativeSourceType = {}));
42
44
  // backpress
@@ -1,3 +1,4 @@
1
+ import { AlternativeLogicType, AlternativeNavigation, AlternativeNetworkTool, AlternativeSourceType, AlternativeStorageType } from "index";
1
2
  import { FlashAppType } from "./flash-app-type";
2
3
  import mongoose, { Document, Model } from "mongoose";
3
4
  export declare enum FlashAppPlugStatus {
@@ -11,11 +12,7 @@ export interface IFlashApp extends Document {
11
12
  trackingUrl?: string;
12
13
  bundle: string;
13
14
  pushesEnabled?: boolean;
14
- plugId: string;
15
- plugType: PlugType;
16
- plugContent: string;
17
- plugStatus: FlashAppPlugStatus;
18
- plugAccountId: number;
15
+ sourceUrl?: string;
19
16
  reservePlugId?: string;
20
17
  reservePlugType?: PlugType;
21
18
  reservePlugContent?: string;
@@ -31,6 +28,19 @@ export interface IFlashApp extends Document {
31
28
  developerOrganization: string;
32
29
  generationOptions: IAppGenerationOptions;
33
30
  keitaroData: IAppKeitaroData;
31
+ integrationVersion: IntegrationVersion;
32
+ integrationAlterations: IntegrationAlterations;
33
+ }
34
+ export declare enum IntegrationVersion {
35
+ _3 = 3,
36
+ _4 = 4
37
+ }
38
+ export interface IntegrationAlterations {
39
+ networkTool: AlternativeNetworkTool;
40
+ logicType: AlternativeLogicType;
41
+ navigation: AlternativeNavigation;
42
+ storageType: AlternativeStorageType;
43
+ sourceType: AlternativeSourceType;
34
44
  }
35
45
  export interface IAppGenerationOptions {
36
46
  splashActivityClassName: string;
@@ -63,8 +73,6 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
63
73
  id: number;
64
74
  bundle: string;
65
75
  trackingUrl: string;
66
- plugId: string;
67
- plugType: string;
68
76
  geos: string;
69
77
  onesignalAppId: string;
70
78
  onesignalRestApiKey: string;
@@ -73,14 +81,7 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
73
81
  developerOrganization: string;
74
82
  name?: string | undefined;
75
83
  pushesEnabled?: boolean | undefined;
76
- plugAccountId?: number | undefined;
77
- reservePlugAccountId?: number | undefined;
78
- plugContent?: string | undefined;
79
- plugStatus?: string | undefined;
80
- reservePlugId?: string | undefined;
81
- reservePlugType?: string | undefined;
82
- reservePlugContent?: string | undefined;
83
- reservePlugStatus?: string | undefined;
84
+ sourceUrl?: string | undefined;
84
85
  policyUrl?: string | undefined;
85
86
  generationOptions?: {
86
87
  splashActivityClassName: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.PlugType = exports.FlashAppPlugStatus = void 0;
3
+ exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.PlugType = exports.IntegrationVersion = exports.FlashAppPlugStatus = void 0;
4
4
  const flash_app_type_1 = require("./flash-app-type");
5
5
  const mongoose_1 = require("mongoose");
6
6
  const util = require("util");
@@ -10,6 +10,11 @@ var FlashAppPlugStatus;
10
10
  FlashAppPlugStatus[FlashAppPlugStatus["TEST_MODE"] = 1] = "TEST_MODE";
11
11
  FlashAppPlugStatus[FlashAppPlugStatus["ENABLED"] = 2] = "ENABLED";
12
12
  })(FlashAppPlugStatus = exports.FlashAppPlugStatus || (exports.FlashAppPlugStatus = {}));
13
+ var IntegrationVersion;
14
+ (function (IntegrationVersion) {
15
+ IntegrationVersion[IntegrationVersion["_3"] = 3] = "_3";
16
+ IntegrationVersion[IntegrationVersion["_4"] = 4] = "_4";
17
+ })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
13
18
  var PlugType;
14
19
  (function (PlugType) {
15
20
  PlugType["PASTEBIN"] = "PASTEBIN";
@@ -33,50 +38,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
33
38
  default: null
34
39
  },
35
40
  pushesEnabled: Boolean,
36
- plugId: {
37
- type: String,
38
- // unique: true,
39
- required: true
40
- },
41
- plugType: {
42
- type: String,
43
- enum: PlugType,
44
- default: PlugType.PASTEBIN,
45
- required: true
46
- },
47
- plugContent: {
48
- type: String,
49
- required: false
50
- },
51
- plugStatus: {
52
- type: String,
53
- enum: FlashAppPlugStatus,
54
- default: FlashAppPlugStatus.DISABLED,
55
- required: false
56
- },
57
- plugAccountId: Number,
58
- reservePlugId: {
59
- type: String,
60
- // unique: true,
61
- required: false
62
- },
63
- reservePlugType: {
64
- type: String,
65
- enum: PlugType,
66
- default: PlugType.PASTEBIN,
67
- required: false
68
- },
69
- reservePlugContent: {
70
- type: String,
71
- required: false
72
- },
73
- reservePlugStatus: {
74
- type: String,
75
- enum: FlashAppPlugStatus,
76
- default: FlashAppPlugStatus.DISABLED,
77
- required: false
78
- },
79
- reservePlugAccountId: Number,
41
+ sourceUrl: String,
80
42
  policyUrl: {
81
43
  type: String,
82
44
  // unique: true,
package/lib/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export { IOfferWallSection } from "./aso/offerwall/offerwall-section";
16
16
  export { IOfferWallOffer } from "./aso/offerwall/offerwall-offer";
17
17
  export { IOfferWallResponse } from "./aso/offerwall/offerwall-response";
18
18
  export { IOfferWallHomeDialogData } from "./aso/offerwall/offerwall-home-dialog-data";
19
- export { IFlashApp, FlashAppSchema, updateSchemaAndMoveValue, PlugType, FlashAppPlugStatus } from "./flash/flash-app";
19
+ export { IntegrationAlterations, IntegrationVersion, IFlashApp, FlashAppSchema, updateSchemaAndMoveValue, PlugType, FlashAppPlugStatus } from "./flash/flash-app";
20
20
  export { IFlashAppListItem } from "./flash/flash-app-list-item";
21
21
  export { FlashAppType } from "./flash/flash-app-type";
22
22
  export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IFlashIntegration } from "./flash/flash-app-integration";
package/lib/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.KeitaroUtils = exports.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.FlashAppType = exports.FlashAppPlugStatus = exports.PlugType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.ASO_v5 = exports.ASO_v4 = exports.ASO_v3 = exports.ASO_v2 = exports.ASO_v1 = exports.ASO_v0 = void 0;
26
+ exports.KeitaroUtils = exports.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.FlashAppType = exports.FlashAppPlugStatus = exports.PlugType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.IntegrationVersion = exports.ASO_v5 = exports.ASO_v4 = exports.ASO_v3 = exports.ASO_v2 = exports.ASO_v1 = exports.ASO_v0 = void 0;
27
27
  exports.ASO_v0 = __importStar(require("./aso/config/aso-config-v0"));
28
28
  exports.ASO_v1 = __importStar(require("./aso/config/aso-config-v1"));
29
29
  exports.ASO_v2 = __importStar(require("./aso/config/aso-config-v2"));
@@ -31,6 +31,7 @@ exports.ASO_v3 = __importStar(require("./aso/config/aso-config-v3"));
31
31
  exports.ASO_v4 = __importStar(require("./aso/config/aso-config-v4"));
32
32
  exports.ASO_v5 = __importStar(require("./aso/config/aso-config-v5"));
33
33
  var flash_app_1 = require("./flash/flash-app");
34
+ Object.defineProperty(exports, "IntegrationVersion", { enumerable: true, get: function () { return flash_app_1.IntegrationVersion; } });
34
35
  Object.defineProperty(exports, "FlashAppSchema", { enumerable: true, get: function () { return flash_app_1.FlashAppSchema; } });
35
36
  Object.defineProperty(exports, "updateSchemaAndMoveValue", { enumerable: true, get: function () { return flash_app_1.updateSchemaAndMoveValue; } });
36
37
  Object.defineProperty(exports, "PlugType", { enumerable: true, get: function () { return flash_app_1.PlugType; } });
@@ -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
@@ -473,6 +471,25 @@ let gatherInfoForFlashApps = async () => {
473
471
  });
474
472
  // console.log(result)
475
473
  };
474
+ let findBrokenOfferStreams = async () => {
475
+ let allCampaigns = await keitaro_service_1.KeitaroService.getAllCampaigns();
476
+ let regexp = new RegExp(`^FA #`);
477
+ const matchingCampaigns = allCampaigns.filter(campaign => regexp.exec(campaign.name));
478
+ for (let campaign of matchingCampaigns) {
479
+ console.log(campaign.name);
480
+ console.log("––––––––––––––––––––––––");
481
+ let streams = await keitaro_service_1.KeitaroService.getStreamsByCampaignId(campaign.id);
482
+ for (let stream of streams) {
483
+ if (stream.name == "Bot Protection")
484
+ continue;
485
+ let idPayload = stream.filters.find(f => f.name == "sub_id_15");
486
+ if (!idPayload) {
487
+ console.log(`${stream.name}: id payload is missing, payload: ${stream.filters}`);
488
+ }
489
+ }
490
+ }
491
+ };
492
+ findBrokenOfferStreams();
476
493
  // removeBrokenDomain()
477
494
  // createFlashCampaigns(sampleApp)
478
495
  // changeSourceForFA()
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.97",
3
+ "version": "1.2.100",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
7
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
- "test-flash-creation": "tsc; node lib/utils/keitaro-utils.js"
10
+ "keitaro": "tsc; node lib/utils/keitaro-utils.js"
11
11
  },
12
12
  "author": "bprotsyk",
13
13
  "license": "ISC",
@@ -32,7 +32,9 @@ export enum AlternativeLayoutType {
32
32
 
33
33
  export enum AlternativeSourceType {
34
34
  FIREBASE_REALTIME_DATABASE = "Firebase Realtime DB",
35
- // FROM_LINK = "From link",
35
+ GET_RETROFIT = "From link via Retrofit",
36
+ GET_VOLLEY = "From link via Volley",
37
+ GET_HTTP_URL = "From link via HTTPUrlConnection",
36
38
  // WITHIN_WEBVIEW = "Within webview",
37
39
  }
38
40
 
@@ -1,3 +1,4 @@
1
+ import { AlternativeLogicType, AlternativeNavigation, AlternativeNetworkTool, AlternativeSourceType, AlternativeStorageType } from "index";
1
2
  import { FlashAppType } from "./flash-app-type";
2
3
  import mongoose, { Document, Model, model, PipelineStage, Schema, UpdateQuery, UpdateWithAggregationPipeline } from "mongoose";
3
4
  const util = require("util")
@@ -15,11 +16,7 @@ export interface IFlashApp extends Document {
15
16
  bundle: string
16
17
 
17
18
  pushesEnabled?: boolean
18
- plugId: string
19
- plugType: PlugType
20
- plugContent: string
21
- plugStatus: FlashAppPlugStatus
22
- plugAccountId: number
19
+ sourceUrl?: string,
23
20
  reservePlugId?: string
24
21
  reservePlugType?: PlugType
25
22
  reservePlugContent?: string
@@ -36,7 +33,22 @@ export interface IFlashApp extends Document {
36
33
  developerEmail: string
37
34
  developerOrganization: string
38
35
  generationOptions: IAppGenerationOptions,
39
- keitaroData: IAppKeitaroData
36
+ keitaroData: IAppKeitaroData,
37
+ integrationVersion: IntegrationVersion
38
+ integrationAlterations: IntegrationAlterations
39
+ }
40
+
41
+ export enum IntegrationVersion {
42
+ _3 = 3,
43
+ _4 = 4,
44
+ }
45
+
46
+ export interface IntegrationAlterations {
47
+ networkTool: AlternativeNetworkTool, // Network
48
+ logicType: AlternativeLogicType, // Logic
49
+ navigation: AlternativeNavigation, // Navigation
50
+ storageType: AlternativeStorageType, // Storage
51
+ sourceType: AlternativeSourceType // Source
40
52
  }
41
53
 
42
54
  export interface IAppGenerationOptions {
@@ -87,50 +99,7 @@ export const FlashAppSchema = new Schema({
87
99
  },
88
100
 
89
101
  pushesEnabled: Boolean,
90
- plugId: {
91
- type: String,
92
- // unique: true,
93
- required: true
94
- },
95
- plugType: {
96
- type: String,
97
- enum: PlugType,
98
- default: PlugType.PASTEBIN,
99
- required: true
100
- },
101
- plugContent: {
102
- type: String,
103
- required: false
104
- },
105
- plugStatus: {
106
- type: String,
107
- enum: FlashAppPlugStatus,
108
- default: FlashAppPlugStatus.DISABLED,
109
- required: false
110
- },
111
- plugAccountId: Number,
112
- reservePlugId: {
113
- type: String,
114
- // unique: true,
115
- required: false
116
- },
117
- reservePlugType: {
118
- type: String,
119
- enum: PlugType,
120
- default: PlugType.PASTEBIN,
121
- required: false
122
- },
123
- reservePlugContent: {
124
- type: String,
125
- required: false
126
- },
127
- reservePlugStatus: {
128
- type: String,
129
- enum: FlashAppPlugStatus,
130
- default: FlashAppPlugStatus.DISABLED,
131
- required: false
132
- },
133
- reservePlugAccountId: Number,
102
+ sourceUrl: String,
134
103
  policyUrl: {
135
104
  type: String,
136
105
  // unique: true,
package/src/index.ts CHANGED
@@ -19,7 +19,7 @@ export { IOfferWallOffer } from "./aso/offerwall/offerwall-offer"
19
19
  export { IOfferWallResponse } from "./aso/offerwall/offerwall-response"
20
20
  export { IOfferWallHomeDialogData } from "./aso/offerwall/offerwall-home-dialog-data"
21
21
 
22
- export { IFlashApp, FlashAppSchema, updateSchemaAndMoveValue, PlugType, FlashAppPlugStatus } from "./flash/flash-app"
22
+ export { IntegrationAlterations, IntegrationVersion, IFlashApp, FlashAppSchema, updateSchemaAndMoveValue, PlugType, FlashAppPlugStatus } from "./flash/flash-app"
23
23
  export { IFlashAppListItem } from "./flash/flash-app-list-item"
24
24
  export { FlashAppType } from "./flash/flash-app-type"
25
25
  export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IFlashIntegration } from "./flash/flash-app-integration"
@@ -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
@@ -505,6 +505,31 @@ let gatherInfoForFlashApps = async () => {
505
505
  // console.log(result)
506
506
  }
507
507
 
508
+ let findBrokenOfferStreams = async () => {
509
+ let allCampaigns = await KeitaroService.getAllCampaigns()
510
+
511
+
512
+ let regexp = new RegExp(`^FA #`)
513
+ const matchingCampaigns = allCampaigns.filter(campaign => regexp.exec(campaign.name));
514
+ for (let campaign of matchingCampaigns) {
515
+ console.log(campaign.name)
516
+ console.log("––––––––––––––––––––––––")
517
+ let streams = await KeitaroService.getStreamsByCampaignId(campaign.id)
518
+
519
+ for (let stream of streams) {
520
+ if (stream.name == "Bot Protection") continue
521
+
522
+ let idPayload = stream.filters.find(f => f.name == "sub_id_15")
523
+
524
+ if (!idPayload) {
525
+ console.log(`${stream.name}: id payload is missing, payload: ${stream.filters}`)
526
+ }
527
+ }
528
+ }
529
+ }
530
+
531
+ findBrokenOfferStreams()
532
+
508
533
  // removeBrokenDomain()
509
534
 
510
535
  // createFlashCampaigns(sampleApp)