@bprotsyk/aso-core 2.1.192 → 2.1.196

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.js CHANGED
@@ -1,79 +1,24 @@
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 = exports.ETeam = void 0;
3
+ exports.AppSchema = exports.AppStatus = exports.DEFENCE_CAMPAIGN_TOKEN = exports.DEFENCE_CAMPAIGN_ID = exports.DIRECT_TEMPLATE_CAMPAIGN_ID = exports.OFFERWALL_TEMPLATE_CAMPAIGN_ID = exports.IntegrationType = void 0;
4
4
  const mongoose_1 = require("mongoose");
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
- var EPlatform;
12
- (function (EPlatform) {
13
- EPlatform["GENERAL"] = "@";
14
- EPlatform["HUAWEI"] = "hw";
15
- EPlatform["SAMSUNG"] = "sm";
16
- EPlatform["ruSTORE"] = "rs";
17
- EPlatform["XIAOMI"] = "xm";
18
- EPlatform["APKPURE"] = "ap";
19
- EPlatform["TELEGRAM"] = "tg";
20
- EPlatform["AMAZON"] = "am";
21
- EPlatform["TEST"] = "test";
22
- })(EPlatform = exports.EPlatform || (exports.EPlatform = {}));
23
- var EDirectType;
24
- (function (EDirectType) {
25
- EDirectType["KEITARO_OFFER"] = "keitaroOffer";
26
- EDirectType["OFFER_DIRECT"] = "offerDirect";
27
- EDirectType["TRAFFLE_KEITARO_OFFER"] = "traffleKeitaroOffer";
28
- EDirectType["TRAFFLE_OFFER_DIRECT"] = "traffleOfferDirect";
29
- })(EDirectType = exports.EDirectType || (exports.EDirectType = {}));
30
- // Removed IPublicationHistory interface
31
- const getPlatformName = (platform) => {
32
- switch (platform) {
33
- case EPlatform.SAMSUNG:
34
- return "samsung";
35
- case EPlatform.HUAWEI:
36
- return "huawei";
37
- case EPlatform.ruSTORE:
38
- return "ruStore";
39
- case EPlatform.XIAOMI:
40
- return "xiaomi";
41
- case EPlatform.APKPURE:
42
- return "apkpure";
43
- case EPlatform.TELEGRAM:
44
- return "telegram";
45
- case EPlatform.AMAZON:
46
- return "amazon";
47
- case EPlatform.GENERAL:
48
- return false;
49
- default:
50
- return false;
51
- }
52
- };
53
- exports.getPlatformName = getPlatformName;
5
+ // Integration types - OFFERWALL is default
6
+ var IntegrationType;
7
+ (function (IntegrationType) {
8
+ IntegrationType["OFFERWALL"] = "offerwall";
9
+ IntegrationType["DIRECT"] = "direct";
10
+ })(IntegrationType = exports.IntegrationType || (exports.IntegrationType = {}));
11
+ // Campaign IDs for cloning
12
+ exports.OFFERWALL_TEMPLATE_CAMPAIGN_ID = 3497;
13
+ exports.DIRECT_TEMPLATE_CAMPAIGN_ID = 3499;
14
+ exports.DEFENCE_CAMPAIGN_ID = 3498;
15
+ exports.DEFENCE_CAMPAIGN_TOKEN = 'hnwtbnwvq5lrvmztxnc78gxgxtk24jq8';
54
16
  var AppStatus;
55
17
  (function (AppStatus) {
56
18
  AppStatus["ARCHIVED"] = "ARCHIVED";
57
19
  AppStatus["IN_DEVELOPMENT"] = "IN_DEVELOPMENT";
58
20
  AppStatus["READY"] = "READY";
59
21
  })(AppStatus = exports.AppStatus || (exports.AppStatus = {}));
