@things-factory/biz-base 5.0.0 → 5.0.11

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.
Files changed (69) hide show
  1. package/dist-server/index.js +4 -17
  2. package/dist-server/index.js.map +1 -1
  3. package/dist-server/middlewares/index.js.map +1 -1
  4. package/dist-server/migrations/index.js.map +1 -1
  5. package/dist-server/service/biz-option/biz-option-mutation.js +27 -38
  6. package/dist-server/service/biz-option/biz-option-mutation.js.map +1 -1
  7. package/dist-server/service/biz-option/biz-option-query.js +14 -25
  8. package/dist-server/service/biz-option/biz-option-query.js.map +1 -1
  9. package/dist-server/service/biz-option/biz-option-types.js +24 -32
  10. package/dist-server/service/biz-option/biz-option-types.js.map +1 -1
  11. package/dist-server/service/biz-option/biz-option.js +22 -30
  12. package/dist-server/service/biz-option/biz-option.js.map +1 -1
  13. package/dist-server/service/biz-option/index.js.map +1 -1
  14. package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js +27 -38
  15. package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js.map +1 -1
  16. package/dist-server/service/biz-option-detail/biz-option-detail-query.js +13 -24
  17. package/dist-server/service/biz-option-detail/biz-option-detail-query.js.map +1 -1
  18. package/dist-server/service/biz-option-detail/biz-option-detail-types.js +20 -28
  19. package/dist-server/service/biz-option-detail/biz-option-detail-types.js.map +1 -1
  20. package/dist-server/service/biz-option-detail/biz-option-detail.js +20 -28
  21. package/dist-server/service/biz-option-detail/biz-option-detail.js.map +1 -1
  22. package/dist-server/service/biz-option-detail/index.js.map +1 -1
  23. package/dist-server/service/bizplace/bizplace-mutation.js +38 -49
  24. package/dist-server/service/bizplace/bizplace-mutation.js.map +1 -1
  25. package/dist-server/service/bizplace/bizplace-query.js +65 -76
  26. package/dist-server/service/bizplace/bizplace-query.js.map +1 -1
  27. package/dist-server/service/bizplace/bizplace-types.js +53 -61
  28. package/dist-server/service/bizplace/bizplace-types.js.map +1 -1
  29. package/dist-server/service/bizplace/bizplace.js +33 -41
  30. package/dist-server/service/bizplace/bizplace.js.map +1 -1
  31. package/dist-server/service/bizplace/index.js.map +1 -1
  32. package/dist-server/service/company/company-mutation.js +32 -43
  33. package/dist-server/service/company/company-mutation.js.map +1 -1
  34. package/dist-server/service/company/company-query.js +23 -38
  35. package/dist-server/service/company/company-query.js.map +1 -1
  36. package/dist-server/service/company/company-types.js +42 -50
  37. package/dist-server/service/company/company-types.js.map +1 -1
  38. package/dist-server/service/company/company.js +38 -46
  39. package/dist-server/service/company/company.js.map +1 -1
  40. package/dist-server/service/company/index.js.map +1 -1
  41. package/dist-server/service/contact-point/contact-point-mutation.js +33 -44
  42. package/dist-server/service/contact-point/contact-point-mutation.js.map +1 -1
  43. package/dist-server/service/contact-point/contact-point-query.js +14 -25
  44. package/dist-server/service/contact-point/contact-point-query.js.map +1 -1
  45. package/dist-server/service/contact-point/contact-point-types.js +80 -88
  46. package/dist-server/service/contact-point/contact-point-types.js.map +1 -1
  47. package/dist-server/service/contact-point/contact-point.js +48 -56
  48. package/dist-server/service/contact-point/contact-point.js.map +1 -1
  49. package/dist-server/service/contact-point/index.js.map +1 -1
  50. package/dist-server/service/index.js +13 -26
  51. package/dist-server/service/index.js.map +1 -1
  52. package/dist-server/service/worker/index.js.map +1 -1
  53. package/dist-server/service/worker/worker-mutation.js +32 -43
  54. package/dist-server/service/worker/worker-mutation.js.map +1 -1
  55. package/dist-server/service/worker/worker-query.js +14 -25
  56. package/dist-server/service/worker/worker-query.js.map +1 -1
  57. package/dist-server/service/worker/worker-types.js +28 -36
  58. package/dist-server/service/worker/worker-types.js.map +1 -1
  59. package/dist-server/service/worker/worker.js +22 -30
  60. package/dist-server/service/worker/worker.js.map +1 -1
  61. package/dist-server/tsconfig.tsbuildinfo +1 -0
  62. package/dist-server/utils/get-permitted-bizplaces.js.map +1 -1
  63. package/dist-server/utils/index.js +2 -15
  64. package/dist-server/utils/index.js.map +1 -1
  65. package/package.json +3 -3
  66. package/server/service/bizplace/bizplace-query.ts +28 -27
  67. package/server/service/company/company-query.ts +0 -5
  68. package/server/service/contact-point/contact-point-mutation.ts +1 -1
  69. package/server/utils/get-permitted-bizplaces.ts +3 -3
