@reachu/database 1.0.86 → 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 +1 -0
- package/dist/entity/modules/templates/AuthInfo.js +4 -0
- package/dist/entity/modules/templates/AuthInfo.js.map +1 -1
- 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 +14 -2
- package/package.json +3 -3
- package/src/entity/modules/templates/AuthInfo.ts +3 -0
- package/src/migrations/1687993176652-add-info-to-auth-2.ts +20 -0
|
@@ -81,6 +81,10 @@ __decorate([
|
|
|
81
81
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
82
82
|
__metadata("design:type", String)
|
|
83
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);
|
|
84
88
|
__decorate([
|
|
85
89
|
typeorm_1.OneToMany(() => UserTemplateEcommerce_1.default, (userTemplateEcommerce) => userTemplateEcommerce.authInfo, {
|
|
86
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,qC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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,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": {
|
|
@@ -3336,6 +3336,11 @@
|
|
|
3336
3336
|
"signature": "5a1b894d97be04741932b65590ac239ce78405637426463afe0e3f8eb3adb826",
|
|
3337
3337
|
"affectsGlobalScope": false
|
|
3338
3338
|
},
|
|
3339
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": {
|
|
3340
|
+
"version": "968d3cfdc931aeca935fad00b0a6dbc99b3508054cc302c64c88dab79aecfd21",
|
|
3341
|
+
"signature": "baa58422d01771e5b5edeeee96b69158016ba96be10abd66c1c6ed5617d25233",
|
|
3342
|
+
"affectsGlobalScope": false
|
|
3343
|
+
},
|
|
3339
3344
|
"../src/migrations/execute/index.ts": {
|
|
3340
3345
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3341
3346
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6206,6 +6211,9 @@
|
|
|
6206
6211
|
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
6207
6212
|
"../node_modules/typeorm/index.d.ts"
|
|
6208
6213
|
],
|
|
6214
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": [
|
|
6215
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6216
|
+
],
|
|
6209
6217
|
"../src/migrations/execute/index.ts": [
|
|
6210
6218
|
"../src/config/connect.ts"
|
|
6211
6219
|
],
|
|
@@ -8931,6 +8939,9 @@
|
|
|
8931
8939
|
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
8932
8940
|
"../node_modules/typeorm/index.d.ts"
|
|
8933
8941
|
],
|
|
8942
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts": [
|
|
8943
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8944
|
+
],
|
|
8934
8945
|
"../src/migrations/index.ts": [
|
|
8935
8946
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8936
8947
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9746,6 +9757,7 @@
|
|
|
9746
9757
|
"../src/migrations/1687877967732-migration-pre-develop.ts",
|
|
9747
9758
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts",
|
|
9748
9759
|
"../src/migrations/1687981491374-add-info-to-auth.ts",
|
|
9760
|
+
"../src/migrations/1687993176652-add-info-to-auth-2.ts",
|
|
9749
9761
|
"../src/migrations/execute/index.ts",
|
|
9750
9762
|
"../src/migrations/index.ts",
|
|
9751
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",
|
|
@@ -52,6 +52,9 @@ export default class AuthInfo extends AuditedModel {
|
|
|
52
52
|
@Column('varchar', { nullable: true })
|
|
53
53
|
oauthTwoClientEndpoint: string;
|
|
54
54
|
|
|
55
|
+
@Column('varchar', { nullable: true })
|
|
56
|
+
oauthTwoClientAudience: string;
|
|
57
|
+
|
|
55
58
|
@OneToMany(
|
|
56
59
|
() => UserTemplateEcommerce,
|
|
57
60
|
(userTemplateEcommerce: UserTemplateEcommerce) => userTemplateEcommerce.authInfo,
|
|
@@ -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
|
+
}
|