@reachu/database 1.0.81 → 1.0.82

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.
@@ -6,5 +6,7 @@ export default class EndpointTemplateEcommerce extends AuditedModel {
6
6
  url: string;
7
7
  connection: boolean;
8
8
  response: string;
9
+ type: string;
10
+ body: string;
9
11
  userTemplateEcommerce: UserTemplateEcommerce;
10
12
  }
@@ -37,6 +37,14 @@ __decorate([
37
37
  typeorm_1.Column('varchar', { length: '21844', nullable: true }),
38
38
  __metadata("design:type", String)
39
39
  ], EndpointTemplateEcommerce.prototype, "response", void 0);
40
+ __decorate([
41
+ typeorm_1.Column('varchar', { nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], EndpointTemplateEcommerce.prototype, "type", void 0);
44
+ __decorate([
45
+ typeorm_1.Column('varchar', { length: '21844', nullable: true }),
46
+ __metadata("design:type", String)
47
+ ], EndpointTemplateEcommerce.prototype, "body", void 0);
40
48
  __decorate([
41
49
  typeorm_1.ManyToOne(() => UserTemplateEcommerce_1.default, (userTemplateEcommerce) => userTemplateEcommerce.endpointTemplateEcommerce, { eager: true, onDelete: 'CASCADE' }),
42
50
  typeorm_1.JoinColumn(),
@@ -1 +1 @@
1
- {"version":3,"file":"EndpointTemplateEcommerce.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/EndpointTemplateEcommerce.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,yBAAyB,GAA9C,MAAqB,yBAA0B,SAAQ,sBAAY;CAwBlE,CAAA;AAtBC;IADC,gCAAsB,EAAE;;qDACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;4DAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sDAC3B;AAGZ;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACxB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACtC;AASjB;IAPC,mBAAS,CACR,GAAG,EAAE,CAAC,+BAAqB,EAC3B,CAAC,qBAA4C,EAAE,EAAE,CAC/C,qBAAqB,CAAC,yBAAyB,EACjD,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CACrC;IACA,oBAAU,EAAE;8BACU,+BAAqB;wEAAC;AAvB1B,yBAAyB;IAD7C,gBAAM,EAAE;GACY,yBAAyB,CAwB7C;kBAxBoB,yBAAyB"}
1
+ {"version":3,"file":"EndpointTemplateEcommerce.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/EndpointTemplateEcommerce.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,yBAAyB,GAA9C,MAAqB,yBAA0B,SAAQ,sBAAY;CA8BlE,CAAA;AA5BC;IADC,gCAAsB,EAAE;;qDACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;4DAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sDAC3B;AAGZ;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6DACxB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACtC;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC1C;AASb;IAPC,mBAAS,CACR,GAAG,EAAE,CAAC,+BAAqB,EAC3B,CAAC,qBAA4C,EAAE,EAAE,CAC/C,qBAAqB,CAAC,yBAAyB,EACjD,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CACrC;IACA,oBAAU,EAAE;8BACU,+BAAqB;wEAAC;AA7B1B,yBAAyB;IAD7C,gBAAM,EAAE;GACY,yBAAyB,CA8B7C;kBA9BoB,yBAAyB"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class addColumnsTemplateEndpoint1687872767462 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,43 @@
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.addColumnsTemplateEndpoint1687872767462 = void 0;
13
+ class addColumnsTemplateEndpoint1687872767462 {
14
+ constructor() {
15
+ this.name = 'addColumnsTemplateEndpoint1687872767462';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
20
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
21
+ yield queryRunner.query(`ALTER TABLE \`cart\` ADD \`shipping_country\` varchar(255) NULL`);
22
+ yield queryRunner.query(`ALTER TABLE \`cart_item\` ADD \`shipping_country_id\` varchar(36) NULL`);
23
+ yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
24
+ yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
25
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
26
+ yield queryRunner.query(`ALTER TABLE \`cart_item\` ADD CONSTRAINT \`FK_3bc8725061c3cea8a94060bfc9d\` FOREIGN KEY (\`shipping_country_id\`) REFERENCES \`shipping_country\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
27
+ });
28
+ }
29
+ down(queryRunner) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ yield queryRunner.query(`ALTER TABLE \`cart_item\` DROP FOREIGN KEY \`FK_3bc8725061c3cea8a94060bfc9d\``);
32
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
33
+ yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
34
+ yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
35
+ yield queryRunner.query(`ALTER TABLE \`cart_item\` DROP COLUMN \`shipping_country_id\``);
36
+ yield queryRunner.query(`ALTER TABLE \`cart\` DROP COLUMN \`shipping_country\``);
37
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
38
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
39
+ });
40
+ }
41
+ }
42
+ exports.addColumnsTemplateEndpoint1687872767462 = addColumnsTemplateEndpoint1687872767462;
43
+ //# sourceMappingURL=1687872767462-add-columns-template-endpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1687872767462-add-columns-template-endpoint.js","sourceRoot":"","sources":["../../src/migrations/1687872767462-add-columns-template-endpoint.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,uCAAuC;IAApD;QACI,SAAI,GAAG,yCAAyC,CAAA;IAwBpD,CAAC;IAtBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YAC3F,MAAM,WAAW,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;YAClG,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,sMAAsM,CAAC,CAAC;YAChO,MAAM,WAAW,CAAC,KAAK,CAAC,iMAAiM,CAAC,CAAC;QAC/N,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;YACzG,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACjF,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACxF,CAAC;KAAA;CAEJ;AAzBD,0FAyBC"}
@@ -2647,8 +2647,8 @@
2647
2647
  "affectsGlobalScope": false
2648
2648
  },
2649
2649
  "../src/entity/modules/templates/endpointtemplateecommerce.ts": {
2650
- "version": "3f2087a47674670eec0ea9ce95b916ff464a30e6b4e96f00216e0e8cfbc3af45",
2651
- "signature": "78be799e286e35e9a4006d0974e5c73b85a5a7b73f7c7ae3302834f690dc5d92",
2650
+ "version": "2bf597f6b9e526b7c820a308954bc6d73d4096afe5d13734600557671eb80b27",
2651
+ "signature": "1e238ca80896de3b9d7f5eef5af5db26c89cbd90714d6db58685b1a3cb7e96c9",
2652
2652
  "affectsGlobalScope": false
2653
2653
  },
2654
2654
  "../src/entity/modules/templates/schemeproduct/reachuschemeconfigproduct.ts": {
@@ -3306,6 +3306,11 @@
3306
3306
  "signature": "bf72fbaf93cc0e771b724f545a881d8b51bdb493548c133351ede490ebbafeb5",
3307
3307
  "affectsGlobalScope": false
3308
3308
  },
3309
+ "../src/migrations/1687872767462-add-columns-template-endpoint.ts": {
3310
+ "version": "ae6876b6117158027f7bd4bb5e81c5d80ce2f549ecd7d958d36763bb4290c0e9",
3311
+ "signature": "6f95205c8ce4797dcda2e5ce8cb6baf56c27737ef4f8a982cf6ca0532a399318",
3312
+ "affectsGlobalScope": false
3313
+ },
3309
3314
  "../src/migrations/execute/index.ts": {
3310
3315
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3311
3316
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -6157,6 +6162,9 @@
6157
6162
  "../src/migrations/1687322723851-channel_apikey.ts": [
6158
6163
  "../node_modules/typeorm/index.d.ts"
6159
6164
  ],
6165
+ "../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
6166
+ "../node_modules/typeorm/index.d.ts"
6167
+ ],
6160
6168
  "../src/migrations/execute/index.ts": [
6161
6169
  "../src/config/connect.ts"
6162
6170
  ],
@@ -8863,6 +8871,9 @@
8863
8871
  "../src/migrations/1687322723851-channel_apikey.ts": [
8864
8872
  "../node_modules/typeorm/index.d.ts"
8865
8873
  ],
8874
+ "../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
8875
+ "../node_modules/typeorm/index.d.ts"
8876
+ ],
8866
8877
  "../src/migrations/index.ts": [
8867
8878
  "../src/migrations/1628474597284-initialschema.ts",
8868
8879
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -9672,6 +9683,7 @@
9672
9683
  "../src/migrations/1686837392110-cart_shipping_default.ts",
9673
9684
  "../src/migrations/1687235204409-channel_user.ts",
9674
9685
  "../src/migrations/1687322723851-channel_apikey.ts",
9686
+ "../src/migrations/1687872767462-add-columns-template-endpoint.ts",
9675
9687
  "../src/migrations/execute/index.ts",
9676
9688
  "../src/migrations/index.ts",
9677
9689
  "../src/repositories/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.81",
3
+ "version": "1.0.82",
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.81",
25
- "@reachu/utils": "1.0.81",
24
+ "@reachu/logger": "1.0.82",
25
+ "@reachu/utils": "1.0.82",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -26,6 +26,12 @@ export default class EndpointTemplateEcommerce extends AuditedModel {
26
26
  @Column('varchar', { length: '21844', nullable: true })
27
27
  response: string;
28
28
 
29
+ @Column('varchar', { nullable: true })
30
+ type: string;
31
+
32
+ @Column('varchar', { length: '21844', nullable: true })
33
+ body: string;
34
+
29
35
  @ManyToOne(
30
36
  () => UserTemplateEcommerce,
31
37
  (userTemplateEcommerce: UserTemplateEcommerce) =>
@@ -0,0 +1,28 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class addColumnsTemplateEndpoint1687872767462 implements MigrationInterface {
4
+ name = 'addColumnsTemplateEndpoint1687872767462'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
9
+ await queryRunner.query(`ALTER TABLE \`cart\` ADD \`shipping_country\` varchar(255) NULL`);
10
+ await queryRunner.query(`ALTER TABLE \`cart_item\` ADD \`shipping_country_id\` varchar(36) NULL`);
11
+ await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
12
+ await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
13
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
14
+ await queryRunner.query(`ALTER TABLE \`cart_item\` ADD CONSTRAINT \`FK_3bc8725061c3cea8a94060bfc9d\` FOREIGN KEY (\`shipping_country_id\`) REFERENCES \`shipping_country\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
15
+ }
16
+
17
+ public async down(queryRunner: QueryRunner): Promise<void> {
18
+ await queryRunner.query(`ALTER TABLE \`cart_item\` DROP FOREIGN KEY \`FK_3bc8725061c3cea8a94060bfc9d\``);
19
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
20
+ await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
21
+ await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
22
+ await queryRunner.query(`ALTER TABLE \`cart_item\` DROP COLUMN \`shipping_country_id\``);
23
+ await queryRunner.query(`ALTER TABLE \`cart\` DROP COLUMN \`shipping_country\``);
24
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
25
+ await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
26
+ }
27
+
28
+ }