@reachu/database 1.0.163 → 1.0.164
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/ChannelUser.d.ts +2 -0
- package/dist/entity/ChannelUser.js +6 -0
- package/dist/entity/ChannelUser.js.map +1 -1
- package/dist/entity/ChannelUserSettings.d.ts +9 -0
- package/dist/entity/ChannelUserSettings.js +47 -0
- package/dist/entity/ChannelUserSettings.js.map +1 -0
- package/dist/migrations/1711562145337-user-channel-settings.d.ts +6 -0
- package/dist/migrations/1711562145337-user-channel-settings.js +37 -0
- package/dist/migrations/1711562145337-user-channel-settings.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +76 -83
- package/package.json +3 -3
- package/src/entity/ChannelUser.ts +6 -0
- package/src/entity/ChannelUserSettings.ts +24 -0
- package/src/migrations/1711562145337-user-channel-settings.ts +22 -0
|
@@ -7,6 +7,7 @@ import ShopifyConnection from './ShopifyConnection';
|
|
|
7
7
|
import WooConnection from './WooConnection';
|
|
8
8
|
import UserChannelApiKey from './UserChannelApiKey';
|
|
9
9
|
import { MagentoConnection } from './MagentoConnection.entity';
|
|
10
|
+
import ChannelUserSettings from './ChannelUserSettings';
|
|
10
11
|
export default class ChannelUser extends AuditedModel {
|
|
11
12
|
deletedAt: Date;
|
|
12
13
|
id: number;
|
|
@@ -23,4 +24,5 @@ export default class ChannelUser extends AuditedModel {
|
|
|
23
24
|
magentoConnection: MagentoConnection;
|
|
24
25
|
userChannelApiKey: UserChannelApiKey;
|
|
25
26
|
testOrigen: boolean;
|
|
27
|
+
channelUserSettings: ChannelUserSettings;
|
|
26
28
|
}
|
|
@@ -22,6 +22,7 @@ const ShopifyConnection_1 = __importDefault(require("./ShopifyConnection"));
|
|
|
22
22
|
const WooConnection_1 = __importDefault(require("./WooConnection"));
|
|
23
23
|
const UserChannelApiKey_1 = __importDefault(require("./UserChannelApiKey"));
|
|
24
24
|
const MagentoConnection_entity_1 = require("./MagentoConnection.entity");
|
|
25
|
+
const ChannelUserSettings_1 = __importDefault(require("./ChannelUserSettings"));
|
|
25
26
|
let ChannelUser = class ChannelUser extends AuditedModel_1.default {
|
|
26
27
|
};
|
|
27
28
|
__decorate([
|
|
@@ -104,6 +105,11 @@ __decorate([
|
|
|
104
105
|
typeorm_1.Column('boolean', { default: false }),
|
|
105
106
|
__metadata("design:type", Boolean)
|
|
106
107
|
], ChannelUser.prototype, "testOrigen", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
typeorm_1.OneToOne(() => ChannelUserSettings_1.default, { eager: false, nullable: true }),
|
|
110
|
+
typeorm_1.JoinColumn(),
|
|
111
|
+
__metadata("design:type", ChannelUserSettings_1.default)
|
|
112
|
+
], ChannelUser.prototype, "channelUserSettings", void 0);
|
|
107
113
|
ChannelUser = __decorate([
|
|
108
114
|
typeorm_1.Entity()
|
|
109
115
|
], ChannelUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const AuditedModel_1 = __importDefault(require("./AuditedModel"));
|
|
17
|
+
let ChannelUserSettings = class ChannelUserSettings extends AuditedModel_1.default {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
typeorm_1.DeleteDateColumn(),
|
|
21
|
+
__metadata("design:type", Date)
|
|
22
|
+
], ChannelUserSettings.prototype, "deletedAt", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], ChannelUserSettings.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
typeorm_1.Column('boolean', { default: false }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], ChannelUserSettings.prototype, "stripePaymentLink", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
typeorm_1.Column('boolean', { default: false }),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], ChannelUserSettings.prototype, "stripePaymentIntent", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
typeorm_1.Column('boolean', { default: false }),
|
|
37
|
+
__metadata("design:type", Boolean)
|
|
38
|
+
], ChannelUserSettings.prototype, "klarna", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
typeorm_1.Column('varchar', { length: '21844' }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ChannelUserSettings.prototype, "markets", void 0);
|
|
43
|
+
ChannelUserSettings = __decorate([
|
|
44
|
+
typeorm_1.Entity()
|
|
45
|
+
], ChannelUserSettings);
|
|
46
|
+
exports.default = ChannelUserSettings;
|
|
47
|
+
//# sourceMappingURL=ChannelUserSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelUserSettings.js","sourceRoot":"","sources":["../../src/entity/ChannelUserSettings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAmF;AACnF,kEAA0C;AAG1C,IAAqB,mBAAmB,GAAxC,MAAqB,mBAAoB,SAAQ,sBAAY;CAmB5D,CAAA;AAjBC;IADC,0BAAgB,EAAE;8BACR,IAAI;sDAAC;AAGhB;IADC,gCAAsB,EAAE;;+CACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACX;AAG3B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gEACT;AAG7B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mDACtB;AAIhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;oDACvB;AAlBG,mBAAmB;IADvC,gBAAM,EAAE;GACY,mBAAmB,CAmBvC;kBAnBoB,mBAAmB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.userChannelSettings1711562145337 = void 0;
|
|
13
|
+
class userChannelSettings1711562145337 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'userChannelSettings1711562145337';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`channel_user_settings\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`deleted_at\` datetime(6) NULL, \`id\` int NOT NULL AUTO_INCREMENT, \`stripe_payment_link\` tinyint NOT NULL DEFAULT 0, \`stripe_payment_intent\` tinyint NOT NULL DEFAULT 0, \`klarna\` tinyint NOT NULL DEFAULT 0, \`markets\` varchar(21844) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`channel_user_settings_id\` int NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD UNIQUE INDEX \`IDX_7e330764fdf1dc12dd5ba35dec\` (\`channel_user_settings_id\`)`);
|
|
22
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_7e330764fdf1dc12dd5ba35dec\` ON \`channel_user\` (\`channel_user_settings_id\`)`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_7e330764fdf1dc12dd5ba35dece\` FOREIGN KEY (\`channel_user_settings_id\`) REFERENCES \`channel_user_settings\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
down(queryRunner) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_7e330764fdf1dc12dd5ba35dece\``);
|
|
29
|
+
yield queryRunner.query(`DROP INDEX \`REL_7e330764fdf1dc12dd5ba35dec\` ON \`channel_user\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP INDEX \`IDX_7e330764fdf1dc12dd5ba35dec\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`channel_user_settings_id\``);
|
|
32
|
+
yield queryRunner.query(`DROP TABLE \`channel_user_settings\``);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.userChannelSettings1711562145337 = userChannelSettings1711562145337;
|
|
37
|
+
//# sourceMappingURL=1711562145337-user-channel-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1711562145337-user-channel-settings.js","sourceRoot":"","sources":["../../src/migrations/1711562145337-user-channel-settings.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,gCAAgC;IAA7C;QACI,SAAI,GAAG,kCAAkC,CAAA;IAkB7C,CAAC;IAhBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,2eAA2e,CAAC,CAAC;YACrgB,MAAM,WAAW,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;YAClG,MAAM,WAAW,CAAC,KAAK,CAAC,iHAAiH,CAAC,CAAC;YAC3I,MAAM,WAAW,CAAC,KAAK,CAAC,2GAA2G,CAAC,CAAC;YACrI,MAAM,WAAW,CAAC,KAAK,CAAC,gNAAgN,CAAC,CAAC;QAC9O,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QACpE,CAAC;KAAA;CAEJ;AAnBD,4EAmBC"}
|
|
@@ -2236,59 +2236,44 @@
|
|
|
2236
2236
|
"signature": "744e6430bafc6f39f66c4fc1e6a0d8c9551260ffd1782aa7e3f5166ac6aa1f86",
|
|
2237
2237
|
"affectsGlobalScope": false
|
|
2238
2238
|
},
|
|
2239
|
-
"../node_modules/@types/
|
|
2240
|
-
"version": "
|
|
2241
|
-
"signature": "
|
|
2242
|
-
"affectsGlobalScope": false
|
|
2243
|
-
},
|
|
2244
|
-
"../node_modules/@types/send/index.d.ts": {
|
|
2245
|
-
"version": "b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a",
|
|
2246
|
-
"signature": "b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a",
|
|
2239
|
+
"../node_modules/@types/range-parser/index.d.ts": {
|
|
2240
|
+
"version": "16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c",
|
|
2241
|
+
"signature": "16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c",
|
|
2247
2242
|
"affectsGlobalScope": false
|
|
2248
2243
|
},
|
|
2249
2244
|
"../node_modules/@types/qs/index.d.ts": {
|
|
2250
|
-
"version": "
|
|
2251
|
-
"signature": "
|
|
2252
|
-
"affectsGlobalScope": false
|
|
2253
|
-
},
|
|
2254
|
-
"../node_modules/@types/range-parser/index.d.ts": {
|
|
2255
|
-
"version": "2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed",
|
|
2256
|
-
"signature": "2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed",
|
|
2245
|
+
"version": "ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",
|
|
2246
|
+
"signature": "ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",
|
|
2257
2247
|
"affectsGlobalScope": false
|
|
2258
2248
|
},
|
|
2259
2249
|
"../node_modules/@types/express-serve-static-core/index.d.ts": {
|
|
2260
|
-
"version": "
|
|
2261
|
-
"signature": "
|
|
2250
|
+
"version": "c5dd1fef4cd4aaffc78786047bed5ae6fc1200d19a1946cbc4e2d3ed4d62c8fa",
|
|
2251
|
+
"signature": "c5dd1fef4cd4aaffc78786047bed5ae6fc1200d19a1946cbc4e2d3ed4d62c8fa",
|
|
2262
2252
|
"affectsGlobalScope": true
|
|
2263
2253
|
},
|
|
2264
|
-
"../node_modules/@types/http-errors/index.d.ts": {
|
|
2265
|
-
"version": "b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b",
|
|
2266
|
-
"signature": "b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b",
|
|
2267
|
-
"affectsGlobalScope": false
|
|
2268
|
-
},
|
|
2269
2254
|
"../node_modules/@types/mime/mime.d.ts": {
|
|
2270
|
-
"version": "
|
|
2271
|
-
"signature": "
|
|
2255
|
+
"version": "5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7",
|
|
2256
|
+
"signature": "5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7",
|
|
2272
2257
|
"affectsGlobalScope": false
|
|
2273
2258
|
},
|
|
2274
2259
|
"../node_modules/@types/mime/index.d.ts": {
|
|
2275
|
-
"version": "
|
|
2276
|
-
"signature": "
|
|
2260
|
+
"version": "951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e",
|
|
2261
|
+
"signature": "951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e",
|
|
2277
2262
|
"affectsGlobalScope": false
|
|
2278
2263
|
},
|
|
2279
2264
|
"../node_modules/@types/serve-static/index.d.ts": {
|
|
2280
|
-
"version": "
|
|
2281
|
-
"signature": "
|
|
2265
|
+
"version": "e6f0cb9d8cb2e38bec66e032e73caa3e7c6671f21ed7196acb821aec462051f2",
|
|
2266
|
+
"signature": "e6f0cb9d8cb2e38bec66e032e73caa3e7c6671f21ed7196acb821aec462051f2",
|
|
2282
2267
|
"affectsGlobalScope": false
|
|
2283
2268
|
},
|
|
2284
2269
|
"../node_modules/@types/connect/index.d.ts": {
|
|
2285
|
-
"version": "
|
|
2286
|
-
"signature": "
|
|
2270
|
+
"version": "6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073",
|
|
2271
|
+
"signature": "6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073",
|
|
2287
2272
|
"affectsGlobalScope": false
|
|
2288
2273
|
},
|
|
2289
2274
|
"../node_modules/@types/body-parser/index.d.ts": {
|
|
2290
|
-
"version": "
|
|
2291
|
-
"signature": "
|
|
2275
|
+
"version": "afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90",
|
|
2276
|
+
"signature": "afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90",
|
|
2292
2277
|
"affectsGlobalScope": false
|
|
2293
2278
|
},
|
|
2294
2279
|
"../node_modules/@types/express/index.d.ts": {
|
|
@@ -2496,9 +2481,14 @@
|
|
|
2496
2481
|
"signature": "7efd2406080e07894d8d335fbe75ba26c7dc03e64ce95245ba86c08a271ee76d",
|
|
2497
2482
|
"affectsGlobalScope": false
|
|
2498
2483
|
},
|
|
2484
|
+
"../src/entity/channelusersettings.ts": {
|
|
2485
|
+
"version": "a47982b54c3f5c458bd71013b53e382c46e90ee3c16436429882be02ecfbbb48",
|
|
2486
|
+
"signature": "33b238a18b58d058b0d9f68b163b4c8f7b54e6f812db2a70838c993d34706d20",
|
|
2487
|
+
"affectsGlobalScope": false
|
|
2488
|
+
},
|
|
2499
2489
|
"../src/entity/channeluser.ts": {
|
|
2500
|
-
"version": "
|
|
2501
|
-
"signature": "
|
|
2490
|
+
"version": "e238c137ace5e721933d353c5118dc7a0a88790fad7ee1f020653c684b2ffeb2",
|
|
2491
|
+
"signature": "65f97d9fa475392c2ef13b994380a6f64cc02295ef5594c4ba6379599d4f94e0",
|
|
2502
2492
|
"affectsGlobalScope": false
|
|
2503
2493
|
},
|
|
2504
2494
|
"../src/entity/channel.ts": {
|
|
@@ -3721,29 +3711,34 @@
|
|
|
3721
3711
|
"signature": "7cc7d57e7b8d8064a350346af4fac982fbd8dab6c2f076576e215566ac50780c",
|
|
3722
3712
|
"affectsGlobalScope": false
|
|
3723
3713
|
},
|
|
3714
|
+
"../src/migrations/1711562145337-user-channel-settings.ts": {
|
|
3715
|
+
"version": "5cfdc4d825c13c4aabb2f0bac03e03ca7ce90054df8a6226de247ad79cfc1351",
|
|
3716
|
+
"signature": "9f5612345e6e3183640df5d3fe9f236c85556134a3b67da39f6adf03c22fd69a",
|
|
3717
|
+
"affectsGlobalScope": false
|
|
3718
|
+
},
|
|
3724
3719
|
"../src/migrations/execute/index.ts": {
|
|
3725
3720
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3726
3721
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
3727
3722
|
"affectsGlobalScope": false
|
|
3728
3723
|
},
|
|
3729
3724
|
"../node_modules/@babel/types/lib/index.d.ts": {
|
|
3730
|
-
"version": "
|
|
3731
|
-
"signature": "
|
|
3725
|
+
"version": "3078727fed04c123165efdb42deeac5dceaa42ac62216ca13cb809dc7e13415f",
|
|
3726
|
+
"signature": "3078727fed04c123165efdb42deeac5dceaa42ac62216ca13cb809dc7e13415f",
|
|
3732
3727
|
"affectsGlobalScope": false
|
|
3733
3728
|
},
|
|
3734
3729
|
"../node_modules/@types/babel__generator/index.d.ts": {
|
|
3735
|
-
"version": "
|
|
3736
|
-
"signature": "
|
|
3730
|
+
"version": "cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb",
|
|
3731
|
+
"signature": "cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb",
|
|
3737
3732
|
"affectsGlobalScope": false
|
|
3738
3733
|
},
|
|
3739
3734
|
"../node_modules/@babel/parser/typings/babel-parser.d.ts": {
|
|
3740
|
-
"version": "
|
|
3741
|
-
"signature": "
|
|
3735
|
+
"version": "b4f76b34637d79cefad486127115fed843762c69512d7101b7096e1293699679",
|
|
3736
|
+
"signature": "b4f76b34637d79cefad486127115fed843762c69512d7101b7096e1293699679",
|
|
3742
3737
|
"affectsGlobalScope": false
|
|
3743
3738
|
},
|
|
3744
3739
|
"../node_modules/@types/babel__template/index.d.ts": {
|
|
3745
|
-
"version": "
|
|
3746
|
-
"signature": "
|
|
3740
|
+
"version": "93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9",
|
|
3741
|
+
"signature": "93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9",
|
|
3747
3742
|
"affectsGlobalScope": false
|
|
3748
3743
|
},
|
|
3749
3744
|
"../node_modules/@types/babel__traverse/index.d.ts": {
|
|
@@ -3752,28 +3747,28 @@
|
|
|
3752
3747
|
"affectsGlobalScope": false
|
|
3753
3748
|
},
|
|
3754
3749
|
"../node_modules/@types/babel__core/index.d.ts": {
|
|
3755
|
-
"version": "
|
|
3756
|
-
"signature": "
|
|
3750
|
+
"version": "b6ddf3a46ccfa4441d8be84d2e9bf3087573c48804196faedbd4a25b60631beb",
|
|
3751
|
+
"signature": "b6ddf3a46ccfa4441d8be84d2e9bf3087573c48804196faedbd4a25b60631beb",
|
|
3757
3752
|
"affectsGlobalScope": false
|
|
3758
3753
|
},
|
|
3759
3754
|
"../node_modules/@types/graceful-fs/index.d.ts": {
|
|
3760
|
-
"version": "
|
|
3761
|
-
"signature": "
|
|
3755
|
+
"version": "bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e",
|
|
3756
|
+
"signature": "bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e",
|
|
3762
3757
|
"affectsGlobalScope": false
|
|
3763
3758
|
},
|
|
3764
3759
|
"../node_modules/@types/istanbul-lib-coverage/index.d.ts": {
|
|
3765
|
-
"version": "
|
|
3766
|
-
"signature": "
|
|
3760
|
+
"version": "8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215",
|
|
3761
|
+
"signature": "8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215",
|
|
3767
3762
|
"affectsGlobalScope": false
|
|
3768
3763
|
},
|
|
3769
3764
|
"../node_modules/@types/istanbul-lib-report/index.d.ts": {
|
|
3770
|
-
"version": "
|
|
3771
|
-
"signature": "
|
|
3765
|
+
"version": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee",
|
|
3766
|
+
"signature": "7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee",
|
|
3772
3767
|
"affectsGlobalScope": false
|
|
3773
3768
|
},
|
|
3774
3769
|
"../node_modules/@types/istanbul-reports/index.d.ts": {
|
|
3775
|
-
"version": "
|
|
3776
|
-
"signature": "
|
|
3770
|
+
"version": "f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0",
|
|
3771
|
+
"signature": "f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0",
|
|
3777
3772
|
"affectsGlobalScope": false
|
|
3778
3773
|
},
|
|
3779
3774
|
"../node_modules/jest-diff/build/cleanupsemantic.d.ts": {
|
|
@@ -3817,28 +3812,28 @@
|
|
|
3817
3812
|
"affectsGlobalScope": true
|
|
3818
3813
|
},
|
|
3819
3814
|
"../node_modules/@types/json-schema/index.d.ts": {
|
|
3820
|
-
"version": "
|
|
3821
|
-
"signature": "
|
|
3815
|
+
"version": "f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6",
|
|
3816
|
+
"signature": "f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6",
|
|
3822
3817
|
"affectsGlobalScope": false
|
|
3823
3818
|
},
|
|
3824
3819
|
"../node_modules/@types/prettier/index.d.ts": {
|
|
3825
|
-
"version": "
|
|
3826
|
-
"signature": "
|
|
3820
|
+
"version": "bc88e4049153bc4dddb4503ed7e624eb141edfa9064b3659d6c86e900fe9e621",
|
|
3821
|
+
"signature": "bc88e4049153bc4dddb4503ed7e624eb141edfa9064b3659d6c86e900fe9e621",
|
|
3827
3822
|
"affectsGlobalScope": false
|
|
3828
3823
|
},
|
|
3829
3824
|
"../node_modules/@types/stack-utils/index.d.ts": {
|
|
3830
|
-
"version": "
|
|
3831
|
-
"signature": "
|
|
3825
|
+
"version": "b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298",
|
|
3826
|
+
"signature": "b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298",
|
|
3832
3827
|
"affectsGlobalScope": false
|
|
3833
3828
|
},
|
|
3834
3829
|
"../node_modules/@types/yargs-parser/index.d.ts": {
|
|
3835
|
-
"version": "
|
|
3836
|
-
"signature": "
|
|
3830
|
+
"version": "70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e",
|
|
3831
|
+
"signature": "70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e",
|
|
3837
3832
|
"affectsGlobalScope": false
|
|
3838
3833
|
},
|
|
3839
3834
|
"../node_modules/@types/yargs/index.d.ts": {
|
|
3840
|
-
"version": "
|
|
3841
|
-
"signature": "
|
|
3835
|
+
"version": "149ebd778196c03e9c75b630866543501e0e9e62a146c1a17ce91ade4cdfb0ba",
|
|
3836
|
+
"signature": "149ebd778196c03e9c75b630866543501e0e9e62a146c1a17ce91ade4cdfb0ba",
|
|
3842
3837
|
"affectsGlobalScope": false
|
|
3843
3838
|
},
|
|
3844
3839
|
"../node_modules/@types/zen-observable/index.d.ts": {
|
|
@@ -3949,8 +3944,7 @@
|
|
|
3949
3944
|
"../node_modules/@types/node/http.d.ts",
|
|
3950
3945
|
"../node_modules/@types/node/index.d.ts",
|
|
3951
3946
|
"../node_modules/@types/qs/index.d.ts",
|
|
3952
|
-
"../node_modules/@types/range-parser/index.d.ts"
|
|
3953
|
-
"../node_modules/@types/send/index.d.ts"
|
|
3947
|
+
"../node_modules/@types/range-parser/index.d.ts"
|
|
3954
3948
|
],
|
|
3955
3949
|
"../node_modules/@types/express/index.d.ts": [
|
|
3956
3950
|
"../node_modules/@types/body-parser/index.d.ts",
|
|
@@ -4148,14 +4142,7 @@
|
|
|
4148
4142
|
"../node_modules/@types/node/zlib.d.ts": [
|
|
4149
4143
|
"../node_modules/@types/node/stream.d.ts"
|
|
4150
4144
|
],
|
|
4151
|
-
"../node_modules/@types/send/index.d.ts": [
|
|
4152
|
-
"../node_modules/@types/node/fs.d.ts",
|
|
4153
|
-
"../node_modules/@types/node/index.d.ts",
|
|
4154
|
-
"../node_modules/@types/node/stream.d.ts",
|
|
4155
|
-
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
|
|
4156
|
-
],
|
|
4157
4145
|
"../node_modules/@types/serve-static/index.d.ts": [
|
|
4158
|
-
"../node_modules/@types/http-errors/index.d.ts",
|
|
4159
4146
|
"../node_modules/@types/mime/index.d.ts",
|
|
4160
4147
|
"../node_modules/@types/node/http.d.ts",
|
|
4161
4148
|
"../node_modules/@types/node/index.d.ts"
|
|
@@ -5726,6 +5713,7 @@
|
|
|
5726
5713
|
"../src/entity/channel.ts",
|
|
5727
5714
|
"../src/entity/channelgroup.ts",
|
|
5728
5715
|
"../src/entity/channeluserproductsync.ts",
|
|
5716
|
+
"../src/entity/channelusersettings.ts",
|
|
5729
5717
|
"../src/entity/magentoconnection.entity.ts",
|
|
5730
5718
|
"../src/entity/shopifyconnection.ts",
|
|
5731
5719
|
"../src/entity/user.ts",
|
|
@@ -5739,6 +5727,10 @@
|
|
|
5739
5727
|
"../src/entity/product.entity.ts",
|
|
5740
5728
|
"../src/entity/variant.ts"
|
|
5741
5729
|
],
|
|
5730
|
+
"../src/entity/channelusersettings.ts": [
|
|
5731
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5732
|
+
"../src/entity/auditedmodel.ts"
|
|
5733
|
+
],
|
|
5742
5734
|
"../src/entity/check.ts": [
|
|
5743
5735
|
"../node_modules/typeorm/index.d.ts"
|
|
5744
5736
|
],
|
|
@@ -6867,6 +6859,9 @@
|
|
|
6867
6859
|
"../src/migrations/1708039535580-order-channel-user.ts": [
|
|
6868
6860
|
"../node_modules/typeorm/index.d.ts"
|
|
6869
6861
|
],
|
|
6862
|
+
"../src/migrations/1711562145337-user-channel-settings.ts": [
|
|
6863
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6864
|
+
],
|
|
6870
6865
|
"../src/migrations/execute/index.ts": [
|
|
6871
6866
|
"../src/config/connect.ts"
|
|
6872
6867
|
],
|
|
@@ -7118,8 +7113,7 @@
|
|
|
7118
7113
|
"../node_modules/@types/node/http.d.ts",
|
|
7119
7114
|
"../node_modules/@types/node/index.d.ts",
|
|
7120
7115
|
"../node_modules/@types/qs/index.d.ts",
|
|
7121
|
-
"../node_modules/@types/range-parser/index.d.ts"
|
|
7122
|
-
"../node_modules/@types/send/index.d.ts"
|
|
7116
|
+
"../node_modules/@types/range-parser/index.d.ts"
|
|
7123
7117
|
],
|
|
7124
7118
|
"../node_modules/@types/express/index.d.ts": [
|
|
7125
7119
|
"../node_modules/@types/body-parser/index.d.ts",
|
|
@@ -7317,14 +7311,7 @@
|
|
|
7317
7311
|
"../node_modules/@types/node/zlib.d.ts": [
|
|
7318
7312
|
"../node_modules/@types/node/stream.d.ts"
|
|
7319
7313
|
],
|
|
7320
|
-
"../node_modules/@types/send/index.d.ts": [
|
|
7321
|
-
"../node_modules/@types/node/fs.d.ts",
|
|
7322
|
-
"../node_modules/@types/node/index.d.ts",
|
|
7323
|
-
"../node_modules/@types/node/stream.d.ts",
|
|
7324
|
-
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
|
|
7325
|
-
],
|
|
7326
7314
|
"../node_modules/@types/serve-static/index.d.ts": [
|
|
7327
|
-
"../node_modules/@types/http-errors/index.d.ts",
|
|
7328
7315
|
"../node_modules/@types/mime/index.d.ts",
|
|
7329
7316
|
"../node_modules/@types/node/http.d.ts",
|
|
7330
7317
|
"../node_modules/@types/node/index.d.ts"
|
|
@@ -8874,6 +8861,7 @@
|
|
|
8874
8861
|
"../src/entity/channel.ts",
|
|
8875
8862
|
"../src/entity/channelgroup.ts",
|
|
8876
8863
|
"../src/entity/channeluserproductsync.ts",
|
|
8864
|
+
"../src/entity/channelusersettings.ts",
|
|
8877
8865
|
"../src/entity/magentoconnection.entity.ts",
|
|
8878
8866
|
"../src/entity/shopifyconnection.ts",
|
|
8879
8867
|
"../src/entity/user.ts",
|
|
@@ -8886,6 +8874,9 @@
|
|
|
8886
8874
|
"../src/entity/product.entity.ts",
|
|
8887
8875
|
"../src/entity/variant.ts"
|
|
8888
8876
|
],
|
|
8877
|
+
"../src/entity/channelusersettings.ts": [
|
|
8878
|
+
"../src/entity/auditedmodel.ts"
|
|
8879
|
+
],
|
|
8889
8880
|
"../src/entity/collection.ts": [
|
|
8890
8881
|
"../src/entity/auditedmodel.ts",
|
|
8891
8882
|
"../src/entity/channelgroup.ts",
|
|
@@ -9867,6 +9858,9 @@
|
|
|
9867
9858
|
"../src/migrations/1708039535580-order-channel-user.ts": [
|
|
9868
9859
|
"../node_modules/typeorm/index.d.ts"
|
|
9869
9860
|
],
|
|
9861
|
+
"../src/migrations/1711562145337-user-channel-settings.ts": [
|
|
9862
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9863
|
+
],
|
|
9870
9864
|
"../src/migrations/index.ts": [
|
|
9871
9865
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
9872
9866
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10058,7 +10052,6 @@
|
|
|
10058
10052
|
"../node_modules/@types/express-serve-static-core/index.d.ts",
|
|
10059
10053
|
"../node_modules/@types/express/index.d.ts",
|
|
10060
10054
|
"../node_modules/@types/graceful-fs/index.d.ts",
|
|
10061
|
-
"../node_modules/@types/http-errors/index.d.ts",
|
|
10062
10055
|
"../node_modules/@types/istanbul-lib-coverage/index.d.ts",
|
|
10063
10056
|
"../node_modules/@types/istanbul-lib-report/index.d.ts",
|
|
10064
10057
|
"../node_modules/@types/istanbul-reports/index.d.ts",
|
|
@@ -10116,8 +10109,6 @@
|
|
|
10116
10109
|
"../node_modules/@types/prettier/index.d.ts",
|
|
10117
10110
|
"../node_modules/@types/qs/index.d.ts",
|
|
10118
10111
|
"../node_modules/@types/range-parser/index.d.ts",
|
|
10119
|
-
"../node_modules/@types/send/index.d.ts",
|
|
10120
|
-
"../node_modules/@types/send/node_modules/@types/mime/index.d.ts",
|
|
10121
10112
|
"../node_modules/@types/serve-static/index.d.ts",
|
|
10122
10113
|
"../node_modules/@types/stack-utils/index.d.ts",
|
|
10123
10114
|
"../node_modules/@types/yargs-parser/index.d.ts",
|
|
@@ -10523,6 +10514,7 @@
|
|
|
10523
10514
|
"../src/entity/channelgroup.ts",
|
|
10524
10515
|
"../src/entity/channeluser.ts",
|
|
10525
10516
|
"../src/entity/channeluserproductsync.ts",
|
|
10517
|
+
"../src/entity/channelusersettings.ts",
|
|
10526
10518
|
"../src/entity/check.ts",
|
|
10527
10519
|
"../src/entity/checkoutmetadata.ts",
|
|
10528
10520
|
"../src/entity/collection.ts",
|
|
@@ -10771,6 +10763,7 @@
|
|
|
10771
10763
|
"../src/migrations/1707768053927-shopify-supplier-delete.ts",
|
|
10772
10764
|
"../src/migrations/1708027064933-woo-user-delete.ts",
|
|
10773
10765
|
"../src/migrations/1708039535580-order-channel-user.ts",
|
|
10766
|
+
"../src/migrations/1711562145337-user-channel-settings.ts",
|
|
10774
10767
|
"../src/migrations/execute/index.ts",
|
|
10775
10768
|
"../src/migrations/index.ts",
|
|
10776
10769
|
"../src/repositories/discount/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.164",
|
|
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.164",
|
|
25
|
+
"@reachu/utils": "1.0.164",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
JoinColumn,
|
|
7
7
|
OneToMany,
|
|
8
8
|
Column,
|
|
9
|
+
OneToOne,
|
|
9
10
|
} from 'typeorm';
|
|
10
11
|
import AuditedModel from './AuditedModel';
|
|
11
12
|
import Channel from './Channel';
|
|
@@ -17,6 +18,7 @@ import WooConnection from './WooConnection';
|
|
|
17
18
|
|
|
18
19
|
import UserChannelApiKey from './UserChannelApiKey';
|
|
19
20
|
import { MagentoConnection } from './MagentoConnection.entity';
|
|
21
|
+
import ChannelUserSettings from './ChannelUserSettings';
|
|
20
22
|
|
|
21
23
|
@Entity()
|
|
22
24
|
export default class ChannelUser extends AuditedModel {
|
|
@@ -88,4 +90,8 @@ export default class ChannelUser extends AuditedModel {
|
|
|
88
90
|
|
|
89
91
|
@Column('boolean', { default: false })
|
|
90
92
|
testOrigen: boolean;
|
|
93
|
+
|
|
94
|
+
@OneToOne(() => ChannelUserSettings, { eager: false, nullable: true })
|
|
95
|
+
@JoinColumn()
|
|
96
|
+
channelUserSettings: ChannelUserSettings;
|
|
91
97
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Entity, PrimaryGeneratedColumn, DeleteDateColumn, Column } from 'typeorm';
|
|
2
|
+
import AuditedModel from './AuditedModel';
|
|
3
|
+
|
|
4
|
+
@Entity()
|
|
5
|
+
export default class ChannelUserSettings extends AuditedModel {
|
|
6
|
+
@DeleteDateColumn()
|
|
7
|
+
deletedAt: Date;
|
|
8
|
+
|
|
9
|
+
@PrimaryGeneratedColumn()
|
|
10
|
+
id: number;
|
|
11
|
+
|
|
12
|
+
@Column('boolean', { default: false })
|
|
13
|
+
stripePaymentLink: boolean;
|
|
14
|
+
|
|
15
|
+
@Column('boolean', { default: false })
|
|
16
|
+
stripePaymentIntent: boolean;
|
|
17
|
+
|
|
18
|
+
@Column('boolean', { default: false })
|
|
19
|
+
klarna: boolean;
|
|
20
|
+
|
|
21
|
+
//array of strings (countries code)
|
|
22
|
+
@Column('varchar', { length: '21844' })
|
|
23
|
+
markets: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class userChannelSettings1711562145337 implements MigrationInterface {
|
|
4
|
+
name = 'userChannelSettings1711562145337'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`channel_user_settings\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`deleted_at\` datetime(6) NULL, \`id\` int NOT NULL AUTO_INCREMENT, \`stripe_payment_link\` tinyint NOT NULL DEFAULT 0, \`stripe_payment_intent\` tinyint NOT NULL DEFAULT 0, \`klarna\` tinyint NOT NULL DEFAULT 0, \`markets\` varchar(21844) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`channel_user_settings_id\` int NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD UNIQUE INDEX \`IDX_7e330764fdf1dc12dd5ba35dec\` (\`channel_user_settings_id\`)`);
|
|
10
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_7e330764fdf1dc12dd5ba35dec\` ON \`channel_user\` (\`channel_user_settings_id\`)`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_7e330764fdf1dc12dd5ba35dece\` FOREIGN KEY (\`channel_user_settings_id\`) REFERENCES \`channel_user_settings\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_7e330764fdf1dc12dd5ba35dece\``);
|
|
16
|
+
await queryRunner.query(`DROP INDEX \`REL_7e330764fdf1dc12dd5ba35dec\` ON \`channel_user\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP INDEX \`IDX_7e330764fdf1dc12dd5ba35dec\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`channel_user_settings_id\``);
|
|
19
|
+
await queryRunner.query(`DROP TABLE \`channel_user_settings\``);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|