@bprotsyk/aso-core 1.2.193 → 1.2.194

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.
@@ -124,8 +124,6 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
124
124
  bundle: string;
125
125
  trackingUrl: string;
126
126
  geos: string;
127
- onesignalAppId: string;
128
- onesignalRestApiKey: string;
129
127
  integrationVersion: string;
130
128
  name?: string | undefined;
131
129
  webInterfaceName?: string | undefined;
@@ -138,6 +136,8 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
138
136
  bannerParams?: any;
139
137
  directParams?: any;
140
138
  policyUrl?: string | undefined;
139
+ onesignalAppId?: string | undefined;
140
+ onesignalRestApiKey?: string | undefined;
141
141
  linkPath?: string | undefined;
142
142
  generationOptions?: {
143
143
  splashName?: string | undefined;
@@ -59,18 +59,18 @@ exports.FlashAppSchema = new mongoose_1.Schema({
59
59
  },
60
60
  onesignalAppId: {
61
61
  type: String,
62
- required: true
62
+ required: false
63
63
  },
64
64
  onesignalRestApiKey: {
65
65
  type: String,
66
- required: true
66
+ required: false
67
67
  },
68
68
  linkPath: {
69
69
  type: String
70
70
  },
71
71
  integrationVersion: {
72
72
  type: String,
73
- default: IntegrationVersion.MVVM,
73
+ default: IntegrationVersion.OFFER_STUB,
74
74
  enum: IntegrationVersion
75
75
  },
76
76
  integrationAlterations: Object,
@@ -1,13 +1,13 @@
1
1
  import { IAppGenerationOptions, IAppKeitaroData, IBannerParams, IDeveloperParams, IDirectParams, IDomainParams, IOffersStubParams, IPrivacyPolicyParams, IRemoveDataParams, IntegrationVersion } from "flash/flash-app";
2
2
  export interface IUpsertFlashAppRequest {
3
3
  id: number;
4
- name: string;
5
- bundle: string;
4
+ name?: string;
5
+ bundle?: string;
6
6
  sourceUrl?: string;
7
- enabled: boolean;
8
- geos: string;
7
+ enabled?: boolean;
8
+ geos?: string;
9
9
  policyUrl?: string;
10
- integrationVersion: IntegrationVersion;
10
+ integrationVersion?: IntegrationVersion;
11
11
  webInterfaceName?: string;
12
12
  generationOptions?: Partial<IAppGenerationOptions>;
13
13
  keitaroData?: Partial<IAppKeitaroData>;
@@ -358,12 +358,12 @@ let changeSourceForFA = async () => {
358
358
  });
359
359
  }
360
360
  };
361
- let replaceDomainInOffers = async (oldDomain, newDomain, offerNameRegEx) => {
361
+ let replaceInOfferLink = async (old, replace, offerNameRegEx) => {
362
362
  let offers = await keitaro_service_1.KeitaroService.getAllOffers();
363
363
  offers = offers.filter((o) => offerNameRegEx.exec(o.name));
364
364
  for (let offer of offers) {
365
365
  console.log(offer.name);
366
- offer.action_payload = offer.action_payload.replace(oldDomain, newDomain);
366
+ offer.action_payload = offer.action_payload.replace(old, replace);
367
367
  await (0, sleep_promise_1.default)(700);
368
368
  await keitaro_service_1.KeitaroService.updateOffer(offer);
369
369
  }
@@ -488,4 +488,5 @@ let moveCampaignsToAnotherGroup = async () => {
488
488
  // addGeosToAllRedirectCam`paigns("GR")
489
489
  // removeGeosFromAllRedirectCampaigns("BE`")
490
490
  // gatherInfoForFlashApps()
491
- // replaceDomainInOffers(`xmariorel.com`, `veemienasorullf.com`, /Icecasino Huffson.*/g)
491
+ // replaceInOfferLink(`xmariorel.com`, `lalielynaualish.com`, /.*icecasino_huffson.*/g)
492
+ // replaceInOfferLink(`lp=18`, `lp=00`, /.*icecasino_huffson.*/g)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.193",
3
+ "version": "1.2.194",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -184,11 +184,11 @@ export const FlashAppSchema = new Schema({
184
184
 
185
185
  onesignalAppId: {
186
186
  type: String,
187
- required: true
187
+ required: false
188
188
  },
189
189
  onesignalRestApiKey: {
190
190
  type: String,
191
- required: true
191
+ required: false
192
192
  },
193
193
 
194
194
  linkPath: {
@@ -197,7 +197,7 @@ export const FlashAppSchema = new Schema({
197
197
 
198
198
  integrationVersion: {
199
199
  type: String,
200
- default: IntegrationVersion.MVVM,
200
+ default: IntegrationVersion.OFFER_STUB,
201
201
  enum: IntegrationVersion
202
202
  },
203
203
  integrationAlterations: Object,
@@ -3,18 +3,18 @@ import { PlugType } from "index"
3
3
 
4
4
  export interface IUpsertFlashAppRequest {
5
5
  id: number
6
- name: string
7
- bundle: string
6
+ name?: string
7
+ bundle?: string
8
8
  sourceUrl?: string,
9
- enabled: boolean,
10
- geos: string,
9
+ enabled?: boolean,
10
+ geos?: string,
11
11
 
12
12
  // onesignalAppId: string
13
13
  // onesignalRestApiKey: string
14
14
 
15
15
  policyUrl?: string,
16
16
 
17
- integrationVersion: IntegrationVersion,
17
+ integrationVersion?: IntegrationVersion,
18
18
 
19
19
  webInterfaceName?: string,
20
20
  generationOptions?: Partial<IAppGenerationOptions>
@@ -394,14 +394,14 @@ let changeSourceForFA = async () => {
394
394
  }
395
395
  }
396
396
 
397
- let replaceDomainInOffers = async (oldDomain: string, newDomain: string, offerNameRegEx: RegExp)=> {
397
+ let replaceInOfferLink = async (old: string, replace: string, offerNameRegEx: RegExp)=> {
398
398
  let offers = await KeitaroService.getAllOffers()
399
399
 
400
400
  offers = offers.filter((o) => offerNameRegEx.exec(o.name))
401
401
 
402
402
  for (let offer of offers) {
403
403
  console.log(offer.name)
404
- offer.action_payload = offer.action_payload.replace(oldDomain, newDomain)
404
+ offer.action_payload = offer.action_payload.replace(old, replace)
405
405
 
406
406
  await sleep(700)
407
407
  await KeitaroService.updateOffer(offer)
@@ -561,5 +561,6 @@ let moveCampaignsToAnotherGroup = async () => {
561
561
 
562
562
  // gatherInfoForFlashApps()
563
563
 
564
- // replaceDomainInOffers(`xmariorel.com`, `veemienasorullf.com`, /Icecasino Huffson.*/g)
564
+ // replaceInOfferLink(`xmariorel.com`, `lalielynaualish.com`, /.*icecasino_huffson.*/g)
565
+ // replaceInOfferLink(`lp=18`, `lp=00`, /.*icecasino_huffson.*/g)
565
566