@bprotsyk/aso-core 2.1.190 → 2.1.195
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 +20 -12
- package/lib/app/app.js +5 -13
- package/lib/general/domain.js +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -3
- package/lib/network/keitaro/traffle/traffle-keitaro-service.js +6 -4
- package/lib/panel/app/upsert-flash-app-request.d.ts +4 -2
- package/package.json +1 -1
- package/src/app/app.ts +15 -15
- package/src/general/domain.ts +1 -1
- package/src/index.ts +2 -3
- package/src/network/keitaro/traffle/traffle-keitaro-service.ts +6 -4
- package/src/panel/app/upsert-flash-app-request.ts +4 -2
package/lib/app/app.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface IApp extends Document {
|
|
|
13
13
|
name: string;
|
|
14
14
|
bundle: string;
|
|
15
15
|
status: AppStatus;
|
|
16
|
-
|
|
16
|
+
geos?: string[];
|
|
17
17
|
onesignalAppId: string;
|
|
18
18
|
onesignalRestApiKey: string;
|
|
19
19
|
appmetricaApiKey?: string;
|
|
@@ -21,6 +21,8 @@ export interface IApp extends Document {
|
|
|
21
21
|
keitaroData: IAppKeitaroData | null;
|
|
22
22
|
bannerParams?: IBannerParams;
|
|
23
23
|
offersStubParams?: IOffersStubParams;
|
|
24
|
+
offerwallParams?: IOfferwallParams;
|
|
25
|
+
integrationVersion?: IntegrationVersion;
|
|
24
26
|
domainParams: IDomainParams;
|
|
25
27
|
platforms: {
|
|
26
28
|
[key: string]: IPlatformParams;
|
|
@@ -29,10 +31,6 @@ export interface IApp extends Document {
|
|
|
29
31
|
policyPath: string;
|
|
30
32
|
postbacks?: IAppsflyerPostback[];
|
|
31
33
|
}
|
|
32
|
-
export declare enum ETeam {
|
|
33
|
-
TRAFFLE = "traffle",
|
|
34
|
-
ELTRAFICO = "eltrafico"
|
|
35
|
-
}
|
|
36
34
|
export declare enum EPlatform {
|
|
37
35
|
GENERAL = "@",
|
|
38
36
|
HUAWEI = "hw",
|
|
@@ -46,9 +44,7 @@ export declare enum EPlatform {
|
|
|
46
44
|
}
|
|
47
45
|
export declare enum EDirectType {
|
|
48
46
|
KEITARO_OFFER = "keitaroOffer",
|
|
49
|
-
OFFER_DIRECT = "offerDirect"
|
|
50
|
-
TRAFFLE_KEITARO_OFFER = "traffleKeitaroOffer",
|
|
51
|
-
TRAFFLE_OFFER_DIRECT = "traffleOfferDirect"
|
|
47
|
+
OFFER_DIRECT = "offerDirect"
|
|
52
48
|
}
|
|
53
49
|
export declare const getPlatformName: (platform: EPlatform | undefined) => string | false;
|
|
54
50
|
export interface IPlatformParams {
|
|
@@ -97,6 +93,10 @@ export interface IOffersStubParams {
|
|
|
97
93
|
offersPath: string;
|
|
98
94
|
imagesPath: string;
|
|
99
95
|
}
|
|
96
|
+
export interface IOfferwallParams {
|
|
97
|
+
path: string;
|
|
98
|
+
version?: number;
|
|
99
|
+
}
|
|
100
100
|
export declare enum AppStatus {
|
|
101
101
|
ARCHIVED = "ARCHIVED",
|
|
102
102
|
IN_DEVELOPMENT = "IN_DEVELOPMENT",
|
|
@@ -138,9 +138,11 @@ export declare enum IntegrationVersion {
|
|
|
138
138
|
WEB = "WEB",
|
|
139
139
|
WEB_DIRECT = "WEB_DIRECT",
|
|
140
140
|
BANNER = "BANNER",
|
|
141
|
-
PWA = "PWA"
|
|
141
|
+
PWA = "PWA",
|
|
142
|
+
OFFERWALL = "OFFERWALL"
|
|
142
143
|
}
|
|
143
144
|
export interface IKeitaroDirectTrackingParams {
|
|
145
|
+
naming: string;
|
|
144
146
|
firebase_app_instance_id: string;
|
|
145
147
|
firebase_user_id: string;
|
|
146
148
|
firebase_device_language_code: string;
|
|
@@ -169,8 +171,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
169
171
|
enabled: boolean;
|
|
170
172
|
ech: boolean;
|
|
171
173
|
status: AppStatus;
|
|
172
|
-
team: ETeam;
|
|
173
174
|
bundle: string;
|
|
175
|
+
geos: string[];
|
|
174
176
|
removeInfo: any;
|
|
175
177
|
policyPath: string;
|
|
176
178
|
postbacks: mongoose.Types.DocumentArray<{
|
|
@@ -200,6 +202,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
200
202
|
privacyPolicyParams?: any;
|
|
201
203
|
bannerParams?: any;
|
|
202
204
|
offersStubParams?: any;
|
|
205
|
+
offerwallParams?: any;
|
|
206
|
+
integrationVersion?: string | null | undefined;
|
|
203
207
|
platforms?: any;
|
|
204
208
|
onesignalAppId?: string | null | undefined;
|
|
205
209
|
onesignalRestApiKey?: string | null | undefined;
|
|
@@ -221,8 +225,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
221
225
|
enabled: boolean;
|
|
222
226
|
ech: boolean;
|
|
223
227
|
status: AppStatus;
|
|
224
|
-
team: ETeam;
|
|
225
228
|
bundle: string;
|
|
229
|
+
geos: string[];
|
|
226
230
|
removeInfo: any;
|
|
227
231
|
policyPath: string;
|
|
228
232
|
postbacks: mongoose.Types.DocumentArray<{
|
|
@@ -252,6 +256,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
252
256
|
privacyPolicyParams?: any;
|
|
253
257
|
bannerParams?: any;
|
|
254
258
|
offersStubParams?: any;
|
|
259
|
+
offerwallParams?: any;
|
|
260
|
+
integrationVersion?: string | null | undefined;
|
|
255
261
|
platforms?: any;
|
|
256
262
|
onesignalAppId?: string | null | undefined;
|
|
257
263
|
onesignalRestApiKey?: string | null | undefined;
|
|
@@ -273,8 +279,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
273
279
|
enabled: boolean;
|
|
274
280
|
ech: boolean;
|
|
275
281
|
status: AppStatus;
|
|
276
|
-
team: ETeam;
|
|
277
282
|
bundle: string;
|
|
283
|
+
geos: string[];
|
|
278
284
|
removeInfo: any;
|
|
279
285
|
policyPath: string;
|
|
280
286
|
postbacks: mongoose.Types.DocumentArray<{
|
|
@@ -304,6 +310,8 @@ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
304
310
|
privacyPolicyParams?: any;
|
|
305
311
|
bannerParams?: any;
|
|
306
312
|
offersStubParams?: any;
|
|
313
|
+
offerwallParams?: any;
|
|
314
|
+
integrationVersion?: string | null | undefined;
|
|
307
315
|
platforms?: any;
|
|
308
316
|
onesignalAppId?: string | null | undefined;
|
|
309
317
|
onesignalRestApiKey?: string | null | undefined;
|
package/lib/app/app.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.AppStatus = exports.getPlatformName = exports.EDirectType = exports.EPlatform =
|
|
3
|
+
exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.AppStatus = exports.getPlatformName = exports.EDirectType = exports.EPlatform = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const util = require("util");
|
|
6
|
-
var ETeam;
|
|
7
|
-
(function (ETeam) {
|
|
8
|
-
ETeam["TRAFFLE"] = "traffle";
|
|
9
|
-
ETeam["ELTRAFICO"] = "eltrafico";
|
|
10
|
-
})(ETeam = exports.ETeam || (exports.ETeam = {}));
|
|
11
6
|
var EPlatform;
|
|
12
7
|
(function (EPlatform) {
|
|
13
8
|
EPlatform["GENERAL"] = "@";
|
|
@@ -24,8 +19,6 @@ var EDirectType;
|
|
|
24
19
|
(function (EDirectType) {
|
|
25
20
|
EDirectType["KEITARO_OFFER"] = "keitaroOffer";
|
|
26
21
|
EDirectType["OFFER_DIRECT"] = "offerDirect";
|
|
27
|
-
EDirectType["TRAFFLE_KEITARO_OFFER"] = "traffleKeitaroOffer";
|
|
28
|
-
EDirectType["TRAFFLE_OFFER_DIRECT"] = "traffleOfferDirect";
|
|
29
22
|
})(EDirectType = exports.EDirectType || (exports.EDirectType = {}));
|
|
30
23
|
// Removed IPublicationHistory interface
|
|
31
24
|
const getPlatformName = (platform) => {
|
|
@@ -66,6 +59,7 @@ var IntegrationVersion;
|
|
|
66
59
|
IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
|
|
67
60
|
IntegrationVersion["BANNER"] = "BANNER";
|
|
68
61
|
IntegrationVersion["PWA"] = "PWA";
|
|
62
|
+
IntegrationVersion["OFFERWALL"] = "OFFERWALL";
|
|
69
63
|
})(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
|
|
70
64
|
var PlugType;
|
|
71
65
|
(function (PlugType) {
|
|
@@ -93,17 +87,13 @@ exports.AppSchema = new mongoose_1.Schema({
|
|
|
93
87
|
enum: AppStatus,
|
|
94
88
|
default: AppStatus.IN_DEVELOPMENT
|
|
95
89
|
},
|
|
96
|
-
team: {
|
|
97
|
-
type: String,
|
|
98
|
-
enum: ETeam,
|
|
99
|
-
default: ETeam.ELTRAFICO
|
|
100
|
-
},
|
|
101
90
|
bundle: {
|
|
102
91
|
type: String,
|
|
103
92
|
unique: true,
|
|
104
93
|
required: true
|
|
105
94
|
},
|
|
106
95
|
name: String,
|
|
96
|
+
geos: [String],
|
|
107
97
|
onesignalAppId: {
|
|
108
98
|
type: String,
|
|
109
99
|
required: false
|
|
@@ -158,6 +148,8 @@ exports.AppSchema = new mongoose_1.Schema({
|
|
|
158
148
|
privacyPolicyParams: Object,
|
|
159
149
|
bannerParams: Object,
|
|
160
150
|
offersStubParams: Object,
|
|
151
|
+
offerwallParams: Object,
|
|
152
|
+
integrationVersion: String,
|
|
161
153
|
domainParams: {
|
|
162
154
|
name: {
|
|
163
155
|
type: String,
|
package/lib/general/domain.js
CHANGED
|
@@ -20,7 +20,7 @@ var DomainTarget;
|
|
|
20
20
|
})(DomainTarget = exports.DomainTarget || (exports.DomainTarget = {}));
|
|
21
21
|
let getDomainTargetByIp = (ip) => {
|
|
22
22
|
switch (ip) {
|
|
23
|
-
case "
|
|
23
|
+
case "194.61.120.94":
|
|
24
24
|
return DomainTarget.MAIN;
|
|
25
25
|
case "46.246.96.114":
|
|
26
26
|
return DomainTarget.KEITARO;
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { IPush } from "./general/push";
|
|
|
2
2
|
export { IOffer, IPartner, IOfferType } from "./offers/offer";
|
|
3
3
|
export { IOffersSection, OffersSectionSchema, DefaultSectionId } from "./offers/section";
|
|
4
4
|
export { IAppOffersSection, ISectionsList, SectionsListSchema, IOfferState } from "./offers/list";
|
|
5
|
-
export { IAdjustEventIds, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData, IPlatformParams, EPlatform, AppStatus, IRemovalInfo, EDirectType, IAppsflyerPostback, IBannerParams } from "./app/app";
|
|
5
|
+
export { IAdjustEventIds, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData, IPlatformParams, EPlatform, AppStatus, IRemovalInfo, EDirectType, IAppsflyerPostback, IBannerParams, IOfferwallParams } from "./app/app";
|
|
6
6
|
export { IAppListItem } from "./app/app-list-item";
|
|
7
7
|
export { AppType } from "./app/app-type";
|
|
8
8
|
export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IAppIntegration as IFlashIntegration } from "./app/app-integration";
|
|
@@ -26,4 +26,3 @@ export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, Namechea
|
|
|
26
26
|
export { NginxTemplate } from "./templates/nginx-template";
|
|
27
27
|
export { TraffleKeitaroService } from "./network/keitaro/traffle/traffle-keitaro-service";
|
|
28
28
|
export { KeitaroCLOGeosService } from "./keitaro/keitaro-clo-geos";
|
|
29
|
-
export { ETeam } from "./app/app";
|
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.
|
|
26
|
+
exports.KeitaroCLOGeosService = exports.TraffleKeitaroService = exports.NginxTemplate = exports.NamecheapBuyRequestSchema = exports.getDomainTargetByIp = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.KeitaroUtils = exports.KeitaroService = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.AppType = exports.EDirectType = exports.AppStatus = exports.EPlatform = exports.PlugType = exports.AppSchema = exports.IntegrationVersion = exports.SectionsListSchema = exports.DefaultSectionId = exports.OffersSectionSchema = exports.IOfferType = void 0;
|
|
27
27
|
var offer_1 = require("./offers/offer");
|
|
28
28
|
Object.defineProperty(exports, "IOfferType", { enumerable: true, get: function () { return offer_1.IOfferType; } });
|
|
29
29
|
var section_1 = require("./offers/section");
|
|
@@ -73,5 +73,3 @@ var traffle_keitaro_service_1 = require("./network/keitaro/traffle/traffle-keita
|
|
|
73
73
|
Object.defineProperty(exports, "TraffleKeitaroService", { enumerable: true, get: function () { return traffle_keitaro_service_1.TraffleKeitaroService; } });
|
|
74
74
|
var keitaro_clo_geos_1 = require("./keitaro/keitaro-clo-geos");
|
|
75
75
|
Object.defineProperty(exports, "KeitaroCLOGeosService", { enumerable: true, get: function () { return keitaro_clo_geos_1.KeitaroCLOGeosService; } });
|
|
76
|
-
var app_2 = require("./app/app");
|
|
77
|
-
Object.defineProperty(exports, "ETeam", { enumerable: true, get: function () { return app_2.ETeam; } });
|
|
@@ -434,6 +434,7 @@ async function updateAppTrackingParams(app, platform, newParameters) {
|
|
|
434
434
|
const platformData = app.platforms[platform];
|
|
435
435
|
if (platformData?.direct?.keitaroData && typeof platformData.direct.keitaroData !== 'boolean' && platformData.direct.keitaroData.trackingParams) {
|
|
436
436
|
platformData.direct.keitaroData.trackingParams = {
|
|
437
|
+
naming: newParameters.sub_id_15?.name || "naming",
|
|
437
438
|
firebase_app_instance_id: newParameters.sub_id_11?.name || "firebase_app_instance_id",
|
|
438
439
|
firebase_user_id: newParameters.sub_id_12?.name || "firebase_user_id",
|
|
439
440
|
firebase_device_language_code: newParameters.sub_id_13?.name || "firebase_device_language_code",
|
|
@@ -557,6 +558,7 @@ async function updateAppWithCampaignParams(existingCampaign, app, platform) {
|
|
|
557
558
|
}
|
|
558
559
|
// Оновлюємо app з параметрами з Keitaro (нова структура)
|
|
559
560
|
platformData.direct.keitaroData.trackingParams = {
|
|
561
|
+
naming: campaignParams.sub_id_15?.name || "naming",
|
|
560
562
|
firebase_app_instance_id: campaignParams.sub_id_11?.name || "firebase_app_instance_id",
|
|
561
563
|
firebase_user_id: campaignParams.sub_id_12?.name || "firebase_user_id",
|
|
562
564
|
firebase_device_language_code: campaignParams.sub_id_13?.name || "firebase_device_language_code",
|
|
@@ -566,7 +568,7 @@ async function updateAppWithCampaignParams(existingCampaign, app, platform) {
|
|
|
566
568
|
campaign: campaignParams.sub_id_20?.name || "campaign",
|
|
567
569
|
bundle_id: campaignParams.sub_id_16?.placeholder || ""
|
|
568
570
|
};
|
|
569
|
-
console.log(`Updated app with campaign parameters (new structure): campaign=${platformData.direct.keitaroData.trackingParams
|
|
571
|
+
console.log(`Updated app with campaign parameters (new structure): campaign=${platformData.direct.keitaroData.trackingParams?.campaign}, advertising_id=${platformData.direct.keitaroData.trackingParams?.advertising_id}, appsflyer_device_id=${platformData.direct.keitaroData.trackingParams?.appsflyer_device_id}`);
|
|
570
572
|
return true;
|
|
571
573
|
}
|
|
572
574
|
catch (error) {
|
|
@@ -939,10 +941,10 @@ async function updateStreamsForApp(app, platform) {
|
|
|
939
941
|
console.log(`Skipping stream update for platform ${platform}: test platform is ignored`);
|
|
940
942
|
return false;
|
|
941
943
|
}
|
|
942
|
-
// Перевіряємо чи є directType
|
|
944
|
+
// Перевіряємо чи є directType
|
|
943
945
|
const directType = platformData.direct?.directType;
|
|
944
|
-
if (!directType
|
|
945
|
-
console.log(`Skipping stream update for platform ${platform}: directType
|
|
946
|
+
if (!directType) {
|
|
947
|
+
console.log(`Skipping stream update for platform ${platform}: no directType set`);
|
|
946
948
|
return false;
|
|
947
949
|
}
|
|
948
950
|
const campaign = await findCampaignForAppPlatform(app, platform);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { AppStatus,
|
|
1
|
+
import { AppStatus, IAppKeitaroData, IBannerParams, IDomainParams, IOffersStubParams, IOfferwallParams, IntegrationVersion, IPlatformParams } from "app/app";
|
|
2
2
|
export interface IUpsertAppRequest {
|
|
3
3
|
id: number;
|
|
4
4
|
name?: string;
|
|
5
5
|
bundle?: string;
|
|
6
6
|
sourceUrl?: string;
|
|
7
7
|
enabled?: boolean;
|
|
8
|
+
geos?: string[];
|
|
9
|
+
integrationVersion?: IntegrationVersion;
|
|
8
10
|
appmetricaApiKey?: string;
|
|
9
11
|
appmetricaAppId?: number;
|
|
10
12
|
keitaroData?: Partial<IAppKeitaroData>;
|
|
11
13
|
bannerParams?: IBannerParams;
|
|
12
14
|
offersStubParams?: IOffersStubParams;
|
|
15
|
+
offerwallParams?: IOfferwallParams;
|
|
13
16
|
domainParams: IDomainParams;
|
|
14
17
|
platforms: {
|
|
15
18
|
[key: string]: IPlatformParams;
|
|
@@ -18,7 +21,6 @@ export interface IUpsertAppRequest {
|
|
|
18
21
|
file?: any;
|
|
19
22
|
status?: AppStatus;
|
|
20
23
|
policyPath?: string;
|
|
21
|
-
team?: ETeam;
|
|
22
24
|
}
|
|
23
25
|
export interface IUpsertAppResponse {
|
|
24
26
|
data: IUpsertAppRequest;
|
package/package.json
CHANGED
package/src/app/app.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface IApp extends Document {
|
|
|
19
19
|
name: string
|
|
20
20
|
bundle: string
|
|
21
21
|
status: AppStatus
|
|
22
|
-
|
|
22
|
+
geos?: string[]
|
|
23
23
|
onesignalAppId: string
|
|
24
24
|
onesignalRestApiKey: string
|
|
25
25
|
|
|
@@ -30,6 +30,8 @@ export interface IApp extends Document {
|
|
|
30
30
|
|
|
31
31
|
bannerParams?: IBannerParams,
|
|
32
32
|
offersStubParams?: IOffersStubParams,
|
|
33
|
+
offerwallParams?: IOfferwallParams,
|
|
34
|
+
integrationVersion?: IntegrationVersion,
|
|
33
35
|
domainParams: IDomainParams
|
|
34
36
|
platforms: { [key: string]: IPlatformParams },
|
|
35
37
|
|
|
@@ -38,11 +40,6 @@ export interface IApp extends Document {
|
|
|
38
40
|
postbacks?: IAppsflyerPostback[]
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
export enum ETeam {
|
|
42
|
-
TRAFFLE = 'traffle',
|
|
43
|
-
ELTRAFICO = 'eltrafico'
|
|
44
|
-
}
|
|
45
|
-
|
|
46
43
|
export enum EPlatform {
|
|
47
44
|
GENERAL = '@',
|
|
48
45
|
HUAWEI = 'hw',
|
|
@@ -57,9 +54,7 @@ export enum EPlatform {
|
|
|
57
54
|
|
|
58
55
|
export enum EDirectType{
|
|
59
56
|
KEITARO_OFFER = 'keitaroOffer',
|
|
60
|
-
OFFER_DIRECT = 'offerDirect'
|
|
61
|
-
TRAFFLE_KEITARO_OFFER = 'traffleKeitaroOffer',
|
|
62
|
-
TRAFFLE_OFFER_DIRECT = 'traffleOfferDirect'
|
|
57
|
+
OFFER_DIRECT = 'offerDirect'
|
|
63
58
|
}
|
|
64
59
|
|
|
65
60
|
// Removed IPublicationHistory interface
|
|
@@ -138,6 +133,11 @@ export interface IOffersStubParams {
|
|
|
138
133
|
imagesPath: string,
|
|
139
134
|
}
|
|
140
135
|
|
|
136
|
+
export interface IOfferwallParams {
|
|
137
|
+
path: string,
|
|
138
|
+
version?: number,
|
|
139
|
+
}
|
|
140
|
+
|
|
141
141
|
export enum AppStatus {
|
|
142
142
|
ARCHIVED = "ARCHIVED",
|
|
143
143
|
IN_DEVELOPMENT = "IN_DEVELOPMENT",
|
|
@@ -187,10 +187,12 @@ export enum IntegrationVersion {
|
|
|
187
187
|
WEB = "WEB",
|
|
188
188
|
WEB_DIRECT = "WEB_DIRECT",
|
|
189
189
|
BANNER = "BANNER",
|
|
190
|
-
PWA = "PWA"
|
|
190
|
+
PWA = "PWA",
|
|
191
|
+
OFFERWALL = "OFFERWALL"
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
export interface IKeitaroDirectTrackingParams {
|
|
195
|
+
naming: string,
|
|
194
196
|
firebase_app_instance_id: string,
|
|
195
197
|
firebase_user_id: string,
|
|
196
198
|
firebase_device_language_code: string,
|
|
@@ -237,11 +239,6 @@ export const AppSchema = new Schema({
|
|
|
237
239
|
enum: AppStatus,
|
|
238
240
|
default: AppStatus.IN_DEVELOPMENT
|
|
239
241
|
},
|
|
240
|
-
team: {
|
|
241
|
-
type: String,
|
|
242
|
-
enum: ETeam,
|
|
243
|
-
default: ETeam.ELTRAFICO
|
|
244
|
-
},
|
|
245
242
|
|
|
246
243
|
bundle: {
|
|
247
244
|
type: String,
|
|
@@ -249,6 +246,7 @@ export const AppSchema = new Schema({
|
|
|
249
246
|
required: true
|
|
250
247
|
},
|
|
251
248
|
name: String,
|
|
249
|
+
geos: [String],
|
|
252
250
|
onesignalAppId: {
|
|
253
251
|
type: String,
|
|
254
252
|
required: false
|
|
@@ -304,6 +302,8 @@ export const AppSchema = new Schema({
|
|
|
304
302
|
privacyPolicyParams: Object,
|
|
305
303
|
bannerParams: Object,
|
|
306
304
|
offersStubParams: Object,
|
|
305
|
+
offerwallParams: Object,
|
|
306
|
+
integrationVersion: String,
|
|
307
307
|
domainParams: {
|
|
308
308
|
name: {
|
|
309
309
|
type: String,
|
package/src/general/domain.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { IOffer, IPartner, IOfferType } from "./offers/offer"
|
|
|
4
4
|
export { IOffersSection, OffersSectionSchema, DefaultSectionId } from "./offers/section"
|
|
5
5
|
export { IAppOffersSection, ISectionsList, SectionsListSchema, IOfferState } from "./offers/list"
|
|
6
6
|
|
|
7
|
-
export { IAdjustEventIds, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData, IPlatformParams, EPlatform, AppStatus, IRemovalInfo, EDirectType, IAppsflyerPostback, IBannerParams } from "./app/app"
|
|
7
|
+
export { IAdjustEventIds, IntegrationVersion, IApp, AppSchema, PlugType, IAppKeitaroData, IPlatformParams, EPlatform, AppStatus, IRemovalInfo, EDirectType, IAppsflyerPostback, IBannerParams, IOfferwallParams } from "./app/app"
|
|
8
8
|
export { IAppListItem } from "./app/app-list-item"
|
|
9
9
|
export { AppType } from "./app/app-type"
|
|
10
10
|
export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IAppIntegration as IFlashIntegration } from "./app/app-integration"
|
|
@@ -33,5 +33,4 @@ export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, Namechea
|
|
|
33
33
|
export { NginxTemplate } from "./templates/nginx-template";
|
|
34
34
|
|
|
35
35
|
export { TraffleKeitaroService } from "./network/keitaro/traffle/traffle-keitaro-service"
|
|
36
|
-
export { KeitaroCLOGeosService } from "./keitaro/keitaro-clo-geos"
|
|
37
|
-
export { ETeam} from "./app/app";
|
|
36
|
+
export { KeitaroCLOGeosService } from "./keitaro/keitaro-clo-geos"
|
|
@@ -509,6 +509,7 @@ async function updateAppTrackingParams(app: IApp, platform: EPlatform, newParame
|
|
|
509
509
|
const platformData = app.platforms[platform];
|
|
510
510
|
if (platformData?.direct?.keitaroData && typeof platformData.direct.keitaroData !== 'boolean' && platformData.direct.keitaroData.trackingParams) {
|
|
511
511
|
platformData.direct.keitaroData.trackingParams = {
|
|
512
|
+
naming: newParameters.sub_id_15?.name || "naming",
|
|
512
513
|
firebase_app_instance_id: newParameters.sub_id_11?.name || "firebase_app_instance_id",
|
|
513
514
|
firebase_user_id: newParameters.sub_id_12?.name || "firebase_user_id",
|
|
514
515
|
firebase_device_language_code: newParameters.sub_id_13?.name || "firebase_device_language_code",
|
|
@@ -641,6 +642,7 @@ async function updateAppWithCampaignParams(existingCampaign: IKeitaroCampaign, a
|
|
|
641
642
|
|
|
642
643
|
// Оновлюємо app з параметрами з Keitaro (нова структура)
|
|
643
644
|
platformData.direct.keitaroData.trackingParams = {
|
|
645
|
+
naming: campaignParams.sub_id_15?.name || "naming",
|
|
644
646
|
firebase_app_instance_id: campaignParams.sub_id_11?.name || "firebase_app_instance_id",
|
|
645
647
|
firebase_user_id: campaignParams.sub_id_12?.name || "firebase_user_id",
|
|
646
648
|
firebase_device_language_code: campaignParams.sub_id_13?.name || "firebase_device_language_code",
|
|
@@ -651,7 +653,7 @@ async function updateAppWithCampaignParams(existingCampaign: IKeitaroCampaign, a
|
|
|
651
653
|
bundle_id: campaignParams.sub_id_16?.placeholder || ""
|
|
652
654
|
};
|
|
653
655
|
|
|
654
|
-
console.log(`Updated app with campaign parameters (new structure): campaign=${platformData.direct.keitaroData.trackingParams
|
|
656
|
+
console.log(`Updated app with campaign parameters (new structure): campaign=${platformData.direct.keitaroData.trackingParams?.campaign}, advertising_id=${platformData.direct.keitaroData.trackingParams?.advertising_id}, appsflyer_device_id=${platformData.direct.keitaroData.trackingParams?.appsflyer_device_id}`);
|
|
655
657
|
|
|
656
658
|
return true;
|
|
657
659
|
} catch (error) {
|
|
@@ -1079,10 +1081,10 @@ export async function updateStreamsForApp(app: IApp, platform: EPlatform): Promi
|
|
|
1079
1081
|
return false;
|
|
1080
1082
|
}
|
|
1081
1083
|
|
|
1082
|
-
// Перевіряємо чи є directType
|
|
1084
|
+
// Перевіряємо чи є directType
|
|
1083
1085
|
const directType = platformData.direct?.directType;
|
|
1084
|
-
if (!directType
|
|
1085
|
-
console.log(`Skipping stream update for platform ${platform}: directType
|
|
1086
|
+
if (!directType) {
|
|
1087
|
+
console.log(`Skipping stream update for platform ${platform}: no directType set`);
|
|
1086
1088
|
return false;
|
|
1087
1089
|
}
|
|
1088
1090
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppStatus,
|
|
1
|
+
import { AppStatus, IAppKeitaroData, IBannerParams, IDomainParams, IOffersStubParams, IOfferwallParams, IntegrationVersion, IPlatformParams, IPrivacyPolicyParams, IRemoveDataParams } from "app/app"
|
|
2
2
|
import { PlugType } from "index"
|
|
3
3
|
|
|
4
4
|
export interface IUpsertAppRequest {
|
|
@@ -7,6 +7,8 @@ export interface IUpsertAppRequest {
|
|
|
7
7
|
bundle?: string
|
|
8
8
|
sourceUrl?: string, // –
|
|
9
9
|
enabled?: boolean,
|
|
10
|
+
geos?: string[],
|
|
11
|
+
integrationVersion?: IntegrationVersion,
|
|
10
12
|
|
|
11
13
|
// onesignalAppId: string
|
|
12
14
|
// onesignalRestApiKey: string
|
|
@@ -17,13 +19,13 @@ export interface IUpsertAppRequest {
|
|
|
17
19
|
keitaroData?: Partial<IAppKeitaroData>,
|
|
18
20
|
bannerParams?: IBannerParams,
|
|
19
21
|
offersStubParams?: IOffersStubParams,
|
|
22
|
+
offerwallParams?: IOfferwallParams,
|
|
20
23
|
domainParams: IDomainParams,
|
|
21
24
|
platforms: { [key: string]: IPlatformParams },
|
|
22
25
|
ech?: boolean,
|
|
23
26
|
file?: any
|
|
24
27
|
status?: AppStatus
|
|
25
28
|
policyPath?: string
|
|
26
|
-
team?: ETeam
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export interface IUpsertAppResponse {
|