@bprotsyk/aso-core 2.1.63 → 2.1.65
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.
package/lib/app/app.d.ts
CHANGED
|
@@ -45,6 +45,10 @@ export declare enum EPlatform {
|
|
|
45
45
|
TELEGRAM = "tg",
|
|
46
46
|
AMAZON = "am"
|
|
47
47
|
}
|
|
48
|
+
export declare enum EDirectType {
|
|
49
|
+
KEITARO_OFFER = "keitaroOffer",
|
|
50
|
+
OFFER_DIRECT = "keitaroCampaign"
|
|
51
|
+
}
|
|
48
52
|
export declare const getPlatformName: (platform: EPlatform | undefined) => string | false;
|
|
49
53
|
export interface IPlatformParams {
|
|
50
54
|
enabled: boolean;
|
|
@@ -57,6 +61,7 @@ export interface IPlatformParams {
|
|
|
57
61
|
direct?: {
|
|
58
62
|
enabled: boolean;
|
|
59
63
|
keitaroData: IAppKeitaroData | boolean;
|
|
64
|
+
directType?: EDirectType;
|
|
60
65
|
trackingUrl?: string;
|
|
61
66
|
};
|
|
62
67
|
metricaParams?: {
|
package/lib/app/app.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.getPlatformName = exports.EPlatform = exports.EImageFormat = void 0;
|
|
3
|
+
exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.getPlatformName = exports.EDirectType = exports.EPlatform = exports.EImageFormat = void 0;
|
|
4
4
|
const app_type_1 = require("./app-type");
|
|
5
5
|
const mongoose_1 = require("mongoose");
|
|
6
6
|
const util = require("util");
|
|
@@ -21,6 +21,11 @@ var EPlatform;
|
|
|
21
21
|
EPlatform["TELEGRAM"] = "tg";
|
|
22
22
|
EPlatform["AMAZON"] = "am";
|
|
23
23
|
})(EPlatform = exports.EPlatform || (exports.EPlatform = {}));
|
|
24
|
+
var EDirectType;
|
|
25
|
+
(function (EDirectType) {
|
|
26
|
+
EDirectType["KEITARO_OFFER"] = "keitaroOffer";
|
|
27
|
+
EDirectType["OFFER_DIRECT"] = "keitaroCampaign";
|
|
28
|
+
})(EDirectType = exports.EDirectType || (exports.EDirectType = {}));
|
|
24
29
|
const getPlatformName = (platform) => {
|
|
25
30
|
switch (platform) {
|
|
26
31
|
case EPlatform.SAMSUNG:
|
|
@@ -279,7 +279,7 @@ async function cloneOWCampaign(app, platform) {
|
|
|
279
279
|
async function cloneDirectCampaign(app, platform) {
|
|
280
280
|
let name = `#${app.id} [➥]`;
|
|
281
281
|
let platformName = platform ? (0, app_1.getPlatformName)(platform) : null;
|
|
282
|
-
const platformCampaignName = `#${app.id} [
|
|
282
|
+
const platformCampaignName = `#${app.id} [➥] (${platformName})`;
|
|
283
283
|
const generateAlias = () => {
|
|
284
284
|
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
285
285
|
return Array.from({ length: 8 }, () => chars.charAt(Math.floor(Math.random() * chars.length))).join('');
|
package/package.json
CHANGED
package/src/app/app.ts
CHANGED
|
@@ -57,6 +57,11 @@ export enum EPlatform {
|
|
|
57
57
|
AMAZON = 'am'
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export enum EDirectType{
|
|
61
|
+
KEITARO_OFFER = 'keitaroOffer',
|
|
62
|
+
OFFER_DIRECT = 'keitaroCampaign',
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
|
|
61
66
|
export const getPlatformName = (platform: EPlatform | undefined): string | false => {
|
|
62
67
|
switch (platform) {
|
|
@@ -92,6 +97,7 @@ export interface IPlatformParams {
|
|
|
92
97
|
direct?: {
|
|
93
98
|
enabled: boolean,
|
|
94
99
|
keitaroData: IAppKeitaroData | boolean,
|
|
100
|
+
directType?: EDirectType,
|
|
95
101
|
trackingUrl?: string
|
|
96
102
|
},
|
|
97
103
|
metricaParams?: {
|
|
@@ -344,7 +344,7 @@ async function cloneOWCampaign(app: IApp, platform?: EPlatform): Promise<IKeitar
|
|
|
344
344
|
async function cloneDirectCampaign(app: IApp, platform?: EPlatform): Promise<IKeitaroCampaign | any> {
|
|
345
345
|
let name = `#${app.id} [➥]`
|
|
346
346
|
let platformName = platform ? getPlatformName(platform) : null;
|
|
347
|
-
const platformCampaignName = `#${app.id} [
|
|
347
|
+
const platformCampaignName = `#${app.id} [➥] (${platformName})`;
|
|
348
348
|
const generateAlias = () => {
|
|
349
349
|
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
350
350
|
return Array.from(
|