@reachu/database 1.0.92 → 1.0.93

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.
@@ -61,7 +61,7 @@ __decorate([
61
61
  __metadata("design:type", String)
62
62
  ], ImportedProduct.prototype, "woltId", void 0);
63
63
  __decorate([
64
- typeorm_1.ManyToOne(() => User_1.default, { nullable: true }),
64
+ typeorm_1.ManyToOne(() => ChannelUser_1.default, { nullable: true }),
65
65
  typeorm_1.JoinColumn(),
66
66
  __metadata("design:type", ChannelUser_1.default)
67
67
  ], ImportedProduct.prototype, "channelUser", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ImportedProduct.js","sourceRoot":"","sources":["../../src/entity/ImportedProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,qDAA2C;AAC3C,kDAA0B;AAC1B,gEAAwC;AAGxC,IAAqB,eAAe,GAApC,MAAqB,eAAe;CAoCnC,CAAA;AAlCC;IADC,gCAAsB,EAAE;;2CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;kDAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3D,oBAAU,EAAE;8BACP,cAAI;6CAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9D,oBAAU,EAAE;8BACJ,wBAAO;gDAAC;AAGjB;IADC,gBAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAClB;AAGnB;IADC,gBAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACtB;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAA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,CAAC;;8CACtB;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAChB;AAGtB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACtB;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,oBAAU,EAAE;8BACA,qBAAW;oDAAC;AAnCN,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CAoCnC;kBApCoB,eAAe"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class migrationPreDevelopUserChannelExportedProduct1688921300692 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.migrationPreDevelopUserChannelExportedProduct1688921300692 = void 0;
13
+ class migrationPreDevelopUserChannelExportedProduct1688921300692 {
14
+ constructor() {
15
+ this.name = 'migrationPreDevelopUserChannelExportedProduct1688921300692';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD \`channel_user_id\` int NULL`);
20
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
21
+ });
22
+ }
23
+ down(queryRunner) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
26
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`channel_user_id\``);
27
+ });
28
+ }
29
+ }
30
+ exports.migrationPreDevelopUserChannelExportedProduct1688921300692 = migrationPreDevelopUserChannelExportedProduct1688921300692;
31
+ //# sourceMappingURL=1688921300692-migration-pre-develop-user-channel-exported-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1688921300692-migration-pre-develop-user-channel-exported-product.js","sourceRoot":"","sources":["../../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0DAA0D;IAAvE;QACI,SAAI,GAAG,4DAA4D,CAAA;IAYvE,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,0LAA0L,CAAC,CAAC;QACxN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAChG,CAAC;KAAA;CAEJ;AAbD,gIAaC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class migrationPreDevelopUserChannelExportedProductV11688925248106 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.migrationPreDevelopUserChannelExportedProductV11688925248106 = void 0;
13
+ class migrationPreDevelopUserChannelExportedProductV11688925248106 {
14
+ constructor() {
15
+ this.name = 'migrationPreDevelopUserChannelExportedProductV11688925248106';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
20
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
21
+ });
22
+ }
23
+ down(queryRunner) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
26
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
27
+ });
28
+ }
29
+ }
30
+ exports.migrationPreDevelopUserChannelExportedProductV11688925248106 = migrationPreDevelopUserChannelExportedProductV11688925248106;
31
+ //# sourceMappingURL=1688925248106-migration-pre-develop-user-channel-exported-product_v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1688925248106-migration-pre-develop-user-channel-exported-product_v1.js","sourceRoot":"","sources":["../../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4DAA4D;IAAzE;QACI,SAAI,GAAG,8DAA8D,CAAA;IAYzE,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,kMAAkM,CAAC,CAAC;QAChO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,0LAA0L,CAAC,CAAC;QACxN,CAAC;KAAA;CAEJ;AAbD,oIAaC"}
@@ -2417,7 +2417,7 @@
2417
2417
  "affectsGlobalScope": false
2418
2418
  },
2419
2419
  "../src/entity/importedproduct.ts": {
2420
- "version": "249c42f3bc4e2a40d07359e505838972fef7387c208653281f304458a755a27e",
2420
+ "version": "8f9cb6bf66f203519c1a2ed09c997d132eb401ee0108b5042751ca556d89c966",
2421
2421
  "signature": "e9b48b9b5b47f7a3626ba1ccec58d7fc386dbf08561909014a88e31bd29ce697",
2422
2422
  "affectsGlobalScope": false
2423
2423
  },
