@things-factory/biz-base 5.0.7 → 6.0.0-alpha.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.
Files changed (79) 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 +38 -45
  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 +17 -30
  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 -33
  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 -31
  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 +34 -44
  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 +16 -29
  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 -29
  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 -29
  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 +53 -65
  24. package/dist-server/service/bizplace/bizplace-mutation.js.map +1 -1
  25. package/dist-server/service/bizplace/bizplace-query.js +79 -88
  26. package/dist-server/service/bizplace/bizplace-query.js.map +1 -1
  27. package/dist-server/service/bizplace/bizplace-types.js +53 -62
  28. package/dist-server/service/bizplace/bizplace-types.js.map +1 -1
  29. package/dist-server/service/bizplace/bizplace.js +33 -42
  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 +40 -51
  33. package/dist-server/service/company/company-mutation.js.map +1 -1
  34. package/dist-server/service/company/company-query.js +28 -44
  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 -47
  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 +45 -56
  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 +17 -30
  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 -89
  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 -57
  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 +40 -50
  54. package/dist-server/service/worker/worker-mutation.js.map +1 -1
  55. package/dist-server/service/worker/worker-query.js +16 -28
  56. package/dist-server/service/worker/worker-query.js.map +1 -1
  57. package/dist-server/service/worker/worker-types.js +28 -37
  58. package/dist-server/service/worker/worker-types.js.map +1 -1
  59. package/dist-server/service/worker/worker.js +22 -31
  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 +30 -24
  63. package/dist-server/utils/get-permitted-bizplaces.js.map +1 -1
  64. package/dist-server/utils/index.js +2 -15
  65. package/dist-server/utils/index.js.map +1 -1
  66. package/package.json +3 -3
  67. package/server/service/biz-option/biz-option-mutation.ts +26 -12
  68. package/server/service/biz-option/biz-option-query.ts +4 -5
  69. package/server/service/biz-option-detail/biz-option-detail-mutation.ts +13 -8
  70. package/server/service/biz-option-detail/biz-option-detail-query.ts +3 -4
  71. package/server/service/bizplace/bizplace-mutation.ts +11 -12
  72. package/server/service/bizplace/bizplace-query.ts +44 -37
  73. package/server/service/company/company-mutation.ts +15 -9
  74. package/server/service/company/company-query.ts +9 -14
  75. package/server/service/contact-point/contact-point-mutation.ts +18 -16
  76. package/server/service/contact-point/contact-point-query.ts +4 -5
  77. package/server/service/worker/worker-mutation.ts +10 -10
  78. package/server/service/worker/worker-query.ts +4 -4
  79. package/server/utils/get-permitted-bizplaces.ts +15 -9
@@ -1,19 +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
- var _a, _b, _c, _d;
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.bizplaceUsers = exports.BizplaceQuery = void 0;
4
+ const tslib_1 = require("tslib");
17
5
  const type_graphql_1 = require("type-graphql");
18
6
  const typeorm_1 = require("typeorm");
19
7
  const auth_base_1 = require("@things-factory/auth-base");
