@bprotsyk/aso-core 1.2.46 → 1.2.47
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/flash/flash-app.d.ts +25 -57
- package/lib/flash/flash-app.js +78 -123
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -3
- package/package.json +1 -1
- package/src/flash/flash-app.ts +100 -164
- package/src/index.ts +1 -1
package/lib/flash/flash-app.d.ts
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import { FlashAppType } from "./flash-app-type";
|
|
2
2
|
import mongoose, { Model } from "mongoose";
|
|
3
3
|
export interface IFlashApp {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
trackingUrl?: string;
|
|
7
|
-
email?: string;
|
|
8
|
-
bundle: string;
|
|
9
|
-
pushesEnabled?: boolean;
|
|
10
|
-
pastebinUrl: string;
|
|
11
|
-
policyUrl: string | null;
|
|
12
|
-
onesignalAppId: string;
|
|
13
|
-
onesignalRestApiKey: string;
|
|
14
|
-
generationOptions: IAppGenerationOptions;
|
|
15
|
-
}
|
|
16
|
-
export interface IFlashAppUpdated {
|
|
17
4
|
id: number;
|
|
18
5
|
name: string;
|
|
19
6
|
trackingUrl?: string;
|
|
@@ -29,14 +16,8 @@ export interface IFlashAppUpdated {
|
|
|
29
16
|
developerName: string;
|
|
30
17
|
developerEmail: string;
|
|
31
18
|
developerOrganization: string;
|
|
32
|
-
generationOptions:
|
|
33
|
-
|
|
34
|
-
export interface IAppGenerationOptionsUpdated {
|
|
35
|
-
splashActivityClassName: string;
|
|
36
|
-
mainActivityClassName: string;
|
|
37
|
-
linkName: string;
|
|
38
|
-
savedName: string;
|
|
39
|
-
paranoidSeed: number;
|
|
19
|
+
generationOptions: IAppGenerationOptions;
|
|
20
|
+
keitaroData: IAppKeitaroData;
|
|
40
21
|
}
|
|
41
22
|
export interface IAppGenerationOptions {
|
|
42
23
|
splashActivityClassName: string;
|
|
@@ -44,50 +25,27 @@ export interface IAppGenerationOptions {
|
|
|
44
25
|
linkName: string;
|
|
45
26
|
savedName: string;
|
|
46
27
|
paranoidSeed: number;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
28
|
+
}
|
|
29
|
+
export interface IAppKeitaroData {
|
|
30
|
+
redirectCampaignId: string;
|
|
31
|
+
redirectCampaignName: string;
|
|
32
|
+
trackingCampaignId: string;
|
|
33
|
+
trackingCampaignName: string;
|
|
34
|
+
clickIdParameterName: string;
|
|
35
|
+
offerIdParameterName: string;
|
|
36
|
+
domainId: string;
|
|
37
|
+
domainName: string;
|
|
54
38
|
}
|
|
55
39
|
export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
56
|
-
email: string;
|
|
57
|
-
id: number;
|
|
58
|
-
bundle: string;
|
|
59
|
-
trackingUrl: string;
|
|
60
|
-
pastebinUrl: string;
|
|
61
|
-
onesignalAppId: string;
|
|
62
|
-
onesignalRestApiKey: string;
|
|
63
|
-
name?: string | undefined;
|
|
64
|
-
pushesEnabled?: boolean | undefined;
|
|
65
|
-
policyUrl?: string | undefined;
|
|
66
|
-
generationOptions?: {
|
|
67
|
-
splashActivityClassName: string;
|
|
68
|
-
mainActivityClassName: string;
|
|
69
|
-
linkName: string;
|
|
70
|
-
savedName: string;
|
|
71
|
-
paranoidSeed: number;
|
|
72
|
-
keyFileName: string;
|
|
73
|
-
keyDeveloperName: string;
|
|
74
|
-
keyDeveloperOrganization: string;
|
|
75
|
-
keyCountryCode: string;
|
|
76
|
-
keyCity: string;
|
|
77
|
-
keyAlias: string;
|
|
78
|
-
keyPassword: string;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}>;
|
|
81
|
-
export declare const FlashAppSchemaUpdated: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
82
40
|
type: string;
|
|
83
41
|
id: number;
|
|
84
42
|
bundle: string;
|
|
85
43
|
trackingUrl: string;
|
|
86
|
-
onesignalAppId: string;
|
|
87
|
-
onesignalRestApiKey: string;
|
|
88
44
|
plugUrl: string;
|
|
89
45
|
reservePlugUrl: string;
|
|
90
46
|
geos: string;
|
|
47
|
+
onesignalAppId: string;
|
|
48
|
+
onesignalRestApiKey: string;
|
|
91
49
|
developerName: string;
|
|
92
50
|
developerEmail: string;
|
|
93
51
|
developerOrganization: string;
|
|
@@ -101,5 +59,15 @@ export declare const FlashAppSchemaUpdated: mongoose.Schema<any, mongoose.Model<
|
|
|
101
59
|
savedName: string;
|
|
102
60
|
paranoidSeed: number;
|
|
103
61
|
} | undefined;
|
|
62
|
+
keitaroData?: {
|
|
63
|
+
redirectCampaignId: string;
|
|
64
|
+
redirectCampaignName: string;
|
|
65
|
+
trackingCampaignId: string;
|
|
66
|
+
trackingCampaignName: string;
|
|
67
|
+
domainId: string;
|
|
68
|
+
domainName: string;
|
|
69
|
+
clickIdParameterName?: string | undefined;
|
|
70
|
+
offerIdParameterName?: string | undefined;
|
|
71
|
+
} | undefined;
|
|
104
72
|
}>;
|
|
105
|
-
export declare function updateSchemaAndMoveValue(model: Model<
|
|
73
|
+
export declare function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise<void>;
|
package/lib/flash/flash-app.js
CHANGED
|
@@ -1,101 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateSchemaAndMoveValue = exports.
|
|
3
|
+
exports.updateSchemaAndMoveValue = exports.FlashAppSchema = void 0;
|
|
4
4
|
const flash_app_type_1 = require("./flash-app-type");
|
|
5
5
|
const mongoose_1 = require("mongoose");
|
|
6
6
|
exports.FlashAppSchema = new mongoose_1.Schema({
|
|
7
|
-
id: {
|
|
8
|
-
type: Number,
|
|
9
|
-
unique: true,
|
|
10
|
-
required: true
|
|
11
|
-
},
|
|
12
|
-
bundle: {
|
|
13
|
-
type: String,
|
|
14
|
-
unique: true,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
name: String,
|
|
18
|
-
trackingUrl: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: null
|
|
21
|
-
},
|
|
22
|
-
email: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: null
|
|
25
|
-
},
|
|
26
|
-
pushesEnabled: Boolean,
|
|
27
|
-
pastebinUrl: {
|
|
28
|
-
type: String,
|
|
29
|
-
unique: true,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
|
-
policyUrl: String,
|
|
33
|
-
onesignalAppId: {
|
|
34
|
-
type: String,
|
|
35
|
-
unique: true,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
onesignalRestApiKey: {
|
|
39
|
-
type: String,
|
|
40
|
-
unique: true,
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
generationOptions: {
|
|
44
|
-
splashActivityClassName: {
|
|
45
|
-
type: String,
|
|
46
|
-
required: true
|
|
47
|
-
},
|
|
48
|
-
mainActivityClassName: {
|
|
49
|
-
type: String,
|
|
50
|
-
required: true
|
|
51
|
-
},
|
|
52
|
-
linkName: {
|
|
53
|
-
type: String,
|
|
54
|
-
required: true
|
|
55
|
-
},
|
|
56
|
-
savedName: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: true
|
|
59
|
-
},
|
|
60
|
-
paranoidSeed: {
|
|
61
|
-
type: Number,
|
|
62
|
-
required: true,
|
|
63
|
-
unique: true
|
|
64
|
-
},
|
|
65
|
-
keyFileName: {
|
|
66
|
-
type: String,
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
keyDeveloperName: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: true,
|
|
72
|
-
unique: true
|
|
73
|
-
},
|
|
74
|
-
keyDeveloperOrganization: {
|
|
75
|
-
type: String,
|
|
76
|
-
required: true,
|
|
77
|
-
unique: true,
|
|
78
|
-
},
|
|
79
|
-
keyCountryCode: {
|
|
80
|
-
type: String,
|
|
81
|
-
required: true
|
|
82
|
-
},
|
|
83
|
-
keyCity: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: true
|
|
86
|
-
},
|
|
87
|
-
keyAlias: {
|
|
88
|
-
type: String,
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
keyPassword: {
|
|
92
|
-
type: String,
|
|
93
|
-
required: true,
|
|
94
|
-
unique: true
|
|
95
|
-
},
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
exports.FlashAppSchemaUpdated = new mongoose_1.Schema({
|
|
99
7
|
id: {
|
|
100
8
|
type: Number,
|
|
101
9
|
unique: true,
|
|
@@ -183,39 +91,86 @@ exports.FlashAppSchemaUpdated = new mongoose_1.Schema({
|
|
|
183
91
|
required: true,
|
|
184
92
|
unique: true
|
|
185
93
|
},
|
|
94
|
+
},
|
|
95
|
+
keitaroData: {
|
|
96
|
+
redirectCampaignId: {
|
|
97
|
+
type: String,
|
|
98
|
+
unique: true,
|
|
99
|
+
required: true,
|
|
100
|
+
default: "none"
|
|
101
|
+
},
|
|
102
|
+
redirectCampaignName: {
|
|
103
|
+
type: String,
|
|
104
|
+
unique: true,
|
|
105
|
+
required: true,
|
|
106
|
+
default: "none"
|
|
107
|
+
},
|
|
108
|
+
trackingCampaignId: {
|
|
109
|
+
type: String,
|
|
110
|
+
unique: true,
|
|
111
|
+
required: true,
|
|
112
|
+
default: "none"
|
|
113
|
+
},
|
|
114
|
+
trackingCampaignName: {
|
|
115
|
+
type: String,
|
|
116
|
+
unique: true,
|
|
117
|
+
required: true,
|
|
118
|
+
default: "none"
|
|
119
|
+
},
|
|
120
|
+
clickIdParameterName: String,
|
|
121
|
+
offerIdParameterName: String,
|
|
122
|
+
domainId: {
|
|
123
|
+
type: String,
|
|
124
|
+
required: true,
|
|
125
|
+
default: "none"
|
|
126
|
+
},
|
|
127
|
+
domainName: {
|
|
128
|
+
type: String,
|
|
129
|
+
required: true,
|
|
130
|
+
default: "none"
|
|
131
|
+
},
|
|
186
132
|
}
|
|
187
133
|
});
|
|
188
134
|
// TODO app type (casino / fin)
|
|
189
135
|
async function updateSchemaAndMoveValue(model) {
|
|
190
|
-
let pipelineStage = [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
]
|
|
197
|
-
let aggregation = model.aggregate(pipelineStage)
|
|
198
|
-
await aggregation.exec()
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
136
|
+
// let pipelineStage: PipelineStage[] = [
|
|
137
|
+
// {
|
|
138
|
+
// $addFields: {
|
|
139
|
+
// plugUrl: 0
|
|
140
|
+
// }
|
|
141
|
+
// }
|
|
142
|
+
// ]
|
|
143
|
+
// let aggregation = model.aggregate(pipelineStage)
|
|
144
|
+
// await aggregation.exec()
|
|
145
|
+
const updateOperation = {
|
|
146
|
+
$set: {
|
|
147
|
+
pushesEnabled: true,
|
|
148
|
+
keitaroData: {
|
|
149
|
+
redirectCampaignId: "none",
|
|
150
|
+
redirectCampaignName: "none",
|
|
151
|
+
trackingCampaignId: "none",
|
|
152
|
+
trackingCampaignName: "none",
|
|
153
|
+
clickIdParameterName: "none",
|
|
154
|
+
offerIdParameterName: "none",
|
|
155
|
+
domainId: "none",
|
|
156
|
+
domainName: "none",
|
|
157
|
+
},
|
|
158
|
+
plugUrl: "none",
|
|
159
|
+
developerName: "none"
|
|
160
|
+
},
|
|
161
|
+
// $addToSet
|
|
162
|
+
// $unset: [
|
|
163
|
+
// "pastebinUrl",
|
|
164
|
+
// "email",
|
|
165
|
+
// "generationOptions.keyFileName",
|
|
166
|
+
// "generationOptions.keyDeveloperName",
|
|
167
|
+
// "generationOptions.keyDeveloperOrganization",
|
|
168
|
+
// "generationOptions.keyCountryCode",
|
|
169
|
+
// "generationOptions.keyCity",
|
|
170
|
+
// "generationOptions.keyAlias",
|
|
171
|
+
// "generationOptions.keyPassword",
|
|
172
|
+
// ],
|
|
173
|
+
};
|
|
174
|
+
await model.updateMany({}, updateOperation);
|
|
220
175
|
}
|
|
221
176
|
exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
|
package/lib/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { IOfferWallSection } from "./aso/offerwall/offerwall-section";
|
|
|
16
16
|
export { IOfferWallOffer } from "./aso/offerwall/offerwall-offer";
|
|
17
17
|
export { IOfferWallResponse } from "./aso/offerwall/offerwall-response";
|
|
18
18
|
export { IOfferWallHomeDialogData } from "./aso/offerwall/offerwall-home-dialog-data";
|
|
19
|
-
export { IFlashApp
|
|
19
|
+
export { IFlashApp, FlashAppSchema, updateSchemaAndMoveValue } from "./flash/flash-app";
|
|
20
20
|
export { IFlashAppListItem } from "./flash/flash-app-list-item";
|
|
21
21
|
export { FlashAppType } from "./flash/flash-app-type";
|
|
22
22
|
export * as ASOConfigFetch from "./aso/usage-logs/aso-config-fetch-entry";
|
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.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.FlashAppType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.
|
|
26
|
+
exports.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.FlashAppType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.ASO_v5 = exports.ASO_v4 = exports.ASO_v3 = exports.ASO_v2 = exports.ASO_v1 = exports.ASO_v0 = void 0;
|
|
27
27
|
exports.ASO_v0 = __importStar(require("./aso/config/aso-config-v0"));
|
|
28
28
|
exports.ASO_v1 = __importStar(require("./aso/config/aso-config-v1"));
|
|
29
29
|
exports.ASO_v2 = __importStar(require("./aso/config/aso-config-v2"));
|
|
@@ -31,8 +31,7 @@ exports.ASO_v3 = __importStar(require("./aso/config/aso-config-v3"));
|
|
|
31
31
|
exports.ASO_v4 = __importStar(require("./aso/config/aso-config-v4"));
|
|
32
32
|
exports.ASO_v5 = __importStar(require("./aso/config/aso-config-v5"));
|
|
33
33
|
var flash_app_1 = require("./flash/flash-app");
|
|
34
|
-
Object.defineProperty(exports, "
|
|
35
|
-
Object.defineProperty(exports, "FlashAppSchema", { enumerable: true, get: function () { return flash_app_1.FlashAppSchemaUpdated; } });
|
|
34
|
+
Object.defineProperty(exports, "FlashAppSchema", { enumerable: true, get: function () { return flash_app_1.FlashAppSchema; } });
|
|
36
35
|
Object.defineProperty(exports, "updateSchemaAndMoveValue", { enumerable: true, get: function () { return flash_app_1.updateSchemaAndMoveValue; } });
|
|
37
36
|
var flash_app_type_1 = require("./flash/flash-app-type");
|
|
38
37
|
Object.defineProperty(exports, "FlashAppType", { enumerable: true, get: function () { return flash_app_type_1.FlashAppType; } });
|
package/package.json
CHANGED
package/src/flash/flash-app.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { FlashAppType } from "./flash-app-type";
|
|
2
2
|
import mongoose, { Model, model, PipelineStage, Schema, UpdateQuery, UpdateWithAggregationPipeline } from "mongoose";
|
|
3
3
|
|
|
4
|
-
// TODO add date of policy in case we need to recreate it
|
|
5
|
-
// and all data necessary. test
|
|
6
4
|
export interface IFlashApp {
|
|
7
|
-
id: number
|
|
8
|
-
name: string
|
|
9
|
-
trackingUrl?: string
|
|
10
|
-
email?: string
|
|
11
|
-
bundle: string
|
|
12
|
-
pushesEnabled?: boolean,
|
|
13
|
-
pastebinUrl: string,
|
|
14
|
-
policyUrl: string | null
|
|
15
|
-
|
|
16
|
-
onesignalAppId: string
|
|
17
|
-
onesignalRestApiKey: string
|
|
18
|
-
|
|
19
|
-
generationOptions: IAppGenerationOptions
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface IFlashAppUpdated {
|
|
23
5
|
id: number
|
|
24
6
|
name: string
|
|
25
7
|
trackingUrl?: string
|
|
@@ -38,15 +20,8 @@ export interface IFlashAppUpdated {
|
|
|
38
20
|
developerName: string
|
|
39
21
|
developerEmail: string
|
|
40
22
|
developerOrganization: string
|
|
41
|
-
generationOptions:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export interface IAppGenerationOptionsUpdated {
|
|
45
|
-
splashActivityClassName: string
|
|
46
|
-
mainActivityClassName: string
|
|
47
|
-
linkName: string
|
|
48
|
-
savedName: string
|
|
49
|
-
paranoidSeed: number
|
|
23
|
+
generationOptions: IAppGenerationOptions,
|
|
24
|
+
keitaroData: IAppKeitaroData
|
|
50
25
|
}
|
|
51
26
|
|
|
52
27
|
export interface IAppGenerationOptions {
|
|
@@ -54,114 +29,23 @@ export interface IAppGenerationOptions {
|
|
|
54
29
|
mainActivityClassName: string
|
|
55
30
|
linkName: string
|
|
56
31
|
savedName: string
|
|
57
|
-
|
|
58
32
|
paranoidSeed: number
|
|
59
|
-
keyFileName: string
|
|
60
|
-
keyDeveloperName: string
|
|
61
|
-
keyDeveloperOrganization: string
|
|
62
|
-
keyCountryCode: string
|
|
63
|
-
keyCity: string
|
|
64
|
-
keyAlias: string
|
|
65
|
-
keyPassword: string,
|
|
66
33
|
}
|
|
67
34
|
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
bundle: {
|
|
75
|
-
type: String,
|
|
76
|
-
unique: true,
|
|
77
|
-
required: true
|
|
78
|
-
},
|
|
79
|
-
name: String,
|
|
80
|
-
trackingUrl: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: null
|
|
83
|
-
},
|
|
84
|
-
email: {
|
|
85
|
-
type: String,
|
|
86
|
-
default: null
|
|
87
|
-
},
|
|
35
|
+
export interface IAppKeitaroData {
|
|
36
|
+
redirectCampaignId: string
|
|
37
|
+
redirectCampaignName: string
|
|
38
|
+
trackingCampaignId: string
|
|
39
|
+
trackingCampaignName: string
|
|
88
40
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
type: String,
|
|
92
|
-
unique: true,
|
|
93
|
-
required: true
|
|
94
|
-
},
|
|
95
|
-
policyUrl: String,
|
|
41
|
+
clickIdParameterName: string,
|
|
42
|
+
offerIdParameterName: string,
|
|
96
43
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
required: true
|
|
101
|
-
},
|
|
102
|
-
onesignalRestApiKey: {
|
|
103
|
-
type: String,
|
|
104
|
-
unique: true,
|
|
105
|
-
required: true
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
generationOptions: {
|
|
109
|
-
splashActivityClassName: {
|
|
110
|
-
type: String,
|
|
111
|
-
required: true
|
|
112
|
-
},
|
|
113
|
-
mainActivityClassName: {
|
|
114
|
-
type: String,
|
|
115
|
-
required: true
|
|
116
|
-
},
|
|
117
|
-
linkName: {
|
|
118
|
-
type: String,
|
|
119
|
-
required: true
|
|
120
|
-
},
|
|
121
|
-
savedName: {
|
|
122
|
-
type: String,
|
|
123
|
-
required: true
|
|
124
|
-
},
|
|
125
|
-
paranoidSeed: {
|
|
126
|
-
type: Number,
|
|
127
|
-
required: true,
|
|
128
|
-
unique: true
|
|
129
|
-
},
|
|
130
|
-
keyFileName: {
|
|
131
|
-
type: String,
|
|
132
|
-
required: true
|
|
133
|
-
},
|
|
134
|
-
keyDeveloperName: {
|
|
135
|
-
type: String,
|
|
136
|
-
required: true,
|
|
137
|
-
unique: true
|
|
138
|
-
},
|
|
139
|
-
keyDeveloperOrganization: {
|
|
140
|
-
type: String,
|
|
141
|
-
required: true,
|
|
142
|
-
unique: true,
|
|
143
|
-
},
|
|
144
|
-
keyCountryCode: {
|
|
145
|
-
type: String,
|
|
146
|
-
required: true
|
|
147
|
-
},
|
|
148
|
-
keyCity: {
|
|
149
|
-
type: String,
|
|
150
|
-
required: true
|
|
151
|
-
},
|
|
152
|
-
keyAlias: {
|
|
153
|
-
type: String,
|
|
154
|
-
required: true
|
|
155
|
-
},
|
|
156
|
-
keyPassword: {
|
|
157
|
-
type: String,
|
|
158
|
-
required: true,
|
|
159
|
-
unique: true
|
|
160
|
-
},
|
|
161
|
-
}
|
|
162
|
-
})
|
|
44
|
+
domainId: string
|
|
45
|
+
domainName: string
|
|
46
|
+
}
|
|
163
47
|
|
|
164
|
-
export const
|
|
48
|
+
export const FlashAppSchema = new Schema({
|
|
165
49
|
id: {
|
|
166
50
|
type: Number,
|
|
167
51
|
unique: true,
|
|
@@ -254,42 +138,94 @@ export const FlashAppSchemaUpdated = new Schema({
|
|
|
254
138
|
required: true,
|
|
255
139
|
unique: true
|
|
256
140
|
},
|
|
257
|
-
}
|
|
258
|
-
})
|
|
259
|
-
// TODO app type (casino / fin)
|
|
260
|
-
export async function updateSchemaAndMoveValue(model: Model<IFlashAppUpdated>): Promise<void> {
|
|
261
|
-
let pipelineStage: PipelineStage[] = [
|
|
262
|
-
{
|
|
263
|
-
$project: {
|
|
264
|
-
plugUrl: 0
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
]
|
|
268
|
-
|
|
269
|
-
let aggregation = model.aggregate(pipelineStage)
|
|
141
|
+
},
|
|
270
142
|
|
|
271
|
-
|
|
143
|
+
keitaroData: {
|
|
144
|
+
redirectCampaignId: {
|
|
145
|
+
type: String,
|
|
146
|
+
unique: true,
|
|
147
|
+
required: true,
|
|
148
|
+
default: "none"
|
|
149
|
+
},
|
|
150
|
+
redirectCampaignName: {
|
|
151
|
+
type: String,
|
|
152
|
+
unique: true,
|
|
153
|
+
required: true,
|
|
154
|
+
default: "none"
|
|
155
|
+
},
|
|
156
|
+
trackingCampaignId: {
|
|
157
|
+
type: String,
|
|
158
|
+
unique: true,
|
|
159
|
+
required: true,
|
|
160
|
+
default: "none"
|
|
161
|
+
},
|
|
162
|
+
trackingCampaignName: {
|
|
163
|
+
type: String,
|
|
164
|
+
unique: true,
|
|
165
|
+
required: true,
|
|
166
|
+
default: "none"
|
|
167
|
+
},
|
|
272
168
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
// plugUrl: "$pastebinUrl",
|
|
276
|
-
// reservePlugUrl: null,
|
|
277
|
-
// developerName: "$generationOptions.keyDeveloperName",
|
|
278
|
-
// developerEmail: "$email",
|
|
279
|
-
// developerOrganization: "$generationOptions.keyDeveloperOrganization",
|
|
280
|
-
// },
|
|
281
|
-
// $unset: [
|
|
282
|
-
// "pastebinUrl",
|
|
283
|
-
// "email",
|
|
284
|
-
// "generationOptions.keyFileName",
|
|
285
|
-
// "generationOptions.keyDeveloperName",
|
|
286
|
-
// "generationOptions.keyDeveloperOrganization",
|
|
287
|
-
// "generationOptions.keyCountryCode",
|
|
288
|
-
// "generationOptions.keyCity",
|
|
289
|
-
// "generationOptions.keyAlias",
|
|
290
|
-
// "generationOptions.keyPassword",
|
|
291
|
-
// ],
|
|
292
|
-
// };
|
|
169
|
+
clickIdParameterName: String,
|
|
170
|
+
offerIdParameterName: String,
|
|
293
171
|
|
|
294
|
-
|
|
172
|
+
domainId: {
|
|
173
|
+
type: String,
|
|
174
|
+
required: true,
|
|
175
|
+
default: "none"
|
|
176
|
+
},
|
|
177
|
+
domainName: {
|
|
178
|
+
type: String,
|
|
179
|
+
required: true,
|
|
180
|
+
default: "none"
|
|
181
|
+
},
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
// TODO app type (casino / fin)
|
|
185
|
+
export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise<void> {
|
|
186
|
+
// let pipelineStage: PipelineStage[] = [
|
|
187
|
+
// {
|
|
188
|
+
// $addFields: {
|
|
189
|
+
// plugUrl: 0
|
|
190
|
+
// }
|
|
191
|
+
// }
|
|
192
|
+
// ]
|
|
193
|
+
|
|
194
|
+
// let aggregation = model.aggregate(pipelineStage)
|
|
195
|
+
|
|
196
|
+
// await aggregation.exec()
|
|
197
|
+
|
|
198
|
+
const updateOperation: UpdateQuery<IFlashApp> = {
|
|
199
|
+
$set: {
|
|
200
|
+
pushesEnabled: true,
|
|
201
|
+
keitaroData: {
|
|
202
|
+
redirectCampaignId: "none",
|
|
203
|
+
redirectCampaignName: "none",
|
|
204
|
+
trackingCampaignId: "none",
|
|
205
|
+
trackingCampaignName: "none",
|
|
206
|
+
|
|
207
|
+
clickIdParameterName: "none",
|
|
208
|
+
offerIdParameterName: "none",
|
|
209
|
+
|
|
210
|
+
domainId: "none",
|
|
211
|
+
domainName: "none",
|
|
212
|
+
},
|
|
213
|
+
plugUrl: "none",
|
|
214
|
+
developerName: "none"
|
|
215
|
+
},
|
|
216
|
+
// $addToSet
|
|
217
|
+
// $unset: [
|
|
218
|
+
// "pastebinUrl",
|
|
219
|
+
// "email",
|
|
220
|
+
// "generationOptions.keyFileName",
|
|
221
|
+
// "generationOptions.keyDeveloperName",
|
|
222
|
+
// "generationOptions.keyDeveloperOrganization",
|
|
223
|
+
// "generationOptions.keyCountryCode",
|
|
224
|
+
// "generationOptions.keyCity",
|
|
225
|
+
// "generationOptions.keyAlias",
|
|
226
|
+
// "generationOptions.keyPassword",
|
|
227
|
+
// ],
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
await model.updateMany({}, updateOperation);
|
|
295
231
|
}
|
package/src/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { IOfferWallOffer } from "./aso/offerwall/offerwall-offer"
|
|
|
19
19
|
export { IOfferWallResponse } from "./aso/offerwall/offerwall-response"
|
|
20
20
|
export { IOfferWallHomeDialogData } from "./aso/offerwall/offerwall-home-dialog-data"
|
|
21
21
|
|
|
22
|
-
export { IFlashApp
|
|
22
|
+
export { IFlashApp, FlashAppSchema, updateSchemaAndMoveValue } from "./flash/flash-app"
|
|
23
23
|
export { IFlashAppListItem } from "./flash/flash-app-list-item"
|
|
24
24
|
export { FlashAppType } from "./flash/flash-app-type"
|
|
25
25
|
|