@@ -3361,6 +3361,16 @@
3361
3361
  "signature": "8cd3f783cc6a2fd4f9fe1ae4da675196568d5f2a62545c4c91e12103646af565",
3362
3362
  "affectsGlobalScope": false
3363
3363
  },
3364
+ "../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": {
3365
+ "version": "9b9cee6a0cc11c9ec51b962475c76d5b78fcbf941b3ab55481d61a33b13fe7f0",
3366
+ "signature": "53e4d5e2b2e9623e8a61007157cde5956f1368bdf158306b57be2cfdbbdde00a",
3367
+ "affectsGlobalScope": false
3368
+ },
3369
+ "../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": {
3370
+ "version": "69e93407c49dffe8795c8c7fec9a867e82f050a46b40dd24c6b7739d37e5b33a",
3371
+ "signature": "83be3e186c96540835f05f393d7534975aba88bda33144528025fe6a2e7c282b",
3372
+ "affectsGlobalScope": false
3373
+ },
3364
3374
  "../src/migrations/execute/index.ts": {
3365
3375
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3366
3376
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -6251,6 +6261,12 @@
6251
6261
  "../src/migrations/1688489173526-add-webhook-template.ts": [
6252
6262
  "../node_modules/typeorm/index.d.ts"
6253
6263
  ],
6264
+ "../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": [
6265
+ "../node_modules/typeorm/index.d.ts"
6266
+ ],
6267
+ "../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": [
6268
+ "../node_modules/typeorm/index.d.ts"
6269
+ ],
6254
6270
  "../src/migrations/execute/index.ts": [
6255
6271
  "../src/config/connect.ts"
6256
6272
  ],
@@ -8996,6 +9012,12 @@
8996
9012
  "../src/migrations/1688489173526-add-webhook-template.ts": [
8997
9013
  "../node_modules/typeorm/index.d.ts"
8998
9014
  ],
9015
+ "../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": [
9016
+ "../node_modules/typeorm/index.d.ts"
9017
+ ],
9018
+ "../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": [
9019
+ "../node_modules/typeorm/index.d.ts"
9020
+ ],
8999
9021
  "../src/migrations/index.ts": [
9000
9022
  "../src/migrations/1628474597284-initialschema.ts",
9001
9023
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -9817,6 +9839,8 @@
9817
9839
  "../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts",
9818
9840
  "../src/migrations/1688049065964-add-title-endpoint.ts",
9819
9841
  "../src/migrations/1688489173526-add-webhook-template.ts",
9842
+ "../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts",
9843
+ "../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts",
9820
9844
  "../src/migrations/execute/index.ts",
9821
9845
  "../src/migrations/index.ts",
9822
9846
  "../src/repositories/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.92",
3
+ "version": "1.0.93",
4
4
  "description": "reachu-database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "author": "reachu",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@reachu/logger": "1.0.92",
25
- "@reachu/utils": "1.0.92",
24
+ "@reachu/logger": "1.0.93",
25
+ "@reachu/utils": "1.0.93",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -44,7 +44,7 @@ export default class ImportedProduct {
44
44
  @Column('varchar', { nullable: true })
45
45
  woltId?: string;
46
46
 
47
- @ManyToOne(() => User, { nullable: true })
47
+ @ManyToOne(() => ChannelUser, { nullable: true })
48
48
  @JoinColumn()
49
49
  channelUser: ChannelUser;
50
50
  }
@@ -0,0 +1,16 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class migrationPreDevelopUserChannelExportedProduct1688921300692 implements MigrationInterface {
4
+ name = 'migrationPreDevelopUserChannelExportedProduct1688921300692'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`imported_product\` ADD \`channel_user_id\` int NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
13
+ await queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`channel_user_id\``);
14
+ }
15
+
16
+ }
@@ -0,0 +1,16 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class migrationPreDevelopUserChannelExportedProductV11688925248106 implements MigrationInterface {
4
+ name = 'migrationPreDevelopUserChannelExportedProductV11688925248106'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
8
+ await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
13
+ await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
14
+ }
15
+
16
+ }