@@ -1,20 +1,7 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./service"), exports);
18
- __exportStar(require("./migrations"), exports);
19
- __exportStar(require("./utils"), exports);
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./service"), exports);
5
+ tslib_1.__exportStar(require("./migrations"), exports);
6
+ tslib_1.__exportStar(require("./utils"), exports);
20
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,+CAA4B;AAC5B,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,uDAA4B;AAC5B,kDAAuB","sourcesContent":["export * from './service'\nexport * from './migrations'\nexport * from './utils'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
@@ -1,18 +1,7 @@
1
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
3
  exports.BizOptionMutation = void 0;
4
+ const tslib_1 = require("tslib");
16
5
  const type_graphql_1 = require("type-graphql");
17
6
  const typeorm_1 = require("typeorm");
18
7
  const biz_option_1 = require("./biz-option");
@@ -40,40 +29,40 @@ let BizOptionMutation = class BizOptionMutation {
40
29
  return true;
41
30
  }
42
31
  };
43
- __decorate([
32
+ tslib_1.__decorate([
44
33
  (0, type_graphql_1.Mutation)(returns => biz_option_1.BizOption),
45
- __param(0, (0, type_graphql_1.Arg)('bizOption')),
46
- __param(1, (0, type_graphql_1.Ctx)()),
47
- __metadata("design:type", Function),
48
- __metadata("design:paramtypes", [biz_option_types_1.NewBizOption, Object]),
49
- __metadata("design:returntype", Promise)
34
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('bizOption')),
35
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
36
+ tslib_1.__metadata("design:type", Function),
37
+ tslib_1.__metadata("design:paramtypes", [biz_option_types_1.NewBizOption, Object]),
38
+ tslib_1.__metadata("design:returntype", Promise)
50
39
  ], BizOptionMutation.prototype, "createBizOption", null);
51
- __decorate([
40
+ tslib_1.__decorate([
52
41
  (0, type_graphql_1.Mutation)(returns => biz_option_1.BizOption),
53
- __param(0, (0, type_graphql_1.Arg)('name')),
54
- __param(1, (0, type_graphql_1.Arg)('patch')),
55
- __param(2, (0, type_graphql_1.Ctx)()),
56
- __metadata("design:type", Function),
57
- __metadata("design:paramtypes", [String, biz_option_types_1.BizOptionPatch, Object]),
58
- __metadata("design:returntype", Promise)
42
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
43
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
44
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
45
+ tslib_1.__metadata("design:type", Function),
46
+ tslib_1.__metadata("design:paramtypes", [String, biz_option_types_1.BizOptionPatch, Object]),
47
+ tslib_1.__metadata("design:returntype", Promise)
59
48
  ], BizOptionMutation.prototype, "updateBizOption", null);
60
- __decorate([
49
+ tslib_1.__decorate([
61
50
  (0, type_graphql_1.Mutation)(returns => Boolean),
62
- __param(0, (0, type_graphql_1.Arg)('name')),
63
- __param(1, (0, type_graphql_1.Ctx)()),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [String, Object]),
66
- __metadata("design:returntype", Promise)
51
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
52
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
53
+ tslib_1.__metadata("design:type", Function),
54
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
55
+ tslib_1.__metadata("design:returntype", Promise)
67
56
  ], BizOptionMutation.prototype, "deleteBizOption", null);
68
- __decorate([
57
+ tslib_1.__decorate([
69
58
  (0, type_graphql_1.Mutation)(returns => Boolean),
70
- __param(0, (0, type_graphql_1.Arg)('names', type => [String])),
71
- __param(1, (0, type_graphql_1.Ctx)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [Array, Object]),
74
- __metadata("design:returntype", Promise)
59
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('names', type => [String])),
60
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
61
+ tslib_1.__metadata("design:type", Function),
62
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
63
+ tslib_1.__metadata("design:returntype", Promise)
75
64
  ], BizOptionMutation.prototype, "deleteBizOptions", null);
76
- BizOptionMutation = __decorate([
65
+ BizOptionMutation = tslib_1.__decorate([
77
66
  (0, type_graphql_1.Resolver)(biz_option_1.BizOption)
78
67
  ], BizOptionMutation);
79
68
  exports.BizOptionMutation = BizOptionMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"biz-option-mutation.js","sourceRoot":"","sources":["../../../server/service/biz-option/biz-option-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAA2C;AAE3C,6CAAwC;AACxC,yDAAiE;AAGjE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAE5B,KAAK,CAAC,eAAe,CAAmB,SAAuB,EAAS,OAAY;QAClF,OAAO,MAAM,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAC,IAAI,iCACrC,SAAS,KACZ,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,eAAe,CACN,IAAY,EACX,KAAqB,EAC5B,OAAY;QAEnB,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAA;QAC3C,MAAM,SAAS,GAAG,MAAM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AAO,CAAC;IACL,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAM7E;AA1CU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,iBAAiB,CA2C7B;AA3CY,8CAAiB","sourcesContent":["import { Arg, Ctx, Mutation, Resolver } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\n\nimport { BizOption } from './biz-option'\nimport { BizOptionPatch, NewBizOption } from './biz-option-types'\n\n@Resolver(BizOption)\nexport class BizOptionMutation {\n @Mutation(returns => BizOption)\n async createBizOption(@Arg('bizOption') bizOption: NewBizOption, @Ctx() context: any): Promise<BizOption> {\n return await getRepository(BizOption).save({\n ...bizOption,\n domain: context.state.domain,\n creator: context.state.user,\n updater: context.state.user\n })\n }\n\n @Mutation(returns => BizOption)\n async updateBizOption(\n @Arg('name') name: string,\n @Arg('patch') patch: BizOptionPatch,\n @Ctx() context: any\n ): Promise<BizOption> {\n const repository = getRepository(BizOption)\n const bizOption = await repository.findOne({\n where: { domain: context.state.domain, name }\n })\n\n return await repository.save({\n ...bizOption,\n ...patch,\n updater: context.state.user\n })\n }\n\n @Mutation(returns => Boolean)\n async deleteBizOption(@Arg('name') name: string, @Ctx() context: any): Promise<Boolean> {\n await getRepository(BizOption).delete({ domain: context.state.domain, name })\n return true\n }\n\n @Mutation(returns => Boolean)\n async deleteBizOptions(@Arg('names', type => [String]) names: string[], @Ctx() context: any): Promise<Boolean> {\n await getRepository(BizOption).delete({\n domain: context.state.domain,\n name: In(names)\n })\n return true\n }\n}\n"]}
@@ -1,19 +1,8 @@
1
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  var _a;
15
3
  Object.defineProperty(exports, "__esModule", { value: true });
16
4
  exports.BizOptionQuery = void 0;
5
+ const tslib_1 = require("tslib");
17
6
  const type_graphql_1 = require("type-graphql");
18
7
  const typeorm_1 = require("typeorm");
19
8
  const shell_1 = require("@things-factory/shell");
@@ -32,23 +21,23 @@ let BizOptionQuery = class BizOptionQuery {
32
21
  return { items, total };
33
22
  }
34
23
  };
35
- __decorate([
24
+ tslib_1.__decorate([
36
25
  (0, type_graphql_1.Query)(returns => biz_option_1.BizOption),
37
- __param(0, (0, type_graphql_1.Arg)('name')),
38
- __param(1, (0, type_graphql_1.Ctx)()),
39
- __metadata("design:type", Function),
40
- __metadata("design:paramtypes", [String, Object]),
41
- __metadata("design:returntype", Promise)
26
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
27
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
28
+ tslib_1.__metadata("design:type", Function),
29
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
30
+ tslib_1.__metadata("design:returntype", Promise)
42
31
  ], BizOptionQuery.prototype, "bizOption", null);
43
- __decorate([
32
+ tslib_1.__decorate([
44
33
  (0, type_graphql_1.Query)(returns => biz_option_types_1.BizOptionList),
45
- __param(0, (0, type_graphql_1.Args)()),
46
- __param(1, (0, type_graphql_1.Ctx)()),
47
- __metadata("design:type", Function),
48
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
49
- __metadata("design:returntype", Promise)
34
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
35
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
36
+ tslib_1.__metadata("design:type", Function),
37
+ tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
38
+ tslib_1.__metadata("design:returntype", Promise)
50
39
  ], BizOptionQuery.prototype, "bizOptions", null);
51
- BizOptionQuery = __decorate([
40
+ BizOptionQuery = tslib_1.__decorate([
52
41
  (0, type_graphql_1.Resolver)(biz_option_1.BizOption)
53
42
  ], BizOptionQuery);
54
43
  exports.BizOptionQuery = BizOptionQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"biz-option-query.js","sourceRoot":"","sources":["../../../server/service/biz-option/biz-option-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,qCAAuC;AAEvC,iDAAoE;AAEpE,6CAAwC;AACxC,yDAAkD;AAGlD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAEzB,KAAK,CAAC,SAAS,CAAc,IAAY,EAAS,OAAY;QAC5D,OAAO,MAAM,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;YAC7C,SAAS,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5E,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,UAAU,CAAS,MAAiB,EAAS,OAAY;QAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,sBAAS,CA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eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAC,YAAY,iCAC7D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC,IAC3E,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,sBAAS,CAAC;IACX,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAKhD;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,gCAAa,CAAC;IACd,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;gDAOzC;AAjBU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,cAAc,CAkB1B;AAlBY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, Query, Resolver } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { convertListParams, ListParam } from '@things-factory/shell'\n\nimport { BizOption } from './biz-option'\nimport { BizOptionList } from './biz-option-types'\n\n@Resolver(BizOption)\nexport class BizOptionQuery {\n @Query(returns => BizOption)\n async bizOption(@Arg('name') name: string, @Ctx() context: any): Promise<BizOption> {\n return await getRepository(BizOption).findOne({\n where: { domain: context.state.domain, name },\n relations: ['domain', 'bizplace', 'bizOptionDetails', 'creator', 'updater']\n })\n }\n\n @Query(returns => BizOptionList)\n async bizOptions(@Args() params: ListParam, @Ctx() context: any): Promise<BizOptionList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(BizOption).findAndCount({\n ...convertedParams,\n relations: ['domain', 'bizplace', 'bizOptionDetails', 'creator', 'updater']\n })\n return { items, total }\n }\n}\n"]}
@@ -1,74 +1,66 @@
1
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
2
  var _a;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.NewBizOption = exports.BizOptionPatch = exports.BizOptionList = void 0;
5
+ const tslib_1 = require("tslib");
14
6
  const type_graphql_1 = require("type-graphql");
15
7
  const shell_1 = require("@things-factory/shell");
16
8
  const biz_option_1 = require("./biz-option");
17
9
  let BizOptionList = class BizOptionList {
18
10
  };
19
- __decorate([
11
+ tslib_1.__decorate([
20
12
  (0, type_graphql_1.Field)(type => [biz_option_1.BizOption], { nullable: true }),
21
- __metadata("design:type", Array)
13
+ tslib_1.__metadata("design:type", Array)
22
14
  ], BizOptionList.prototype, "items", void 0);
23
- __decorate([
15
+ tslib_1.__decorate([
24
16
  (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
25
- __metadata("design:type", Number)
17
+ tslib_1.__metadata("design:type", Number)
26
18
  ], BizOptionList.prototype, "total", void 0);
27
- BizOptionList = __decorate([
19
+ BizOptionList = tslib_1.__decorate([
28
20
  (0, type_graphql_1.ObjectType)()
29
21
  ], BizOptionList);
30
22
  exports.BizOptionList = BizOptionList;
31
23
  let BizOptionPatch = class BizOptionPatch {
32
24
  };
33
- __decorate([
25
+ tslib_1.__decorate([
34
26
  (0, type_graphql_1.Field)({ nullable: true }),
35
- __metadata("design:type", String)
27
+ tslib_1.__metadata("design:type", String)
36
28
  ], BizOptionPatch.prototype, "id", void 0);
37
- __decorate([
29
+ tslib_1.__decorate([
38
30
  (0, type_graphql_1.Field)({ nullable: true }),
39
- __metadata("design:type", String)
31
+ tslib_1.__metadata("design:type", String)
40
32
  ], BizOptionPatch.prototype, "name", void 0);
41
- __decorate([
33
+ tslib_1.__decorate([
42
34
  (0, type_graphql_1.Field)({ nullable: true }),
43
- __metadata("design:type", String)
35
+ tslib_1.__metadata("design:type", String)
44
36
  ], BizOptionPatch.prototype, "description", void 0);
45
- __decorate([
37
+ tslib_1.__decorate([
46
38
  (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
47
- __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
39
+ tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
48
40
  ], BizOptionPatch.prototype, "bizplace", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, type_graphql_1.Field)(type => [shell_1.ObjectRef], { nullable: true }),
51
- __metadata("design:type", Array)
43
+ tslib_1.__metadata("design:type", Array)
52
44
  ], BizOptionPatch.prototype, "bizOptionDetails", void 0);
53
- __decorate([
45
+ tslib_1.__decorate([
54
46
  (0, type_graphql_1.Field)({ nullable: true }),
55
- __metadata("design:type", String)
47
+ tslib_1.__metadata("design:type", String)
56
48
  ], BizOptionPatch.prototype, "cuFlag", void 0);
57
- BizOptionPatch = __decorate([
49
+ BizOptionPatch = tslib_1.__decorate([
58
50
  (0, type_graphql_1.InputType)()
59
51
  ], BizOptionPatch);
60
52
  exports.BizOptionPatch = BizOptionPatch;
61
53
  let NewBizOption = class NewBizOption {
62
54
  };
63
- __decorate([
55
+ tslib_1.__decorate([
64
56
  (0, type_graphql_1.Field)(),
65
- __metadata("design:type", String)
57
+ tslib_1.__metadata("design:type", String)
66
58
  ], NewBizOption.prototype, "name", void 0);
67
- __decorate([
59
+ tslib_1.__decorate([
68
60
  (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", String)
61
+ tslib_1.__metadata("design:type", String)
70
62
  ], NewBizOption.prototype, "description", void 0);
71
- NewBizOption = __decorate([
63
+ NewBizOption = tslib_1.__decorate([
72
64
  (0, type_graphql_1.InputType)()
73
65
  ], NewBizOption);
74
66
  exports.NewBizOption = NewBizOption;
@@ -1 +1 @@
1
- {"version":3,"file":"biz-option-types.js","sourceRoot":"","sources":["../../../server/service/biz-option/biz-option-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAgE;AAEhE,iDAAiD;AAEjD,6CAAwC;AAGxC,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACzB;AALH,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa;AAS1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAkB1B,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,C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CACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,iBAAS,oBAAT,iBAAS;gDAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACjB;AAG9B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACX;AAjBJ,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAkB1B;AAlBY,wCAAc;AAqB3B,IAAa,YAAY,GAAzB,MAAa,YAAY;CAMxB,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AANY,oCAAY","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { BizOption } from './biz-option'\n\n@ObjectType()\nexport class BizOptionList {\n @Field(type => [BizOption], { nullable: true })\n items?: BizOption[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class BizOptionPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => ObjectRef, { nullable: true })\n bizplace?: ObjectRef\n\n @Field(type => [ObjectRef], { nullable: true })\n bizOptionDetails?: ObjectRef[]\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@InputType()\nexport class NewBizOption {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n"]}
@@ -1,16 +1,8 @@
1
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
2
  var _a, _b, _c;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.BizOption = void 0;
5
+ const tslib_1 = require("tslib");
14
6
  const type_graphql_1 = require("type-graphql");
15
7
  const typeorm_1 = require("typeorm");
16
8
  const auth_base_1 = require("@things-factory/auth-base");
@@ -19,65 +11,65 @@ const biz_option_detail_1 = require("../biz-option-detail/biz-option-detail");
19
11
  const bizplace_1 = require("../bizplace/bizplace");
20
12
  let BizOption = class BizOption {
21
13
  };
22
- __decorate([
14
+ tslib_1.__decorate([
23
15
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
16
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
- __metadata("design:type", String)
17
+ tslib_1.__metadata("design:type", String)
26
18
  ], BizOption.prototype, "id", void 0);
27
- __decorate([
19
+ tslib_1.__decorate([
28
20
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: true }),
29
21
  (0, type_graphql_1.Field)({ nullable: true }),
30
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
22
+ tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
31
23
  ], BizOption.prototype, "domain", void 0);
32
- __decorate([
24
+ tslib_1.__decorate([
33
25
  (0, typeorm_1.Column)(),
34
26
  (0, type_graphql_1.Field)(),
35
- __metadata("design:type", String)
27
+ tslib_1.__metadata("design:type", String)
36
28
  ], BizOption.prototype, "name", void 0);
37
- __decorate([
29
+ tslib_1.__decorate([
38
30
  (0, typeorm_1.ManyToOne)(type => bizplace_1.Bizplace, {
39
31
  nullable: false
40
32
  }),
41
33
  (0, type_graphql_1.Field)(type => bizplace_1.Bizplace, { nullable: true }),
42
- __metadata("design:type", bizplace_1.Bizplace)
34
+ tslib_1.__metadata("design:type", bizplace_1.Bizplace)
43
35
  ], BizOption.prototype, "bizplace", void 0);
44
- __decorate([
36
+ tslib_1.__decorate([
45
37
  (0, typeorm_1.OneToMany)(type => biz_option_detail_1.BizOptionDetail, bizOptionDetail => bizOptionDetail.bizOption),
46
38
  (0, type_graphql_1.Field)(type => biz_option_detail_1.BizOptionDetail, { nullable: true }),
47
- __metadata("design:type", Array)
39
+ tslib_1.__metadata("design:type", Array)
48
40
  ], BizOption.prototype, "bizOptionDetails", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, typeorm_1.Column)({
51
43
  nullable: true
52
44
  }),
53
45
  (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", String)
46
+ tslib_1.__metadata("design:type", String)
55
47
  ], BizOption.prototype, "description", void 0);
56
- __decorate([
48
+ tslib_1.__decorate([
57
49
  (0, typeorm_1.CreateDateColumn)(),
58
50
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", Date)
51
+ tslib_1.__metadata("design:type", Date)
60
52
  ], BizOption.prototype, "createdAt", void 0);
61
- __decorate([
53
+ tslib_1.__decorate([
62
54
  (0, typeorm_1.UpdateDateColumn)(),
63
55
  (0, type_graphql_1.Field)({ nullable: true }),
64
- __metadata("design:type", Date)
56
+ tslib_1.__metadata("design:type", Date)
65
57
  ], BizOption.prototype, "updatedAt", void 0);
66
- __decorate([
58
+ tslib_1.__decorate([
67
59
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
68
60
  nullable: true
69
61
  }),
70
62
  (0, type_graphql_1.Field)({ nullable: true }),
71
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
63
+ tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
72
64
  ], BizOption.prototype, "creator", void 0);
73
- __decorate([
65
+ tslib_1.__decorate([
74
66
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
75
67
  nullable: true
76
68
  }),
77
69
  (0, type_graphql_1.Field)({ nullable: true }),
78
- __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
70
+ tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
79
71
  ], BizOption.prototype, "updater", void 0);
80
- BizOption = __decorate([
72
+ BizOption = tslib_1.__decorate([
81
73
  (0, typeorm_1.Entity)(),
82
74
  (0, typeorm_1.Index)('ix_biz-option_0', (bizOption) => [bizOption.bizplace, bizOption.name], { unique: true }),
83
75
  (0, type_graphql_1.ObjectType)()
@@ -1 +1 @@
1
- {"version":3,"file":"biz-option.js","sourceRoot":"","sources":["../../../server/service/biz-option/biz-option.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,8EAAwE;AACxE,mDAA+C;AAK/C,IAAa,SAAS,GAAtB,MAAa,SAAS;CAgDrB,CAAA;AA7CC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACR;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E,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1G,IAAA,yBAAU,GAAE;GACA,SAAS,CAgDrB;AAhDY,8BAAS","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { BizOptionDetail } from '../biz-option-detail/biz-option-detail'\nimport { Bizplace } from '../bizplace/bizplace'\n\n@Entity()\n@Index('ix_biz-option_0', (bizOption: BizOption) => [bizOption.bizplace, bizOption.name], { unique: true })\n@ObjectType()\nexport class BizOption {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n id: string\n\n @ManyToOne(type => Domain, { nullable: true })\n @Field({ nullable: true })\n domain: Domain\n\n @Column()\n @Field()\n name: string\n\n @ManyToOne(type => Bizplace, {\n nullable: false\n })\n @Field(type => Bizplace, { nullable: true })\n bizplace: Bizplace\n\n @OneToMany(type => BizOptionDetail, bizOptionDetail => bizOptionDetail.bizOption)\n @Field(type => BizOptionDetail, { nullable: true })\n bizOptionDetails: BizOptionDetail[]\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/biz-option/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,+DAAyD;AACzD,yDAAmD;AAEtC,QAAA,QAAQ,GAAG,CAAC,sBAAS,CAAC,CAAA;AACtB,QAAA,SAAS,GAAG,CAAC,iCAAc,EAAE,uCAAiB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/biz-option/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,+DAAyD;AACzD,yDAAmD;AAEtC,QAAA,QAAQ,GAAG,CAAC,sBAAS,CAAC,CAAA;AACtB,QAAA,SAAS,GAAG,CAAC,iCAAc,EAAE,uCAAiB,CAAC,CAAA","sourcesContent":["import { BizOption } from './biz-option'\nimport { BizOptionMutation } from './biz-option-mutation'\nimport { BizOptionQuery } from './biz-option-query'\n\nexport const entities = [BizOption]\nexport const resolvers = [BizOptionQuery, BizOptionMutation]\n"]}
@@ -1,18 +1,7 @@
1
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
3
  exports.BizOptionDetailMutation = void 0;
4
+ const tslib_1 = require("tslib");
16
5
  const type_graphql_1 = require("type-graphql");
17
6
  const typeorm_1 = require("typeorm");
18
7
  const biz_option_detail_1 = require("./biz-option-detail");
@@ -40,40 +29,40 @@ let BizOptionDetailMutation = class BizOptionDetailMutation {
40
29
  return true;
41
30
  }
42
31
  };
43
- __decorate([
32
+ tslib_1.__decorate([
44
33
  (0, type_graphql_1.Mutation)(returns => biz_option_detail_1.BizOptionDetail),
45
- __param(0, (0, type_graphql_1.Arg)('bizOptionDetail')),
46
- __param(1, (0, type_graphql_1.Ctx)()),
47
- __metadata("design:type", Function),
48
- __metadata("design:paramtypes", [biz_option_detail_types_1.NewBizOptionDetail, Object]),
49
- __metadata("design:returntype", Promise)
34
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('bizOptionDetail')),
35
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
36
+ tslib_1.__metadata("design:type", Function),
37
+ tslib_1.__metadata("design:paramtypes", [biz_option_detail_types_1.NewBizOptionDetail, Object]),
38
+ tslib_1.__metadata("design:returntype", Promise)
50
39
  ], BizOptionDetailMutation.prototype, "createBizOptionDetail", null);
51
- __decorate([
40
+ tslib_1.__decorate([
52
41
  (0, type_graphql_1.Mutation)(returns => biz_option_detail_1.BizOptionDetail),
53
- __param(0, (0, type_graphql_1.Arg)('name')),
54
- __param(1, (0, type_graphql_1.Arg)('patch')),
55
- __param(2, (0, type_graphql_1.Ctx)()),
56
- __metadata("design:type", Function),
57
- __metadata("design:paramtypes", [String, biz_option_detail_types_1.BizOptionDetailPatch, Object]),
58
- __metadata("design:returntype", Promise)
42
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
43
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
44
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
45
+ tslib_1.__metadata("design:type", Function),
46
+ tslib_1.__metadata("design:paramtypes", [String, biz_option_detail_types_1.BizOptionDetailPatch, Object]),
47
+ tslib_1.__metadata("design:returntype", Promise)
59
48
  ], BizOptionDetailMutation.prototype, "updateBizOptionDetail", null);
60
- __decorate([
49
+ tslib_1.__decorate([
61
50
  (0, type_graphql_1.Mutation)(returns => Boolean),
62
- __param(0, (0, type_graphql_1.Arg)('name')),
63
- __param(1, (0, type_graphql_1.Ctx)()),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [String, Object]),
66
- __metadata("design:returntype", Promise)
51
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
52
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
53
+ tslib_1.__metadata("design:type", Function),
54
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
55
+ tslib_1.__metadata("design:returntype", Promise)
67
56
  ], BizOptionDetailMutation.prototype, "deleteBizOptionDetail", null);
68
- __decorate([
57
+ tslib_1.__decorate([
69
58
  (0, type_graphql_1.Mutation)(returns => Boolean),
70
- __param(0, (0, type_graphql_1.Arg)('names', type => [String])),
71
- __param(1, (0, type_graphql_1.Ctx)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [Array, Object]),
74
- __metadata("design:returntype", Promise)
59
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('names', type => [String])),
60
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
61
+ tslib_1.__metadata("design:type", Function),
62
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
63
+ tslib_1.__metadata("design:returntype", Promise)
75
64
  ], BizOptionDetailMutation.prototype, "deleteBizOptionDetails", null);
76
- BizOptionDetailMutation = __decorate([
65
+ BizOptionDetailMutation = tslib_1.__decorate([
77
66
  (0, type_graphql_1.Resolver)(biz_option_detail_1.BizOptionDetail)
78
67
  ], BizOptionDetailMutation);
79
68
  exports.BizOptionDetailMutation = BizOptionDetailMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"biz-option-detail-mutation.js","sourceRoot":"","sources":["../../../server/service/biz-option-detail/biz-option-detail-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAA2C;AAE3C,2DAAqD;AACrD,uEAAoF;AAGpF,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAElC,KAAK,CAAC,qBAAqB,CACD,eAAmC,EACpD,OAAY;QAEnB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C;IAElC,WAAA,IAAA,kBAAG,EAAC,iBAAiB,CAAC,CAAA;IACtB,WAAA,IAAA,kBAAG,GAAE,CAAA;;qCADmC,4CAAkB;;oEAS5D;AAGD;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,mCAAe,CAAC;IAElC,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,WAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,WAAA,IAAA,kBAAG,GAAE,CAAA;;6CADe,8CAAoB;;oEAa1C;AAGD;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACA,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;oEAG5D;AAGD;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACC,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;qEAMnF;AA7CU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,mCAAe,CAAC;GACb,uBAAuB,CA8CnC;AA9CY,0DAAuB"}
1
+ {"version":3,"file":"biz-option-detail-mutation.js","sourceRoot":"","sources":["../../../server/service/biz-option-detail/biz-option-detail-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAC3D,qCAA2C;AAE3C,2DAAqD;AACrD,uEAAoF;AAGpF,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAElC,KAAK,CAAC,qBAAqB,CACD,eAAmC,EACpD,OAAY;QAEnB,OAAO,MAAM,IAAA,uBAAa,EAAC,mCAAe,CAAC,CAAC,IAAI,iCAC3C,eAAe,KAClB,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CA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AC,OAAO,CAAC,EAAE,CAAC,mCAAe,CAAC;IAElC,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,8CAAoB;;oEAa1C;AAGD;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACA,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oEAG5D;AAGD;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACC,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qEAMnF;AA7CU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,mCAAe,CAAC;GACb,uBAAuB,CA8CnC;AA9CY,0DAAuB","sourcesContent":["import { Arg, Ctx, Mutation, Resolver } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\n\nimport { BizOptionDetail } from './biz-option-detail'\nimport { BizOptionDetailPatch, NewBizOptionDetail } from './biz-option-detail-types'\n\n@Resolver(BizOptionDetail)\nexport class BizOptionDetailMutation {\n @Mutation(returns => BizOptionDetail)\n async createBizOptionDetail(\n @Arg('bizOptionDetail') bizOptionDetail: NewBizOptionDetail,\n @Ctx() context: any\n ): Promise<BizOptionDetail> {\n return await getRepository(BizOptionDetail).save({\n ...bizOptionDetail,\n domain: context.state.domain,\n creator: context.state.user,\n updater: context.state.user\n })\n }\n\n @Mutation(returns => BizOptionDetail)\n async updateBizOptionDetail(\n @Arg('name') name: string,\n @Arg('patch') patch: BizOptionDetailPatch,\n @Ctx() context: any\n ): Promise<BizOptionDetail> {\n const repository = getRepository(BizOptionDetail)\n const bizOptionDetail = await repository.findOne({\n where: { domain: context.state.domain, name }\n })\n\n return await repository.save({\n ...bizOptionDetail,\n ...patch,\n updater: context.state.user\n })\n }\n\n @Mutation(returns => Boolean)\n async deleteBizOptionDetail(@Arg('name') name: string, @Ctx() context: any): Promise<Boolean> {\n await getRepository(BizOptionDetail).delete({ domain: context.state.domain, name })\n return true\n }\n\n @Mutation(returns => Boolean)\n async deleteBizOptionDetails(@Arg('names', type => [String]) names: string[], @Ctx() context: any): Promise<Boolean> {\n await getRepository(BizOptionDetail).delete({\n domain: context.state.domain,\n name: In(names)\n })\n return true\n }\n}\n"]}
@@ -1,19 +1,8 @@
1
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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  var _a;
15
3
  Object.defineProperty(exports, "__esModule", { value: true });
16
4
  exports.BizOptionDetailQuery = void 0;
5
+ const tslib_1 = require("tslib");
17
6
  const type_graphql_1 = require("type-graphql");
18
7
  const typeorm_1 = require("typeorm");
19
8
  const shell_1 = require("@things-factory/shell");
@@ -32,22 +21,22 @@ let BizOptionDetailQuery = class BizOptionDetailQuery {
32
21
  return { items, total };
33
22
  }
34
23
  };
35
- __decorate([
24
+ tslib_1.__decorate([
36
25
  (0, type_graphql_1.Query)(returns => biz_option_detail_1.BizOptionDetail),
37
- __param(0, (0, type_graphql_1.Arg)('name')),
38
- __param(1, (0, type_graphql_1.Ctx)()),
39
- __metadata("design:type", Function),
40
- __metadata("design:paramtypes", [String, Object]),
41
- __metadata("design:returntype", Promise)
26
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
27
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
28
+ tslib_1.__metadata("design:type", Function),
29
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
30
+ tslib_1.__metadata("design:returntype", Promise)
42
31
  ], BizOptionDetailQuery.prototype, "bizOptionDetail", null);
43
- __decorate([
32
+ tslib_1.__decorate([
44
33
  (0, type_graphql_1.Query)(returns => biz_option_detail_types_1.BizOptionDetailList),
45
- __param(0, (0, type_graphql_1.Args)()),
46
- __metadata("design:type", Function),
47
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object]),
48
- __metadata("design:returntype", Promise)
34
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
35
+ tslib_1.__metadata("design:type", Function),
36
+ tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object]),
37
+ tslib_1.__metadata("design:returntype", Promise)
49
38
  ], BizOptionDetailQuery.prototype, "bizOptionDetails", null);
50
- BizOptionDetailQuery = __decorate([
39
+ BizOptionDetailQuery = tslib_1.__decorate([
51
40
  (0, type_graphql_1.Resolver)(biz_option_detail_1.BizOptionDetail)
52
41
  ], BizOptionDetailQuery);
53
42
  exports.BizOptionDetailQuery = BizOptionDetailQuery;