@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/offers/list.d.ts
CHANGED
|
@@ -45,20 +45,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
45
45
|
content: import("mongoose").Types.DocumentArray<{
|
|
46
46
|
prototype?: {
|
|
47
47
|
toString: {} | null;
|
|
48
|
-
valueOf: {} | null;
|
|
49
48
|
toLocaleString: {} | null;
|
|
50
49
|
constructor: {
|
|
51
50
|
name?: unknown;
|
|
52
51
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
53
52
|
prototype?: unknown;
|
|
54
53
|
length?: unknown;
|
|
55
|
-
toString: {} | null;
|
|
56
54
|
caller?: any | null | undefined;
|
|
57
55
|
arguments?: unknown;
|
|
56
|
+
toString: {} | null;
|
|
58
57
|
apply?: {} | null | undefined;
|
|
59
58
|
call?: {} | null | undefined;
|
|
60
59
|
bind?: {} | null | undefined;
|
|
61
60
|
} | null;
|
|
61
|
+
valueOf: {} | null;
|
|
62
62
|
hasOwnProperty: {} | null;
|
|
63
63
|
isPrototypeOf: {} | null;
|
|
64
64
|
propertyIsEnumerable: {} | null;
|
|
@@ -88,20 +88,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
88
88
|
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
89
89
|
prototype?: {
|
|
90
90
|
toString: {} | null;
|
|
91
|
-
valueOf: {} | null;
|
|
92
91
|
toLocaleString: {} | null;
|
|
93
92
|
constructor: {
|
|
94
93
|
name?: unknown;
|
|
95
94
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
96
95
|
prototype?: unknown;
|
|
97
96
|
length?: unknown;
|
|
98
|
-
toString: {} | null;
|
|
99
97
|
caller?: any | null | undefined;
|
|
100
98
|
arguments?: unknown;
|
|
99
|
+
toString: {} | null;
|
|
101
100
|
apply?: {} | null | undefined;
|
|
102
101
|
call?: {} | null | undefined;
|
|
103
102
|
bind?: {} | null | undefined;
|
|
104
103
|
} | null;
|
|
104
|
+
valueOf: {} | null;
|
|
105
105
|
hasOwnProperty: {} | null;
|
|
106
106
|
isPrototypeOf: {} | null;
|
|
107
107
|
propertyIsEnumerable: {} | null;
|
|
@@ -131,20 +131,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
131
131
|
}> & {
|
|
132
132
|
prototype?: {
|
|
133
133
|
toString: {} | null;
|
|
134
|
-
valueOf: {} | null;
|
|
135
134
|
toLocaleString: {} | null;
|
|
136
135
|
constructor: {
|
|
137
136
|
name?: unknown;
|
|
138
137
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
139
138
|
prototype?: unknown;
|
|
140
139
|
length?: unknown;
|
|
141
|
-
toString: {} | null;
|
|
142
140
|
caller?: any | null | undefined;
|
|
143
141
|
arguments?: unknown;
|
|
142
|
+
toString: {} | null;
|
|
144
143
|
apply?: {} | null | undefined;
|
|
145
144
|
call?: {} | null | undefined;
|
|
146
145
|
bind?: {} | null | undefined;
|
|
147
146
|
} | null;
|
|
147
|
+
valueOf: {} | null;
|
|
148
148
|
hasOwnProperty: {} | null;
|
|
149
149
|
isPrototypeOf: {} | null;
|
|
150
150
|
propertyIsEnumerable: {} | null;
|
|
@@ -178,20 +178,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
178
178
|
content: import("mongoose").Types.DocumentArray<{
|
|
179
179
|
prototype?: {
|
|
180
180
|
toString: {} | null;
|
|
181
|
-
valueOf: {} | null;
|
|
182
181
|
toLocaleString: {} | null;
|
|
183
182
|
constructor: {
|
|
184
183
|
name?: unknown;
|
|
185
184
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
186
185
|
prototype?: unknown;
|
|
187
186
|
length?: unknown;
|
|
188
|
-
toString: {} | null;
|
|
189
187
|
caller?: any | null | undefined;
|
|
190
188
|
arguments?: unknown;
|
|
189
|
+
toString: {} | null;
|
|
191
190
|
apply?: {} | null | undefined;
|
|
192
191
|
call?: {} | null | undefined;
|
|
193
192
|
bind?: {} | null | undefined;
|
|
194
193
|
} | null;
|
|
194
|
+
valueOf: {} | null;
|
|
195
195
|
hasOwnProperty: {} | null;
|
|
196
196
|
isPrototypeOf: {} | null;
|
|
197
197
|
propertyIsEnumerable: {} | null;
|
|
@@ -221,20 +221,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
221
221
|
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
222
222
|
prototype?: {
|
|
223
223
|
toString: {} | null;
|
|
224
|
-
valueOf: {} | null;
|
|
225
224
|
toLocaleString: {} | null;
|
|
226
225
|
constructor: {
|
|
227
226
|
name?: unknown;
|
|
228
227
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
229
228
|
prototype?: unknown;
|
|
230
229
|
length?: unknown;
|
|
231
|
-
toString: {} | null;
|
|
232
230
|
caller?: any | null | undefined;
|
|
233
231
|
arguments?: unknown;
|
|
232
|
+
toString: {} | null;
|
|
234
233
|
apply?: {} | null | undefined;
|
|
235
234
|
call?: {} | null | undefined;
|
|
236
235
|
bind?: {} | null | undefined;
|
|
237
236
|
} | null;
|
|
237
|
+
valueOf: {} | null;
|
|
238
238
|
hasOwnProperty: {} | null;
|
|
239
239
|
isPrototypeOf: {} | null;
|
|
240
240
|
propertyIsEnumerable: {} | null;
|
|
@@ -264,20 +264,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
264
264
|
}> & {
|
|
265
265
|
prototype?: {
|
|
266
266
|
toString: {} | null;
|
|
267
|
-
valueOf: {} | null;
|
|
268
267
|
toLocaleString: {} | null;
|
|
269
268
|
constructor: {
|
|
270
269
|
name?: unknown;
|
|
271
270
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
272
271
|
prototype?: unknown;
|
|
273
272
|
length?: unknown;
|
|
274
|
-
toString: {} | null;
|
|
275
273
|
caller?: any | null | undefined;
|
|
276
274
|
arguments?: unknown;
|
|
275
|
+
toString: {} | null;
|
|
277
276
|
apply?: {} | null | undefined;
|
|
278
277
|
call?: {} | null | undefined;
|
|
279
278
|
bind?: {} | null | undefined;
|
|
280
279
|
} | null;
|
|
280
|
+
valueOf: {} | null;
|
|
281
281
|
hasOwnProperty: {} | null;
|
|
282
282
|
isPrototypeOf: {} | null;
|
|
283
283
|
propertyIsEnumerable: {} | null;
|
|
@@ -311,20 +311,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
311
311
|
content: import("mongoose").Types.DocumentArray<{
|
|
312
312
|
prototype?: {
|
|
313
313
|
toString: {} | null;
|
|
314
|
-
valueOf: {} | null;
|
|
315
314
|
toLocaleString: {} | null;
|
|
316
315
|
constructor: {
|
|
317
316
|
name?: unknown;
|
|
318
317
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
319
318
|
prototype?: unknown;
|
|
320
319
|
length?: unknown;
|
|
321
|
-
toString: {} | null;
|
|
322
320
|
caller?: any | null | undefined;
|
|
323
321
|
arguments?: unknown;
|
|
322
|
+
toString: {} | null;
|
|
324
323
|
apply?: {} | null | undefined;
|
|
325
324
|
call?: {} | null | undefined;
|
|
326
325
|
bind?: {} | null | undefined;
|
|
327
326
|
} | null;
|
|
327
|
+
valueOf: {} | null;
|
|
328
328
|
hasOwnProperty: {} | null;
|
|
329
329
|
isPrototypeOf: {} | null;
|
|
330
330
|
propertyIsEnumerable: {} | null;
|
|
@@ -354,20 +354,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
354
354
|
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
355
355
|
prototype?: {
|
|
356
356
|
toString: {} | null;
|
|
357
|
-
valueOf: {} | null;
|
|
358
357
|
toLocaleString: {} | null;
|
|
359
358
|
constructor: {
|
|
360
359
|
name?: unknown;
|
|
361
360
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
362
361
|
prototype?: unknown;
|
|
363
362
|
length?: unknown;
|
|
364
|
-
toString: {} | null;
|
|
365
363
|
caller?: any | null | undefined;
|
|
366
364
|
arguments?: unknown;
|
|
365
|
+
toString: {} | null;
|
|
367
366
|
apply?: {} | null | undefined;
|
|
368
367
|
call?: {} | null | undefined;
|
|
369
368
|
bind?: {} | null | undefined;
|
|
370
369
|
} | null;
|
|
370
|
+
valueOf: {} | null;
|
|
371
371
|
hasOwnProperty: {} | null;
|
|
372
372
|
isPrototypeOf: {} | null;
|
|
373
373
|
propertyIsEnumerable: {} | null;
|
|
@@ -397,20 +397,20 @@ export declare const SectionsListSchema: Schema<any, import("mongoose").Model<an
|
|
|
397
397
|
}> & {
|
|
398
398
|
prototype?: {
|
|
399
399
|
toString: {} | null;
|
|
400
|
-
valueOf: {} | null;
|
|
401
400
|
toLocaleString: {} | null;
|
|
402
401
|
constructor: {
|
|
403
402
|
name?: unknown;
|
|
404
403
|
[Symbol.hasInstance]?: {} | null | undefined;
|
|
405
404
|
prototype?: unknown;
|
|
406
405
|
length?: unknown;
|
|
407
|
-
toString: {} | null;
|
|
408
406
|
caller?: any | null | undefined;
|
|
409
407
|
arguments?: unknown;
|
|
408
|
+
toString: {} | null;
|
|
410
409
|
apply?: {} | null | undefined;
|
|
411
410
|
call?: {} | null | undefined;
|
|
412
411
|
bind?: {} | null | undefined;
|
|
413
412
|
} | null;
|
|
413
|
+
valueOf: {} | null;
|
|
414
414
|
hasOwnProperty: {} | null;
|
|
415
415
|
isPrototypeOf: {} | null;
|
|
416
416
|
propertyIsEnumerable: {} | null;
|
package/lib/offers/offer.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface IOffer extends Document {
|
|
|
38
38
|
link: string;
|
|
39
39
|
type: IOfferType;
|
|
40
40
|
keitaroId: string | null;
|
|
41
|
+
generatedKey?: string;
|
|
41
42
|
hidden?: boolean;
|
|
42
43
|
history: {
|
|
43
44
|
link: string[];
|
|
@@ -90,6 +91,7 @@ export declare const OfferSchema: Schema<any, Model<any, any, any, any, any, any
|
|
|
90
91
|
caption?: string | null | undefined;
|
|
91
92
|
link?: string | null | undefined;
|
|
92
93
|
keitaroId?: string | null | undefined;
|
|
94
|
+
generatedKey?: string | null | undefined;
|
|
93
95
|
graphic?: {
|
|
94
96
|
logo?: string | null | undefined;
|
|
95
97
|
bg?: string | null | undefined;
|
|
@@ -112,6 +114,7 @@ export declare const OfferSchema: Schema<any, Model<any, any, any, any, any, any
|
|
|
112
114
|
caption?: string | null | undefined;
|
|
113
115
|
link?: string | null | undefined;
|
|
114
116
|
keitaroId?: string | null | undefined;
|
|
117
|
+
generatedKey?: string | null | undefined;
|
|
115
118
|
graphic?: {
|
|
116
119
|
logo?: string | null | undefined;
|
|
117
120
|
bg?: string | null | undefined;
|
|
@@ -134,6 +137,7 @@ export declare const OfferSchema: Schema<any, Model<any, any, any, any, any, any
|
|
|
134
137
|
caption?: string | null | undefined;
|
|
135
138
|
link?: string | null | undefined;
|
|
136
139
|
keitaroId?: string | null | undefined;
|
|
140
|
+
generatedKey?: string | null | undefined;
|
|
137
141
|
graphic?: {
|
|
138
142
|
logo?: string | null | undefined;
|
|
139
143
|
bg?: string | null | undefined;
|
package/lib/offers/offer.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { AppStatus,
|
|
1
|
+
import { AppMode, AppStatus, IAppCampaign, IAdjustParams, IAppsflyerParams, IDomainParams, IOfferwallParams, IWebviewConfig, IAppsflyerPostback } from "../../app/app";
|
|
2
|
+
import { AppType } from "../../app/app-type";
|
|
2
3
|
export interface IUpsertAppRequest {
|
|
3
4
|
id: number;
|
|
4
5
|
name?: string;
|
|
5
6
|
bundle?: string;
|
|
6
|
-
sourceUrl?: string;
|
|
7
7
|
enabled?: boolean;
|
|
8
|
+
status?: AppStatus;
|
|
9
|
+
appMode?: AppMode;
|
|
10
|
+
appType?: AppType;
|
|
8
11
|
geos?: string[];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
keitaroData?: Partial<IAppKeitaroData>;
|
|
13
|
-
bannerParams?: IBannerParams;
|
|
14
|
-
offersStubParams?: IOffersStubParams;
|
|
12
|
+
campaign?: Partial<IAppCampaign>;
|
|
13
|
+
appsflyerParams?: IAppsflyerParams;
|
|
14
|
+
adjustParams?: IAdjustParams;
|
|
15
15
|
offerwallParams?: IOfferwallParams;
|
|
16
16
|
domainParams: IDomainParams;
|
|
17
|
-
platforms: {
|
|
18
|
-
[key: string]: IPlatformParams;
|
|
19
|
-
};
|
|
20
|
-
ech?: boolean;
|
|
21
|
-
file?: any;
|
|
22
|
-
status?: AppStatus;
|
|
23
17
|
policyPath?: string;
|
|
18
|
+
postbacks?: IAppsflyerPostback[];
|
|
19
|
+
webviewConfig?: IWebviewConfig;
|
|
20
|
+
serverId?: string;
|
|
21
|
+
file?: any;
|
|
22
|
+
createNewCampaign?: boolean;
|
|
23
|
+
selectedOfferwallCampaignId?: number | null;
|
|
24
24
|
}
|
|
25
25
|
export interface IUpsertAppResponse {
|
|
26
26
|
data: IUpsertAppRequest;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/session" />
|
|
19
|
+
/// <reference types="mongoose/types/types" />
|
|
20
|
+
/// <reference types="mongoose/types/utility" />
|
|
21
|
+
/// <reference types="mongoose/types/validation" />
|
|
22
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { Schema, Document } from 'mongoose';
|
|
27
|
+
export type ServerProvider = 'ovh';
|
|
28
|
+
export declare enum ServerStatus {
|
|
29
|
+
PROVISIONING = "provisioning",
|
|
30
|
+
ACTIVE = "active",
|
|
31
|
+
ERROR = "error",
|
|
32
|
+
TERMINATED = "terminated"
|
|
33
|
+
}
|
|
34
|
+
export declare enum HelperAppStatus {
|
|
35
|
+
NOT_DEPLOYED = "not_deployed",
|
|
36
|
+
DEPLOYING = "deploying",
|
|
37
|
+
ACTIVE = "active",
|
|
38
|
+
ERROR = "error"
|
|
39
|
+
}
|
|
40
|
+
export interface IServerSlot {
|
|
41
|
+
ip: string;
|
|
42
|
+
appId?: number;
|
|
43
|
+
domain?: string;
|
|
44
|
+
sslReady: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface IServer extends Document {
|
|
47
|
+
provider: ServerProvider;
|
|
48
|
+
ovhServiceId: string;
|
|
49
|
+
mainIp: string;
|
|
50
|
+
status: ServerStatus;
|
|
51
|
+
hostname: string;
|
|
52
|
+
region: string;
|
|
53
|
+
helperAppStatus: HelperAppStatus;
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
notes?: string;
|
|
56
|
+
slots: IServerSlot[];
|
|
57
|
+
}
|
|
58
|
+
export declare const ServerSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
59
|
+
status: ServerStatus;
|
|
60
|
+
createdAt: NativeDate;
|
|
61
|
+
provider: string;
|
|
62
|
+
ovhServiceId: string;
|
|
63
|
+
mainIp: string;
|
|
64
|
+
hostname: string;
|
|
65
|
+
region: string;
|
|
66
|
+
helperAppStatus: HelperAppStatus;
|
|
67
|
+
slots: import("mongoose").Types.DocumentArray<{
|
|
68
|
+
ip: string;
|
|
69
|
+
sslReady: boolean;
|
|
70
|
+
domain?: string | null | undefined;
|
|
71
|
+
appId?: number | null | undefined;
|
|
72
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
73
|
+
ip: string;
|
|
74
|
+
sslReady: boolean;
|
|
75
|
+
domain?: string | null | undefined;
|
|
76
|
+
appId?: number | null | undefined;
|
|
77
|
+
}> & {
|
|
78
|
+
ip: string;
|
|
79
|
+
sslReady: boolean;
|
|
80
|
+
domain?: string | null | undefined;
|
|
81
|
+
appId?: number | null | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
notes?: string | null | undefined;
|
|
84
|
+
}, Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
85
|
+
status: ServerStatus;
|
|
86
|
+
createdAt: NativeDate;
|
|
87
|
+
provider: string;
|
|
88
|
+
ovhServiceId: string;
|
|
89
|
+
mainIp: string;
|
|
90
|
+
hostname: string;
|
|
91
|
+
region: string;
|
|
92
|
+
helperAppStatus: HelperAppStatus;
|
|
93
|
+
slots: import("mongoose").Types.DocumentArray<{
|
|
94
|
+
ip: string;
|
|
95
|
+
sslReady: boolean;
|
|
96
|
+
domain?: string | null | undefined;
|
|
97
|
+
appId?: number | null | undefined;
|
|
98
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
99
|
+
ip: string;
|
|
100
|
+
sslReady: boolean;
|
|
101
|
+
domain?: string | null | undefined;
|
|
102
|
+
appId?: number | null | undefined;
|
|
103
|
+
}> & {
|
|
104
|
+
ip: string;
|
|
105
|
+
sslReady: boolean;
|
|
106
|
+
domain?: string | null | undefined;
|
|
107
|
+
appId?: number | null | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
notes?: string | null | undefined;
|
|
110
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<{
|
|
111
|
+
status: ServerStatus;
|
|
112
|
+
createdAt: NativeDate;
|
|
113
|
+
provider: string;
|
|
114
|
+
ovhServiceId: string;
|
|
115
|
+
mainIp: string;
|
|
116
|
+
hostname: string;
|
|
117
|
+
region: string;
|
|
118
|
+
helperAppStatus: HelperAppStatus;
|
|
119
|
+
slots: import("mongoose").Types.DocumentArray<{
|
|
120
|
+
ip: string;
|
|
121
|
+
sslReady: boolean;
|
|
122
|
+
domain?: string | null | undefined;
|
|
123
|
+
appId?: number | null | undefined;
|
|
124
|
+
}, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
|
|
125
|
+
ip: string;
|
|
126
|
+
sslReady: boolean;
|
|
127
|
+
domain?: string | null | undefined;
|
|
128
|
+
appId?: number | null | undefined;
|
|
129
|
+
}> & {
|
|
130
|
+
ip: string;
|
|
131
|
+
sslReady: boolean;
|
|
132
|
+
domain?: string | null | undefined;
|
|
133
|
+
appId?: number | null | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
notes?: string | null | undefined;
|
|
136
|
+
}> & {
|
|
137
|
+
_id: import("mongoose").Types.ObjectId;
|
|
138
|
+
} & {
|
|
139
|
+
__v: number;
|
|
140
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServerSchema = exports.HelperAppStatus = exports.ServerStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var ServerStatus;
|
|
6
|
+
(function (ServerStatus) {
|
|
7
|
+
ServerStatus["PROVISIONING"] = "provisioning";
|
|
8
|
+
ServerStatus["ACTIVE"] = "active";
|
|
9
|
+
ServerStatus["ERROR"] = "error";
|
|
10
|
+
ServerStatus["TERMINATED"] = "terminated";
|
|
11
|
+
})(ServerStatus = exports.ServerStatus || (exports.ServerStatus = {}));
|
|
12
|
+
var HelperAppStatus;
|
|
13
|
+
(function (HelperAppStatus) {
|
|
14
|
+
HelperAppStatus["NOT_DEPLOYED"] = "not_deployed";
|
|
15
|
+
HelperAppStatus["DEPLOYING"] = "deploying";
|
|
16
|
+
HelperAppStatus["ACTIVE"] = "active";
|
|
17
|
+
HelperAppStatus["ERROR"] = "error";
|
|
18
|
+
})(HelperAppStatus = exports.HelperAppStatus || (exports.HelperAppStatus = {}));
|
|
19
|
+
const ServerSlotSchema = new mongoose_1.Schema({
|
|
20
|
+
ip: { type: String, required: true },
|
|
21
|
+
appId: { type: Number },
|
|
22
|
+
domain: { type: String },
|
|
23
|
+
sslReady: { type: Boolean, default: false },
|
|
24
|
+
}, { _id: false });
|
|
25
|
+
exports.ServerSchema = new mongoose_1.Schema({
|
|
26
|
+
provider: { type: String, default: 'ovh' },
|
|
27
|
+
ovhServiceId: { type: String, default: '' },
|
|
28
|
+
mainIp: { type: String, default: '' },
|
|
29
|
+
status: { type: String, enum: Object.values(ServerStatus), default: ServerStatus.PROVISIONING },
|
|
30
|
+
hostname: { type: String, default: '' },
|
|
31
|
+
region: { type: String, default: '' },
|
|
32
|
+
helperAppStatus: { type: String, enum: Object.values(HelperAppStatus), default: HelperAppStatus.NOT_DEPLOYED },
|
|
33
|
+
createdAt: { type: Date, default: Date.now },
|
|
34
|
+
notes: { type: String },
|
|
35
|
+
slots: { type: [ServerSlotSchema], default: [] },
|
|
36
|
+
});
|
|
@@ -2,9 +2,9 @@ import { EPlatform, IApp } from "../app/app";
|
|
|
2
2
|
import { IKeitaroCampaign, IKeitaroCampaignParameters } from "../keitaro/keitaro-campaign";
|
|
3
3
|
export declare const TRAFFIC_SOURCE_ID_FLASH_AI = 22;
|
|
4
4
|
export declare const TRAFFIC_SOURCE_ID_DIRECT_AI = 23;
|
|
5
|
+
export declare let prepareOWCampaignParameters: (app: IApp) => IKeitaroCampaignParameters;
|
|
5
6
|
export declare let addGeosToAllRedirectCampaigns: (geosToAdd: string) => Promise<void>;
|
|
6
7
|
export declare let removeGeosFromAllRedirectCampaigns: (geoToRemove: string) => Promise<void>;
|
|
7
|
-
export declare let prepareOWCampaignParameters: (app: IApp) => IKeitaroCampaignParameters;
|
|
8
8
|
export declare function createDirectCampaign(app: IApp): Promise<IKeitaroCampaign>;
|
|
9
9
|
export declare function createOWCampaign(app: IApp, platform?: EPlatform): Promise<any>;
|
|
10
10
|
type PostbackStatus = 'lead' | 'sale' | 'rejected';
|