@bprotsyk/aso-core 1.2.72 → 1.2.74

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.
@@ -75,7 +75,7 @@ export declare const FlashAppSchema: mongoose.Schema<any, mongoose.Model<any, an
75
75
  reservePlugAccountId?: number | undefined;
76
76
  plugContent?: string | undefined;
77
77
  plugStatus?: string | undefined;
78
- reservePlugID?: string | undefined;
78
+ reservePlugId?: string | undefined;
79
79
  reservePlugType?: string | undefined;
80
80
  reservePlugContent?: string | undefined;
81
81
  reservePlugStatus?: string | undefined;
@@ -55,7 +55,7 @@ exports.FlashAppSchema = new mongoose_1.Schema({
55
55
  required: false
56
56
  },
57
57
  plugAccountId: Number,
58
- reservePlugID: {
58
+ reservePlugId: {
59
59
  type: String,
60
60
  // unique: true,
61
61
  required: false
@@ -198,47 +198,41 @@ async function updateSchemaAndMoveValue(model) {
198
198
  // employee_addr: "$$REMOVE"
199
199
  // },
200
200
  $set: {
201
- "generationOptions.keyDeveloperName": "$$REMOVE",
201
+ "plugAccountId": 1,
202
+ "reservePlugAccountId": 1,
203
+ "plugId": "none",
204
+ "plugContent": "none",
205
+ "keitaroData.domainId": "$$REMOVE",
206
+ "keitaroData.domainName": "$$REMOVE",
207
+ "plugUrl": "$$REMOVE",
208
+ "reservePlugUrl": "$$REMOVE",
202
209
  }
203
210
  }
204
211
  ];
205
212
  let aggregation = model.aggregate(pipelineStage);
206
- // await model.collection.dropIndex("generationOptions.keyDeveloperName_1")
213
+ await model.collection.dropIndex("keitaroData.domainId");
214
+ await model.collection.dropIndex("keitaroData.domainName");
215
+ await model.collection.dropIndex("plugUrl");
216
+ await model.collection.dropIndex("reservePlugUrl");
207
217
  // await model.schema.dropIndex("generationOptions.keyPassword_1")
208
- // await aggregation.exec()
209
- // const updateOperation: UpdateQuery<IFlashApp> = {
210
- // $set: {
211
- // pushesEnabled: true,
212
- // keitaroData: {
213
- // redirectCampaignId: "none",
214
- // redirectCampaignName: "none",
215
- // trackingCampaignId: "none",
216
- // trackingCampaignName: "none",
217
- // clickIdParameterName: "none",
218
- // offerIdParameterName: "none",
219
- // domainId: "none",
220
- // domainName: "none",
221
- // },
222
- // plugUrl: "none",
223
- // plugType: PlugType.PASTEBIN,
224
- // reservePlugUrl: "none",
225
- // reservePlugType: PlugType.GIST,
226
- // developerName: "none",
227
- // type: FlashAppType.GAMBLING
228
- // },
229
- // $addToSet
230
- // $unset: [
231
- // "pastebinUrl",
232
- // "email",
233
- // "generationOptions.keyFileName",
234
- // "generationOptions.keyDeveloperName",
235
- // "generationOptions.keyDeveloperOrganization",
236
- // "generationOptions.keyCountryCode",
237
- // "generationOptions.keyCity",
238
- // "generationOptions.keyAlias",
239
- // "generationOptions.keyPassword",
240
- // ],
241
- // };
242
- // await model.updateMany({}, updateOperation);
218
+ await aggregation.exec();
219
+ const updateOperation = {
220
+ $set: {
221
+ plugId: "none"
222
+ },
223
+ // $addToSet
224
+ $unset: [
225
+ "pastebinUrl",
226
+ "email",
227
+ "generationOptions.keyFileName",
228
+ "generationOptions.keyDeveloperName",
229
+ "generationOptions.keyDeveloperOrganization",
230
+ "generationOptions.keyCountryCode",
231
+ "generationOptions.keyCity",
232
+ "generationOptions.keyAlias",
233
+ "generationOptions.keyPassword",
234
+ ],
235
+ };
236
+ await model.updateMany({}, updateOperation);
243
237
  }
244
238
  exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
@@ -473,4 +473,4 @@ let gatherInfoForFlashApps = async () => {
473
473
  // changeSourceForFA()
474
474
  // addGeosToAllRedirectCampaigns("BE")
475
475
  // removeGeosFromAllRedirectCampaigns("BE`")
476
- gatherInfoForFlashApps();
476
+ // gatherInfoForFlashApps()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.72",
3
+ "version": "1.2.74",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -107,7 +107,7 @@ export const FlashAppSchema = new Schema({
107
107
  required: false
108
108
  },
109
109
  plugAccountId: Number,
110
- reservePlugID: {
110
+ reservePlugId: {
111
111
  type: String,
112
112
  // unique: true,
113
113
  required: false
@@ -255,53 +255,47 @@ export async function updateSchemaAndMoveValue(model: Model<IFlashApp>): Promise
255
255
  // employee_addr: "$$REMOVE"
256
256
  // },
257
257
  $set: {
258
- "generationOptions.keyDeveloperName": "$$REMOVE",
258
+ "plugAccountId": 1,
259
+ "reservePlugAccountId": 1,
260
+ "plugId": "none",
261
+ "plugContent": "none",
262
+ "keitaroData.domainId": "$$REMOVE",
263
+ "keitaroData.domainName": "$$REMOVE",
264
+ "plugUrl": "$$REMOVE",
265
+ "reservePlugUrl": "$$REMOVE",
259
266
  }
260
267
  }
261
268
  ]
262
269
 
263
270
  let aggregation = model.aggregate(pipelineStage)
264
- // await model.collection.dropIndex("generationOptions.keyDeveloperName_1")
265
- // await model.schema.dropIndex("generationOptions.keyPassword_1")
266
- // await aggregation.exec()
271
+ await model.collection.dropIndex("keitaroData.domainId")
272
+ await model.collection.dropIndex("keitaroData.domainName")
267
273
 
268
- // const updateOperation: UpdateQuery<IFlashApp> = {
269
- // $set: {
270
- // pushesEnabled: true,
271
- // keitaroData: {
272
- // redirectCampaignId: "none",
273
- // redirectCampaignName: "none",
274
- // trackingCampaignId: "none",
275
- // trackingCampaignName: "none",
274
+ await model.collection.dropIndex("plugUrl")
275
+ await model.collection.dropIndex("reservePlugUrl")
276
276
 
277
- // clickIdParameterName: "none",
278
- // offerIdParameterName: "none",
277
+ // await model.schema.dropIndex("generationOptions.keyPassword_1")
278
+ await aggregation.exec()
279
279
 
280
- // domainId: "none",
281
- // domainName: "none",
282
- // },
283
- // plugUrl: "none",
284
- // plugType: PlugType.PASTEBIN,
285
- // reservePlugUrl: "none",
286
- // reservePlugType: PlugType.GIST,
287
- // developerName: "none",
288
- // type: FlashAppType.GAMBLING
289
- // },
290
- // $addToSet
291
- // $unset: [
292
- // "pastebinUrl",
293
- // "email",
294
- // "generationOptions.keyFileName",
295
- // "generationOptions.keyDeveloperName",
296
- // "generationOptions.keyDeveloperOrganization",
297
- // "generationOptions.keyCountryCode",
298
- // "generationOptions.keyCity",
299
- // "generationOptions.keyAlias",
300
- // "generationOptions.keyPassword",
301
- // ],
302
- // };
280
+ const updateOperation: UpdateQuery<IFlashApp> = {
281
+ $set: {
282
+ plugId: "none"
283
+ },
284
+ // $addToSet
285
+ $unset: [
286
+ "pastebinUrl",
287
+ "email",
288
+ "generationOptions.keyFileName",
289
+ "generationOptions.keyDeveloperName",
290
+ "generationOptions.keyDeveloperOrganization",
291
+ "generationOptions.keyCountryCode",
292
+ "generationOptions.keyCity",
293
+ "generationOptions.keyAlias",
294
+ "generationOptions.keyPassword",
295
+ ],
296
+ };
303
297
 
304
- // await model.updateMany({}, updateOperation);
298
+ await model.updateMany({}, updateOperation);
305
299
 
306
300
 
307
301
  }
@@ -492,4 +492,4 @@ let gatherInfoForFlashApps = async () => {
492
492
  // addGeosToAllRedirectCampaigns("BE")
493
493
  // removeGeosFromAllRedirectCampaigns("BE`")
494
494
 
495
- gatherInfoForFlashApps()
495
+ // gatherInfoForFlashApps()