@things-factory/biz-base 4.3.591 → 4.3.671

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 (74) hide show
  1. package/package.json +3 -3
  2. package/server/service/bizplace/bizplace-query.ts +19 -10
  3. package/dist-server/index.js +0 -20
  4. package/dist-server/index.js.map +0 -1
  5. package/dist-server/middlewares/index.js +0 -1
  6. package/dist-server/middlewares/index.js.map +0 -1
  7. package/dist-server/migrations/index.js +0 -12
  8. package/dist-server/migrations/index.js.map +0 -1
  9. package/dist-server/service/biz-option/biz-option-mutation.js +0 -80
  10. package/dist-server/service/biz-option/biz-option-mutation.js.map +0 -1
  11. package/dist-server/service/biz-option/biz-option-query.js +0 -55
  12. package/dist-server/service/biz-option/biz-option-query.js.map +0 -1
  13. package/dist-server/service/biz-option/biz-option-types.js +0 -75
  14. package/dist-server/service/biz-option/biz-option-types.js.map +0 -1
  15. package/dist-server/service/biz-option/biz-option.js +0 -86
  16. package/dist-server/service/biz-option/biz-option.js.map +0 -1
  17. package/dist-server/service/biz-option/index.js +0 -9
  18. package/dist-server/service/biz-option/index.js.map +0 -1
  19. package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js +0 -80
  20. package/dist-server/service/biz-option-detail/biz-option-detail-mutation.js.map +0 -1
  21. package/dist-server/service/biz-option-detail/biz-option-detail-query.js +0 -54
  22. package/dist-server/service/biz-option-detail/biz-option-detail-query.js.map +0 -1
  23. package/dist-server/service/biz-option-detail/biz-option-detail-types.js +0 -67
  24. package/dist-server/service/biz-option-detail/biz-option-detail-types.js.map +0 -1
  25. package/dist-server/service/biz-option-detail/biz-option-detail.js +0 -82
  26. package/dist-server/service/biz-option-detail/biz-option-detail.js.map +0 -1
  27. package/dist-server/service/biz-option-detail/index.js +0 -9
  28. package/dist-server/service/biz-option-detail/index.js.map +0 -1
  29. package/dist-server/service/bizplace/bizplace-mutation.js +0 -144
  30. package/dist-server/service/bizplace/bizplace-mutation.js.map +0 -1
  31. package/dist-server/service/bizplace/bizplace-query.js +0 -279
  32. package/dist-server/service/bizplace/bizplace-query.js.map +0 -1
  33. package/dist-server/service/bizplace/bizplace-types.js +0 -189
  34. package/dist-server/service/bizplace/bizplace-types.js.map +0 -1
  35. package/dist-server/service/bizplace/bizplace.js +0 -194
  36. package/dist-server/service/bizplace/bizplace.js.map +0 -1
  37. package/dist-server/service/bizplace/index.js +0 -9
  38. package/dist-server/service/bizplace/index.js.map +0 -1
  39. package/dist-server/service/company/company-mutation.js +0 -141
  40. package/dist-server/service/company/company-mutation.js.map +0 -1
  41. package/dist-server/service/company/company-query.js +0 -102
  42. package/dist-server/service/company/company-query.js.map +0 -1
  43. package/dist-server/service/company/company-types.js +0 -109
  44. package/dist-server/service/company/company-types.js.map +0 -1
  45. package/dist-server/service/company/company.js +0 -135
  46. package/dist-server/service/company/company.js.map +0 -1
  47. package/dist-server/service/company/index.js +0 -9
  48. package/dist-server/service/company/index.js.map +0 -1
  49. package/dist-server/service/contact-point/contact-point-mutation.js +0 -164
  50. package/dist-server/service/contact-point/contact-point-mutation.js.map +0 -1
  51. package/dist-server/service/contact-point/contact-point-query.js +0 -63
  52. package/dist-server/service/contact-point/contact-point-query.js.map +0 -1
  53. package/dist-server/service/contact-point/contact-point-types.js +0 -171
  54. package/dist-server/service/contact-point/contact-point-types.js.map +0 -1
  55. package/dist-server/service/contact-point/contact-point.js +0 -139
  56. package/dist-server/service/contact-point/contact-point.js.map +0 -1
  57. package/dist-server/service/contact-point/index.js +0 -9
  58. package/dist-server/service/contact-point/index.js.map +0 -1
  59. package/dist-server/service/index.js +0 -67
  60. package/dist-server/service/index.js.map +0 -1
  61. package/dist-server/service/worker/index.js +0 -9
  62. package/dist-server/service/worker/index.js.map +0 -1
  63. package/dist-server/service/worker/worker-mutation.js +0 -134
  64. package/dist-server/service/worker/worker-mutation.js.map +0 -1
  65. package/dist-server/service/worker/worker-query.js +0 -63
  66. package/dist-server/service/worker/worker-query.js.map +0 -1
  67. package/dist-server/service/worker/worker-types.js +0 -83
  68. package/dist-server/service/worker/worker-types.js.map +0 -1
  69. package/dist-server/service/worker/worker.js +0 -83
  70. package/dist-server/service/worker/worker.js.map +0 -1
  71. package/dist-server/utils/get-permitted-bizplaces.js +0 -285
  72. package/dist-server/utils/get-permitted-bizplaces.js.map +0 -1
  73. package/dist-server/utils/index.js +0 -18
  74. package/dist-server/utils/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/biz-base",
