@reachu/database 1.0.80 → 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.
- package/dist/entity/UserChannelApiKey.d.ts +2 -0
- package/dist/entity/UserChannelApiKey.js +6 -0
- package/dist/entity/UserChannelApiKey.js.map +1 -1
- package/dist/entity/modules/templates/EndpointTemplateEcommerce.d.ts +2 -0
- package/dist/entity/modules/templates/EndpointTemplateEcommerce.js +8 -0
- package/dist/entity/modules/templates/EndpointTemplateEcommerce.js.map +1 -1
- package/dist/migrations/1687322723851-channel_apikey.d.ts +6 -0
- package/dist/migrations/1687322723851-channel_apikey.js +31 -0
- package/dist/migrations/1687322723851-channel_apikey.js.map +1 -0
- package/dist/migrations/1687872767462-add-columns-template-endpoint.d.ts +6 -0
- package/dist/migrations/1687872767462-add-columns-template-endpoint.js +43 -0
- package/dist/migrations/1687872767462-add-columns-template-endpoint.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +30 -4
- package/package.json +3 -3
- package/src/entity/UserChannelApiKey.ts +6 -0
- package/src/entity/modules/templates/EndpointTemplateEcommerce.ts +6 -0
- package/src/migrations/1687322723851-channel_apikey.ts +16 -0
- package/src/migrations/1687872767462-add-columns-template-endpoint.ts +28 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import AuditedModel from './AuditedModel';
|
|
2
2
|
import Channel from './Channel';
|
|
3
|
+
import ChannelUser from './ChannelUser';
|
|
3
4
|
import User from './User';
|
|
4
5
|
export default class UserChannelApiKey extends AuditedModel {
|
|
5
6
|
id: number;
|
|
6
7
|
deletedAt: Date;
|
|
7
8
|
user: User;
|
|
8
9
|
channel: Channel;
|
|
10
|
+
ChannelUser: ChannelUser;
|
|
9
11
|
apiKey: string;
|
|
10
12
|
}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
17
|
const Channel_1 = __importDefault(require("./Channel"));
|
|
18
|
+
const ChannelUser_1 = __importDefault(require("./ChannelUser"));
|
|
18
19
|
const User_1 = __importDefault(require("./User"));
|
|
19
20
|
let UserChannelApiKey = class UserChannelApiKey extends AuditedModel_1.default {
|
|
20
21
|
};
|
|
@@ -36,6 +37,11 @@ __decorate([
|
|
|
36
37
|
typeorm_1.JoinColumn(),
|
|
37
38
|
__metadata("design:type", Channel_1.default)
|
|
38
39
|
], UserChannelApiKey.prototype, "channel", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
typeorm_1.ManyToOne(() => ChannelUser_1.default, (channelUser) => channelUser.id, { nullable: true }),
|
|
42
|
+
typeorm_1.JoinColumn(),
|
|
43
|
+
__metadata("design:type", ChannelUser_1.default)
|
|
44
|
+
], UserChannelApiKey.prototype, "ChannelUser", void 0);
|
|
39
45
|
__decorate([
|
|
40
46
|
typeorm_1.Column('varchar'),
|
|
41
47
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserChannelApiKey.js","sourceRoot":"","sources":["../../src/entity/UserChannelApiKey.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,wDAAgC;AAChC,kDAA0B;AAG1B,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"UserChannelApiKey.js","sourceRoot":"","sources":["../../src/entity/UserChannelApiKey.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,wDAAgC;AAChC,gEAAwC;AAExC,kDAA0B;AAG1B,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;CAqB1D,CAAA;AAnBC;IADC,gCAAsB,EAAE;;6CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;oDAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjE,oBAAU,EAAE;8BACP,cAAI;+CAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,iBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACzF,oBAAU,EAAE;8BACJ,iBAAO;kDAAC;AAIjB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjF,oBAAU,EAAE;8BACA,qBAAW;sDAAC;AAGzB;IADC,gBAAM,CAAC,SAAS,CAAC;;iDACH;AApBI,iBAAiB;IADrC,gBAAM,EAAE;GACY,iBAAiB,CAqBrC;kBArBoB,iBAAiB"}
|
|
@@ -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;
|
|
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,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.channelApikey1687322723851 = void 0;
|
|
13
|
+
class channelApikey1687322723851 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'channelApikey1687322723851';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
|
|
20
|
+
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`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.channelApikey1687322723851 = channelApikey1687322723851;
|
|
31
|
+
//# sourceMappingURL=1687322723851-channel_apikey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687322723851-channel_apikey.js","sourceRoot":"","sources":["../../src/migrations/1687322723851-channel_apikey.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0BAA0B;IAAvC;QACI,SAAI,GAAG,4BAA4B,CAAA;IAYvC,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,sMAAsM,CAAC,CAAC;QACpO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;QACpG,CAAC;KAAA;CAEJ;AAbD,gEAaC"}
|
|
@@ -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"}
|
|
@@ -2472,8 +2472,8 @@
|
|
|
2472
2472
|
"affectsGlobalScope": false
|
|
2473
2473
|
},
|
|
2474
2474
|
"../src/entity/userchannelapikey.ts": {
|
|
2475
|
-
"version": "
|
|
2476
|
-
"signature": "
|
|
2475
|
+
"version": "985bc475fc650804cb3902c2d0ccafd248c0163434112d262ff4e74cb636b5c1",
|
|
2476
|
+
"signature": "12372bedd14f6d5431f7273e4a338473a3e61161d6ac0da23e7b81ea92edffb8",
|
|
2477
2477
|
"affectsGlobalScope": false
|
|
2478
2478
|
},
|
|
2479
2479
|
"../src/entity/channel.ts": {
|
|
@@ -2647,8 +2647,8 @@
|
|
|
2647
2647
|
"affectsGlobalScope": false
|
|
2648
2648
|
},
|
|
2649
2649
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts": {
|
|
2650
|
-
"version": "
|
|
2651
|
-
"signature": "
|
|
2650
|
+
"version": "2bf597f6b9e526b7c820a308954bc6d73d4096afe5d13734600557671eb80b27",
|
|
2651
|
+
"signature": "1e238ca80896de3b9d7f5eef5af5db26c89cbd90714d6db58685b1a3cb7e96c9",
|
|
2652
2652
|
"affectsGlobalScope": false
|
|
2653
2653
|
},
|
|
2654
2654
|
"../src/entity/modules/templates/schemeproduct/reachuschemeconfigproduct.ts": {
|
|
@@ -3301,6 +3301,16 @@
|
|
|
3301
3301
|
"signature": "5c4b5981535ccf6b437a011756006f5734f76f9abbb7b25e622537653a6f45b2",
|
|
3302
3302
|
"affectsGlobalScope": false
|
|
3303
3303
|
},
|
|
3304
|
+
"../src/migrations/1687322723851-channel_apikey.ts": {
|
|
3305
|
+
"version": "d35ea8f9e6f6167fa0bbe77966f68213aaf6bbaad881ddc6200a5a79de0712c1",
|
|
3306
|
+
"signature": "bf72fbaf93cc0e771b724f545a881d8b51bdb493548c133351ede490ebbafeb5",
|
|
3307
|
+
"affectsGlobalScope": false
|
|
3308
|
+
},
|
|
3309
|
+
"../src/migrations/1687872767462-add-columns-template-endpoint.ts": {
|
|
3310
|
+
"version": "ae6876b6117158027f7bd4bb5e81c5d80ce2f549ecd7d958d36763bb4290c0e9",
|
|
3311
|
+
"signature": "6f95205c8ce4797dcda2e5ce8cb6baf56c27737ef4f8a982cf6ca0532a399318",
|
|
3312
|
+
"affectsGlobalScope": false
|
|
3313
|
+
},
|
|
3304
3314
|
"../src/migrations/execute/index.ts": {
|
|
3305
3315
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3306
3316
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5834,6 +5844,7 @@
|
|
|
5834
5844
|
"../node_modules/typeorm/index.d.ts",
|
|
5835
5845
|
"../src/entity/auditedmodel.ts",
|
|
5836
5846
|
"../src/entity/channel.ts",
|
|
5847
|
+
"../src/entity/channeluser.ts",
|
|
5837
5848
|
"../src/entity/user.ts"
|
|
5838
5849
|
],
|
|
5839
5850
|
"../src/entity/userrole.ts": [
|
|
@@ -6148,6 +6159,12 @@
|
|
|
6148
6159
|
"../src/migrations/1687235204409-channel_user.ts": [
|
|
6149
6160
|
"../node_modules/typeorm/index.d.ts"
|
|
6150
6161
|
],
|
|
6162
|
+
"../src/migrations/1687322723851-channel_apikey.ts": [
|
|
6163
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6164
|
+
],
|
|
6165
|
+
"../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
|
|
6166
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6167
|
+
],
|
|
6151
6168
|
"../src/migrations/execute/index.ts": [
|
|
6152
6169
|
"../src/config/connect.ts"
|
|
6153
6170
|
],
|
|
@@ -8559,6 +8576,7 @@
|
|
|
8559
8576
|
"../src/entity/userchannelapikey.ts": [
|
|
8560
8577
|
"../src/entity/auditedmodel.ts",
|
|
8561
8578
|
"../src/entity/channel.ts",
|
|
8579
|
+
"../src/entity/channeluser.ts",
|
|
8562
8580
|
"../src/entity/user.ts"
|
|
8563
8581
|
],
|
|
8564
8582
|
"../src/entity/userrole.ts": [
|
|
@@ -8850,6 +8868,12 @@
|
|
|
8850
8868
|
"../src/migrations/1687235204409-channel_user.ts": [
|
|
8851
8869
|
"../node_modules/typeorm/index.d.ts"
|
|
8852
8870
|
],
|
|
8871
|
+
"../src/migrations/1687322723851-channel_apikey.ts": [
|
|
8872
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8873
|
+
],
|
|
8874
|
+
"../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
|
|
8875
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8876
|
+
],
|
|
8853
8877
|
"../src/migrations/index.ts": [
|
|
8854
8878
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8855
8879
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9658,6 +9682,8 @@
|
|
|
9658
9682
|
"../src/migrations/1686309865248-cart_shipping_country.ts",
|
|
9659
9683
|
"../src/migrations/1686837392110-cart_shipping_default.ts",
|
|
9660
9684
|
"../src/migrations/1687235204409-channel_user.ts",
|
|
9685
|
+
"../src/migrations/1687322723851-channel_apikey.ts",
|
|
9686
|
+
"../src/migrations/1687872767462-add-columns-template-endpoint.ts",
|
|
9661
9687
|
"../src/migrations/execute/index.ts",
|
|
9662
9688
|
"../src/migrations/index.ts",
|
|
9663
9689
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
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.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
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",
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
} from 'typeorm';
|
|
10
10
|
import AuditedModel from './AuditedModel';
|
|
11
11
|
import Channel from './Channel';
|
|
12
|
+
import ChannelUser from './ChannelUser';
|
|
13
|
+
|
|
12
14
|
import User from './User';
|
|
13
15
|
|
|
14
16
|
@Entity()
|
|
@@ -27,6 +29,10 @@ export default class UserChannelApiKey extends AuditedModel {
|
|
|
27
29
|
@JoinColumn()
|
|
28
30
|
channel: Channel;
|
|
29
31
|
|
|
32
|
+
@ManyToOne(() => ChannelUser, (channelUser) => channelUser.id, { nullable: true })
|
|
33
|
+
@JoinColumn()
|
|
34
|
+
ChannelUser: ChannelUser;
|
|
35
|
+
|
|
30
36
|
@Column('varchar')
|
|
31
37
|
apiKey: string;
|
|
32
38
|
}
|
|
@@ -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,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class channelApikey1687322723851 implements MigrationInterface {
|
|
4
|
+
name = 'channelApikey1687322723851'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
|
|
8
|
+
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`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -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
|
+
}
|