@bprotsyk/aso-core 2.1.223 → 2.1.225
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 +237 -362
- package/lib/app/app.js +93 -175
- package/lib/general/cloudflare-domain.d.ts +1 -0
- package/lib/general/domain.d.ts +82 -0
- package/lib/general/domain.js +5 -0
- package/lib/index.d.ts +5 -2
- package/lib/index.js +21 -17
- package/lib/keitaro/keitaro-campaign.d.ts +0 -1
- package/lib/keitaro/keitaro-offer.d.ts +3 -14
- package/lib/network/keitaro/http.js +1 -1
- package/lib/network/keitaro/keitaro-service.d.ts +37 -51
- package/lib/network/keitaro/keitaro-service.js +442 -192
- package/lib/offers/list.d.ts +18 -18
- package/lib/offers/offer.d.ts +4 -0
- package/lib/offers/offer.js +1 -0
- package/lib/panel/app/upsert-flash-app-request.d.ts +14 -14
- package/lib/server/server.d.ts +140 -0
- package/lib/server/server.js +36 -0
- package/lib/utils/keitaro-utils.d.ts +1 -1
- package/lib/utils/keitaro-utils.js +9 -722
- package/package.json +1 -1
- package/src/app/app.ts +316 -307
- package/src/general/cloudflare-domain.ts +1 -0
- package/src/general/domain.ts +8 -0
- package/src/index.ts +27 -30
- package/src/keitaro/keitaro-campaign.ts +0 -1
- package/src/keitaro/keitaro-offer.ts +3 -14
- package/src/network/keitaro/http.ts +1 -1
- package/src/network/keitaro/keitaro-service.ts +533 -232
- package/src/offers/offer.ts +2 -0
- package/src/panel/app/upsert-flash-app-request.ts +48 -0
- package/src/server/server.ts +57 -0
- package/src/utils/keitaro-utils.ts +24 -0
package/lib/app/app.js
CHANGED
|
@@ -1,84 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ETeam = exports.getPlatformName = exports.AppSchema = exports.IntegrationVersion = exports.PlugType = exports.EDirectType = exports.EPlatform = exports.AppStatus = exports.AppMode = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
//
|
|
6
|
-
var
|
|
7
|
-
(function (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
IntegrationVersion["POLICY"] = "policy";
|
|
19
|
-
IntegrationVersion["OFFER_STUB"] = "offer_stub";
|
|
20
|
-
IntegrationVersion["WEB"] = "web";
|
|
21
|
-
IntegrationVersion["BANNER"] = "banner";
|
|
22
|
-
IntegrationVersion["PWA"] = "pwa";
|
|
23
|
-
})(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
|
|
24
|
-
// @deprecated - Platform enum (no longer used)
|
|
5
|
+
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
6
|
+
var AppMode;
|
|
7
|
+
(function (AppMode) {
|
|
8
|
+
AppMode["OFFERWALL"] = "offerwall";
|
|
9
|
+
AppMode["WEBVIEW"] = "webview";
|
|
10
|
+
})(AppMode = exports.AppMode || (exports.AppMode = {}));
|
|
11
|
+
var AppStatus;
|
|
12
|
+
(function (AppStatus) {
|
|
13
|
+
AppStatus["ARCHIVED"] = "ARCHIVED";
|
|
14
|
+
AppStatus["IN_DEVELOPMENT"] = "IN_DEVELOPMENT";
|
|
15
|
+
AppStatus["READY"] = "READY";
|
|
16
|
+
AppStatus["DISABLED"] = "DISABLED";
|
|
17
|
+
})(AppStatus = exports.AppStatus || (exports.AppStatus = {}));
|
|
25
18
|
var EPlatform;
|
|
26
19
|
(function (EPlatform) {
|
|
27
20
|
EPlatform["GENERAL"] = "@";
|
|
28
|
-
EPlatform["
|
|
21
|
+
EPlatform["HUAWEI"] = "hw";
|
|
22
|
+
EPlatform["SAMSUNG"] = "sm";
|
|
23
|
+
EPlatform["ruSTORE"] = "rs";
|
|
24
|
+
EPlatform["XIAOMI"] = "xm";
|
|
25
|
+
EPlatform["APKPURE"] = "ap";
|
|
26
|
+
EPlatform["TELEGRAM"] = "tg";
|
|
27
|
+
EPlatform["AMAZON"] = "am";
|
|
28
|
+
EPlatform["TEST"] = "test";
|
|
29
29
|
})(EPlatform = exports.EPlatform || (exports.EPlatform = {}));
|
|
30
|
-
// @deprecated - Direct type enum
|
|
31
30
|
var EDirectType;
|
|
32
31
|
(function (EDirectType) {
|
|
33
|
-
EDirectType["
|
|
34
|
-
EDirectType["
|
|
35
|
-
EDirectType["KEITARO_OFFER"] = "keitaro_offer";
|
|
36
|
-
EDirectType["OFFER_DIRECT"] = "offer_direct";
|
|
32
|
+
EDirectType["KEITARO_OFFER"] = "keitaroOffer";
|
|
33
|
+
EDirectType["OFFER_DIRECT"] = "offerDirect";
|
|
37
34
|
})(EDirectType = exports.EDirectType || (exports.EDirectType = {}));
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})(
|
|
55
|
-
|
|
56
|
-
(function (AlternativeOnActivityResult) {
|
|
57
|
-
AlternativeOnActivityResult["DEFAULT"] = "default";
|
|
58
|
-
})(AlternativeOnActivityResult = exports.AlternativeOnActivityResult || (exports.AlternativeOnActivityResult = {}));
|
|
59
|
-
var AlternativeOnBackPressed;
|
|
60
|
-
(function (AlternativeOnBackPressed) {
|
|
61
|
-
AlternativeOnBackPressed["DEFAULT"] = "default";
|
|
62
|
-
})(AlternativeOnBackPressed = exports.AlternativeOnBackPressed || (exports.AlternativeOnBackPressed = {}));
|
|
63
|
-
var AlternativeSourceType;
|
|
64
|
-
(function (AlternativeSourceType) {
|
|
65
|
-
AlternativeSourceType["DEFAULT"] = "default";
|
|
66
|
-
})(AlternativeSourceType = exports.AlternativeSourceType || (exports.AlternativeSourceType = {}));
|
|
67
|
-
var AlternativeStorageType;
|
|
68
|
-
(function (AlternativeStorageType) {
|
|
69
|
-
AlternativeStorageType["DEFAULT"] = "default";
|
|
70
|
-
})(AlternativeStorageType = exports.AlternativeStorageType || (exports.AlternativeStorageType = {}));
|
|
71
|
-
// Campaign IDs for cloning
|
|
72
|
-
exports.OFFERWALL_TEMPLATE_CAMPAIGN_ID = 3497;
|
|
73
|
-
exports.DIRECT_TEMPLATE_CAMPAIGN_ID = 3499;
|
|
74
|
-
exports.DEFENCE_CAMPAIGN_ID = 3498;
|
|
75
|
-
exports.DEFENCE_CAMPAIGN_TOKEN = 'hnwtbnwvq5lrvmztxnc78gxgxtk24jq8';
|
|
76
|
-
var AppStatus;
|
|
77
|
-
(function (AppStatus) {
|
|
78
|
-
AppStatus["ARCHIVED"] = "ARCHIVED";
|
|
79
|
-
AppStatus["IN_DEVELOPMENT"] = "IN_DEVELOPMENT";
|
|
80
|
-
AppStatus["READY"] = "READY";
|
|
81
|
-
})(AppStatus = exports.AppStatus || (exports.AppStatus = {}));
|
|
35
|
+
var PlugType;
|
|
36
|
+
(function (PlugType) {
|
|
37
|
+
PlugType["PASTEBIN"] = "PASTEBIN";
|
|
38
|
+
PlugType["GIST"] = "GIST";
|
|
39
|
+
PlugType["OTHER"] = "OTHER";
|
|
40
|
+
})(PlugType = exports.PlugType || (exports.PlugType = {}));
|
|
41
|
+
var IntegrationVersion;
|
|
42
|
+
(function (IntegrationVersion) {
|
|
43
|
+
IntegrationVersion["NONE"] = "MVVM";
|
|
44
|
+
IntegrationVersion["POLICY"] = "POLICY";
|
|
45
|
+
IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
|
|
46
|
+
IntegrationVersion["WEB"] = "WEB";
|
|
47
|
+
IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
|
|
48
|
+
IntegrationVersion["BANNER"] = "BANNER";
|
|
49
|
+
IntegrationVersion["PWA"] = "PWA";
|
|
50
|
+
IntegrationVersion["OFFERWALL"] = "OFFERWALL";
|
|
51
|
+
})(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
|
|
52
|
+
// ─── Mongoose schema ──────────────────────────────────────────────────────────
|
|
82
53
|
exports.AppSchema = new mongoose_1.Schema({
|
|
83
54
|
id: {
|
|
84
55
|
type: Number,
|
|
@@ -92,13 +63,17 @@ exports.AppSchema = new mongoose_1.Schema({
|
|
|
92
63
|
},
|
|
93
64
|
status: {
|
|
94
65
|
type: String,
|
|
95
|
-
enum: AppStatus,
|
|
66
|
+
enum: Object.values(AppStatus),
|
|
96
67
|
default: AppStatus.IN_DEVELOPMENT
|
|
97
68
|
},
|
|
98
|
-
|
|
69
|
+
appMode: {
|
|
70
|
+
type: String,
|
|
71
|
+
enum: Object.values(AppMode),
|
|
72
|
+
default: AppMode.OFFERWALL
|
|
73
|
+
},
|
|
74
|
+
appType: {
|
|
99
75
|
type: String,
|
|
100
|
-
|
|
101
|
-
default: IntegrationType.OFFERWALL
|
|
76
|
+
required: false
|
|
102
77
|
},
|
|
103
78
|
bundle: {
|
|
104
79
|
type: String,
|
|
@@ -106,112 +81,55 @@ exports.AppSchema = new mongoose_1.Schema({
|
|
|
106
81
|
required: true
|
|
107
82
|
},
|
|
108
83
|
name: String,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
type: String,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
trackingCampaignId: Number,
|
|
119
|
-
trackingCampaignName: String,
|
|
120
|
-
trackingCampaignAlias: String,
|
|
121
|
-
trackingDomainId: Number,
|
|
122
|
-
trackingDomainName: String,
|
|
123
|
-
campingToken: String,
|
|
124
|
-
trackingParams: {
|
|
125
|
-
naming: String,
|
|
126
|
-
firebase_app_instance_id: String,
|
|
127
|
-
firebase_user_id: String,
|
|
128
|
-
firebase_device_language_code: String,
|
|
129
|
-
firebase_push_token: String,
|
|
130
|
-
bundle_id: String,
|
|
131
|
-
advertising_id: String,
|
|
132
|
-
appsflyer_device_id: String,
|
|
133
|
-
campaign: String
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
directCampaign: {
|
|
137
|
-
trackingCampaignId: Number,
|
|
138
|
-
trackingCampaignName: String,
|
|
139
|
-
trackingCampaignAlias: String,
|
|
140
|
-
trackingDomainId: Number,
|
|
141
|
-
trackingDomainName: String,
|
|
142
|
-
campingToken: String,
|
|
143
|
-
trackingParams: {
|
|
144
|
-
naming: String,
|
|
145
|
-
firebase_app_instance_id: String,
|
|
146
|
-
firebase_user_id: String,
|
|
147
|
-
firebase_device_language_code: String,
|
|
148
|
-
firebase_push_token: String,
|
|
149
|
-
bundle_id: String,
|
|
150
|
-
advertising_id: String,
|
|
151
|
-
appsflyer_device_id: String,
|
|
152
|
-
campaign: String
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
appsflyerParams: {
|
|
156
|
-
apiToken: String,
|
|
157
|
-
eventIds: Object,
|
|
158
|
-
appId: String,
|
|
159
|
-
devKey: String
|
|
84
|
+
geos: [String],
|
|
85
|
+
campaign: {
|
|
86
|
+
campaignId: { type: Number, default: 0 },
|
|
87
|
+
campaignName: { type: String, default: 'none' },
|
|
88
|
+
campaignAlias: { type: String, default: 'none' },
|
|
89
|
+
campaignToken: { type: String },
|
|
90
|
+
domainId: { type: Number, default: 0 },
|
|
91
|
+
domainName: { type: String, default: 'none' },
|
|
92
|
+
trackingParams: { type: Object }
|
|
160
93
|
},
|
|
94
|
+
appsflyerParams: { type: Object },
|
|
95
|
+
adjustParams: { type: Object },
|
|
96
|
+
offerwallParams: { type: Object },
|
|
161
97
|
domainParams: {
|
|
162
|
-
name: {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
clouflareZone: String,
|
|
167
|
-
ready: Boolean
|
|
98
|
+
name: { type: String, unique: true },
|
|
99
|
+
clouflareZone: { type: String },
|
|
100
|
+
ready: { type: Boolean, default: false }
|
|
168
101
|
},
|
|
169
102
|
policyPath: {
|
|
170
103
|
type: String,
|
|
171
|
-
default:
|
|
104
|
+
default: 'none'
|
|
172
105
|
},
|
|
173
106
|
postbacks: [{
|
|
174
|
-
campaign_id: {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
required: true
|
|
181
|
-
},
|
|
182
|
-
method: {
|
|
183
|
-
type: String,
|
|
184
|
-
enum: ["GET", "POST"],
|
|
185
|
-
required: true
|
|
186
|
-
},
|
|
187
|
-
statuses: [{
|
|
188
|
-
type: String,
|
|
189
|
-
required: true
|
|
190
|
-
}],
|
|
191
|
-
url: {
|
|
192
|
-
type: String,
|
|
193
|
-
required: true
|
|
194
|
-
},
|
|
195
|
-
notes: {
|
|
196
|
-
type: String,
|
|
197
|
-
required: false
|
|
198
|
-
}
|
|
107
|
+
campaign_id: { type: Number, required: true },
|
|
108
|
+
id: { type: Number, required: true },
|
|
109
|
+
method: { type: String, enum: ['GET', 'POST'], required: true },
|
|
110
|
+
statuses: [{ type: String, required: true }],
|
|
111
|
+
url: { type: String, required: true },
|
|
112
|
+
notes: { type: String, required: false }
|
|
199
113
|
}],
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
trackingCampaignId: Number,
|
|
203
|
-
trackingCampaignName: String,
|
|
204
|
-
trackingCampaignAlias: String,
|
|
205
|
-
trackingDomainId: Number,
|
|
206
|
-
trackingDomainName: String,
|
|
207
|
-
campingToken: String,
|
|
208
|
-
trackingParams: mongoose_1.Schema.Types.Mixed
|
|
209
|
-
},
|
|
210
|
-
platforms: mongoose_1.Schema.Types.Mixed,
|
|
211
|
-
bannerParams: mongoose_1.Schema.Types.Mixed,
|
|
212
|
-
offersStubParams: mongoose_1.Schema.Types.Mixed,
|
|
213
|
-
ech: mongoose_1.Schema.Types.Mixed,
|
|
214
|
-
offerwallParams: mongoose_1.Schema.Types.Mixed,
|
|
215
|
-
appmetricaApiKey: String,
|
|
216
|
-
appmetricaAppId: String
|
|
114
|
+
webviewConfig: { type: Object },
|
|
115
|
+
serverId: { type: String }
|
|
217
116
|
});
|
|
117
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
118
|
+
const getPlatformName = (platform) => {
|
|
119
|
+
switch (platform) {
|
|
120
|
+
case EPlatform.SAMSUNG: return "samsung";
|
|
121
|
+
case EPlatform.HUAWEI: return "huawei";
|
|
122
|
+
case EPlatform.ruSTORE: return "ruStore";
|
|
123
|
+
case EPlatform.XIAOMI: return "xiaomi";
|
|
124
|
+
case EPlatform.APKPURE: return "apkpure";
|
|
125
|
+
case EPlatform.TELEGRAM: return "telegram";
|
|
126
|
+
case EPlatform.AMAZON: return "amazon";
|
|
127
|
+
default: return false;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
exports.getPlatformName = getPlatformName;
|
|
131
|
+
/** @deprecated stub — ETeam was referenced in some legacy export */
|
|
132
|
+
var ETeam;
|
|
133
|
+
(function (ETeam) {
|
|
134
|
+
ETeam["MAIN"] = "main";
|
|
135
|
+
})(ETeam = exports.ETeam || (exports.ETeam = {}));
|
package/lib/general/domain.d.ts
CHANGED
|
@@ -43,9 +43,19 @@ export interface IDomain extends Document {
|
|
|
43
43
|
createdAt: number;
|
|
44
44
|
expiresAt: number;
|
|
45
45
|
ip: string;
|
|
46
|
+
aRecords: {
|
|
47
|
+
host: string;
|
|
48
|
+
value: string;
|
|
49
|
+
proxied: boolean;
|
|
50
|
+
}[];
|
|
46
51
|
subdomain: string | null;
|
|
47
52
|
txtRecords: string[];
|
|
48
53
|
mxRecord: string;
|
|
54
|
+
mxPriority: number;
|
|
55
|
+
aaaaRecords: {
|
|
56
|
+
host: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}[];
|
|
49
59
|
target: DomainTarget;
|
|
50
60
|
assignedTo: number[];
|
|
51
61
|
archived: boolean;
|
|
@@ -85,7 +95,31 @@ export declare let getDomainTargetByIp: (ip: string) => DomainTarget;
|
|
|
85
95
|
export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
86
96
|
nameServers: string[];
|
|
87
97
|
originalNameServers: string[];
|
|
98
|
+
aRecords: import("mongoose").Types.DocumentArray<{
|
|
99
|
+
proxied?: boolean | null | undefined;
|
|
100
|
+
host?: string | null | undefined;
|
|
101
|
+
value?: string | null | undefined;
|
|
102
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
103
|
+
proxied?: boolean | null | undefined;
|
|
104
|
+
host?: string | null | undefined;
|
|
105
|
+
value?: string | null | undefined;
|
|
106
|
+
}> & {
|
|
107
|
+
proxied?: boolean | null | undefined;
|
|
108
|
+
host?: string | null | undefined;
|
|
109
|
+
value?: string | null | undefined;
|
|
110
|
+
}>;
|
|
88
111
|
txtRecords: string[];
|
|
112
|
+
mxPriority: number;
|
|
113
|
+
aaaaRecords: import("mongoose").Types.DocumentArray<{
|
|
114
|
+
host?: string | null | undefined;
|
|
115
|
+
value?: string | null | undefined;
|
|
116
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
117
|
+
host?: string | null | undefined;
|
|
118
|
+
value?: string | null | undefined;
|
|
119
|
+
}> & {
|
|
120
|
+
host?: string | null | undefined;
|
|
121
|
+
value?: string | null | undefined;
|
|
122
|
+
}>;
|
|
89
123
|
assignedTo: number[];
|
|
90
124
|
expirationMessageSent: boolean;
|
|
91
125
|
id?: string | null | undefined;
|
|
@@ -113,7 +147,31 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
|
|
|
113
147
|
}, Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
114
148
|
nameServers: string[];
|
|
115
149
|
originalNameServers: string[];
|
|
150
|
+
aRecords: import("mongoose").Types.DocumentArray<{
|
|
151
|
+
proxied?: boolean | null | undefined;
|
|
152
|
+
host?: string | null | undefined;
|
|
153
|
+
value?: string | null | undefined;
|
|
154
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
155
|
+
proxied?: boolean | null | undefined;
|
|
156
|
+
host?: string | null | undefined;
|
|
157
|
+
value?: string | null | undefined;
|
|
158
|
+
}> & {
|
|
159
|
+
proxied?: boolean | null | undefined;
|
|
160
|
+
host?: string | null | undefined;
|
|
161
|
+
value?: string | null | undefined;
|
|
162
|
+
}>;
|
|
116
163
|
txtRecords: string[];
|
|
164
|
+
mxPriority: number;
|
|
165
|
+
aaaaRecords: import("mongoose").Types.DocumentArray<{
|
|
166
|
+
host?: string | null | undefined;
|
|
167
|
+
value?: string | null | undefined;
|
|
168
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
169
|
+
host?: string | null | undefined;
|
|
170
|
+
value?: string | null | undefined;
|
|
171
|
+
}> & {
|
|
172
|
+
host?: string | null | undefined;
|
|
173
|
+
value?: string | null | undefined;
|
|
174
|
+
}>;
|
|
117
175
|
assignedTo: number[];
|
|
118
176
|
expirationMessageSent: boolean;
|
|
119
177
|
id?: string | null | undefined;
|
|
@@ -141,7 +199,31 @@ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any, an
|
|
|
141
199
|
}>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<{
|
|
142
200
|
nameServers: string[];
|
|
143
201
|
originalNameServers: string[];
|
|
202
|
+
aRecords: import("mongoose").Types.DocumentArray<{
|
|
203
|
+
proxied?: boolean | null | undefined;
|
|
204
|
+
host?: string | null | undefined;
|
|
205
|
+
value?: string | null | undefined;
|
|
206
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
207
|
+
proxied?: boolean | null | undefined;
|
|
208
|
+
host?: string | null | undefined;
|
|
209
|
+
value?: string | null | undefined;
|
|
210
|
+
}> & {
|
|
211
|
+
proxied?: boolean | null | undefined;
|
|
212
|
+
host?: string | null | undefined;
|
|
213
|
+
value?: string | null | undefined;
|
|
214
|
+
}>;
|
|
144
215
|
txtRecords: string[];
|
|
216
|
+
mxPriority: number;
|
|
217
|
+
aaaaRecords: import("mongoose").Types.DocumentArray<{
|
|
218
|
+
host?: string | null | undefined;
|
|
219
|
+
value?: string | null | undefined;
|
|
220
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
221
|
+
host?: string | null | undefined;
|
|
222
|
+
value?: string | null | undefined;
|
|
223
|
+
}> & {
|
|
224
|
+
host?: string | null | undefined;
|
|
225
|
+
value?: string | null | undefined;
|
|
226
|
+
}>;
|
|
145
227
|
assignedTo: number[];
|
|
146
228
|
expirationMessageSent: boolean;
|
|
147
229
|
id?: string | null | undefined;
|
package/lib/general/domain.js
CHANGED
|
@@ -21,8 +21,10 @@ var DomainTarget;
|
|
|
21
21
|
let getDomainTargetByIp = (ip) => {
|
|
22
22
|
switch (ip) {
|
|
23
23
|
case "194.61.120.94":
|
|
24
|
+
case "185.123.53.216":
|
|
24
25
|
return DomainTarget.MAIN;
|
|
25
26
|
case "46.246.96.114":
|
|
27
|
+
case "135.125.241.59":
|
|
26
28
|
return DomainTarget.KEITARO;
|
|
27
29
|
case "46.246.98.201":
|
|
28
30
|
return DomainTarget.HOSTING;
|
|
@@ -49,9 +51,12 @@ exports.DomainSchema = new mongoose_1.Schema({
|
|
|
49
51
|
createdAt: Number,
|
|
50
52
|
expiresAt: Number,
|
|
51
53
|
ip: String,
|
|
54
|
+
aRecords: { type: [{ host: String, value: String, proxied: Boolean }], default: [] },
|
|
52
55
|
subdomain: String,
|
|
53
56
|
txtRecords: [String],
|
|
54
57
|
mxRecord: String,
|
|
58
|
+
mxPriority: { type: Number, default: 10 },
|
|
59
|
+
aaaaRecords: { type: [{ host: String, value: String }], default: [] },
|
|
55
60
|
target: String,
|
|
56
61
|
assignedTo: [Number],
|
|
57
62
|
archived: Boolean,
|
package/lib/index.d.ts
CHANGED
|
@@ -2,22 +2,25 @@ 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 {
|
|
5
|
+
export { IApp, AppSchema, AppMode, AppStatus, IAppCampaign, IAppsflyerParams, IAdjustParams, IAdjustEventIds, IOfferwallParams, IWebviewConfig, IWebviewPostParams, IDomainParams, IAppsflyerPostback, IAppKeitaroData, IPlatformParams, EPlatform, EDirectType, IntegrationVersion, PlugType, IRemovalInfo, IBannerParams, IOffersStubParams, IKeitaroDirectTrackingParams, getPlatformName, ETeam } 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";
|
|
8
9
|
export { IPanelUser, PanelUserAccessScope, PanelUserSchema } from "./panel/user";
|
|
9
10
|
export { IAuthToken } from "./panel/auth";
|
|
11
|
+
export { IUpsertAppRequest, IUpsertAppResponse } from "./panel/app/upsert-flash-app-request";
|
|
10
12
|
export { IGradient, IStroke, IShape, ShapeDiv } from "./general/shape";
|
|
11
13
|
export { IOfferWallHomeDialogData } from "./offers/offerwall/offerwall-home-dialog-data";
|
|
12
14
|
export { IOfferWallOffer } from "./offers/offerwall/offerwall-offer";
|
|
13
15
|
export { IOfferWallResponse } from "./offers/offerwall/offerwall-response";
|
|
14
16
|
export { IOfferWallSection } from "./offers/offerwall/offerwall-section";
|
|
17
|
+
export { KeitaroService, IKeitaroOffersFilter } from "./network/keitaro/keitaro-service";
|
|
15
18
|
export { IKeitaroCampaign, IKeitaroCampaignParameters, IKeitaroCampaignParameter } from "./keitaro/keitaro-campaign";
|
|
16
19
|
export { IKeitaroDomain } from "./keitaro/keitaro-domain";
|
|
17
20
|
export { IKeitaroOffer } from "./keitaro/keitaro-offer";
|
|
18
21
|
export { IKeitaroStream } from "./keitaro/keitaro-stream";
|
|
19
|
-
export { KeitaroService } from "./network/keitaro/keitaro-service";
|
|
20
22
|
export { ICloudflareDomainStatus, ICloudflareDomainType, ICloudflareDomain } from "./general/cloudflare-domain";
|
|
21
23
|
export { IDomain, IDomainSetupResult, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY, IDomainsBuyRequestResponse, getDomainTargetByIp } from "./general/domain";
|
|
22
24
|
export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema, INamecheapGetDomainsResult, INamecheapBuyResult } from "./general/namecheap-domain";
|
|
23
25
|
export { NginxTemplate } from "./templates/nginx-template";
|
|
26
|
+
export { IServer, IServerSlot, ServerSchema, ServerStatus, HelperAppStatus, ServerProvider } from "./server/server";
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NginxTemplate = exports.NamecheapBuyRequestSchema = exports.getDomainTargetByIp = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.KeitaroService = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.
|
|
3
|
+
exports.HelperAppStatus = exports.ServerStatus = exports.ServerSchema = exports.NginxTemplate = exports.NamecheapBuyRequestSchema = exports.getDomainTargetByIp = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = 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.ETeam = exports.getPlatformName = exports.PlugType = exports.IntegrationVersion = exports.EDirectType = exports.EPlatform = exports.AppStatus = exports.AppMode = exports.AppSchema = exports.SectionsListSchema = exports.DefaultSectionId = exports.OffersSectionSchema = exports.IOfferType = void 0;
|
|
4
4
|
var offer_1 = require("./offers/offer");
|
|
5
5
|
Object.defineProperty(exports, "IOfferType", { enumerable: true, get: function () { return offer_1.IOfferType; } });
|
|
6
6
|
var section_1 = require("./offers/section");
|
|
@@ -9,26 +9,26 @@ Object.defineProperty(exports, "DefaultSectionId", { enumerable: true, get: func
|
|
|
9
9
|
var list_1 = require("./offers/list");
|
|
10
10
|
Object.defineProperty(exports, "SectionsListSchema", { enumerable: true, get: function () { return list_1.SectionsListSchema; } });
|
|
11
11
|
var app_1 = require("./app/app");
|
|
12
|
-
Object.defineProperty(exports, "IntegrationType", { enumerable: true, get: function () { return app_1.IntegrationType; } });
|
|
13
|
-
Object.defineProperty(exports, "IntegrationVersion", { enumerable: true, get: function () { return app_1.IntegrationVersion; } });
|
|
14
|
-
Object.defineProperty(exports, "EPlatform", { enumerable: true, get: function () { return app_1.EPlatform; } });
|
|
15
|
-
Object.defineProperty(exports, "EDirectType", { enumerable: true, get: function () { return app_1.EDirectType; } });
|
|
16
|
-
Object.defineProperty(exports, "AlternativeLayoutType", { enumerable: true, get: function () { return app_1.AlternativeLayoutType; } });
|
|
17
|
-
Object.defineProperty(exports, "AlternativeLogicType", { enumerable: true, get: function () { return app_1.AlternativeLogicType; } });
|
|
18
|
-
Object.defineProperty(exports, "AlternativeNavigation", { enumerable: true, get: function () { return app_1.AlternativeNavigation; } });
|
|
19
|
-
Object.defineProperty(exports, "AlternativeNetworkTool", { enumerable: true, get: function () { return app_1.AlternativeNetworkTool; } });
|
|
20
|
-
Object.defineProperty(exports, "AlternativeOnActivityResult", { enumerable: true, get: function () { return app_1.AlternativeOnActivityResult; } });
|
|
21
|
-
Object.defineProperty(exports, "AlternativeOnBackPressed", { enumerable: true, get: function () { return app_1.AlternativeOnBackPressed; } });
|
|
22
|
-
Object.defineProperty(exports, "AlternativeSourceType", { enumerable: true, get: function () { return app_1.AlternativeSourceType; } });
|
|
23
|
-
Object.defineProperty(exports, "AlternativeStorageType", { enumerable: true, get: function () { return app_1.AlternativeStorageType; } });
|
|
24
12
|
Object.defineProperty(exports, "AppSchema", { enumerable: true, get: function () { return app_1.AppSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "AppMode", { enumerable: true, get: function () { return app_1.AppMode; } });
|
|
25
14
|
Object.defineProperty(exports, "AppStatus", { enumerable: true, get: function () { return app_1.AppStatus; } });
|
|
26
|
-
Object.defineProperty(exports, "
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "EPlatform", { enumerable: true, get: function () { return app_1.EPlatform; } });
|
|
16
|
+
Object.defineProperty(exports, "EDirectType", { enumerable: true, get: function () { return app_1.EDirectType; } });
|
|
17
|
+
Object.defineProperty(exports, "IntegrationVersion", { enumerable: true, get: function () { return app_1.IntegrationVersion; } });
|
|
18
|
+
Object.defineProperty(exports, "PlugType", { enumerable: true, get: function () { return app_1.PlugType; } });
|
|
19
|
+
Object.defineProperty(exports, "getPlatformName", { enumerable: true, get: function () { return app_1.getPlatformName; } });
|
|
20
|
+
Object.defineProperty(exports, "ETeam", { enumerable: true, get: function () { return app_1.ETeam; } });
|
|
30
21
|
var app_type_1 = require("./app/app-type");
|
|
31
22
|
Object.defineProperty(exports, "AppType", { enumerable: true, get: function () { return app_type_1.AppType; } });
|
|
23
|
+
var app_integration_1 = require("./app/app-integration");
|
|
24
|
+
Object.defineProperty(exports, "AlternativeLayoutType", { enumerable: true, get: function () { return app_integration_1.AlternativeLayoutType; } });
|
|
25
|
+
Object.defineProperty(exports, "AlternativeSourceType", { enumerable: true, get: function () { return app_integration_1.AlternativeSourceType; } });
|
|
26
|
+
Object.defineProperty(exports, "AlternativeLogicType", { enumerable: true, get: function () { return app_integration_1.AlternativeLogicType; } });
|
|
27
|
+
Object.defineProperty(exports, "AlternativeNetworkTool", { enumerable: true, get: function () { return app_integration_1.AlternativeNetworkTool; } });
|
|
28
|
+
Object.defineProperty(exports, "AlternativeStorageType", { enumerable: true, get: function () { return app_integration_1.AlternativeStorageType; } });
|
|
29
|
+
Object.defineProperty(exports, "AlternativeNavigation", { enumerable: true, get: function () { return app_integration_1.AlternativeNavigation; } });
|
|
30
|
+
Object.defineProperty(exports, "AlternativeOnBackPressed", { enumerable: true, get: function () { return app_integration_1.AlternativeOnBackPressed; } });
|
|
31
|
+
Object.defineProperty(exports, "AlternativeOnActivityResult", { enumerable: true, get: function () { return app_integration_1.AlternativeOnActivityResult; } });
|
|
32
32
|
var user_1 = require("./panel/user");
|
|
33
33
|
Object.defineProperty(exports, "PanelUserAccessScope", { enumerable: true, get: function () { return user_1.PanelUserAccessScope; } });
|
|
34
34
|
Object.defineProperty(exports, "PanelUserSchema", { enumerable: true, get: function () { return user_1.PanelUserSchema; } });
|
|
@@ -48,3 +48,7 @@ var namecheap_domain_1 = require("./general/namecheap-domain");
|
|
|
48
48
|
Object.defineProperty(exports, "NamecheapBuyRequestSchema", { enumerable: true, get: function () { return namecheap_domain_1.NamecheapBuyRequestSchema; } });
|
|
49
49
|
var nginx_template_1 = require("./templates/nginx-template");
|
|
50
50
|
Object.defineProperty(exports, "NginxTemplate", { enumerable: true, get: function () { return nginx_template_1.NginxTemplate; } });
|
|
51
|
+
var server_1 = require("./server/server");
|
|
52
|
+
Object.defineProperty(exports, "ServerSchema", { enumerable: true, get: function () { return server_1.ServerSchema; } });
|
|
53
|
+
Object.defineProperty(exports, "ServerStatus", { enumerable: true, get: function () { return server_1.ServerStatus; } });
|
|
54
|
+
Object.defineProperty(exports, "HelperAppStatus", { enumerable: true, get: function () { return server_1.HelperAppStatus; } });
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
export interface IKeitaroOffer {
|
|
2
2
|
id: number;
|
|
3
|
-
campaign_id
|
|
3
|
+
campaign_id: number;
|
|
4
4
|
name: string;
|
|
5
|
-
url
|
|
6
|
-
country
|
|
7
|
-
group_id?: number;
|
|
8
|
-
action_type?: string;
|
|
9
|
-
action_payload?: string;
|
|
10
|
-
affiliate_network_id?: number;
|
|
11
|
-
payout_value?: number;
|
|
12
|
-
payout_currency?: string;
|
|
13
|
-
payout_type?: string;
|
|
14
|
-
state?: string;
|
|
15
|
-
offer_type?: string;
|
|
16
|
-
payout_auto?: boolean;
|
|
17
|
-
payout_upsell?: boolean;
|
|
5
|
+
url: string;
|
|
6
|
+
country: string;
|
|
18
7
|
}
|
|
@@ -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": `
|
|
10
|
+
"Api-Key": `a5369b1016aa6bd6453751a393b157b4`,
|
|
11
11
|
},
|
|
12
12
|
});
|