3
- "version": "4.3.591",
3
+ "version": "4.3.671",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -23,7 +23,7 @@
23
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/auth-base": "^4.3.591"
26
+ "@things-factory/auth-base": "^4.3.671"
27
27
  },
28
- "gitHead": "b8528f316a234ad95d0f285d5ade988b44f1195f"
28
+ "gitHead": "ef524cb207378186ec71917d9a8546363d4300b2"
29
29
  }
@@ -1,8 +1,8 @@
1
1
  import { Arg, Args, Ctx, Directive, Query, Resolver } from 'type-graphql'
2
- import { EntityManager, FindManyOptions, getRepository, In, Not, Repository,SelectQueryBuilder } from 'typeorm'
2
+ import { EntityManager, FindManyOptions, getRepository, In, Not, Repository, SelectQueryBuilder } from 'typeorm'
3
3
 
4
4
  import { User, UserList } from '@things-factory/auth-base'
5
- import { convertListParams, ListParam,buildQuery } from '@things-factory/shell'
5
+ import { convertListParams, ListParam, buildQuery } from '@things-factory/shell'
6
6
 
7
7
  import {
8
8
  getMyBizplace,
@@ -188,8 +188,10 @@ export class BizplaceQuery {
188
188
 
189
189
  @Query(returns => BizplaceList)
190
190
  async lmdBizplaces(@Args() params: ListParam, @Ctx() context: any): Promise<BizplaceList> {
191
- let partnersBizplaceIds = []
191
+ let partnersBizplaceIds = []
192
192
  let bizplaceIndex: any = params.filters.findIndex(x => x.name === 'bizplace')
193
+ let bizplaceNameFilter = params.filters.filter(x => x.name === 'name').map(item => item.value)[0] || ''
194
+
193
195
  if (bizplaceIndex > -1) {
194
196
  partnersBizplaceIds = params.filters
195
197
  .filter(x => x.name === 'bizplace')
@@ -201,6 +203,7 @@ export class BizplaceQuery {
201
203
 
202
204
  //filter popup for lmd
203
205
  let lmdBizplaceFilter = params.filters.reduce(item => item.name == 'lmdBizplaceIds')
206
+
204
207
  if (lmdBizplaceFilter) {
205
208
  params.filters = params.filters.filter(param => param.name !== 'lmdBizplaceIds')
206
209
  }
@@ -216,18 +219,24 @@ export class BizplaceQuery {
216
219
  }
217
220
 
218
221
  const qb: SelectQueryBuilder<Bizplace> = getRepository(Bizplace).createQueryBuilder('b')
219
- buildQuery(qb, params, context)
220
- qb.leftJoinAndSelect('domains', 'd', 'd.id = b.domain_id')
221
- qb.leftJoinAndSelect('companies', 'c', 'c.id = b.company_id')
222
- qb.where('b.id IN (:...partnersBizplaceIds)', { partnersBizplaceIds: partnersBizplaceIds })
222
+ buildQuery(qb, params, context)
223
+ qb.leftJoinAndSelect('domains', 'd', 'd.id = b.domain_id')
224
+ qb.leftJoinAndSelect('companies', 'c', 'c.id = b.company_id')
225
+ qb.where('b.id IN (:...partnersBizplaceIds)', { partnersBizplaceIds: partnersBizplaceIds })
223
226
 
224
- if (lmdBizplaceFilter?.value?.length >0 ) {
227
+ if (lmdBizplaceFilter?.value?.length > 0) {
225
228
  qb.andWhere('b.id NOT IN (:...lmdBizplaceIds)', { lmdBizplaceIds: lmdBizplaceFilter.value })
226
229
  }
227
230
 
228
- const [items, total] = await qb.getManyAndCount()
231
+ if (bizplaceNameFilter) {
232
+ qb.andWhere('b.name ilike :name', { name: bizplaceNameFilter })
233
+ }
229
234
 
230
- return { items, total }
235
+ qb.orderBy('b.name', 'ASC')
236
+
237
+ const [items, total] = await qb.getManyAndCount()
238
+
239
+ return { items, total }
231
240
  }
232
241
  }
233
242
 
@@ -1,20 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./service"), exports);
18
- __exportStar(require("./migrations"), exports);
19
- __exportStar(require("./utils"), exports);
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,+CAA4B;AAC5B,0CAAuB"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrations = void 0;
4
- const glob = require('glob');
5
- const path = require('path');
6
- exports.migrations = [];
7
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
- if (file.indexOf('index.js') !== -1)
9
- return;
10
- exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
- });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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,80 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.BizOptionMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const biz_option_1 = require("./biz-option");
19
- const biz_option_types_1 = require("./biz-option-types");
20
- let BizOptionMutation = class BizOptionMutation {
21
- async createBizOption(bizOption, context) {
22
- return await (0, typeorm_1.getRepository)(biz_option_1.BizOption).save(Object.assign(Object.assign({}, bizOption), { domain: context.state.domain, creator: context.state.user, updater: context.state.user }));
23
- }
24
- async updateBizOption(name, patch, context) {
25
- const repository = (0, typeorm_1.getRepository)(biz_option_1.BizOption);
26
- const bizOption = await repository.findOne({
27
- where: { domain: context.state.domain, name }
28
- });
29
- return await repository.save(Object.assign(Object.assign(Object.assign({}, bizOption), patch), { updater: context.state.user }));
30
- }
31
- async deleteBizOption(name, context) {
32
- await (0, typeorm_1.getRepository)(biz_option_1.BizOption).delete({ domain: context.state.domain, name });
33
- return true;
34
- }
35
- async deleteBizOptions(names, context) {
36
- await (0, typeorm_1.getRepository)(biz_option_1.BizOption).delete({
37
- domain: context.state.domain,
38
- name: (0, typeorm_1.In)(names)
39
- });
40
- return true;
41
- }
42
- };
43
- __decorate([
44
- (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)
50
- ], BizOptionMutation.prototype, "createBizOption", null);
51
- __decorate([
52
- (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)
59
- ], BizOptionMutation.prototype, "updateBizOption", null);
60
- __decorate([
61
- (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)
67
- ], BizOptionMutation.prototype, "deleteBizOption", null);
68
- __decorate([
69
- (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)
75
- ], BizOptionMutation.prototype, "deleteBizOptions", null);
76
- BizOptionMutation = __decorate([
77
- (0, type_graphql_1.Resolver)(biz_option_1.BizOption)
78
- ], BizOptionMutation);
79
- exports.BizOptionMutation = BizOptionMutation;
80
- //# sourceMappingURL=biz-option-mutation.js.map
@@ -1 +0,0 @@
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;AAG1D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAEtB,AAAN,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;IAGK,AAAN,KAAK,CAAC,eAAe,CACN,IAAY,EACX,KAAqB,EAC5B,OAAY;QAEnB,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,sBAAS,CAAC,CAAA;QAC3C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;SAC9C,CAAC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IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACL,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAmB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAM7E;AA1CU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,iBAAiB,CA2C7B;AA3CY,8CAAiB"}
@@ -1,55 +0,0 @@
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
- var _a;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.BizOptionQuery = void 0;
17
- const type_graphql_1 = require("type-graphql");
18
- const typeorm_1 = require("typeorm");
19
- const shell_1 = require("@things-factory/shell");
20
- const biz_option_1 = require("./biz-option");
21
- const biz_option_types_1 = require("./biz-option-types");
22
- let BizOptionQuery = class BizOptionQuery {
23
- async bizOption(name, context) {
24
- return await (0, typeorm_1.getRepository)(biz_option_1.BizOption).findOne({
25
- where: { domain: context.state.domain, name },
26
- relations: ['domain', 'bizplace', 'bizOptionDetails', 'creator', 'updater']
27
- });
28
- }
29
- async bizOptions(params, context) {
30
- const convertedParams = (0, shell_1.convertListParams)(params);
31
- const [items, total] = await (0, typeorm_1.getRepository)(biz_option_1.BizOption).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'bizplace', 'bizOptionDetails', 'creator', 'updater'] }));
32
- return { items, total };
33
- }
34
- };
35
- __decorate([
36
- (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)
42
- ], BizOptionQuery.prototype, "bizOption", null);
43
- __decorate([
44
- (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)
50
- ], BizOptionQuery.prototype, "bizOptions", null);
51
- BizOptionQuery = __decorate([
52
- (0, type_graphql_1.Resolver)(biz_option_1.BizOption)
53
- ], BizOptionQuery);
54
- exports.BizOptionQuery = BizOptionQuery;
55
- //# sourceMappingURL=biz-option-query.js.map
@@ -1 +0,0 @@
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;AAG3C,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,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;IAGK,AAAN,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,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;AAhBO;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,sBAAS,CAAC;IACX,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAKhD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,gCAAa,CAAC;IACd,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;gDAOzC;AAjBU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,cAAc,CAkB1B;AAlBY,wCAAc"}
@@ -1,75 +0,0 @@
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 _a;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.NewBizOption = exports.BizOptionPatch = exports.BizOptionList = void 0;
14
- const type_graphql_1 = require("type-graphql");
15
- const shell_1 = require("@things-factory/shell");
16
- const biz_option_1 = require("./biz-option");
17
- let BizOptionList = class BizOptionList {
18
- };
19
- __decorate([
20
- (0, type_graphql_1.Field)(type => [biz_option_1.BizOption], { nullable: true }),
21
- __metadata("design:type", Array)
22
- ], BizOptionList.prototype, "items", void 0);
23
- __decorate([
24
- (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
25
- __metadata("design:type", Number)
26
- ], BizOptionList.prototype, "total", void 0);
27
- BizOptionList = __decorate([
28
- (0, type_graphql_1.ObjectType)()
29
- ], BizOptionList);
30
- exports.BizOptionList = BizOptionList;
31
- let BizOptionPatch = class BizOptionPatch {
32
- };
33
- __decorate([
34
- (0, type_graphql_1.Field)({ nullable: true }),
35
- __metadata("design:type", String)
36
- ], BizOptionPatch.prototype, "id", void 0);
37
- __decorate([
38
- (0, type_graphql_1.Field)({ nullable: true }),
39
- __metadata("design:type", String)
40
- ], BizOptionPatch.prototype, "name", void 0);
41
- __decorate([
42
- (0, type_graphql_1.Field)({ nullable: true }),
43
- __metadata("design:type", String)
44
- ], BizOptionPatch.prototype, "description", void 0);
45
- __decorate([
46
- (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)
48
- ], BizOptionPatch.prototype, "bizplace", void 0);
49
- __decorate([
50
- (0, type_graphql_1.Field)(type => [shell_1.ObjectRef], { nullable: true }),
51
- __metadata("design:type", Array)
52
- ], BizOptionPatch.prototype, "bizOptionDetails", void 0);
53
- __decorate([
54
- (0, type_graphql_1.Field)({ nullable: true }),
55
- __metadata("design:type", String)
56
- ], BizOptionPatch.prototype, "cuFlag", void 0);
57
- BizOptionPatch = __decorate([
58
- (0, type_graphql_1.InputType)()
59
- ], BizOptionPatch);
60
- exports.BizOptionPatch = BizOptionPatch;
61
- let NewBizOption = class NewBizOption {
62
- };
63
- __decorate([
64
- (0, type_graphql_1.Field)(),
65
- __metadata("design:type", String)
66
- ], NewBizOption.prototype, "name", void 0);
67
- __decorate([
68
- (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", String)
70
- ], NewBizOption.prototype, "description", void 0);
71
- NewBizOption = __decorate([
72
- (0, type_graphql_1.InputType)()
73
- ], NewBizOption);
74
- exports.NewBizOption = NewBizOption;
75
- //# sourceMappingURL=biz-option-types.js.map
@@ -1 +0,0 @@
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;AAGjC,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAEnB;IAAC,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;AASnB,IAAM,cAAc,GAApB,MAAM,cAAc;CAkB1B,CAAA;AAjBC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAClC,iBAAS,oBAAT,iBAAS;gDAAA;AAEpB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACjB;AAE9B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACX;AAjBJ,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAkB1B;AAlBY,wCAAc;AAqBpB,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;0CACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AANY,oCAAY"}
@@ -1,86 +0,0 @@
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 _a, _b, _c;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.BizOption = void 0;
14
- const type_graphql_1 = require("type-graphql");
15
- const typeorm_1 = require("typeorm");
16
- const auth_base_1 = require("@things-factory/auth-base");
17
- const shell_1 = require("@things-factory/shell");
18
- const biz_option_detail_1 = require("../biz-option-detail/biz-option-detail");
19
- const bizplace_1 = require("../bizplace/bizplace");
20
- let BizOption = class BizOption {
21
- };
22
- __decorate([
23
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
- __metadata("design:type", String)
26
- ], BizOption.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: true }),
29
- (0, type_graphql_1.Field)({ nullable: true }),
30
- __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
31
- ], BizOption.prototype, "domain", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)(),
34
- (0, type_graphql_1.Field)(),
35
- __metadata("design:type", String)
36
- ], BizOption.prototype, "name", void 0);
37
- __decorate([
38
- (0, typeorm_1.ManyToOne)(type => bizplace_1.Bizplace, {
39
- nullable: false
40
- }),
41
- (0, type_graphql_1.Field)(type => bizplace_1.Bizplace, { nullable: true }),
42
- __metadata("design:type", bizplace_1.Bizplace)
43
- ], BizOption.prototype, "bizplace", void 0);
44
- __decorate([
45
- (0, typeorm_1.OneToMany)(type => biz_option_detail_1.BizOptionDetail, bizOptionDetail => bizOptionDetail.bizOption),
46
- (0, type_graphql_1.Field)(type => biz_option_detail_1.BizOptionDetail, { nullable: true }),
47
- __metadata("design:type", Array)
48
- ], BizOption.prototype, "bizOptionDetails", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({
51
- nullable: true
52
- }),
53
- (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", String)
55
- ], BizOption.prototype, "description", void 0);
56
- __decorate([
57
- (0, typeorm_1.CreateDateColumn)(),
58
- (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", Date)
60
- ], BizOption.prototype, "createdAt", void 0);
61
- __decorate([
62
- (0, typeorm_1.UpdateDateColumn)(),
63
- (0, type_graphql_1.Field)({ nullable: true }),
64
- __metadata("design:type", Date)
65
- ], BizOption.prototype, "updatedAt", void 0);
66
- __decorate([
67
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
68
- nullable: true
69
- }),
70
- (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)
72
- ], BizOption.prototype, "creator", void 0);
73
- __decorate([
74
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
75
- nullable: true
76
- }),
77
- (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)
79
- ], BizOption.prototype, "updater", void 0);
80
- BizOption = __decorate([
81
- (0, typeorm_1.Entity)(),
82
- (0, typeorm_1.Index)('ix_biz-option_0', (bizOption) => [bizOption.bizplace, bizOption.name], { unique: true }),
83
- (0, type_graphql_1.ObjectType)()
84
- ], BizOption);
85
- exports.BizOption = BizOption;
86
- //# sourceMappingURL=biz-option.js.map
@@ -1 +0,0 @@
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;AAKxC,IAAM,SAAS,GAAf,MAAM,SAAS;CAgDrB,CAAA;AA/CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACR;AAE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IAAI,EAAE,CAAC;kDACjB,gBAAI,oBAAJ,gBAAI;0CAAA;AAEb;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,gBAAI,oBAAJ,gBAAI;0CAAA;AA/CF,SAAS;IAHrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,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"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const biz_option_1 = require("./biz-option");
5
- const biz_option_mutation_1 = require("./biz-option-mutation");
6
- const biz_option_query_1 = require("./biz-option-query");
7
- exports.entities = [biz_option_1.BizOption];
8
- exports.resolvers = [biz_option_query_1.BizOptionQuery, biz_option_mutation_1.BizOptionMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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,80 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.BizOptionDetailMutation = void 0;
16
- const type_graphql_1 = require("type-graphql");
17
- const typeorm_1 = require("typeorm");
18
- const biz_option_detail_1 = require("./biz-option-detail");
19
- const biz_option_detail_types_1 = require("./biz-option-detail-types");
20
- let BizOptionDetailMutation = class BizOptionDetailMutation {
21
- async createBizOptionDetail(bizOptionDetail, context) {
22
- return await (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail).save(Object.assign(Object.assign({}, bizOptionDetail), { domain: context.state.domain, creator: context.state.user, updater: context.state.user }));
23
- }
24
- async updateBizOptionDetail(name, patch, context) {
25
- const repository = (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail);
26
- const bizOptionDetail = await repository.findOne({
27
- where: { domain: context.state.domain, name }
28
- });
29
- return await repository.save(Object.assign(Object.assign(Object.assign({}, bizOptionDetail), patch), { updater: context.state.user }));
30
- }
31
- async deleteBizOptionDetail(name, context) {
32
- await (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail).delete({ domain: context.state.domain, name });
33
- return true;
34
- }
35
- async deleteBizOptionDetails(names, context) {
36
- await (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail).delete({
37
- domain: context.state.domain,
38
- name: (0, typeorm_1.In)(names)
39
- });
40
- return true;
41
- }
42
- };
43
- __decorate([
44
- (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)
50
- ], BizOptionDetailMutation.prototype, "createBizOptionDetail", null);
51
- __decorate([
52
- (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)
59
- ], BizOptionDetailMutation.prototype, "updateBizOptionDetail", null);
60
- __decorate([
61
- (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)
67
- ], BizOptionDetailMutation.prototype, "deleteBizOptionDetail", null);
68
- __decorate([
69
- (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)
75
- ], BizOptionDetailMutation.prototype, "deleteBizOptionDetails", null);
76
- BizOptionDetailMutation = __decorate([
77
- (0, type_graphql_1.Resolver)(biz_option_detail_1.BizOptionDetail)
78
- ], BizOptionDetailMutation);
79
- exports.BizOptionDetailMutation = BizOptionDetailMutation;
80
- //# sourceMappingURL=biz-option-detail-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"biz-option-detail-mutation.js","sourceRoot":"","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AAe,CAAC,CAAC,MAAM,CAAC;YAC1C,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC5B,IAAI,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC;SAChB,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AA5CO;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,mCAAe,CAAC;IAElC,WAAA,IAAA,kBAAG,EAAC,iBAAiB,CAAC,CAAA;IACtB,WAAA,IAAA,kBAAG,GAAE,CAAA;;qCADmC,4CAAkB;;oEAS5D;AAGK;IADL,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;AAGK;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACA,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;oEAG5D;AAGK;IADL,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,54 +0,0 @@
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
- var _a;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.BizOptionDetailQuery = void 0;
17
- const type_graphql_1 = require("type-graphql");
18
- const typeorm_1 = require("typeorm");
19
- const shell_1 = require("@things-factory/shell");
20
- const biz_option_detail_1 = require("./biz-option-detail");
21
- const biz_option_detail_types_1 = require("./biz-option-detail-types");
22
- let BizOptionDetailQuery = class BizOptionDetailQuery {
23
- async bizOptionDetail(name, context) {
24
- return await (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail).findOne({
25
- where: { domain: context.state.domain, name },
26
- relations: ['domain', 'bizOption', 'creator', 'updater']
27
- });
28
- }
29
- async bizOptionDetails(params) {
30
- const convertedParams = (0, shell_1.convertListParams)(params);
31
- const [items, total] = await (0, typeorm_1.getRepository)(biz_option_detail_1.BizOptionDetail).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'bizOption', 'creator', 'updater'] }));
32
- return { items, total };
33
- }
34
- };
35
- __decorate([
36
- (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)
42
- ], BizOptionDetailQuery.prototype, "bizOptionDetail", null);
43
- __decorate([
44
- (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)
49
- ], BizOptionDetailQuery.prototype, "bizOptionDetails", null);
50
- BizOptionDetailQuery = __decorate([
51
- (0, type_graphql_1.Resolver)(biz_option_detail_1.BizOptionDetail)
52
- ], BizOptionDetailQuery);
53
- exports.BizOptionDetailQuery = BizOptionDetailQuery;
54
- //# sourceMappingURL=biz-option-detail-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"biz-option-detail-query.js","sourceRoot":"","sources":["../../../server/service/biz-option-detail/biz-option-detail-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,qCAAuC;AAEvC,iDAAoE;AAEpE,2DAAqD;AACrD,uEAA+D;AAGxD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAEzB,AAAN,KAAK,CAAC,eAAe,CAAc,IAAY,EAAS,OAAY;QAClE,OAAO,MAAM,IAAA,uBAAa,EAAC,mCAAe,CAAC,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;YAC7C,SAAS,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;SACzD,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CAAS,MAAiB;QAC9C,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,mCAAe,CAAC,CAAC,YAAY,iCACnE,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,SA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