@@ -24,9 +12,9 @@ const bizplace_types_1 = require("./bizplace-types");
24
12
  let BizplaceQuery = class BizplaceQuery {
25
13
  async customerBizplaces(context) {
26
14
  const { domain, user } = context.state;
27
- return await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).find({
15
+ return await (0, shell_1.getRepository)(bizplace_1.Bizplace).find({
28
16
  where: {
29
- domain,
17
+ domain: { id: domain.id },
30
18
  id: (0, typeorm_1.Not)((0, typeorm_1.In)([await (0, utils_1.getMyBizplace)(domain, user)]))
31
19
  },
32
20
  relations: ['domain', 'creator', 'updater']
@@ -35,32 +23,32 @@ let BizplaceQuery = class BizplaceQuery {
35
23
  async businessBizplace(context) {
36
24
  const { domain, user } = context.state;
37
25
  const myBizplace = await (0, utils_1.getMyBizplace)(domain, user);
38
- return await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).findOne({
26
+ return await (0, shell_1.getRepository)(bizplace_1.Bizplace).findOne({
39
27
  where: { id: myBizplace.id },
40
28
  relations: ['company', 'domain', 'users', 'creator', 'updater']
41
29
  });
42
30
  }
31
+ /* TODO make it work */
43
32
  async userBizplaces(email, context) {
44
- const user = await (0, typeorm_1.getRepository)(auth_base_1.User).findOne({
45
- domain: context.state.domain,
33
+ const { domain } = context.state;
34
+ const user = await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({
46
35
  email: email != '' ? email : context.state.user.email
47
- }, {
48
- relations: ['bizplaces']
49
- });
50
- const bizplaces = await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).find({ domain: context.state.domain });
51
- const userBizplaces = user.bizplaces;
52
- return bizplaces.map((bizplace) => {
53
- return {
54
- id: bizplace.id,
55
- name: bizplace.name,
56
- description: bizplace.description,
57
- userBizplaceId: userBizplaces
58
- .map(userBiz => userBiz.bizplace.id)
59
- .slice(0, 1)
60
- .shift(),
61
- assigned: userBizplaces.filter((userBizplace) => userBizplace.id === bizplace.id).length > 0
62
- };
63
36
  });
37
+ return await (0, utils_1.getUserBizplaces)(user);
38
+ // const bizplaces = await getRepository(Bizplace).find({ domain })
39
+ // // const userBizplaces = user.bizplaces
40
+ // return bizplaces.map((bizplace: Bizplace) => {
41
+ // return {
42
+ // id: bizplace.id,
43
+ // name: bizplace.name,
44
+ // description: bizplace.description,
45
+ // userBizplaceId: userBizplaces
46
+ // .map(userBiz => userBiz.bizplace.id)
47
+ // .slice(0, 1)
48
+ // .shift(),
49
+ // assigned: userBizplaces.filter((userBizplace: Bizplace) => userBizplace.id === bizplace.id).length > 0
50
+ // }
51
+ // })
64
52
  }
65
53
  async bizplaces(params, context) {
66
54
  let bizplace_ids = [];
@@ -84,11 +72,11 @@ let BizplaceQuery = class BizplaceQuery {
84
72
  else
85
73
  convertedParams.where.id = (0, typeorm_1.In)(bizplace_ids);
86
74
  }
87
- const [items, total] = await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
75
+ const [items, total] = await (0, shell_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
88
76
  return { items, total };
89
77
  }
90
78
  async bizplace(id) {
91
- return await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).findOne({
79
+ return await (0, shell_1.getRepository)(bizplace_1.Bizplace).findOne({
92
80
  where: { id },
93
81
  relations: ['company', 'domain', 'users', 'users.roles', 'creator', 'updater']
94
82
  });
@@ -128,7 +116,7 @@ let BizplaceQuery = class BizplaceQuery {
128
116
  const convertedParams = (0, shell_1.convertListParams)(params, {
129
117
  searchables: ['name', 'description']
130
118
  });
131
- const [items, total] = await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
119
+ const [items, total] = await (0, shell_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
132
120
  return { items, total };
133
121
  }
134
122
  async permittedPartnersCompanyBizplaces(params, context) {
@@ -151,86 +139,89 @@ let BizplaceQuery = class BizplaceQuery {
151
139
  else {
152
140
  convertedParams.where.id = (0, typeorm_1.In)(partnersBizplaceIds);
153
141
  }
154
- const [items, total] = await (0, typeorm_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
142
+ const [items, total] = await (0, shell_1.getRepository)(bizplace_1.Bizplace).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'company', 'users', 'creator', 'updater'] }));
155
143
  return { items, total };
156
144
  }
157
145
  };
158
- __decorate([
146
+ tslib_1.__decorate([
159
147
  (0, type_graphql_1.Directive)('@privilege(category: "bizplace", privilege: "query")'),
160
148
  (0, type_graphql_1.Query)(returns => [bizplace_1.Bizplace]),
161
- __param(0, (0, type_graphql_1.Ctx)()),
162
- __metadata("design:type", Function),
163
- __metadata("design:paramtypes", [Object]),
164
- __metadata("design:returntype", Promise)
149
+ tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
150
+ tslib_1.__metadata("design:type", Function),
151
+ tslib_1.__metadata("design:paramtypes", [Object]),
152
+ tslib_1.__metadata("design:returntype", Promise)
165
153
  ], BizplaceQuery.prototype, "customerBizplaces", null);
166
- __decorate([
154
+ tslib_1.__decorate([
167
155
  (0, type_graphql_1.Directive)('@privilege(category: "bizplace", privilege: "query", domainOwnerGranted: true)'),
168
156
  (0, type_graphql_1.Query)(returns => bizplace_1.Bizplace),
169
- __param(0, (0, type_graphql_1.Ctx)()),
170
- __metadata("design:type", Function),
171
- __metadata("design:paramtypes", [Object]),
172
- __metadata("design:returntype", Promise)
157
+ tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
158
+ tslib_1.__metadata("design:type", Function),
159
+ tslib_1.__metadata("design:paramtypes", [Object]),
160
+ tslib_1.__metadata("design:returntype", Promise)
173
161
  ], BizplaceQuery.prototype, "businessBizplace", null);
174
- __decorate([
162
+ tslib_1.__decorate([
175
163
  (0, type_graphql_1.Directive)('@privilege(category: "bizplace", privilege: "query", domainOwnerGranted: true)'),
176
- (0, type_graphql_1.Query)(returns => [bizplace_types_1.UserBizplace]),
177
- __param(0, (0, type_graphql_1.Arg)('email')),
178
- __param(1, (0, type_graphql_1.Ctx)()),
179
- __metadata("design:type", Function),
180
- __metadata("design:paramtypes", [String, Object]),
181
- __metadata("design:returntype", Promise)
164
+ (0, type_graphql_1.Query)(returns => [bizplace_1.Bizplace]),
165
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('email')),
166
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
167
+ tslib_1.__metadata("design:type", Function),
168
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
169
+ tslib_1.__metadata("design:returntype", Promise)
182
170
  ], BizplaceQuery.prototype, "userBizplaces", null);
183
- __decorate([
171
+ tslib_1.__decorate([
184
172
  (0, type_graphql_1.Directive)('@privilege(category: "bizplace", privilege: "query", domainOwnerGranted: true)'),
185
173
  (0, type_graphql_1.Query)(returns => bizplace_types_1.BizplaceList),
186
- __param(0, (0, type_graphql_1.Args)()),
187
- __param(1, (0, type_graphql_1.Ctx)()),
188
- __metadata("design:type", Function),
189
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
190
- __metadata("design:returntype", Promise)
174
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
175
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
176
+ tslib_1.__metadata("design:type", Function),
177
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
178
+ tslib_1.__metadata("design:returntype", Promise)
191
179
  ], BizplaceQuery.prototype, "bizplaces", null);
192
- __decorate([
180
+ tslib_1.__decorate([
193
181
  (0, type_graphql_1.Directive)('@privilege(category: "bizplace", privilege: "query", domainOwnerGranted: true)'),
194
182
  (0, type_graphql_1.Query)(returns => bizplace_1.Bizplace),
195
- __param(0, (0, type_graphql_1.Arg)('id')),
196
- __metadata("design:type", Function),
197
- __metadata("design:paramtypes", [String]),
198
- __metadata("design:returntype", Promise)
183
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
184
+ tslib_1.__metadata("design:type", Function),
185
+ tslib_1.__metadata("design:paramtypes", [String]),
186
+ tslib_1.__metadata("design:returntype", Promise)
199
187
  ], BizplaceQuery.prototype, "bizplace", null);
200
- __decorate([
188
+ tslib_1.__decorate([
201
189
  (0, type_graphql_1.Query)(returns => auth_base_1.UserList),
202
- __param(0, (0, type_graphql_1.Args)()),
203
- __param(1, (0, type_graphql_1.Ctx)()),
204
- __metadata("design:type", Function),
205
- __metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
206
- __metadata("design:returntype", Promise)
190
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
191
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
192
+ tslib_1.__metadata("design:type", Function),
193
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
194
+ tslib_1.__metadata("design:returntype", Promise)
207
195
  ], BizplaceQuery.prototype, "bizplaceUsers", null);
208
- __decorate([
196
+ tslib_1.__decorate([
209
197
  (0, type_graphql_1.Query)(returns => bizplace_types_1.BizplaceList),
210
- __param(0, (0, type_graphql_1.Args)()),
211
- __param(1, (0, type_graphql_1.Ctx)()),
212
- __metadata("design:type", Function),
213
- __metadata("design:paramtypes", [typeof (_c = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _c : Object, Object]),
214
- __metadata("design:returntype", Promise)
198
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
199
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
200
+ tslib_1.__metadata("design:type", Function),
201
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
202
+ tslib_1.__metadata("design:returntype", Promise)
215
203
  ], BizplaceQuery.prototype, "partnersBizplaces", null);
216
- __decorate([
204
+ tslib_1.__decorate([
217
205
  (0, type_graphql_1.Query)(returns => bizplace_types_1.BizplaceList),
218
- __param(0, (0, type_graphql_1.Args)()),
219
- __param(1, (0, type_graphql_1.Ctx)()),
220
- __metadata("design:type", Function),
221
- __metadata("design:paramtypes", [typeof (_d = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _d : Object, Object]),
222
- __metadata("design:returntype", Promise)
206
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
207
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
208
+ tslib_1.__metadata("design:type", Function),
209
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
210
+ tslib_1.__metadata("design:returntype", Promise)
223
211
  ], BizplaceQuery.prototype, "permittedPartnersCompanyBizplaces", null);
224
- BizplaceQuery = __decorate([
212
+ BizplaceQuery = tslib_1.__decorate([
225
213
  (0, type_graphql_1.Resolver)(bizplace_1.Bizplace)
226
214
  ], BizplaceQuery);
227
215
  exports.BizplaceQuery = BizplaceQuery;
228
216
  async function bizplaceUsers(bizplace, params, trxMgr) {
229
217
  var _a;
230
- const bizplaceRepo = (trxMgr === null || trxMgr === void 0 ? void 0 : trxMgr.getRepository(bizplace_1.Bizplace)) || (0, typeorm_1.getRepository)(bizplace_1.Bizplace);
231
- const userRepo = (trxMgr === null || trxMgr === void 0 ? void 0 : trxMgr.getRepository(auth_base_1.User)) || (0, typeorm_1.getRepository)(auth_base_1.User);
218
+ const bizplaceRepo = (trxMgr === null || trxMgr === void 0 ? void 0 : trxMgr.getRepository(bizplace_1.Bizplace)) || (0, shell_1.getRepository)(bizplace_1.Bizplace);
219
+ const userRepo = (trxMgr === null || trxMgr === void 0 ? void 0 : trxMgr.getRepository(auth_base_1.User)) || (0, shell_1.getRepository)(auth_base_1.User);
232
220
  if (!((_a = bizplace === null || bizplace === void 0 ? void 0 : bizplace.users) === null || _a === void 0 ? void 0 : _a.length)) {
233
- bizplace = await bizplaceRepo.findOne(bizplace, { relations: ['users'] });
221
+ bizplace = await bizplaceRepo.findOne({
222
+ where: { id: bizplace.id },
223
+ relations: ['users']
224
+ });
234
225
  }
235
226
  const users = bizplace.users;
236
227
  const userIds = users.map((user) => user.id);
@@ -1 +1 @@
1
- {"version":3,"file":"bizplace-query.js","sourceRoot":"","sources":["../../../server/service/bizplace/bizplace-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAyE;AACzE,qCAA4F;AAE5F,yDAA0D;AAC1D,iDAAoE;AAEpE,uCAMoB;AACpB,yCAAqC;AACrC,qDAA6D;AAG7D,IAAa,aAAa,GAA1B,MAAa,aAAa;IAGxB,KAAK,CAAC,iBAAiB,CAAQ,OAAY;QACzC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QACtC,OAAO,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE;gBACL,MAAM;gBACN,EAAE,EAAE,IAAA,aAAG,EAAC,IAAA,YAAE,EAAC,CAAC,MAAM,IAAA,qBAAa,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;aACjD;YACD,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5C,CAAC,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,gBAAgB,CAAQ,OAAY;QACxC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QACtC,MAAM,UAAU,GAAG,MAAM,IAAA,qBAAa,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACpD,OAAO,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE;YAC5B,S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CAAA;IAEF,OAAO;QACL,KAAK;QACL,KAAK;KACN,CAAA;AACH,CAAC;AA7BD,sCA6BC","sourcesContent":["import { Arg, Args, Ctx, Directive, Query, Resolver } from 'type-graphql'\nimport { EntityManager, FindManyOptions, In, Not, Repository } from 'typeorm'\n\nimport { User, UserList } from '@things-factory/auth-base'\nimport { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport {\n getMyBizplace,\n getPartnerBizplaceIds,\n getPartnersBizplaces,\n getPartnersCompanyBizplaces,\n getPermittedBizplaceIds,\n getUserBizplaces\n} from '../../utils'\nimport { Bizplace } from './bizplace'\nimport { BizplaceList } from './bizplace-types'\n\n@Resolver(Bizplace)\nexport class BizplaceQuery {\n @Directive('@privilege(category: \"bizplace\", privilege: \"query\")')\n @Query(returns => [Bizplace])\n async customerBizplaces(@Ctx() context: ResolverContext): Promise<Bizplace[]> {\n const { domain, user } = context.state\n return await getRepository(Bizplace).find({\n where: {\n domain: { id: domain.id },\n id: Not(In([await getMyBizplace(domain, user)]))\n },\n relations: ['domain', 'creator', 'updater']\n })\n }\n\n @Directive('@privilege(category: \"bizplace\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => Bizplace)\n async businessBizplace(@Ctx() context: ResolverContext): Promise<Bizplace> {\n const { domain, user } = context.state\n const myBizplace = await getMyBizplace(domain, user)\n return await getRepository(Bizplace).findOne({\n where: { id: myBizplace.id },\n relations: ['company', 'domain', 'users', 'creator', 'updater']\n })\n }\n\n /* TODO make it work */\n @Directive('@privilege(category: \"bizplace\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => [Bizplace])\n async userBizplaces(@Arg('email') email: string, @Ctx() context: ResolverContext): Promise<Bizplace[]> {\n const { domain } = context.state\n\n const user: User = await getRepository(User).findOneBy({\n email: email != '' ? email : context.state.user.email\n })\n\n return await getUserBizplaces(user)\n\n // const bizplaces = await getRepository(Bizplace).find({ domain })\n // // const userBizplaces = user.bizplaces\n // return bizplaces.map((bizplace: Bizplace) => {\n // return {\n // id: bizplace.id,\n // name: bizplace.name,\n // description: bizplace.description,\n // userBizplaceId: userBizplaces\n // .map(userBiz => userBiz.bizplace.id)\n // .slice(0, 1)\n // .shift(),\n // assigned: userBizplaces.filter((userBizplace: Bizplace) => userBizplace.id === bizplace.id).length > 0\n // }\n // })\n }\n\n @Directive('@privilege(category: \"bizplace\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => BizplaceList)\n async bizplaces(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<BizplaceList> {\n let bizplace_ids = []\n let bizplaceIndex: any = params.filters.findIndex(x => x.name === 'bizplace')\n if (bizplaceIndex > -1) {\n bizplace_ids = params.filters\n .filter(x => x.name === 'bizplace')\n .map(item => {\n return item.value\n })\n params.filters.splice(bizplaceIndex, 1)\n }\n\n const convertedParams = convertListParams(params)\n\n let domainIndex: any = params.filters.findIndex(x => x.name === 'domain')\n if (domainIndex > -1) {\n convertedParams.where.id = In(await getPartnerBizplaceIds(context.state.domain, context.state.user))\n } else {\n if (!(bizplace_ids.length > 0))\n convertedParams.where.id = In(await getPermittedBizplaceIds(context.state.domain, context.state.user))\n else convertedParams.where.id = In(bizplace_ids)\n }\n\n const [items, total] = await getRepository(Bizplace).findAndCount({\n ...convertedParams,\n relations: ['domain', 'company', 'users', 'creator', 'updater']\n })\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"bizplace\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => Bizplace)\n async bizplace(@Arg('id') id: string): Promise<Bizplace> {\n return await getRepository(Bizplace).findOne({\n where: { id },\n relations: ['company', 'domain', 'users', 'users.roles', 'creator', 'updater']\n })\n }\n\n @Query(returns => UserList)\n async bizplaceUsers(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<UserList> {\n const { domain, user } = context.state\n const myBizplace: Bizplace = await getMyBizplace(domain, user)\n return await bizplaceUsers(myBizplace, {\n ...(await convertListParams(params)),\n relations: ['domain', 'domains', 'roles', 'roles.privileges', 'roles.users']\n })\n }\n\n @Query(returns => BizplaceList)\n async partnersBizplaces(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<BizplaceList> {\n let partnersBizplaceIds = []\n let bizplaceIndex: any = params.filters.findIndex(x => x.name === 'bizplace')\n if (bizplaceIndex > -1) {\n partnersBizplaceIds = params.filters\n .filter(x => x.name === 'bizplace')\n .map(item => {\n return item.value\n })\n params.filters.splice(bizplaceIndex, 1)\n }\n\n if (!(partnersBizplaceIds.length > 0)) {\n const partnersBizplaces: Bizplace[] = await getPartnersBizplaces(context.state.domain, context.state.user)\n partnersBizplaceIds = partnersBizplaces.map((bizplace: Bizplace) => bizplace.id || null)\n params.filters.push({\n name: 'id',\n operator: 'in',\n value: partnersBizplaceIds\n })\n } else {\n params.filters.push({\n name: 'id',\n operator: 'in',\n value: partnersBizplaceIds\n })\n }\n\n const convertedParams = convertListParams(params, {\n searchables: ['name', 'description']\n })\n\n const [items, total] = await getRepository(Bizplace).findAndCount({\n ...convertedParams,\n relations: ['domain', 'company', 'users', 'creator', 'updater']\n })\n\n return { items, total }\n }\n\n @Query(returns => BizplaceList)\n async permittedPartnersCompanyBizplaces(\n @Args() params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<BizplaceList> {\n let partnersBizplaceIds = []\n let bizplaceIndex: any = params.filters.findIndex(x => x.name === 'bizplace')\n if (bizplaceIndex > -1) {\n partnersBizplaceIds = params.filters\n .filter(x => x.name === 'bizplace')\n .map(item => {\n return item.value\n })\n params.filters.splice(bizplaceIndex, 1)\n }\n\n const convertedParams = convertListParams(params)\n\n if (!(partnersBizplaceIds.length > 0)) {\n const partnersBizplaces: Bizplace[] = await getPartnersCompanyBizplaces(\n context.state.domain,\n context.state.user,\n true\n )\n partnersBizplaceIds = partnersBizplaces.map((bizplace: Bizplace) => bizplace.id || null)\n convertedParams.where.id = In(partnersBizplaceIds)\n } else {\n convertedParams.where.id = In(partnersBizplaceIds)\n }\n\n const [items, total] = await getRepository(Bizplace).findAndCount({\n ...convertedParams,\n relations: ['domain', 'company', 'users', 'creator', 'updater']\n })\n\n return { items, total }\n }\n}\n\nexport async function bizplaceUsers(\n bizplace: Bizplace,\n params: FindManyOptions<User>,\n trxMgr?: EntityManager\n): Promise<{ items: User[]; total: number }> {\n const bizplaceRepo: Repository<Bizplace> = trxMgr?.getRepository(Bizplace) || getRepository(Bizplace)\n const userRepo: Repository<User> = trxMgr?.getRepository(User) || getRepository(User)\n\n if (!bizplace?.users?.length) {\n bizplace = await bizplaceRepo.findOne({\n where: { id: bizplace.id },\n relations: ['users']\n })\n }\n const users: User[] = bizplace.users\n const userIds: string[] = users.map((user: User) => user.id)\n\n const [items, total] = await userRepo.findAndCount({\n ...params,\n where: {\n ...(params.where as any),\n id: In(userIds)\n }\n })\n\n return {\n items,\n total\n }\n}\n"]}
@@ -1,136 +1,127 @@
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 _a, _b;
12
2
  Object.defineProperty(exports, "__esModule", { value: true });
13
3
  exports.NewBizplace = exports.BizplacePatch = exports.UserBizplace = exports.BizplaceList = void 0;
4
+ const tslib_1 = require("tslib");
14
5
  const type_graphql_1 = require("type-graphql");
15
6
  const shell_1 = require("@things-factory/shell");
16
7
  const bizplace_1 = require("./bizplace");
17
8
  let BizplaceList = class BizplaceList {
18
9
  };
19
- __decorate([
10
+ tslib_1.__decorate([
20
11
  (0, type_graphql_1.Field)(type => [bizplace_1.Bizplace], { nullable: true }),
21
- __metadata("design:type", Array)
12
+ tslib_1.__metadata("design:type", Array)
22
13
  ], BizplaceList.prototype, "items", void 0);
23
- __decorate([
14
+ tslib_1.__decorate([
24
15
  (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
25
- __metadata("design:type", Number)
16
+ tslib_1.__metadata("design:type", Number)
26
17
  ], BizplaceList.prototype, "total", void 0);
27
- BizplaceList = __decorate([
18
+ BizplaceList = tslib_1.__decorate([
28
19
  (0, type_graphql_1.ObjectType)()
29
20
  ], BizplaceList);
30
21
  exports.BizplaceList = BizplaceList;
31
22
  let UserBizplace = class UserBizplace {
32
23
  };
33
- __decorate([
24
+ tslib_1.__decorate([
34
25
  (0, type_graphql_1.Field)({ nullable: true }),
35
- __metadata("design:type", String)
26
+ tslib_1.__metadata("design:type", String)
36
27
  ], UserBizplace.prototype, "id", void 0);
37
- __decorate([
28
+ tslib_1.__decorate([
38
29
  (0, type_graphql_1.Field)({ nullable: true }),
39
- __metadata("design:type", String)
30
+ tslib_1.__metadata("design:type", String)
40
31
  ], UserBizplace.prototype, "name", void 0);
41
- __decorate([
32
+ tslib_1.__decorate([
42
33
  (0, type_graphql_1.Field)({ nullable: true }),
43
- __metadata("design:type", String)
34
+ tslib_1.__metadata("design:type", String)
44
35
  ], UserBizplace.prototype, "description", void 0);
45
- __decorate([
36
+ tslib_1.__decorate([
46
37
  (0, type_graphql_1.Field)({ nullable: true }),
47
- __metadata("design:type", Boolean)
38
+ tslib_1.__metadata("design:type", Boolean)
48
39
  ], UserBizplace.prototype, "assigned", void 0);
49
- __decorate([
40
+ tslib_1.__decorate([
50
41
  (0, type_graphql_1.Field)({ nullable: true }),
51
- __metadata("design:type", String)
42
+ tslib_1.__metadata("design:type", String)
52
43
  ], UserBizplace.prototype, "userBizplaceId", void 0);
53
- __decorate([
44
+ tslib_1.__decorate([
54
45
  (0, type_graphql_1.Field)({ nullable: true }),
55
- __metadata("design:type", Boolean)
46
+ tslib_1.__metadata("design:type", Boolean)
56
47
  ], UserBizplace.prototype, "mainBizplace", void 0);
57
- UserBizplace = __decorate([
48
+ UserBizplace = tslib_1.__decorate([
58
49
  (0, type_graphql_1.ObjectType)()
59
50
  ], UserBizplace);
60
51
  exports.UserBizplace = UserBizplace;
61
52
  let BizplacePatch = class BizplacePatch {
62
53
  };
63
- __decorate([
54
+ tslib_1.__decorate([
64
55
  (0, type_graphql_1.Field)({ nullable: true }),
65
- __metadata("design:type", String)
56
+ tslib_1.__metadata("design:type", String)
66
57
  ], BizplacePatch.prototype, "id", void 0);
67
- __decorate([
58
+ tslib_1.__decorate([
68
59
  (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", String)
60
+ tslib_1.__metadata("design:type", String)
70
61
  ], BizplacePatch.prototype, "name", void 0);
71
- __decorate([
62
+ tslib_1.__decorate([
72
63
  (0, type_graphql_1.Field)({ nullable: true }),
73
- __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
64
+ tslib_1.__metadata("design:type", shell_1.ObjectRef)
74
65
  ], BizplacePatch.prototype, "company", void 0);
75
- __decorate([
66
+ tslib_1.__decorate([
76
67
  (0, type_graphql_1.Field)({ nullable: true }),
77
- __metadata("design:type", String)
68
+ tslib_1.__metadata("design:type", String)
78
69
  ], BizplacePatch.prototype, "description", void 0);
79
- __decorate([
70
+ tslib_1.__decorate([
80
71
  (0, type_graphql_1.Field)({ nullable: true }),
81
- __metadata("design:type", String)
72
+ tslib_1.__metadata("design:type", String)
82
73
  ], BizplacePatch.prototype, "address", void 0);
83
- __decorate([
74
+ tslib_1.__decorate([
84
75
  (0, type_graphql_1.Field)({ nullable: true }),
85
- __metadata("design:type", String)
76
+ tslib_1.__metadata("design:type", String)
86
77
  ], BizplacePatch.prototype, "postalCode", void 0);
87
- __decorate([
78
+ tslib_1.__decorate([
88
79
  (0, type_graphql_1.Field)({ nullable: true }),
89
- __metadata("design:type", String)
80
+ tslib_1.__metadata("design:type", String)
90
81
  ], BizplacePatch.prototype, "latlng", void 0);
91
- __decorate([
82
+ tslib_1.__decorate([
92
83
  (0, type_graphql_1.Field)({ nullable: true }),
93
- __metadata("design:type", String)
84
+ tslib_1.__metadata("design:type", String)
94
85
  ], BizplacePatch.prototype, "status", void 0);
95
- __decorate([
86
+ tslib_1.__decorate([
96
87
  (0, type_graphql_1.Field)({ nullable: true }),
97
- __metadata("design:type", String)
88
+ tslib_1.__metadata("design:type", String)
98
89
  ], BizplacePatch.prototype, "cuFlag", void 0);
99
- BizplacePatch = __decorate([
90
+ BizplacePatch = tslib_1.__decorate([
100
91
  (0, type_graphql_1.InputType)()
101
92
  ], BizplacePatch);
102
93
  exports.BizplacePatch = BizplacePatch;
103
94
  let NewBizplace = class NewBizplace {
104
95
  };
105
- __decorate([
96
+ tslib_1.__decorate([
106
97
  (0, type_graphql_1.Field)(),
107
- __metadata("design:type", String)
98
+ tslib_1.__metadata("design:type", String)
108
99
  ], NewBizplace.prototype, "name", void 0);
109
- __decorate([
100
+ tslib_1.__decorate([
110
101
  (0, type_graphql_1.Field)(),
111
- __metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
102
+ tslib_1.__metadata("design:type", shell_1.ObjectRef)
112
103
  ], NewBizplace.prototype, "company", void 0);
113
- __decorate([
104
+ tslib_1.__decorate([
114
105
  (0, type_graphql_1.Field)({ nullable: true }),
115
- __metadata("design:type", String)
106
+ tslib_1.__metadata("design:type", String)
116
107
  ], NewBizplace.prototype, "description", void 0);
117
- __decorate([
108
+ tslib_1.__decorate([
118
109
  (0, type_graphql_1.Field)(),
119
- __metadata("design:type", String)
110
+ tslib_1.__metadata("design:type", String)
120
111
  ], NewBizplace.prototype, "address", void 0);
121
- __decorate([
112
+ tslib_1.__decorate([
122
113
  (0, type_graphql_1.Field)(),
123
- __metadata("design:type", String)
114
+ tslib_1.__metadata("design:type", String)
124
115
  ], NewBizplace.prototype, "postalCode", void 0);
125
- __decorate([
116
+ tslib_1.__decorate([
126
117
  (0, type_graphql_1.Field)(),
127
- __metadata("design:type", String)
118
+ tslib_1.__metadata("design:type", String)
128
119
  ], NewBizplace.prototype, "latlng", void 0);
129
- __decorate([
120
+ tslib_1.__decorate([
130
121
  (0, type_graphql_1.Field)({ nullable: true }),
131
- __metadata("design:type", String)
122
+ tslib_1.__metadata("design:type", String)
132
123
  ], NewBizplace.prototype, "status", void 0);
133
- NewBizplace = __decorate([
124
+ NewBizplace = tslib_1.__decorate([
134
125
  (0, type_graphql_1.InputType)()
135
126
  ], NewBizplace);
136
127
  exports.NewBizplace = NewBizplace;
@@ -1 +1 @@
1
- {"version":3,"file":"bizplace-types.js","sourceRoot":"","sources":["../../../server/service/bizplace/bizplace-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAgE;AAEhE,iDAAiD;AAEjD,yCAAqC;AAGrC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAMxB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC5B;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACzB;AALH,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB;AANY,oCAAY;AASzB,IAAa,YAAY,GAAzB,MAAa,YAAY;CAkBxB,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,C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oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,GAAE;;4CACO;AAGf;IADC,IAAA,oBAAK,GAAE;;+CACU;AAGlB;IADC,IAAA,oBAAK,GAAE;;2CACM;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACX;AApBJ,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAqBvB;AArBY,kCAAW","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { Bizplace } from './bizplace'\n\n@ObjectType()\nexport class BizplaceList {\n @Field(type => [Bizplace], { nullable: true })\n items?: Bizplace[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@ObjectType()\nexport class UserBizplace {\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({ nullable: true })\n assigned?: boolean\n\n @Field({ nullable: true })\n userBizplaceId?: string\n\n @Field({ nullable: true })\n mainBizplace?: boolean\n}\n\n@InputType()\nexport class BizplacePatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n company?: ObjectRef\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n address?: string\n\n @Field({ nullable: true })\n postalCode?: string\n\n @Field({ nullable: true })\n latlng?: string\n\n @Field({ nullable: true })\n status?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@InputType()\nexport class NewBizplace {\n @Field()\n name: string\n\n @Field()\n company: ObjectRef\n\n @Field({ nullable: true })\n description?: string\n\n @Field()\n address: string\n\n @Field()\n postalCode: string\n\n @Field()\n latlng: string\n\n @Field({ nullable: true })\n status?: string\n}\n"]}