@bprotsyk/aso-core 1.2.97 → 1.2.98

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 {
@@ -31,6 +32,19 @@ export interface IFlashApp extends Document {
31
32
  developerOrganization: string;
32
33
  generationOptions: IAppGenerationOptions;
33
34
  keitaroData: IAppKeitaroData;
35
+ integrationVersion: IntegrationVersion;
36
+ integrationAlterations: IntegrationAlterations;
37
+ }
38
+ export declare enum IntegrationVersion {
39
+ _3 = 3,
40
+ _4 = 4
41
+ }
42
+ export interface IntegrationAlterations {
43
+ networkTool: AlternativeNetworkTool;
44
+ logicType: AlternativeLogicType;
45
+ navigation: AlternativeNavigation;
46
+ storageType: AlternativeStorageType;
47
+ sourceType: AlternativeSourceType;
34
48
  }
35
49
  export interface IAppGenerationOptions {
36
50
  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";
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; } });
@@ -473,6 +473,25 @@ let gatherInfoForFlashApps = async () => {
473
473
  });
474
474
  // console.log(result)
475
475
  };
476
+ let findBrokenOfferStreams = async () => {
477
+ let allCampaigns = await keitaro_service_1.KeitaroService.getAllCampaigns();
478
+ let regexp = new RegExp(`^FA #`);
479
+ const matchingCampaigns = allCampaigns.filter(campaign => regexp.exec(campaign.name));
480
+ for (let campaign of matchingCampaigns) {
481
+ console.log(campaign.name);
482
+ console.log("––––––––––––––––––––––––");
483
+ let streams = await keitaro_service_1.KeitaroService.getStreamsByCampaignId(campaign.id);
484
+ for (let stream of streams) {
485
+ if (stream.name == "Bot Protection")
486
+ continue;
487
+ let idPayload = stream.filters.find(f => f.name == "sub_id_15");
488
+ if (!idPayload) {
489
+ console.log(`${stream.name}: id payload is missing, payload: ${stream.filters}`);
490
+ }
491
+ }
492
+ }
493
+ };
494
+ findBrokenOfferStreams();
476
495
  // removeBrokenDomain()
477
496
  // createFlashCampaigns(sampleApp)
478
497
  // 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.98",
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")
@@ -36,7 +37,22 @@ export interface IFlashApp extends Document {
36
37
  developerEmail: string
37
38
  developerOrganization: string
38
39
  generationOptions: IAppGenerationOptions,
39
- keitaroData: IAppKeitaroData
40
+ keitaroData: IAppKeitaroData,
41
+ integrationVersion: IntegrationVersion
42
+ integrationAlterations: IntegrationAlterations
43
+ }
44
+
45
+ export enum IntegrationVersion {
46
+ _3 = 3,
47
+ _4 = 4,
48
+ }
49
+
50
+ export interface IntegrationAlterations {
51
+ networkTool: AlternativeNetworkTool, // Network
52
+ logicType: AlternativeLogicType, // Logic
53
+ navigation: AlternativeNavigation, // Navigation
54
+ storageType: AlternativeStorageType, // Storage
55
+ sourceType: AlternativeSourceType // Source
40
56
  }
41
57
 
42
58
  export interface IAppGenerationOptions {
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"
@@ -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)