@bprotsyk/aso-core 1.2.144 → 1.2.146

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.
@@ -107,6 +107,7 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
107
107
  onesignalAppId: string;
108
108
  onesignalRestApiKey: string;
109
109
  name?: string | undefined;
110
+ on?: boolean | undefined;
110
111
  pushesEnabled?: boolean | undefined;
111
112
  sourceUrl?: string | undefined;
112
113
  integrationVersion?: number | undefined;
@@ -27,6 +27,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
27
27
  unique: true,
28
28
  required: true
29
29
  },
30
+ on: Boolean,
30
31
  bundle: {
31
32
  type: String,
32
33
  unique: true,
@@ -11,3 +11,4 @@ export declare function createFlashCampaigns(app: IFlashApp): Promise<{
11
11
  tracking: IKeitaroCampaign;
12
12
  redirect: IKeitaroCampaign;
13
13
  }>;
14
+ export declare function createOWCampaign(app: IFlashApp): Promise<IKeitaroCampaign>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createFlashCampaigns = exports.createOWStreamPartialPayload = exports.prepareOWCampaignParameters = exports.createOrFindFlashRedirectCampaign = exports.removeGeosFromAllRedirectCampaigns = exports.addGeosToAllRedirectCampaigns = exports.TRAFFIC_SOURCE_ID_FLASH_AI = void 0;
6
+ exports.createOWCampaign = exports.createFlashCampaigns = exports.createOWStreamPartialPayload = exports.prepareOWCampaignParameters = exports.createOrFindFlashRedirectCampaign = exports.removeGeosFromAllRedirectCampaigns = exports.addGeosToAllRedirectCampaigns = exports.TRAFFIC_SOURCE_ID_FLASH_AI = void 0;
7
7
  const keitaro_service_1 = require("../network/keitaro/keitaro-service");
8
8
  const sleep_promise_1 = __importDefault(require("sleep-promise"));
9
9
  const FLASH_REDIRECT_GROUP_ID = 82;
@@ -335,6 +335,11 @@ async function createFlashCampaigns(app) {
335
335
  };
336
336
  }
337
337
  exports.createFlashCampaigns = createFlashCampaigns;
338
+ async function createOWCampaign(app) {
339
+ let owCampaign = await keitaro_service_1.KeitaroService.cloneOWCampaign(app);
340
+ return owCampaign;
341
+ }
342
+ exports.createOWCampaign = createOWCampaign;
338
343
  // TODO separate files for offers, campaigns etc.
339
344
  let removeBrokenDomain = async () => {
340
345
  let regexp = new RegExp(`^FA #`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.144",
3
+ "version": "1.2.146",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -125,6 +125,7 @@ export const FlashAppSchema = new Schema({
125
125
  unique: true,
126
126
  required: true
127
127
  },
128
+ on: Boolean,
128
129
  bundle: {
129
130
  type: String,
130
131
  unique: true,
@@ -365,6 +365,13 @@ export async function createFlashCampaigns(app: IFlashApp) {
365
365
  }
366
366
  }
367
367
 
368
+ export async function createOWCampaign(app: IFlashApp) {
369
+ let owCampaign = await KeitaroService.cloneOWCampaign(app)
370
+
371
+ return owCampaign
372
+ }
373
+
374
+
368
375
  // TODO separate files for offers, campaigns etc.
369
376
 
370
377
  let removeBrokenDomain = async () => {