@things-factory/shell 4.0.0-alpha.6 → 4.0.0-beta.0
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/bin/things-factory-dev +5 -11
- package/client/elements/oops-progress.js +15 -7
- package/client/graphql-client.js +23 -17
- package/client/index.js +2 -2
- package/client/{notification-store.js → indexdb.js} +49 -40
- package/client/serviceworker/sw-src.js +3 -3
- package/client/themes/oops-theme.css +9 -9
- package/config/config.development.js +12 -1
- package/dist-server/graphql-local-client.js +1 -1
- package/dist-server/graphql-local-client.js.map +1 -1
- package/dist-server/index.js +1 -1
- package/dist-server/initializers/database.js +3 -2
- package/dist-server/initializers/database.js.map +1 -1
- package/dist-server/initializers/naming-strategy.js +1 -1
- package/dist-server/initializers/naming-strategy.js.map +1 -1
- package/dist-server/middlewares/domain-middleware.js +1 -1
- package/dist-server/middlewares/domain-middleware.js.map +1 -1
- package/dist-server/middlewares/index.js +2 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/1000000000000-SeedDomain.js +2 -2
- package/dist-server/migrations/1000000000000-SeedDomain.js.map +1 -1
- package/dist-server/pubsub-log-transport.js +1 -1
- package/dist-server/pubsub-log-transport.js.map +1 -1
- package/dist-server/pubsub.js +15 -13
- package/dist-server/pubsub.js.map +1 -1
- package/dist-server/routers/index.js +1 -1
- package/dist-server/schema.js +10 -10
- package/dist-server/schema.js.map +1 -1
- package/dist-server/server-dev.js +71 -52
- package/dist-server/server-dev.js.map +1 -1
- package/dist-server/server.js +62 -47
- package/dist-server/server.js.map +1 -1
- package/dist-server/service/common-types/index.js +1 -1
- package/dist-server/service/common-types/list-param.js +15 -15
- package/dist-server/service/common-types/list-param.js.map +1 -1
- package/dist-server/service/common-types/log.js +5 -5
- package/dist-server/service/common-types/log.js.map +1 -1
- package/dist-server/service/common-types/object-ref.js +4 -4
- package/dist-server/service/common-types/object-ref.js.map +1 -1
- package/dist-server/service/common-types/scalar-any.js +27 -13
- package/dist-server/service/common-types/scalar-any.js.map +1 -1
- package/dist-server/service/directive-transaction/index.js +1 -1
- package/dist-server/service/directive-transaction/transaction.js +5 -4
- package/dist-server/service/directive-transaction/transaction.js.map +1 -1
- package/dist-server/service/domain/domain-resolver.js +43 -41
- package/dist-server/service/domain/domain-resolver.js.map +1 -1
- package/dist-server/service/domain/domain-types.js +17 -17
- package/dist-server/service/domain/domain-types.js.map +1 -1
- package/dist-server/service/domain/domain.js +31 -31
- package/dist-server/service/domain/domain.js.map +1 -1
- package/dist-server/service/index.js +9 -6
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/subscription-data/data-resolver.js +5 -4
- package/dist-server/service/subscription-data/data-resolver.js.map +1 -1
- package/dist-server/service/subscription-data/data-types.js +4 -4
- package/dist-server/service/subscription-data/data-types.js.map +1 -1
- package/dist-server/utils/condition-builder.js +25 -26
- package/dist-server/utils/condition-builder.js.map +1 -1
- package/dist-server/utils/get-domain.js +3 -3
- package/dist-server/utils/get-domain.js.map +1 -1
- package/dist-server/utils/index.js +1 -1
- package/dist-server/utils/list-params-converter.js +21 -21
- package/dist-server/utils/list-params-converter.js.map +1 -1
- package/dist-server/utils/list-query-builder.js +4 -3
- package/dist-server/utils/list-query-builder.js.map +1 -1
- package/helps/about/components.md +3 -0
- package/helps/about/{common → framework}/redirection.md +0 -0
- package/helps/about/framework/typegraphql.md +74 -0
- package/helps/about/framework.md +10 -0
- package/helps/about/modules.md +3 -1
- package/helps/about/things-factory.en.md +3 -0
- package/helps/about/things-factory.ko.md +4 -0
- package/helps/components/oops-progress.md +73 -0
- package/package.json +25 -29
- package/server/pubsub.ts +16 -15
- package/server/schema.ts +5 -5
- package/server/server-dev.ts +55 -36
- package/server/server.ts +47 -31
- package/server/service/common-types/list-param.ts +1 -1
- package/server/service/common-types/scalar-any.ts +29 -13
- package/server/service/domain/domain-resolver.ts +8 -6
- package/server/service/index.ts +14 -5
- package/server/utils/condition-builder.ts +23 -25
- package/server/utils/list-query-builder.ts +1 -1
- package/db.test.sqlite +0 -0
@@ -15,23 +15,23 @@ const scalar_object_1 = require("./scalar-object");
|
|
15
15
|
let Log = class Log {
|
16
16
|
};
|
17
17
|
__decorate([
|
18
|
-
type_graphql_1.Field(() => scalar_object_1.ScalarObject, { description: 'the source of the log' }),
|
18
|
+
(0, type_graphql_1.Field)(() => scalar_object_1.ScalarObject, { description: 'the source of the log' }),
|
19
19
|
__metadata("design:type", Object)
|
20
20
|
], Log.prototype, "source", void 0);
|
21
21
|
__decorate([
|
22
|
-
type_graphql_1.Field({ description: 'log level (error, warning, info, ..)' }),
|
22
|
+
(0, type_graphql_1.Field)({ description: 'log level (error, warning, info, ..)' }),
|
23
23
|
__metadata("design:type", String)
|
24
24
|
], Log.prototype, "level", void 0);
|
25
25
|
__decorate([
|
26
|
-
type_graphql_1.Field({ description: 'log body message' }),
|
26
|
+
(0, type_graphql_1.Field)({ description: 'log body message' }),
|
27
27
|
__metadata("design:type", String)
|
28
28
|
], Log.prototype, "message", void 0);
|
29
29
|
__decorate([
|
30
|
-
type_graphql_1.Field({ description: 'timestamp the log occurred' }),
|
30
|
+
(0, type_graphql_1.Field)({ description: 'timestamp the log occurred' }),
|
31
31
|
__metadata("design:type", String)
|
32
32
|
], Log.prototype, "timestamp", void 0);
|
33
33
|
Log = __decorate([
|
34
|
-
type_graphql_1.ObjectType()
|
34
|
+
(0, type_graphql_1.ObjectType)()
|
35
35
|
], Log);
|
36
36
|
exports.Log = Log;
|
37
37
|
//# sourceMappingURL=log.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../server/service/common-types/log.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgD;AAChD,mDAA8C;AAG9C,IAAa,GAAG,GAAhB,MAAa,GAAG;CAYf,CAAA;AAVC;IADC,oBAAK,
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../server/service/common-types/log.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgD;AAChD,mDAA8C;AAG9C,IAAa,GAAG,GAAhB,MAAa,GAAG;CAYf,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,4BAAY,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;mCACtD;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;kCAClD;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;;oCAC5B;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;sCACpC;AAXN,GAAG;IADf,IAAA,yBAAU,GAAE;GACA,GAAG,CAYf;AAZY,kBAAG"}
|
@@ -14,19 +14,19 @@ const type_graphql_1 = require("type-graphql");
|
|
14
14
|
let ObjectRef = class ObjectRef {
|
15
15
|
};
|
16
16
|
__decorate([
|
17
|
-
type_graphql_1.Field(() => type_graphql_1.ID, { description: 'Field id' }),
|
17
|
+
(0, type_graphql_1.Field)(() => type_graphql_1.ID, { description: 'Field id' }),
|
18
18
|
__metadata("design:type", String)
|
19
19
|
], ObjectRef.prototype, "id", void 0);
|
20
20
|
__decorate([
|
21
|
-
type_graphql_1.Field({ nullable: true, description: 'Field name' }),
|
21
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Field name' }),
|
22
22
|
__metadata("design:type", String)
|
23
23
|
], ObjectRef.prototype, "name", void 0);
|
24
24
|
__decorate([
|
25
|
-
type_graphql_1.Field({ nullable: true, description: 'Field description' }),
|
25
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Field description' }),
|
26
26
|
__metadata("design:type", String)
|
27
27
|
], ObjectRef.prototype, "description", void 0);
|
28
28
|
ObjectRef = __decorate([
|
29
|
-
type_graphql_1.InputType()
|
29
|
+
(0, type_graphql_1.InputType)()
|
30
30
|
], ObjectRef);
|
31
31
|
exports.ObjectRef = ObjectRef;
|
32
32
|
//# sourceMappingURL=object-ref.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"object-ref.js","sourceRoot":"","sources":["../../../server/service/common-types/object-ref.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAmD;AAGnD,IAAa,SAAS,GAAtB,MAAa,SAAS;CASrB,CAAA;AAPC;IADC,oBAAK,
|
1
|
+
{"version":3,"file":"object-ref.js","sourceRoot":"","sources":["../../../server/service/common-types/object-ref.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAmD;AAGnD,IAAa,SAAS,GAAtB,MAAa,SAAS;CASrB,CAAA;AAPC;IADC,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;;qCACnC;AAGV;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;;uCACxC;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;8CACxC;AART,SAAS;IADrB,IAAA,wBAAS,GAAE;GACC,SAAS,CASrB;AATY,8BAAS"}
|
@@ -2,9 +2,34 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.ScalarAny = void 0;
|
4
4
|
const graphql_1 = require("graphql");
|
5
|
+
function parseObject(ast) {
|
6
|
+
const value = Object.create(null);
|
7
|
+
ast.fields.forEach(field => {
|
8
|
+
value[field.name.value] = parseAst(field.value);
|
9
|
+
});
|
10
|
+
return value;
|
11
|
+
}
|
12
|
+
function parseAst(ast) {
|
13
|
+
switch (ast.kind) {
|
14
|
+
case graphql_1.Kind.INT:
|
15
|
+
return parseInt(ast.value);
|
16
|
+
case graphql_1.Kind.FLOAT:
|
17
|
+
return parseFloat(ast.value);
|
18
|
+
case graphql_1.Kind.BOOLEAN:
|
19
|
+
return ast.value;
|
20
|
+
case graphql_1.Kind.STRING:
|
21
|
+
return ast.value;
|
22
|
+
case graphql_1.Kind.LIST:
|
23
|
+
return ast.values.map(parseAst);
|
24
|
+
case graphql_1.Kind.OBJECT:
|
25
|
+
return parseObject(ast);
|
26
|
+
default:
|
27
|
+
return null;
|
28
|
+
}
|
29
|
+
}
|
5
30
|
exports.ScalarAny = new graphql_1.GraphQLScalarType({
|
6
31
|
name: 'Any',
|
7
|
-
description: 'Any Scalar type (String, Boolean, Int, Float)',
|
32
|
+
description: 'Any Scalar type (String, Boolean, Int, Float, Object, List)',
|
8
33
|
serialize(value) {
|
9
34
|
// Implement your own behavior here by setting the 'result' variable
|
10
35
|
return value;
|
@@ -14,18 +39,7 @@ exports.ScalarAny = new graphql_1.GraphQLScalarType({
|
|
14
39
|
return value;
|
15
40
|
},
|
16
41
|
parseLiteral(ast) {
|
17
|
-
|
18
|
-
case graphql_1.Kind.INT:
|
19
|
-
return parseInt(ast.value);
|
20
|
-
case graphql_1.Kind.FLOAT:
|
21
|
-
return parseFloat(ast.value);
|
22
|
-
case graphql_1.Kind.BOOLEAN:
|
23
|
-
return ast.value;
|
24
|
-
case graphql_1.Kind.STRING:
|
25
|
-
return ast.value;
|
26
|
-
case graphql_1.Kind.LIST:
|
27
|
-
return ast.values.map((v) => v.value);
|
28
|
-
}
|
42
|
+
return parseAst(ast);
|
29
43
|
}
|
30
44
|
});
|
31
45
|
//# sourceMappingURL=scalar-any.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scalar-any.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-any.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;
|
1
|
+
{"version":3,"file":"scalar-any.js","sourceRoot":"","sources":["../../../server/service/common-types/scalar-any.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AAEjD,SAAS,WAAW,CAAC,GAAG;IACtB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CA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
}));
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
-
for (var p in m) if (p !== "default" && !
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
11
|
};
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
13
|
__exportStar(require("./transaction"), exports);
|
@@ -7,18 +7,18 @@ const typeorm_1 = require("typeorm");
|
|
7
7
|
const utils_1 = require("@graphql-tools/utils");
|
8
8
|
const debug = require('debug')('things-factory:shell:directive-transaction');
|
9
9
|
const DIRECTIVE = 'transaction';
|
10
|
-
exports.transactionDirectiveTypeDefs = graphql_tag_1.gql `
|
10
|
+
exports.transactionDirectiveTypeDefs = (0, graphql_tag_1.gql) `
|
11
11
|
directive @${DIRECTIVE} on FIELD_DEFINITION
|
12
12
|
`;
|
13
|
-
|
13
|
+
const transactionDirectiveResolver = (schema) => (0, utils_1.mapSchema)(schema, {
|
14
14
|
[utils_1.MapperKind.OBJECT_FIELD]: (fieldConfig, fieldName) => {
|
15
15
|
var _a;
|
16
|
-
const transactionDirective = (_a = utils_1.getDirective(schema, fieldConfig, DIRECTIVE)) === null || _a === void 0 ? void 0 : _a[0];
|
16
|
+
const transactionDirective = (_a = (0, utils_1.getDirective)(schema, fieldConfig, DIRECTIVE)) === null || _a === void 0 ? void 0 : _a[0];
|
17
17
|
if (transactionDirective) {
|
18
18
|
const { resolve = graphql_1.defaultFieldResolver } = fieldConfig;
|
19
19
|
fieldConfig.resolve = async function (source, args, context, info) {
|
20
20
|
debug('@transaction-begin : ', fieldName);
|
21
|
-
return await typeorm_1.getConnection().transaction(async (tx) => {
|
21
|
+
return await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
22
22
|
/* local-graphql-client로부터 invoke인 경우에는 context.req, context.res 가 없으므로, 빈 오브젝트로 대체해준다. */
|
23
23
|
let wrap = context.app.createContext(context.req || {}, context.res || {});
|
24
24
|
wrap.state = Object.assign(Object.assign({}, context.state), { tx });
|
@@ -31,4 +31,5 @@ exports.transactionDirectiveResolver = (schema) => utils_1.mapSchema(schema, {
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
});
|
34
|
+
exports.transactionDirectiveResolver = transactionDirectiveResolver;
|
34
35
|
//# sourceMappingURL=transaction.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../server/service/directive-transaction/transaction.ts"],"names":[],"mappings":";;;AAAA,qCAA6D;AAC7D,6CAAiC;AACjC,qCAAuC;AACvC,gDAA0E;AAE1E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,4CAA4C,CAAC,CAAA;AAE5E,MAAM,SAAS,GAAG,aAAa,CAAA;AAElB,QAAA,4BAA4B,GAAG,iBAAG,
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../server/service/directive-transaction/transaction.ts"],"names":[],"mappings":";;;AAAA,qCAA6D;AAC7D,6CAAiC;AACjC,qCAAuC;AACvC,gDAA0E;AAE1E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,4CAA4C,CAAC,CAAA;AAE5E,MAAM,SAAS,GAAG,aAAa,CAAA;AAElB,QAAA,4BAA4B,GAAG,IAAA,iBAAG,EAAA;iBAC9B,SAAS;GACvB,CAAA;AACI,MAAM,4BAA4B,GAAG,CAAC,MAAqB,EAAE,EAAE,CACpE,IAAA,iBAAS,EAAC,MAAM,EAAE;IAChB,CAAC,kBAAU,CAAC,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE;;QACpD,MAAM,oBAAoB,GAAG,MAAA,IAAA,oBAAY,EAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,0CAAG,CAAC,CAAC,CAAA;QAC9E,IAAI,oBAAoB,EAAE;YACxB,MAAM,EAAE,OAAO,GAAG,8BAAoB,EAAE,GAAG,WAAW,CAAA;YAEtD,WAAW,CAAC,OAAO,GAAG,KAAK,WAAW,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI;gBAC/D,KAAK,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAA;gBAEzC,OAAO,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAC,EAAE,EAAC,EAAE;oBAClD,0FAA0F;oBAC1F,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,CAAA;oBAE1E,IAAI,CAAC,KAAK,mCACL,OAAO,CAAC,KAAK,KAChB,EAAE,GACH,CAAA;oBAED,IAAI,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;oBAE/D,KAAK,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAA;oBAEvC,OAAO,MAAM,CAAA;gBACf,CAAC,CAAC,CAAA;YACJ,CAAC,CAAA;YAED,OAAO,WAAW,CAAA;SACnB;IACH,CAAC;CACF,CAAC,CAAA;AA9BS,QAAA,4BAA4B,gCA8BrC"}
|
@@ -15,25 +15,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.DomainResolver = void 0;
|
16
16
|
const type_graphql_1 = require("type-graphql");
|
17
17
|
const typeorm_1 = require("typeorm");
|
18
|
-
const list_param_1 = require("../common-types/list-param");
|
19
18
|
const utils_1 = require("@things-factory/utils");
|
19
|
+
const list_query_builder_1 = require("../../utils/list-query-builder");
|
20
|
+
const list_param_1 = require("../common-types/list-param");
|
20
21
|
const domain_1 = require("./domain");
|
21
22
|
const domain_types_1 = require("./domain-types");
|
22
|
-
const list_query_builder_1 = require("../../utils/list-query-builder");
|
23
23
|
let DomainResolver = class DomainResolver {
|
24
|
-
async domain(
|
25
|
-
const repository = typeorm_1.getRepository(domain_1.Domain);
|
26
|
-
return await repository.findOne({
|
24
|
+
async domain(id) {
|
25
|
+
const repository = (0, typeorm_1.getRepository)(domain_1.Domain);
|
26
|
+
return await repository.findOne({ id });
|
27
27
|
}
|
28
28
|
async domains(params, context) {
|
29
|
-
const queryBuilder = typeorm_1.getRepository(domain_1.Domain).createQueryBuilder();
|
30
|
-
list_query_builder_1.buildQuery(queryBuilder, params || {}, context, false);
|
29
|
+
const queryBuilder = (0, typeorm_1.getRepository)(domain_1.Domain).createQueryBuilder();
|
30
|
+
(0, list_query_builder_1.buildQuery)(queryBuilder, params || {}, context, false);
|
31
31
|
const [items, total] = await queryBuilder.getManyAndCount();
|
32
32
|
return { items, total };
|
33
33
|
}
|
34
34
|
async checkExistsDomain(name) {
|
35
|
-
const domainRepository = typeorm_1.getRepository(domain_1.Domain);
|
36
|
-
const targetSubdomain = utils_1.slugger(name);
|
35
|
+
const domainRepository = (0, typeorm_1.getRepository)(domain_1.Domain);
|
36
|
+
const targetSubdomain = (0, utils_1.slugger)(name);
|
37
37
|
const oldDomain = await domainRepository.findOne({ subdomain: targetSubdomain });
|
38
38
|
if (oldDomain) {
|
39
39
|
throw new Error('domain is duplicated');
|
@@ -42,8 +42,8 @@ let DomainResolver = class DomainResolver {
|
|
42
42
|
}
|
43
43
|
async createDomain(domainInput) {
|
44
44
|
const { name, description } = domainInput;
|
45
|
-
const domainRepo = typeorm_1.getRepository(domain_1.Domain);
|
46
|
-
const subdomain = utils_1.slugger(name);
|
45
|
+
const domainRepo = (0, typeorm_1.getRepository)(domain_1.Domain);
|
46
|
+
const subdomain = (0, utils_1.slugger)(name);
|
47
47
|
const domain = await domainRepo.findOne({ subdomain });
|
48
48
|
if (domain) {
|
49
49
|
throw new Error('domain is duplicated');
|
@@ -51,26 +51,26 @@ let DomainResolver = class DomainResolver {
|
|
51
51
|
return await domainRepo.save({ name, description, subdomain });
|
52
52
|
}
|
53
53
|
async deleteDomain(name) {
|
54
|
-
return await typeorm_1.getRepository(domain_1.Domain).delete({ name });
|
54
|
+
return await (0, typeorm_1.getRepository)(domain_1.Domain).delete({ name });
|
55
55
|
}
|
56
56
|
async deleteDomains(names) {
|
57
|
-
const domains = await typeorm_1.getRepository(domain_1.Domain).find({ where: { name: typeorm_1.In(names) } });
|
57
|
+
const domains = await (0, typeorm_1.getRepository)(domain_1.Domain).find({ where: { name: (0, typeorm_1.In)(names) } });
|
58
58
|
const domainIds = domains.map(domain => domain.id);
|
59
|
-
await typeorm_1.getRepository(domain_1.Domain).delete({ id: typeorm_1.In(domainIds) });
|
59
|
+
await (0, typeorm_1.getRepository)(domain_1.Domain).delete({ id: (0, typeorm_1.In)(domainIds) });
|
60
60
|
}
|
61
61
|
async updateDomain(name, patch) {
|
62
|
-
const repository = typeorm_1.getRepository(domain_1.Domain);
|
62
|
+
const repository = (0, typeorm_1.getRepository)(domain_1.Domain);
|
63
63
|
const domain = await repository.findOne({ name });
|
64
64
|
return await repository.save(Object.assign(Object.assign({}, domain), patch));
|
65
65
|
}
|
66
66
|
async updateDomains(patches) {
|
67
|
-
const domainRepo = typeorm_1.getRepository(domain_1.Domain);
|
67
|
+
const domainRepo = (0, typeorm_1.getRepository)(domain_1.Domain);
|
68
68
|
const patchIds = patches.filter((patch) => patch.id);
|
69
69
|
if (patchIds.length > 0) {
|
70
70
|
patchIds.forEach(async (updateRecord) => {
|
71
71
|
const domain = await domainRepo.findOne({ where: { id: updateRecord.id } });
|
72
72
|
if (updateRecord.name) {
|
73
|
-
updateRecord.subdomain = utils_1.slugger(updateRecord.name);
|
73
|
+
updateRecord.subdomain = (0, utils_1.slugger)(updateRecord.name);
|
74
74
|
}
|
75
75
|
await domainRepo.save(Object.assign(Object.assign({}, domain), updateRecord));
|
76
76
|
});
|
@@ -79,70 +79,72 @@ let DomainResolver = class DomainResolver {
|
|
79
79
|
}
|
80
80
|
};
|
81
81
|
__decorate([
|
82
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true, superUserGranted: true)'),
|
83
|
-
type_graphql_1.Query(returns => domain_1.Domain, { description: 'To fetch domain' }),
|
84
|
-
__param(0, type_graphql_1.Arg('
|
82
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true, superUserGranted: true)'),
|
83
|
+
(0, type_graphql_1.Query)(returns => domain_1.Domain, { description: 'To fetch domain' }),
|
84
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
85
85
|
__metadata("design:type", Function),
|
86
86
|
__metadata("design:paramtypes", [String]),
|
87
87
|
__metadata("design:returntype", Promise)
|
88
88
|
], DomainResolver.prototype, "domain", null);
|
89
89
|
__decorate([
|
90
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "query", superUserGranted: true)'),
|
91
|
-
type_graphql_1.Query(returns => domain_types_1.DomainList, { description: 'To fetch multiple domain' }),
|
92
|
-
__param(0,
|
90
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "query", superUserGranted: true)'),
|
91
|
+
(0, type_graphql_1.Query)(returns => domain_types_1.DomainList, { description: 'To fetch multiple domain' }),
|
92
|
+
__param(0, (0, type_graphql_1.Args)()),
|
93
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
93
94
|
__metadata("design:type", Function),
|
94
95
|
__metadata("design:paramtypes", [list_param_1.ListParam, Object]),
|
95
96
|
__metadata("design:returntype", Promise)
|
96
97
|
], DomainResolver.prototype, "domains", null);
|
97
98
|
__decorate([
|
98
|
-
type_graphql_1.Query(returns => Boolean, { description: 'To check if given domain is exist' }),
|
99
|
-
__param(0, type_graphql_1.Arg('name')),
|
99
|
+
(0, type_graphql_1.Query)(returns => Boolean, { description: 'To check if given domain is exist' }),
|
100
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
100
101
|
__metadata("design:type", Function),
|
101
102
|
__metadata("design:paramtypes", [String]),
|
102
103
|
__metadata("design:returntype", Promise)
|
103
104
|
], DomainResolver.prototype, "checkExistsDomain", null);
|
104
105
|
__decorate([
|
105
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
106
|
-
type_graphql_1.Mutation(returns => domain_1.Domain, { description: 'To create domain' }),
|
107
|
-
__param(0, type_graphql_1.Arg('domainInput')),
|
106
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
107
|
+
(0, type_graphql_1.Mutation)(returns => domain_1.Domain, { description: 'To create domain' }),
|
108
|
+
__param(0, (0, type_graphql_1.Arg)('domainInput')),
|
108
109
|
__metadata("design:type", Function),
|
109
110
|
__metadata("design:paramtypes", [domain_types_1.DomainPatch]),
|
110
111
|
__metadata("design:returntype", Promise)
|
111
112
|
], DomainResolver.prototype, "createDomain", null);
|
112
113
|
__decorate([
|
113
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
114
|
-
type_graphql_1.Mutation(returns => domain_1.Domain, { description: 'To delete domain' }),
|
115
|
-
__param(0, type_graphql_1.Arg('name')),
|
114
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
115
|
+
(0, type_graphql_1.Mutation)(returns => domain_1.Domain, { description: 'To delete domain' }),
|
116
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
116
117
|
__metadata("design:type", Function),
|
117
118
|
__metadata("design:paramtypes", [String]),
|
118
119
|
__metadata("design:returntype", Promise)
|
119
120
|
], DomainResolver.prototype, "deleteDomain", null);
|
120
121
|
__decorate([
|
121
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
122
|
-
type_graphql_1.Mutation(returns => Boolean, { description: 'To delete multiple domains' }),
|
123
|
-
__param(0, type_graphql_1.Arg('names', () => [String])),
|
122
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
123
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple domains' }),
|
124
|
+
__param(0, (0, type_graphql_1.Arg)('names', () => [String])),
|
124
125
|
__metadata("design:type", Function),
|
125
126
|
__metadata("design:paramtypes", [Array]),
|
126
127
|
__metadata("design:returntype", Promise)
|
127
128
|
], DomainResolver.prototype, "deleteDomains", null);
|
128
129
|
__decorate([
|
129
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true, superUserGranted: true)'),
|
130
|
-
type_graphql_1.Mutation(returns => domain_1.Domain, { description: 'To update domain' }),
|
131
|
-
__param(0,
|
130
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", domainOwnerGranted: true, superUserGranted: true)'),
|
131
|
+
(0, type_graphql_1.Mutation)(returns => domain_1.Domain, { description: 'To update domain' }),
|
132
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
133
|
+
__param(1, (0, type_graphql_1.Arg)('patch', () => domain_types_1.DomainPatch)),
|
132
134
|
__metadata("design:type", Function),
|
133
135
|
__metadata("design:paramtypes", [String, domain_types_1.DomainPatch]),
|
134
136
|
__metadata("design:returntype", Promise)
|
135
137
|
], DomainResolver.prototype, "updateDomain", null);
|
136
138
|
__decorate([
|
137
|
-
type_graphql_1.Directive('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
138
|
-
type_graphql_1.Mutation(returns => Boolean, { description: 'To update multiple domains' }),
|
139
|
-
__param(0, type_graphql_1.Arg('patches', () => [domain_types_1.DomainPatch])),
|
139
|
+
(0, type_graphql_1.Directive)('@privilege(category: "system", privilege: "mutation", superUserGranted: true)'),
|
140
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To update multiple domains' }),
|
141
|
+
__param(0, (0, type_graphql_1.Arg)('patches', () => [domain_types_1.DomainPatch])),
|
140
142
|
__metadata("design:type", Function),
|
141
143
|
__metadata("design:paramtypes", [Array]),
|
142
144
|
__metadata("design:returntype", Promise)
|
143
145
|
], DomainResolver.prototype, "updateDomains", null);
|
144
146
|
DomainResolver = __decorate([
|
145
|
-
type_graphql_1.Resolver(domain_1.Domain)
|
147
|
+
(0, type_graphql_1.Resolver)(domain_1.Domain)
|
146
148
|
], DomainResolver);
|
147
149
|
exports.DomainResolver = DomainResolver;
|
148
150
|
//# sourceMappingURL=domain-resolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-resolver.js","sourceRoot":"","sources":["../../../server/service/domain/domain-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuD;
|
1
|
+
{"version":3,"file":"domain-resolver.js","sourceRoot":"","sources":["../../../server/service/domain/domain-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuD;AAEvD,iDAA+C;AAE/C,uEAA2D;AAC3D,2DAAsD;AACtD,qCAAiC;AACjC,iDAAwD;AAGxD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAGzB,KAAK,CAAC,MAAM,CAAY,EAAU;QAChC,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,eAAM,CAAC,CAAA;QAExC,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACzC,CAAC;IAID,KAAK,CAAC,OAAO,CAAS,MAAiB,EAAS,OAAO;QACrD,MAAM,YAAY,GAAG,IAAA,uBAAa,EAAC,eAAM,CAAC,CAAC,kBAAkB,EAAE,CAAA;QAC/D,IAAA,+BAAU,EAAC,YAAY,EAAE,MAAM,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;QACtD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,iBAAiB,CAAc,IAAY;QAC/C,MAAM,gBAAgB,GAAuB,IAAA,uBAAa,EAAC,eAAM,CAAC,CAAA;QAClE,MAAM,eAAe,GA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S,EAAC,yGAAyG,CAAC;IACpH,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,eAAM,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC7C,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAA;;6CAAQ,0BAAW;;kDAQhG;AAID;IAFC,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACvD,WAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC,CAAA;;;;mDAqBvD;AAjGU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,eAAM,CAAC;GACJ,cAAc,CAkG1B;AAlGY,wCAAc"}
|
@@ -15,75 +15,75 @@ const domain_1 = require("./domain");
|
|
15
15
|
let DomainInput = class DomainInput {
|
16
16
|
};
|
17
17
|
__decorate([
|
18
|
-
type_graphql_1.Field(),
|
18
|
+
(0, type_graphql_1.Field)(),
|
19
19
|
__metadata("design:type", String)
|
20
20
|
], DomainInput.prototype, "name", void 0);
|
21
21
|
__decorate([
|
22
|
-
type_graphql_1.Field({ nullable: true }),
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
23
23
|
__metadata("design:type", String)
|
24
24
|
], DomainInput.prototype, "description", void 0);
|
25
25
|
DomainInput = __decorate([
|
26
|
-
type_graphql_1.InputType()
|
26
|
+
(0, type_graphql_1.InputType)()
|
27
27
|
], DomainInput);
|
28
28
|
exports.DomainInput = DomainInput;
|
29
29
|
let DomainPatch = class DomainPatch {
|
30
30
|
};
|
31
31
|
__decorate([
|
32
|
-
type_graphql_1.Field({ nullable: true }),
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
33
33
|
__metadata("design:type", String)
|
34
34
|
], DomainPatch.prototype, "id", void 0);
|
35
35
|
__decorate([
|
36
|
-
type_graphql_1.Field({ nullable: true }),
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
37
37
|
__metadata("design:type", String)
|
38
38
|
], DomainPatch.prototype, "name", void 0);
|
39
39
|
__decorate([
|
40
|
-
type_graphql_1.Field({ nullable: true }),
|
40
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
41
41
|
__metadata("design:type", String)
|
42
42
|
], DomainPatch.prototype, "description", void 0);
|
43
43
|
__decorate([
|
44
|
-
type_graphql_1.Field({ nullable: true }),
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
45
45
|
__metadata("design:type", String)
|
46
46
|
], DomainPatch.prototype, "timezone", void 0);
|
47
47
|
__decorate([
|
48
|
-
type_graphql_1.Field({ nullable: true }),
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
49
49
|
__metadata("design:type", Boolean)
|
50
50
|
], DomainPatch.prototype, "systemFlag", void 0);
|
51
51
|
__decorate([
|
52
|
-
type_graphql_1.Field({ nullable: true }),
|
52
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
53
53
|
__metadata("design:type", String)
|
54
54
|
], DomainPatch.prototype, "subdomain", void 0);
|
55
55
|
__decorate([
|
56
|
-
type_graphql_1.Field({ nullable: true }),
|
56
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
57
57
|
__metadata("design:type", String)
|
58
58
|
], DomainPatch.prototype, "brandName", void 0);
|
59
59
|
__decorate([
|
60
|
-
type_graphql_1.Field({ nullable: true }),
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
61
61
|
__metadata("design:type", String)
|
62
62
|
], DomainPatch.prototype, "brandImage", void 0);
|
63
63
|
__decorate([
|
64
|
-
type_graphql_1.Field({ nullable: true }),
|
64
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
65
65
|
__metadata("design:type", String)
|
66
66
|
], DomainPatch.prototype, "contentImage", void 0);
|
67
67
|
__decorate([
|
68
|
-
type_graphql_1.Field({ nullable: true }),
|
68
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
69
69
|
__metadata("design:type", String)
|
70
70
|
], DomainPatch.prototype, "theme", void 0);
|
71
71
|
DomainPatch = __decorate([
|
72
|
-
type_graphql_1.InputType()
|
72
|
+
(0, type_graphql_1.InputType)()
|
73
73
|
], DomainPatch);
|
74
74
|
exports.DomainPatch = DomainPatch;
|
75
75
|
let DomainList = class DomainList {
|
76
76
|
};
|
77
77
|
__decorate([
|
78
|
-
type_graphql_1.Field(type => [domain_1.Domain], { nullable: true }),
|
78
|
+
(0, type_graphql_1.Field)(type => [domain_1.Domain], { nullable: true }),
|
79
79
|
__metadata("design:type", Array)
|
80
80
|
], DomainList.prototype, "items", void 0);
|
81
81
|
__decorate([
|
82
|
-
type_graphql_1.Field(type => type_graphql_1.Int, { nullable: true }),
|
82
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
83
83
|
__metadata("design:type", Number)
|
84
84
|
], DomainList.prototype, "total", void 0);
|
85
85
|
DomainList = __decorate([
|
86
|
-
type_graphql_1.ObjectType()
|
86
|
+
(0, type_graphql_1.ObjectType)()
|
87
87
|
], DomainList);
|
88
88
|
exports.DomainList = DomainList;
|
89
89
|
//# sourceMappingURL=domain-types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgE;AAChE,qCAAiC;AAGjC,IAAa,WAAW,GAAxB,MAAa,WAAW;CAMvB,CAAA;AAJC;IADC,oBAAK,
|
1
|
+
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgE;AAChE,qCAAiC;AAGjC,IAAa,WAAW,GAAxB,MAAa,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Q,EAAE,IAAI,EAAE,CAAC;;yCAC7B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;AALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB;AANY,gCAAU"}
|
@@ -15,99 +15,99 @@ const type_graphql_1 = require("type-graphql");
|
|
15
15
|
let Domain = class Domain {
|
16
16
|
};
|
17
17
|
__decorate([
|
18
|
-
type_graphql_1.Field(type => type_graphql_1.ID),
|
19
|
-
typeorm_1.PrimaryGeneratedColumn('uuid'),
|
18
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
20
20
|
__metadata("design:type", String)
|
21
21
|
], Domain.prototype, "id", void 0);
|
22
22
|
__decorate([
|
23
|
-
type_graphql_1.Field(),
|
24
|
-
typeorm_1.Column({
|
23
|
+
(0, type_graphql_1.Field)(),
|
24
|
+
(0, typeorm_1.Column)({
|
25
25
|
unique: true
|
26
26
|
}),
|
27
27
|
__metadata("design:type", String)
|
28
28
|
], Domain.prototype, "name", void 0);
|
29
29
|
__decorate([
|
30
|
-
type_graphql_1.Field({ nullable: true }),
|
31
|
-
typeorm_1.Column({
|
30
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
31
|
+
(0, typeorm_1.Column)({
|
32
32
|
nullable: true
|
33
33
|
}),
|
34
34
|
__metadata("design:type", String)
|
35
35
|
], Domain.prototype, "description", void 0);
|
36
36
|
__decorate([
|
37
|
-
type_graphql_1.Field({ nullable: true }),
|
38
|
-
typeorm_1.Column({
|
37
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
38
|
+
(0, typeorm_1.Column)({
|
39
39
|
nullable: true
|
40
40
|
}),
|
41
41
|
__metadata("design:type", String)
|
42
42
|
], Domain.prototype, "extType", void 0);
|
43
43
|
__decorate([
|
44
|
-
type_graphql_1.Field({ nullable: true }),
|
45
|
-
typeorm_1.Column({
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
45
|
+
(0, typeorm_1.Column)({
|
46
46
|
nullable: true
|
47
47
|
}),
|
48
48
|
__metadata("design:type", String)
|
49
49
|
], Domain.prototype, "timezone", void 0);
|
50
50
|
__decorate([
|
51
|
-
type_graphql_1.Field({ nullable: true }),
|
52
|
-
typeorm_1.Column({
|
51
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
52
|
+
(0, typeorm_1.Column)({
|
53
53
|
default: false
|
54
54
|
}),
|
55
55
|
__metadata("design:type", Boolean)
|
56
56
|
], Domain.prototype, "systemFlag", void 0);
|
57
57
|
__decorate([
|
58
|
-
type_graphql_1.Field({ nullable: true }),
|
59
|
-
typeorm_1.Column({
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
59
|
+
(0, typeorm_1.Column)({
|
60
60
|
nullable: true
|
61
61
|
}),
|
62
62
|
__metadata("design:type", String)
|
63
63
|
], Domain.prototype, "subdomain", void 0);
|
64
64
|
__decorate([
|
65
|
-
type_graphql_1.Field({ nullable: true }),
|
66
|
-
typeorm_1.Column({
|
65
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
66
|
+
(0, typeorm_1.Column)({
|
67
67
|
nullable: true
|
68
68
|
}),
|
69
69
|
__metadata("design:type", String)
|
70
70
|
], Domain.prototype, "brandName", void 0);
|
71
71
|
__decorate([
|
72
|
-
type_graphql_1.Field({ nullable: true }),
|
73
|
-
typeorm_1.Column({
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
73
|
+
(0, typeorm_1.Column)({
|
74
74
|
nullable: true
|
75
75
|
}),
|
76
76
|
__metadata("design:type", String)
|
77
77
|
], Domain.prototype, "brandImage", void 0);
|
78
78
|
__decorate([
|
79
|
-
type_graphql_1.Field({ nullable: true }),
|
80
|
-
typeorm_1.Column({
|
79
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
80
|
+
(0, typeorm_1.Column)({
|
81
81
|
nullable: true
|
82
82
|
}),
|
83
83
|
__metadata("design:type", String)
|
84
84
|
], Domain.prototype, "contentImage", void 0);
|
85
85
|
__decorate([
|
86
|
-
type_graphql_1.Field({ nullable: true }),
|
87
|
-
typeorm_1.Column({ nullable: true }),
|
86
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
87
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
88
88
|
__metadata("design:type", String)
|
89
89
|
], Domain.prototype, "owner", void 0);
|
90
90
|
__decorate([
|
91
|
-
type_graphql_1.Field({ nullable: true }),
|
92
|
-
typeorm_1.Column({
|
91
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
92
|
+
(0, typeorm_1.Column)({
|
93
93
|
nullable: true
|
94
94
|
}),
|
95
95
|
__metadata("design:type", String)
|
96
96
|
], Domain.prototype, "theme", void 0);
|
97
97
|
__decorate([
|
98
|
-
type_graphql_1.Field({ nullable: true }),
|
99
|
-
typeorm_1.CreateDateColumn(),
|
98
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
99
|
+
(0, typeorm_1.CreateDateColumn)(),
|
100
100
|
__metadata("design:type", Date)
|
101
101
|
], Domain.prototype, "createdAt", void 0);
|
102
102
|
__decorate([
|
103
|
-
type_graphql_1.Field({ nullable: true }),
|
104
|
-
typeorm_1.UpdateDateColumn(),
|
103
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
104
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
105
105
|
__metadata("design:type", Date)
|
106
106
|
], Domain.prototype, "updatedAt", void 0);
|
107
107
|
Domain = __decorate([
|
108
|
-
typeorm_1.Entity(),
|
109
|
-
typeorm_1.Index('ix_domain_0', (domain) => [domain.subdomain], { unique: true }),
|
110
|
-
type_graphql_1.ObjectType()
|
108
|
+
(0, typeorm_1.Entity)(),
|
109
|
+
(0, typeorm_1.Index)('ix_domain_0', (domain) => [domain.subdomain], { unique: true }),
|
110
|
+
(0, type_graphql_1.ObjectType)()
|
111
111
|
], Domain);
|
112
112
|
exports.Domain = Domain;
|
113
113
|
//# sourceMappingURL=domain.js.map
|