60
- var IntegrationVersion;
61
- (function (IntegrationVersion) {
62
- IntegrationVersion["NONE"] = "MVVM";
63
- IntegrationVersion["POLICY"] = "POLICY";
64
- IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
65
- IntegrationVersion["WEB"] = "WEB";
66
- IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
67
- IntegrationVersion["BANNER"] = "BANNER";
68
- IntegrationVersion["PWA"] = "PWA";
69
- IntegrationVersion["OFFERWALL"] = "OFFERWALL";
70
- })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
71
- var PlugType;
72
- (function (PlugType) {
73
- PlugType["PASTEBIN"] = "PASTEBIN";
74
- PlugType["GIST"] = "GIST";
75
- PlugType["OTHER"] = "OTHER";
76
- })(PlugType = exports.PlugType || (exports.PlugType = {}));
77
22
  exports.AppSchema = new mongoose_1.Schema({
78
23
  id: {
79
24
  type: Number,
@@ -85,19 +30,15 @@ exports.AppSchema = new mongoose_1.Schema({
85
30
  required: true,
86
31
  default: false
87
32
  },
88
- ech: {
89
- type: Boolean,
90
- default: false
91
- },
92
33
  status: {
93
34
  type: String,
94
35
  enum: AppStatus,
95
36
  default: AppStatus.IN_DEVELOPMENT
96
37
  },
97
- team: {
38
+ integrationType: {
98
39
  type: String,
99
- enum: ETeam,
100
- default: ETeam.ELTRAFICO
40
+ enum: IntegrationType,
41
+ default: IntegrationType.OFFERWALL
101
42
  },
102
43
  bundle: {
103
44
  type: String,
@@ -113,64 +54,58 @@ exports.AppSchema = new mongoose_1.Schema({
113
54
  type: String,
114
55
  required: false
115
56
  },
116
- appmetricaApiKey: {
117
- type: String,
118
- required: false
57
+ offerwallCampaign: {
58
+ trackingCampaignId: Number,
59
+ trackingCampaignName: String,
60
+ trackingCampaignAlias: String,
61
+ trackingDomainId: Number,
62
+ trackingDomainName: String,
63
+ campingToken: String,
64
+ trackingParams: {
65
+ naming: String,
66
+ firebase_app_instance_id: String,
67
+ firebase_user_id: String,
68
+ firebase_device_language_code: String,
69
+ firebase_push_token: String,
70
+ bundle_id: String,
71
+ advertising_id: String,
72
+ appsflyer_device_id: String,
73
+ campaign: String
74
+ }
119
75
  },
120
- appmetricaAppId: {
121
- type: Number,
122
- required: false
123
- },
124
- keitaroData: {
125
- trackingCampaignId: {
126
- type: Number,
127
- // unique: true,
128
- required: true,
129
- default: 0
130
- },
131
- trackingCampaignName: {
132
- type: String,
133
- // unique: true,
134
- required: true,
135
- default: "none"
136
- },
137
- trackingCampaignAlias: {
138
- type: String,
139
- // unique: true,
140
- required: true,
141
- default: "none"
142
- },
143
- trackingDomainId: {
144
- type: Number,
145
- required: true,
146
- default: 0
147
- },
148
- trackingDomainName: {
149
- type: String,
150
- required: true,
151
- default: "none"
152
- },
76
+ directCampaign: {
77
+ trackingCampaignId: Number,
78
+ trackingCampaignName: String,
79
+ trackingCampaignAlias: String,
80
+ trackingDomainId: Number,
81
+ trackingDomainName: String,
82
+ campingToken: String,
83
+ trackingParams: {
84
+ naming: String,
85
+ firebase_app_instance_id: String,
86
+ firebase_user_id: String,
87
+ firebase_device_language_code: String,
88
+ firebase_push_token: String,
89
+ bundle_id: String,
90
+ advertising_id: String,
91
+ appsflyer_device_id: String,
92
+ campaign: String
93
+ }
153
94
  },
154
- removeDataParams: Object,
155
- removeInfo: {
156
- type: Object,
157
- default: null
95
+ appsflyerParams: {
96
+ apiToken: String,
97
+ eventIds: Object,
98
+ appId: String,
99
+ devKey: String
158
100
  },
159
- privacyPolicyParams: Object,
160
- bannerParams: Object,
161
- offersStubParams: Object,
162
- offerwallParams: Object,
163
- integrationVersion: String,
164
101
  domainParams: {
165
102
  name: {
166
103
  type: String,
167
104
  unique: true
168
105
  },
169
- clouflareZone: {
170
- type: String,
171
- },
106
+ clouflareZone: String,
107
+ ready: Boolean
172
108
  },
173
- platforms: Object,
174
109
  policyPath: {
175
110
  type: String,
176
111
  default: "none"
@@ -94,7 +94,6 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
94
94
  caption?: string | null | undefined;
95
95
  title?: string | null | undefined;
96
96
  status?: string | null | undefined;
97
- ip?: string | null | undefined;
98
97
  namecheapId?: string | null | undefined;
99
98
  isUpdating?: boolean | null | undefined;
100
99
  cloudflareStatus?: string | null | undefined;
@@ -103,6 +102,7 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
103
102
  originalDNSHost?: string | null | undefined;
104
103
  createdAt?: number | null | undefined;
105
104
  expiresAt?: number | null | undefined;
105
+ ip?: string | null | undefined;
106
106
  subdomain?: string | null | undefined;
107
107
  mxRecord?: string | null | undefined;
108
108
  target?: string | null | undefined;
@@ -122,7 +122,6 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
122
122
  caption?: string | null | undefined;
123
123
  title?: string | null | undefined;
124
124
  status?: string | null | undefined;
125
- ip?: string | null | undefined;
126
125
  namecheapId?: string | null | undefined;
127
126
  isUpdating?: boolean | null | undefined;
128
127
  cloudflareStatus?: string | null | undefined;
@@ -131,6 +130,7 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
131
130
  originalDNSHost?: string | null | undefined;
132
131
  createdAt?: number | null | undefined;
133
132
  expiresAt?: number | null | undefined;
133
+ ip?: string | null | undefined;
134
134
  subdomain?: string | null | undefined;
135
135
  mxRecord?: string | null | undefined;
136
136
  target?: string | null | undefined;
@@ -150,7 +150,6 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
150
150
  caption?: string | null | undefined;
151
151
  title?: string | null | undefined;
152
152
  status?: string | null | undefined;
153
- ip?: string | null | undefined;
154
153
  namecheapId?: string | null | undefined;
155
154
  isUpdating?: boolean | null | undefined;
156
155
  cloudflareStatus?: string | null | undefined;
@@ -159,6 +158,7 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
159
158
  originalDNSHost?: string | null | undefined;
160
159
  createdAt?: number | null | undefined;
161
160
  expiresAt?: number | null | undefined;
161
+ ip?: string | null | undefined;
162
162
  subdomain?: string | null | undefined;
163
163
  mxRecord?: string | null | undefined;
164
164
  target?: string | null | undefined;
@@ -20,7 +20,7 @@ var DomainTarget;
20
20
  })(DomainTarget = exports.DomainTarget || (exports.DomainTarget = {}));
21
21
  let getDomainTargetByIp = (ip) => {
22
22
  switch (ip) {
23
- case "185.123.53.227":
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,20 +2,16 @@ 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, IOfferwallParams } from "./app/app";
5
+ export { IntegrationType, IApp, AppSchema, IAppKeitaroData, IAppsflyerParams, AppStatus, IAppsflyerPostback, IDomainParams, IKeitaroDirectTrackingParams, OFFERWALL_TEMPLATE_CAMPAIGN_ID, DIRECT_TEMPLATE_CAMPAIGN_ID, DEFENCE_CAMPAIGN_ID, DEFENCE_CAMPAIGN_TOKEN } from "./app/app";
6
6
  export { IAppListItem } from "./app/app-list-item";
7
7
  export { AppType } from "./app/app-type";
8
- export { AlternativeLayoutType, AlternativeSourceType, AlternativeLogicType, AlternativeNetworkTool, AlternativeStorageType, AlternativeNavigation, AlternativeOnBackPressed, AlternativeOnActivityResult, IAppIntegration as IFlashIntegration } from "./app/app-integration";
9
8
  export { IPanelUser, PanelUserAccessScope, PanelUserSchema } from "./panel/user";
10
9
  export { IAuthToken } from "./panel/auth";
11
- export { IUpsertAppRequest, IUpsertAppResponse } from "./panel/app/upsert-flash-app-request";
12
10
  export { IGradient, IStroke, IShape, ShapeDiv } from "./general/shape";
13
11
  export { IOfferWallHomeDialogData } from "./offers/offerwall/offerwall-home-dialog-data";
14
12
  export { IOfferWallOffer } from "./offers/offerwall/offerwall-offer";
15
13
  export { IOfferWallResponse } from "./offers/offerwall/offerwall-response";
16
14
  export { IOfferWallSection } from "./offers/offerwall/offerwall-section";
17
- export { KeitaroService, IKeitaroOffersFilter } from "./network/keitaro/keitaro-service";
18
- export * as KeitaroUtils from "./utils/keitaro-utils";
19
15
  export { IKeitaroCampaign, IKeitaroCampaignParameters, IKeitaroCampaignParameter } from "./keitaro/keitaro-campaign";
20
16
  export { IKeitaroDomain } from "./keitaro/keitaro-domain";
21
17
  export { IKeitaroOffer } from "./keitaro/keitaro-offer";
@@ -24,6 +20,3 @@ export { ICloudflareDomainStatus, ICloudflareDomainType, ICloudflareDomain } fro
24
20
  export { IDomain, IDomainSetupResult, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY, IDomainsBuyRequestResponse, getDomainTargetByIp } from "./general/domain";
25
21
  export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema, INamecheapGetDomainsResult, INamecheapBuyResult } from "./general/namecheap-domain";
26
22
  export { NginxTemplate } from "./templates/nginx-template";
27
- export { TraffleKeitaroService } from "./network/keitaro/traffle/traffle-keitaro-service";
28
- export { KeitaroCLOGeosService } from "./keitaro/keitaro-clo-geos";
29
- export { ETeam } from "./app/app";
package/lib/index.js CHANGED
@@ -1,29 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ETeam = 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;
3
+ exports.NginxTemplate = exports.NamecheapBuyRequestSchema = exports.getDomainTargetByIp = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.AppType = exports.DEFENCE_CAMPAIGN_TOKEN = exports.DEFENCE_CAMPAIGN_ID = exports.DIRECT_TEMPLATE_CAMPAIGN_ID = exports.OFFERWALL_TEMPLATE_CAMPAIGN_ID = exports.AppStatus = exports.AppSchema = exports.IntegrationType = exports.SectionsListSchema = exports.DefaultSectionId = exports.OffersSectionSchema = exports.IOfferType = void 0;
27
4
  var offer_1 = require("./offers/offer");
28
5
  Object.defineProperty(exports, "IOfferType", { enumerable: true, get: function () { return offer_1.IOfferType; } });
29
6
  var section_1 = require("./offers/section");
@@ -32,31 +9,20 @@ Object.defineProperty(exports, "DefaultSectionId", { enumerable: true, get: func
32
9
  var list_1 = require("./offers/list");
33
10
  Object.defineProperty(exports, "SectionsListSchema", { enumerable: true, get: function () { return list_1.SectionsListSchema; } });
34
11
  var app_1 = require("./app/app");
35
- Object.defineProperty(exports, "IntegrationVersion", { enumerable: true, get: function () { return app_1.IntegrationVersion; } });
12
+ Object.defineProperty(exports, "IntegrationType", { enumerable: true, get: function () { return app_1.IntegrationType; } });
36
13
  Object.defineProperty(exports, "AppSchema", { enumerable: true, get: function () { return app_1.AppSchema; } });
37
- Object.defineProperty(exports, "PlugType", { enumerable: true, get: function () { return app_1.PlugType; } });
38
- Object.defineProperty(exports, "EPlatform", { enumerable: true, get: function () { return app_1.EPlatform; } });
39
14
  Object.defineProperty(exports, "AppStatus", { enumerable: true, get: function () { return app_1.AppStatus; } });
40
- Object.defineProperty(exports, "EDirectType", { enumerable: true, get: function () { return app_1.EDirectType; } });
15
+ Object.defineProperty(exports, "OFFERWALL_TEMPLATE_CAMPAIGN_ID", { enumerable: true, get: function () { return app_1.OFFERWALL_TEMPLATE_CAMPAIGN_ID; } });
16
+ Object.defineProperty(exports, "DIRECT_TEMPLATE_CAMPAIGN_ID", { enumerable: true, get: function () { return app_1.DIRECT_TEMPLATE_CAMPAIGN_ID; } });
17
+ Object.defineProperty(exports, "DEFENCE_CAMPAIGN_ID", { enumerable: true, get: function () { return app_1.DEFENCE_CAMPAIGN_ID; } });
18
+ Object.defineProperty(exports, "DEFENCE_CAMPAIGN_TOKEN", { enumerable: true, get: function () { return app_1.DEFENCE_CAMPAIGN_TOKEN; } });
41
19
  var app_type_1 = require("./app/app-type");
42
20
  Object.defineProperty(exports, "AppType", { enumerable: true, get: function () { return app_type_1.AppType; } });
43
- var app_integration_1 = require("./app/app-integration");
44
- Object.defineProperty(exports, "AlternativeLayoutType", { enumerable: true, get: function () { return app_integration_1.AlternativeLayoutType; } });
45
- Object.defineProperty(exports, "AlternativeSourceType", { enumerable: true, get: function () { return app_integration_1.AlternativeSourceType; } });
46
- Object.defineProperty(exports, "AlternativeLogicType", { enumerable: true, get: function () { return app_integration_1.AlternativeLogicType; } });
47
- Object.defineProperty(exports, "AlternativeNetworkTool", { enumerable: true, get: function () { return app_integration_1.AlternativeNetworkTool; } });
48
- Object.defineProperty(exports, "AlternativeStorageType", { enumerable: true, get: function () { return app_integration_1.AlternativeStorageType; } });
49
- Object.defineProperty(exports, "AlternativeNavigation", { enumerable: true, get: function () { return app_integration_1.AlternativeNavigation; } });
50
- Object.defineProperty(exports, "AlternativeOnBackPressed", { enumerable: true, get: function () { return app_integration_1.AlternativeOnBackPressed; } });
51
- Object.defineProperty(exports, "AlternativeOnActivityResult", { enumerable: true, get: function () { return app_integration_1.AlternativeOnActivityResult; } });
52
21
  var user_1 = require("./panel/user");
53
22
  Object.defineProperty(exports, "PanelUserAccessScope", { enumerable: true, get: function () { return user_1.PanelUserAccessScope; } });
54
23
  Object.defineProperty(exports, "PanelUserSchema", { enumerable: true, get: function () { return user_1.PanelUserSchema; } });
55
24
  var shape_1 = require("./general/shape");
56
25
  Object.defineProperty(exports, "ShapeDiv", { enumerable: true, get: function () { return shape_1.ShapeDiv; } });
57
- var keitaro_service_1 = require("./network/keitaro/keitaro-service");
58
- Object.defineProperty(exports, "KeitaroService", { enumerable: true, get: function () { return keitaro_service_1.KeitaroService; } });
59
- exports.KeitaroUtils = __importStar(require("./utils/keitaro-utils"));
60
26
  var cloudflare_domain_1 = require("./general/cloudflare-domain");
61
27
  Object.defineProperty(exports, "ICloudflareDomainStatus", { enumerable: true, get: function () { return cloudflare_domain_1.ICloudflareDomainStatus; } });
62
28
  Object.defineProperty(exports, "ICloudflareDomainType", { enumerable: true, get: function () { return cloudflare_domain_1.ICloudflareDomainType; } });
@@ -69,9 +35,3 @@ var namecheap_domain_1 = require("./general/namecheap-domain");
69
35
  Object.defineProperty(exports, "NamecheapBuyRequestSchema", { enumerable: true, get: function () { return namecheap_domain_1.NamecheapBuyRequestSchema; } });
70
36
  var nginx_template_1 = require("./templates/nginx-template");
71
37
  Object.defineProperty(exports, "NginxTemplate", { enumerable: true, get: function () { return nginx_template_1.NginxTemplate; } });
72
- var traffle_keitaro_service_1 = require("./network/keitaro/traffle/traffle-keitaro-service");
73
- Object.defineProperty(exports, "TraffleKeitaroService", { enumerable: true, get: function () { return traffle_keitaro_service_1.TraffleKeitaroService; } });
74
- var keitaro_clo_geos_1 = require("./keitaro/keitaro-clo-geos");
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; } });
@@ -16,6 +16,7 @@ export interface IKeitaroCampaign {
16
16
  cost_auto: boolean;
17
17
  domain_id: number;
18
18
  domain: string;
19
+ token?: string;
19
20
  uniqueness_use_cookies: boolean;
20
21
  traffic_loss: number;
21
22
  parameters: IKeitaroCampaignParameters;
@@ -7,6 +7,6 @@ const axios_1 = __importDefault(require("axios"));
7
7
  exports.default = axios_1.default.create({
8
8
  baseURL: 'https://aibprtsk.com/admin_api/v1/',
9
9
  headers: {
10
- "Api-Key": `a5369b1016aa6bd6453751a393b157b4`,
10
+ "Api-Key": `3cb7fc37d5cc231107f649e27dc9b0cb`,
11
11
  },
12
12
  });
@@ -1,10 +1,8 @@
1
1
  import { IKeitaroStream } from "../../keitaro/keitaro-stream";
2
- import { IOffer } from "../../offers/offer";
3
2
  import { IKeitaroCampaign } from "../../keitaro/keitaro-campaign";
4
3
  import { IKeitaroDomain } from "../../keitaro/keitaro-domain";
5
- import { EPlatform, IApp } from "../../app/app";
6
- import { IKeitaroOffer } from "index";
7
- import { IKeitaroClicksRequest, KeitaroClicksInterval } from "../../keitaro/keitaro-clicks";
4
+ import { IApp, IAppKeitaroData, IntegrationType } from "../../app/app";
5
+ import { IKeitaroOffer } from "../../keitaro/keitaro-offer";
8
6
  export interface IKeitaroOffersFilter {
9
7
  keitaroId?: number;
10
8
  name?: string;
@@ -12,44 +10,33 @@ export interface IKeitaroOffersFilter {
12
10
  }
13
11
  declare function getStreamsByCampaignId(campaignId: number): Promise<IKeitaroStream[]>;
14
12
  declare function getAllCampaigns(): Promise<IKeitaroCampaign[]>;
15
- declare function cloneStreams(originalCampaignId: number, streamPositionsToClone: number[], campaignRegExp: RegExp): Promise<void>;
13
+ declare function getCampaignById(id: number): Promise<IKeitaroCampaign>;
16
14
  declare function updateCampaign(id: number, payload: Partial<IKeitaroCampaign>): Promise<void>;
17
- declare function getAllOffers(): Promise<IKeitaroOffer[]>;
18
- declare function findKeitaroOffers(filter: IKeitaroOffersFilter): Promise<IKeitaroOffer[]>;
19
- declare function getOfferByKeitaroId(id: number): Promise<IKeitaroOffer>;
20
- declare function updateOffer(offer: any): Promise<IKeitaroOffer>;
21
- declare function addOffersToKeitaro(offers: IOffer[], affiliateId: number, links: string[], avoidGroup?: number, groupId?: number): Promise<void>;
22
15
  declare function createCampaign(campaignData: Partial<IKeitaroCampaign>): Promise<IKeitaroCampaign>;
23
- declare function getCampaignById(id: number): Promise<IKeitaroCampaign>;
24
- export declare function upsertStreamToCampaign(campaign: IKeitaroCampaign, stream: Partial<IKeitaroStream>): Promise<void>;
25
- declare function cloneOWCampaign(app: IApp, platform?: EPlatform): Promise<IKeitaroCampaign | any>;
26
- declare function cloneDirectCampaign(app: IApp, platform?: EPlatform, addDefaultStreams?: boolean): Promise<IKeitaroCampaign | any>;
27
- declare function cloneDCampaign(app: IApp): Promise<IKeitaroCampaign>;
28
- declare function changeCampaignsGroup(fromId: number, toId: number, exceptForCampaignIds: number[], onlyForCampaignIds?: number[]): Promise<void>;
29
16
  declare function getDomains(onlyActive?: boolean): Promise<IKeitaroDomain[]>;
30
- declare function getProfitForTimeRange(from: number, to: number): Promise<number>;
31
- declare function fixBrokenClickCosts(startDate: string, endDate: string): Promise<void>;
32
- declare function getClicks(request: IKeitaroClicksRequest | KeitaroClicksInterval): Promise<any>;
17
+ declare function getAllOffers(): Promise<IKeitaroOffer[]>;
18
+ declare function generateAlias(): string;
19
+ /**
20
+ * Clone a campaign for an app based on integration type
21
+ * @param app - The app to create campaign for
22
+ * @param integrationType - OFFERWALL or DIRECT
23
+ * @returns Keitaro data for the cloned campaign
24
+ */
25
+ declare function cloneCampaignForApp(app: IApp, integrationType: IntegrationType): Promise<IAppKeitaroData>;
26
+ /**
27
+ * Convert a Keitaro campaign to IAppKeitaroData
28
+ */
29
+ declare function campaignToKeitaroData(campaign: IKeitaroCampaign): IAppKeitaroData;
33
30
  export declare const KeitaroService: {
34
- getStreamsByCampaignId: typeof getStreamsByCampaignId;
35
- updateCampaign: typeof updateCampaign;
36
31
  getAllCampaigns: typeof getAllCampaigns;
37
- getAllOffers: typeof getAllOffers;
38
- cloneStreams: typeof cloneStreams;
39
- addOffersToKeitaro: typeof addOffersToKeitaro;
40
- getOfferByKeitaroId: typeof getOfferByKeitaroId;
41
- getDomains: typeof getDomains;
42
- createCampaign: typeof createCampaign;
43
32
  getCampaignById: typeof getCampaignById;
44
- upsertStreamToCampaign: typeof upsertStreamToCampaign;
45
- cloneOWCampaign: typeof cloneOWCampaign;
46
- updateOffer: typeof updateOffer;
47
- changeCampaignsGroup: typeof changeCampaignsGroup;
48
- getProfitForTimeRange: typeof getProfitForTimeRange;
49
- getClicks: typeof getClicks;
50
- cloneDCampaign: typeof cloneDCampaign;
51
- findKeitaroOffers: typeof findKeitaroOffers;
52
- fixBrokenClickCosts: typeof fixBrokenClickCosts;
53
- cloneDirectCampaign: typeof cloneDirectCampaign;
33
+ createCampaign: typeof createCampaign;
34
+ updateCampaign: typeof updateCampaign;
35
+ cloneCampaignForApp: typeof cloneCampaignForApp;
36
+ getStreamsByCampaignId: typeof getStreamsByCampaignId;
37
+ getDomains: typeof getDomains;
38
+ getAllOffers: typeof getAllOffers;
39
+ generateAlias: typeof generateAlias;
40
+ campaignToKeitaroData: typeof campaignToKeitaroData;
54
41
  };
55
- export {};
42
+ export default KeitaroService;