@bprotsyk/aso-core 1.2.164 → 1.2.171

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.
@@ -66,7 +66,8 @@ export declare enum IntegrationVersion {
66
66
  MVVM = "MVVM",
67
67
  POLICY = "POLICY",
68
68
  OFFER_STUB = "OFFER_STUB",
69
- DIRECT = "DIRECT"
69
+ DIRECT = "DIRECT",
70
+ WEB = "WEB"
70
71
  }
71
72
  export interface IntegrationAlterations {
72
73
  networkTool: AlternativeNetworkTool;
@@ -10,6 +10,7 @@ var IntegrationVersion;
10
10
  IntegrationVersion["POLICY"] = "POLICY";
11
11
  IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
12
12
  IntegrationVersion["DIRECT"] = "DIRECT";
13
+ IntegrationVersion["WEB"] = "WEB";
13
14
  })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
14
15
  var PlugType;
15
16
  (function (PlugType) {
@@ -1,4 +1,4 @@
1
- import { IAppGenerationOptions, IAppKeitaroData, IDeveloperParams, IDomainParams, IOffersStubParams, IPrivacyPolicyParams, IRemoveDataParams, IntegrationVersion } from "flash/flash-app";
1
+ import { IAppGenerationOptions, IAppKeitaroData, IDeveloperParams, IDirectParams, IDomainParams, IOffersStubParams, IPrivacyPolicyParams, IRemoveDataParams, IntegrationVersion } from "flash/flash-app";
2
2
  export interface IUpsertFlashAppRequest {
3
3
  id: number;
4
4
  name: string;
@@ -18,6 +18,7 @@ export interface IUpsertFlashAppRequest {
18
18
  offersStubParams?: IOffersStubParams;
19
19
  developerParams?: IDeveloperParams;
20
20
  domainParams: IDomainParams;
21
+ directParams?: IDirectParams;
21
22
  }
22
23
  export interface IUpsertFlashAppResponse {
23
24
  data: IUpsertFlashAppRequest;
@@ -359,14 +359,14 @@ let changeSourceForFA = async () => {
359
359
  }
360
360
  };
361
361
  let replaceDomainInOffers = async (oldDomain, newDomain, offerNameRegEx) => {
362
- // let offers = await KeitaroService.getAllOffers()
363
- // offers = offers.filter((o) => offerNameRegEx.exec(o.name))
364
- // for (let offer of offers) {
365
- // console.log(offer)
366
- // // offer.action_payload = offer.action_payload.replace(oldDomain, newDomain)
367
- // // await sleep(700)
368
- // // await KeitaroService.updateOffer(offer)
369
- // }
362
+ let offers = await keitaro_service_1.KeitaroService.getAllOffers();
363
+ offers = offers.filter((o) => offerNameRegEx.exec(o.name));
364
+ for (let offer of offers) {
365
+ console.log(offer.name);
366
+ offer.action_payload = offer.action_payload.replace(oldDomain, newDomain);
367
+ await (0, sleep_promise_1.default)(700);
368
+ await keitaro_service_1.KeitaroService.updateOffer(offer);
369
+ }
370
370
  };
371
371
  // let gatherInfoForFlashApps = async () => {
372
372
  // console.log(__dirname)
@@ -476,4 +476,4 @@ let findBrokenOfferStreams = async () => {
476
476
  // addGeosToAllRedirectCam`paigns("GR")
477
477
  // removeGeosFromAllRedirectCampaigns("BE`")
478
478
  // gatherInfoForFlashApps()
479
- // replaceDomainInOffers(`mariorel.com`, `xmariorel.com`, /Icecasino Huffson.*/g)
479
+ replaceDomainInOffers(`xmariorel.com`, `veemienasorullf.com`, /Icecasino Huffson.*/g);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.164",
3
+ "version": "1.2.171",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -83,7 +83,8 @@ export enum IntegrationVersion {
83
83
  MVVM = "MVVM",
84
84
  POLICY = "POLICY",
85
85
  OFFER_STUB = "OFFER_STUB",
86
- DIRECT = "DIRECT"
86
+ DIRECT = "DIRECT",
87
+ WEB = "WEB"
87
88
  }
88
89
 
89
90
  export interface IntegrationAlterations {
@@ -1,4 +1,4 @@
1
- import { IAppGenerationOptions, IAppKeitaroData, IDeveloperParams, IDomainParams, IOffersStubParams, IPrivacyPolicyParams, IRemoveDataParams, IntegrationVersion } from "flash/flash-app"
1
+ import { IAppGenerationOptions, IAppKeitaroData, IDeveloperParams, IDirectParams, IDomainParams, IOffersStubParams, IPrivacyPolicyParams, IRemoveDataParams, IntegrationVersion } from "flash/flash-app"
2
2
  import { PlugType } from "index"
3
3
 
4
4
  export interface IUpsertFlashAppRequest {
@@ -24,6 +24,7 @@ export interface IUpsertFlashAppRequest {
24
24
  offersStubParams?: IOffersStubParams,
25
25
  developerParams?: IDeveloperParams,
26
26
  domainParams: IDomainParams,
27
+ directParams?: IDirectParams,
27
28
  }
28
29
 
29
30
  export interface IUpsertFlashAppResponse {
@@ -395,17 +395,17 @@ let changeSourceForFA = async () => {
395
395
  }
396
396
 
397
397
  let replaceDomainInOffers = async (oldDomain: string, newDomain: string, offerNameRegEx: RegExp)=> {
398
- // let offers = await KeitaroService.getAllOffers()
398
+ let offers = await KeitaroService.getAllOffers()
399
399
 
400
- // offers = offers.filter((o) => offerNameRegEx.exec(o.name))
400
+ offers = offers.filter((o) => offerNameRegEx.exec(o.name))
401
401
 
402
- // for (let offer of offers) {
403
- // console.log(offer)
404
- // // offer.action_payload = offer.action_payload.replace(oldDomain, newDomain)
402
+ for (let offer of offers) {
403
+ console.log(offer.name)
404
+ offer.action_payload = offer.action_payload.replace(oldDomain, newDomain)
405
405
 
406
- // // await sleep(700)
407
- // // await KeitaroService.updateOffer(offer)
408
- // }
406
+ await sleep(700)
407
+ await KeitaroService.updateOffer(offer)
408
+ }
409
409
  }
410
410
 
411
411
  // let gatherInfoForFlashApps = async () => {
@@ -545,4 +545,4 @@ let findBrokenOfferStreams = async () => {
545
545
 
546
546
  // gatherInfoForFlashApps()
547
547
 
548
- // replaceDomainInOffers(`mariorel.com`, `xmariorel.com`, /Icecasino Huffson.*/g)
548
+ replaceDomainInOffers(`xmariorel.com`, `veemienasorullf.com`, /Icecasino Huffson.*/g)