@reachu/database 1.0.85 → 1.0.87
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/modules/templates/AuthInfo.d.ts +6 -0
- package/dist/entity/modules/templates/AuthInfo.js +24 -0
- package/dist/entity/modules/templates/AuthInfo.js.map +1 -1
- package/dist/migrations/1687981491374-add-info-to-auth.d.ts +6 -0
- package/dist/migrations/1687981491374-add-info-to-auth.js +37 -0
- package/dist/migrations/1687981491374-add-info-to-auth.js.map +1 -0
- package/dist/migrations/1687993176652-add-info-to-auth-2.d.ts +6 -0
- package/dist/migrations/1687993176652-add-info-to-auth-2.js +35 -0
- package/dist/migrations/1687993176652-add-info-to-auth-2.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +26 -2
- package/package.json +3 -3
- package/src/entity/modules/templates/AuthInfo.ts +18 -0
- package/src/migrations/1687981491374-add-info-to-auth.ts +22 -0
- package/src/migrations/1687993176652-add-info-to-auth-2.ts +20 -0
|
@@ -10,7 +10,13 @@ export default class AuthInfo extends AuditedModel {
|
|
|
10
10
|
basicAuthPassword: string;
|
|
11
11
|
oauthOneConsumerKey: string;
|
|
12
12
|
oauthOneConsumerSecret: string;
|
|
13
|
+
oauthOneTokenKey: string;
|
|
14
|
+
oauthOneTokenSecret: string;
|
|
13
15
|
oauthTwoToken: string;
|
|
14
16
|
oauthTwoPrefix: string;
|
|
17
|
+
oauthTwoClientId: string;
|
|
18
|
+
oauthTwoClientSecret: string;
|
|
19
|
+
oauthTwoClientEndpoint: string;
|
|
20
|
+
oauthTwoClientAudience: string;
|
|
15
21
|
userTemplateEcommerce: UserTemplateEcommerce[];
|
|
16
22
|
}
|
|
@@ -53,6 +53,14 @@ __decorate([
|
|
|
53
53
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], AuthInfo.prototype, "oauthOneConsumerSecret", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], AuthInfo.prototype, "oauthOneTokenKey", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], AuthInfo.prototype, "oauthOneTokenSecret", void 0);
|
|
56
64
|
__decorate([
|
|
57
65
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
58
66
|
__metadata("design:type", String)
|
|
@@ -61,6 +69,22 @@ __decorate([
|
|
|
61
69
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
62
70
|
__metadata("design:type", String)
|
|
63
71
|
], AuthInfo.prototype, "oauthTwoPrefix", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], AuthInfo.prototype, "oauthTwoClientId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], AuthInfo.prototype, "oauthTwoClientSecret", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], AuthInfo.prototype, "oauthTwoClientEndpoint", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], AuthInfo.prototype, "oauthTwoClientAudience", void 0);
|
|
64
88
|
__decorate([
|
|
65
89
|
typeorm_1.OneToMany(() => UserTemplateEcommerce_1.default, (userTemplateEcommerce) => userTemplateEcommerce.authInfo, {
|
|
66
90
|
cascade: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthInfo.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/AuthInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8F;AAC9F,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"AuthInfo.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/AuthInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8F;AAC9F,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,sBAAY;CA4DjD,CAAA;AA1DC;IADC,gCAAsB,EAAE;;oCACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;2CAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAG1B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AAG1B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;AAG5B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACP;AAG/B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACb;AAGzB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;AAG5B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAChB;AAGtB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACf;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACb;AAGzB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACT;AAG7B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACP;AAG/B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACP;AAS/B;IAPC,mBAAS,CACR,GAAG,EAAE,CAAC,+BAAqB,EAC3B,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAChF;QACE,OAAO,EAAE,IAAI;KACd,CACF;;uDAC8C;AA3D5B,QAAQ;IAD5B,gBAAM,EAAE;GACY,QAAQ,CA4D5B;kBA5DoB,QAAQ"}
|
|
@@ -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.addInfoToAuth1687981491374 = void 0;
|
|
13
|
+
class addInfoToAuth1687981491374 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'addInfoToAuth1687981491374';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_key\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_secret\` varchar(255) NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_id\` varchar(255) NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_secret\` varchar(255) NULL`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_endpoint\` varchar(255) NULL`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
down(queryRunner) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_endpoint\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_secret\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_id\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_secret\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_key\``);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.addInfoToAuth1687981491374 = addInfoToAuth1687981491374;
|
|
37
|
+
//# sourceMappingURL=1687981491374-add-info-to-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687981491374-add-info-to-auth.js","sourceRoot":"","sources":["../../src/migrations/1687981491374-add-info-to-auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0BAA0B;IAAvC;QACI,SAAI,GAAG,4BAA4B,CAAA;IAkBvC,CAAC;IAhBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;YACvG,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;QAC7G,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAC7F,CAAC;KAAA;CAEJ;AAnBD,gEAmBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.addInfoToAuth21687993176652 = void 0;
|
|
13
|
+
class addInfoToAuth21687993176652 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'addInfoToAuth21687993176652';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`DROP INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`shopify_connection_id\` int NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_audience\` varchar(255) NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_687a267ae83f576c002baf0198a\` FOREIGN KEY (\`shopify_connection_id\`) REFERENCES \`shopify_connection\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
down(queryRunner) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_687a267ae83f576c002baf0198a\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_audience\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`shopify_connection_id\``);
|
|
30
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\` (\`reseller_id\`, \`deleted_at\`)`);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.addInfoToAuth21687993176652 = addInfoToAuth21687993176652;
|
|
35
|
+
//# sourceMappingURL=1687993176652-add-info-to-auth-2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687993176652-add-info-to-auth-2.js","sourceRoot":"","sources":["../../src/migrations/1687993176652-add-info-to-auth-2.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACI,SAAI,GAAG,6BAA6B,CAAA;IAgBxC,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;YACzG,MAAM,WAAW,CAAC,KAAK,CAAC,0MAA0M,CAAC,CAAC;QACxO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,oHAAoH,CAAC,CAAC;QAClJ,CAAC;KAAA;CAEJ;AAjBD,kEAiBC"}
|
|
@@ -2712,8 +2712,8 @@
|
|
|
2712
2712
|
"affectsGlobalScope": false
|
|
2713
2713
|
},
|
|
2714
2714
|
"../src/entity/modules/templates/authinfo.ts": {
|
|
2715
|
-
"version": "
|
|
2716
|
-
"signature": "
|
|
2715
|
+
"version": "a9c623f98b7c7e79e84270e3d7e26f4759192195cff95af816c1a625780d0501",
|
|
2716
|
+
"signature": "008db82034596577764c49e3d853195ab66c9b9a5ff47242961c9610d2df2841",
|
|
2717
2717
|
"affectsGlobalScope": false
|
|
2718
2718
|
},
|
|
2719
2719
|
"../src/entity/translate.ts": {
|
|
@@ -3331,6 +3331,16 @@
|
|
|
3331
3331
|
"signature": "f38b307c946937bfe7732722241a7267f6fbdebea7346e2e459d318339c9d27a",
|
|
3332
3332
|
"affectsGlobalScope": false
|
|
3333
3333
|
},
|
|
3334
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": {
|
|
3335
|
+
"version": "4f5d0e5963d02f250a27b1f8651347d19fbdde4a30c7a3be4b4c6e0df44843f5",
|
|
3336
|
+
"signature": "5a1b894d97be04741932b65590ac239ce78405637426463afe0e3f8eb3adb826",
|
|
3337
|
+
"affectsGlobalScope": false
|
|
3338
|
+
},
|
|
3339
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": {
|
|
3340
|
+
"version": "968d3cfdc931aeca935fad00b0a6dbc99b3508054cc302c64c88dab79aecfd21",
|
|
3341
|
+
"signature": "baa58422d01771e5b5edeeee96b69158016ba96be10abd66c1c6ed5617d25233",
|
|
3342
|
+
"affectsGlobalScope": false
|
|
3343
|
+
},
|
|
3334
3344
|
"../src/migrations/execute/index.ts": {
|
|
3335
3345
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3336
3346
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6198,6 +6208,12 @@
|
|
|
6198
6208
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
6199
6209
|
"../node_modules/typeorm/index.d.ts"
|
|
6200
6210
|
],
|
|
6211
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
6212
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6213
|
+
],
|
|
6214
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": [
|
|
6215
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6216
|
+
],
|
|
6201
6217
|
"../src/migrations/execute/index.ts": [
|
|
6202
6218
|
"../src/config/connect.ts"
|
|
6203
6219
|
],
|
|
@@ -8920,6 +8936,12 @@
|
|
|
8920
8936
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
8921
8937
|
"../node_modules/typeorm/index.d.ts"
|
|
8922
8938
|
],
|
|
8939
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
8940
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8941
|
+
],
|
|
8942
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": [
|
|
8943
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8944
|
+
],
|
|
8923
8945
|
"../src/migrations/index.ts": [
|
|
8924
8946
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8925
8947
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9734,6 +9756,8 @@
|
|
|
9734
9756
|
"../src/migrations/1687877455406-migration-develop_01.ts",
|
|
9735
9757
|
"../src/migrations/1687877967732-migration-pre-develop.ts",
|
|
9736
9758
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts",
|
|
9759
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts",
|
|
9760
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts",
|
|
9737
9761
|
"../src/migrations/execute/index.ts",
|
|
9738
9762
|
"../src/migrations/index.ts",
|
|
9739
9763
|
"../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.87",
|
|
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.87",
|
|
25
|
+
"@reachu/utils": "1.0.87",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -31,12 +31,30 @@ export default class AuthInfo extends AuditedModel {
|
|
|
31
31
|
@Column('varchar', { nullable: true })
|
|
32
32
|
oauthOneConsumerSecret: string;
|
|
33
33
|
|
|
34
|
+
@Column('varchar', { nullable: true })
|
|
35
|
+
oauthOneTokenKey: string;
|
|
36
|
+
|
|
37
|
+
@Column('varchar', { nullable: true })
|
|
38
|
+
oauthOneTokenSecret: string;
|
|
39
|
+
|
|
34
40
|
@Column('varchar', { nullable: true })
|
|
35
41
|
oauthTwoToken: string;
|
|
36
42
|
|
|
37
43
|
@Column('varchar', { nullable: true })
|
|
38
44
|
oauthTwoPrefix: string;
|
|
39
45
|
|
|
46
|
+
@Column('varchar', { nullable: true })
|
|
47
|
+
oauthTwoClientId: string;
|
|
48
|
+
|
|
49
|
+
@Column('varchar', { nullable: true })
|
|
50
|
+
oauthTwoClientSecret: string;
|
|
51
|
+
|
|
52
|
+
@Column('varchar', { nullable: true })
|
|
53
|
+
oauthTwoClientEndpoint: string;
|
|
54
|
+
|
|
55
|
+
@Column('varchar', { nullable: true })
|
|
56
|
+
oauthTwoClientAudience: string;
|
|
57
|
+
|
|
40
58
|
@OneToMany(
|
|
41
59
|
() => UserTemplateEcommerce,
|
|
42
60
|
(userTemplateEcommerce: UserTemplateEcommerce) => userTemplateEcommerce.authInfo,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class addInfoToAuth1687981491374 implements MigrationInterface {
|
|
4
|
+
name = 'addInfoToAuth1687981491374'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_key\` varchar(255) NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_secret\` varchar(255) NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_id\` varchar(255) NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_secret\` varchar(255) NULL`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_endpoint\` varchar(255) NULL`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_endpoint\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_secret\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_id\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_secret\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_key\``);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class addInfoToAuth21687993176652 implements MigrationInterface {
|
|
4
|
+
name = 'addInfoToAuth21687993176652'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`DROP INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`shopify_connection_id\` int NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_audience\` varchar(255) NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_687a267ae83f576c002baf0198a\` FOREIGN KEY (\`shopify_connection_id\`) REFERENCES \`shopify_connection\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_687a267ae83f576c002baf0198a\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_audience\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`shopify_connection_id\``);
|
|
17
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\` (\`reseller_id\`, \`deleted_at\`)`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|