@things-factory/geography 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 (69) hide show
  1. package/dist-server/controllers/index.js.map +1 -1
  2. package/dist-server/index.js +4 -17
  3. package/dist-server/index.js.map +1 -1
  4. package/dist-server/middlewares/index.js.map +1 -1
  5. package/dist-server/migrations/index.js.map +1 -1
  6. package/dist-server/routes.js +0 -1
  7. package/dist-server/routes.js.map +1 -1
  8. package/dist-server/service/geo-area/geo-area-mutation.js +34 -45
  9. package/dist-server/service/geo-area/geo-area-mutation.js.map +1 -1
  10. package/dist-server/service/geo-area/geo-area-query.js +75 -48
  11. package/dist-server/service/geo-area/geo-area-query.js.map +1 -1
  12. package/dist-server/service/geo-area/geo-area-type.js +44 -52
  13. package/dist-server/service/geo-area/geo-area-type.js.map +1 -1
  14. package/dist-server/service/geo-area/geo-area.js +37 -46
  15. package/dist-server/service/geo-area/geo-area.js.map +1 -1
  16. package/dist-server/service/geo-area/index.js.map +1 -1
  17. package/dist-server/service/geo-city/geo-city-mutation.js +34 -45
  18. package/dist-server/service/geo-city/geo-city-mutation.js.map +1 -1
  19. package/dist-server/service/geo-city/geo-city-query.js +41 -54
  20. package/dist-server/service/geo-city/geo-city-query.js.map +1 -1
  21. package/dist-server/service/geo-city/geo-city-type.js +28 -36
  22. package/dist-server/service/geo-city/geo-city-type.js.map +1 -1
  23. package/dist-server/service/geo-city/geo-city.js +33 -42
  24. package/dist-server/service/geo-city/geo-city.js.map +1 -1
  25. package/dist-server/service/geo-city/index.js.map +1 -1
  26. package/dist-server/service/geo-continent/geo-continent-mutation.js +34 -45
  27. package/dist-server/service/geo-continent/geo-continent-mutation.js.map +1 -1
  28. package/dist-server/service/geo-continent/geo-continent-query.js +29 -42
  29. package/dist-server/service/geo-continent/geo-continent-query.js.map +1 -1
  30. package/dist-server/service/geo-continent/geo-continent-type.js +20 -28
  31. package/dist-server/service/geo-continent/geo-continent-type.js.map +1 -1
  32. package/dist-server/service/geo-continent/geo-continent.js +20 -29
  33. package/dist-server/service/geo-continent/geo-continent.js.map +1 -1
  34. package/dist-server/service/geo-continent/index.js.map +1 -1
  35. package/dist-server/service/geo-country/geo-country-mutation.js +34 -45
  36. package/dist-server/service/geo-country/geo-country-mutation.js.map +1 -1
  37. package/dist-server/service/geo-country/geo-country-query.js +46 -48
  38. package/dist-server/service/geo-country/geo-country-query.js.map +1 -1
  39. package/dist-server/service/geo-country/geo-country-type.js +24 -32
  40. package/dist-server/service/geo-country/geo-country-type.js.map +1 -1
  41. package/dist-server/service/geo-country/geo-country.js +26 -35
  42. package/dist-server/service/geo-country/geo-country.js.map +1 -1
  43. package/dist-server/service/geo-country/index.js.map +1 -1
  44. package/dist-server/service/geo-state/geo-state-mutation.js +34 -45
  45. package/dist-server/service/geo-state/geo-state-mutation.js.map +1 -1
  46. package/dist-server/service/geo-state/geo-state-query.js +35 -48
  47. package/dist-server/service/geo-state/geo-state-query.js.map +1 -1
  48. package/dist-server/service/geo-state/geo-state-type.js +28 -36
  49. package/dist-server/service/geo-state/geo-state-type.js.map +1 -1
  50. package/dist-server/service/geo-state/geo-state.js +28 -37
  51. package/dist-server/service/geo-state/geo-state.js.map +1 -1
  52. package/dist-server/service/geo-state/index.js.map +1 -1
  53. package/dist-server/service/index.js +6 -19
  54. package/dist-server/service/index.js.map +1 -1
  55. package/dist-server/tsconfig.tsbuildinfo +1 -0
  56. package/package.json +5 -5
  57. package/server/routes.ts +0 -2
  58. package/server/service/geo-area/geo-area-mutation.ts +11 -6
  59. package/server/service/geo-area/geo-area-query.ts +42 -8
  60. package/server/service/geo-area/geo-area.ts +1 -1
  61. package/server/service/geo-city/geo-city-mutation.ts +14 -6
  62. package/server/service/geo-city/geo-city-query.ts +10 -9
  63. package/server/service/geo-city/geo-city.ts +1 -1
  64. package/server/service/geo-continent/geo-continent-mutation.ts +10 -6
  65. package/server/service/geo-continent/geo-continent-query.ts +8 -7
  66. package/server/service/geo-country/geo-country-mutation.ts +13 -6
  67. package/server/service/geo-country/geo-country-query.ts +16 -8
  68. package/server/service/geo-state/geo-state-mutation.ts +10 -6
  69. package/server/service/geo-state/geo-state-query.ts +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-continent/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAC9C,+DAAyD;AACzD,qEAA+D;AAElD,QAAA,QAAQ,GAAG,CAAC,4BAAY,CAAC,CAAA;AACzB,QAAA,SAAS,GAAG,CAAC,uCAAiB,EAAE,6CAAoB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-continent/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAC9C,+DAAyD;AACzD,qEAA+D;AAElD,QAAA,QAAQ,GAAG,CAAC,4BAAY,CAAC,CAAA;AACzB,QAAA,SAAS,GAAG,CAAC,uCAAiB,EAAE,6CAAoB,CAAC,CAAA","sourcesContent":["import { GeoContinent } from './geo-continent'\nimport { GeoContinentQuery } from './geo-continent-query'\nimport { GeoContinentMutation } from './geo-continent-mutation'\n\nexport const entities = [GeoContinent]\nexport const resolvers = [GeoContinentQuery, GeoContinentMutation]\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.GeoCountryMutation = 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 geo_country_1 = require("./geo-country");
@@ -46,7 +35,7 @@ let GeoCountryMutation = class GeoCountryMutation {
46
35
  if (_updateRecords.length > 0) {
47
36
  for (let i = 0; i < _updateRecords.length; i++) {
48
37
  const newRecord = _updateRecords[i];
49
- const geoCountry = await geoCountryRepo.findOne(newRecord.id);
38
+ const geoCountry = await geoCountryRepo.findOneBy({ id: newRecord.id });
50
39
  const result = await geoCountryRepo.save(Object.assign(Object.assign(Object.assign({}, geoCountry), newRecord), { updater: user }));
51
40
  results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
41
  }
@@ -66,53 +55,53 @@ let GeoCountryMutation = class GeoCountryMutation {
66
55
  return true;
67
56
  }
68
57
  };
69
- __decorate([
58
+ tslib_1.__decorate([
70
59
  (0, type_graphql_1.Directive)('@transaction'),
71
60
  (0, type_graphql_1.Mutation)(returns => geo_country_1.GeoCountry, { description: 'To create new GeoCountry' }),
72
- __param(0, (0, type_graphql_1.Arg)('geoCountry')),
73
- __param(1, (0, type_graphql_1.Ctx)()),
74
- __metadata("design:type", Function),
75
- __metadata("design:paramtypes", [geo_country_type_1.NewGeoCountry, Object]),
76
- __metadata("design:returntype", Promise)
61
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('geoCountry')),
62
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
63
+ tslib_1.__metadata("design:type", Function),
64
+ tslib_1.__metadata("design:paramtypes", [geo_country_type_1.NewGeoCountry, Object]),
65
+ tslib_1.__metadata("design:returntype", Promise)
77
66
  ], GeoCountryMutation.prototype, "createGeoCountry", null);
78
- __decorate([
67
+ tslib_1.__decorate([
79
68
  (0, type_graphql_1.Directive)('@transaction'),
80
69
  (0, type_graphql_1.Mutation)(returns => geo_country_1.GeoCountry, { description: 'To modify GeoCountry information' }),
81
- __param(0, (0, type_graphql_1.Arg)('id')),
82
- __param(1, (0, type_graphql_1.Arg)('patch')),
83
- __param(2, (0, type_graphql_1.Ctx)()),
84
- __metadata("design:type", Function),
85
- __metadata("design:paramtypes", [String, geo_country_type_1.GeoCountryPatch, Object]),
86
- __metadata("design:returntype", Promise)
70
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
71
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
72
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
73
+ tslib_1.__metadata("design:type", Function),
74
+ tslib_1.__metadata("design:paramtypes", [String, geo_country_type_1.GeoCountryPatch, Object]),
75
+ tslib_1.__metadata("design:returntype", Promise)
87
76
  ], GeoCountryMutation.prototype, "updateGeoCountry", null);
88
- __decorate([
77
+ tslib_1.__decorate([
89
78
  (0, type_graphql_1.Directive)('@transaction'),
90
79
  (0, type_graphql_1.Mutation)(returns => [geo_country_1.GeoCountry], { description: "To modify multiple GeoCountries' information" }),
91
- __param(0, (0, type_graphql_1.Arg)('patches', type => [geo_country_type_1.GeoCountryPatch])),
92
- __param(1, (0, type_graphql_1.Ctx)()),
93
- __metadata("design:type", Function),
94
- __metadata("design:paramtypes", [Array, Object]),
95
- __metadata("design:returntype", Promise)
80
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [geo_country_type_1.GeoCountryPatch])),
81
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
82
+ tslib_1.__metadata("design:type", Function),
83
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
84
+ tslib_1.__metadata("design:returntype", Promise)
96
85
  ], GeoCountryMutation.prototype, "updateMultipleGeoCountry", null);
97
- __decorate([
86
+ tslib_1.__decorate([
98
87
  (0, type_graphql_1.Directive)('@transaction'),
99
88
  (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete GeoCountry' }),
100
- __param(0, (0, type_graphql_1.Arg)('id')),
101
- __param(1, (0, type_graphql_1.Ctx)()),
102
- __metadata("design:type", Function),
103
- __metadata("design:paramtypes", [String, Object]),
104
- __metadata("design:returntype", Promise)
89
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
90
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
91
+ tslib_1.__metadata("design:type", Function),
92
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
93
+ tslib_1.__metadata("design:returntype", Promise)
105
94
  ], GeoCountryMutation.prototype, "deleteGeoCountry", null);
106
- __decorate([
95
+ tslib_1.__decorate([
107
96
  (0, type_graphql_1.Directive)('@transaction'),
108
97
  (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple geoCountrys' }),
109
- __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
110
- __param(1, (0, type_graphql_1.Ctx)()),
111
- __metadata("design:type", Function),
112
- __metadata("design:paramtypes", [Array, Object]),
113
- __metadata("design:returntype", Promise)
98
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
99
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
100
+ tslib_1.__metadata("design:type", Function),
101
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
102
+ tslib_1.__metadata("design:returntype", Promise)
114
103
  ], GeoCountryMutation.prototype, "deleteGeoCountries", null);
115
- GeoCountryMutation = __decorate([
104
+ GeoCountryMutation = tslib_1.__decorate([
116
105
  (0, type_graphql_1.Resolver)(geo_country_1.GeoCountry)
117
106
  ], GeoCountryMutation);
118
107
  exports.GeoCountryMutation = GeoCountryMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-country-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,+CAA0C;AAC1C,yDAAmE;AAGn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EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;0DAKnD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACtD,WAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAQ3E;AAlGU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,kBAAkB,CAmG9B;AAnGY,gDAAkB"}
1
+ {"version":3,"file":"geo-country-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,+CAA0C;AAC1C,yDAAmE;AAGnE,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAG7B,KAAK,CAAC,gBAAgB,CACD,UAAyB,EACrC,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAC,IAAI,iCACzC,UAAU,KACb,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,gBAAgB,CACT,EAAU,EACP,KAAsB,EAC7B,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAA;QAC/C,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;Y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olver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { GeoCountry } from './geo-country'\nimport { GeoCountryPatch, NewGeoCountry } from './geo-country-type'\n\n@Resolver(GeoCountry)\nexport class GeoCountryMutation {\n @Directive('@transaction')\n @Mutation(returns => GeoCountry, { description: 'To create new GeoCountry' })\n async createGeoCountry(\n @Arg('geoCountry') geoCountry: NewGeoCountry,\n @Ctx() context: ResolverContext\n ): Promise<GeoCountry> {\n const { user, tx } = context.state\n\n return await tx.getRepository(GeoCountry).save({\n ...geoCountry,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => GeoCountry, { description: 'To modify GeoCountry information' })\n async updateGeoCountry(\n @Arg('id') id: string,\n @Arg('patch') patch: GeoCountryPatch,\n @Ctx() context: ResolverContext\n ): Promise<GeoCountry> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(GeoCountry)\n const geoCountry = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...geoCountry,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [GeoCountry], { description: \"To modify multiple GeoCountries' information\" })\n async updateMultipleGeoCountry(\n @Arg('patches', type => [GeoCountryPatch]) patches: GeoCountryPatch[],\n @Ctx() context: ResolverContext\n ): Promise<GeoCountry[]> {\n const { user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const geoCountryRepo = tx.getRepository(GeoCountry)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await geoCountryRepo.save({\n ...newRecord,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const geoCountry = await geoCountryRepo.findOneBy({ id: newRecord.id })\n\n const result = await geoCountryRepo.save({\n ...geoCountry,\n ...newRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete GeoCountry' })\n async deleteGeoCountry(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoCountry).delete({ id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple geoCountrys' })\n async deleteGeoCountries(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoCountry).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -1,85 +1,83 @@
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;
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.GeoCountryQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
17
6
  const auth_base_1 = require("@things-factory/auth-base");
18
7
  const shell_1 = require("@things-factory/shell");
19
- const type_graphql_1 = require("type-graphql");
20
- const typeorm_1 = require("typeorm");
21
8
  const geo_continent_1 = require("../geo-continent/geo-continent");
22
9
  const geo_country_1 = require("./geo-country");
23
10
  const geo_country_type_1 = require("./geo-country-type");
24
11
  let GeoCountryQuery = class GeoCountryQuery {
25
12
  async geoCountry(id, context) {
26
- return await (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).findOne({
13
+ return await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findOne({
27
14
  where: { id }
28
15
  });
29
16
  }
30
17
  async geoCountries(params, context) {
31
18
  const convertedParams = (0, shell_1.convertListParams)(params);
32
- const [items, total] = await (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).findAndCount(convertedParams);
19
+ const [items, total] = await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findAndCount(convertedParams);
20
+ return { items, total };
21
+ }
22
+ async geoCountriesWithoutParam(context) {
23
+ const [items, total] = await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findAndCount();
33
24
  return { items, total };
34
25
  }
35
26
  async geoContinent(geoCountry) {
36
- return await (0, typeorm_1.getRepository)(geo_continent_1.GeoContinent).findOne(geoCountry.geoContinentId);
27
+ return await (0, shell_1.getRepository)(geo_continent_1.GeoContinent).findOneBy({ id: geoCountry.geoContinentId });
37
28
  }
38
29
  async updater(geoCountry) {
39
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCountry.updaterId);
30
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.updaterId });
40
31
  }
41
32
  async creator(geoCountry) {
42
- return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCountry.creatorId);
33
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.creatorId });
43
34
  }
44
35
  };
45
- __decorate([
36
+ tslib_1.__decorate([
46
37
  (0, type_graphql_1.Query)(returns => geo_country_1.GeoCountry, { description: 'To fetch a GeoCountry' }),
47
- __param(0, (0, type_graphql_1.Arg)('id')),
48
- __param(1, (0, type_graphql_1.Ctx)()),
49
- __metadata("design:type", Function),
50
- __metadata("design:paramtypes", [String, Object]),
51
- __metadata("design:returntype", Promise)
38
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
39
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
40
+ tslib_1.__metadata("design:type", Function),
41
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
42
+ tslib_1.__metadata("design:returntype", Promise)
52
43
  ], GeoCountryQuery.prototype, "geoCountry", null);
53
- __decorate([
44
+ tslib_1.__decorate([
54
45
  (0, type_graphql_1.Query)(returns => geo_country_type_1.GeoCountryList, { description: 'To fetch multiple GeoCountries' }),
55
- __param(0, (0, type_graphql_1.Args)()),
56
- __param(1, (0, type_graphql_1.Ctx)()),
57
- __metadata("design:type", Function),
58
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
59
- __metadata("design:returntype", Promise)
46
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
47
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
48
+ tslib_1.__metadata("design:type", Function),
49
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
50
+ tslib_1.__metadata("design:returntype", Promise)
60
51
  ], GeoCountryQuery.prototype, "geoCountries", null);
61
- __decorate([
52
+ tslib_1.__decorate([
53
+ (0, type_graphql_1.Query)(returns => geo_country_type_1.GeoCountryList, { description: 'To fetch multiple GeoCountries without params' }),
54
+ tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
55
+ tslib_1.__metadata("design:type", Function),
56
+ tslib_1.__metadata("design:paramtypes", [Object]),
57
+ tslib_1.__metadata("design:returntype", Promise)
58
+ ], GeoCountryQuery.prototype, "geoCountriesWithoutParam", null);
59
+ tslib_1.__decorate([
62
60
  (0, type_graphql_1.FieldResolver)(type => geo_continent_1.GeoContinent),
63
- __param(0, (0, type_graphql_1.Root)()),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
66
- __metadata("design:returntype", Promise)
61
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
62
+ tslib_1.__metadata("design:type", Function),
63
+ tslib_1.__metadata("design:paramtypes", [geo_country_1.GeoCountry]),
64
+ tslib_1.__metadata("design:returntype", Promise)
67
65
  ], GeoCountryQuery.prototype, "geoContinent", null);
68
- __decorate([
66
+ tslib_1.__decorate([
69
67
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
70
- __param(0, (0, type_graphql_1.Root)()),
71
- __metadata("design:type", Function),
72
- __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
73
- __metadata("design:returntype", Promise)
68
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
69
+ tslib_1.__metadata("design:type", Function),
70
+ tslib_1.__metadata("design:paramtypes", [geo_country_1.GeoCountry]),
71
+ tslib_1.__metadata("design:returntype", Promise)
74
72
  ], GeoCountryQuery.prototype, "updater", null);
75
- __decorate([
73
+ tslib_1.__decorate([
76
74
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
77
- __param(0, (0, type_graphql_1.Root)()),
78
- __metadata("design:type", Function),
79
- __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
80
- __metadata("design:returntype", Promise)
75
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
76
+ tslib_1.__metadata("design:type", Function),
77
+ tslib_1.__metadata("design:paramtypes", [geo_country_1.GeoCountry]),
78
+ tslib_1.__metadata("design:returntype", Promise)
81
79
  ], GeoCountryQuery.prototype, "creator", null);
82
- GeoCountryQuery = __decorate([
80
+ GeoCountryQuery = tslib_1.__decorate([
83
81
  (0, type_graphql_1.Resolver)(geo_country_1.GeoCountry)
84
82
  ], GeoCountryQuery);
85
83
  exports.GeoCountryQuery = GeoCountryQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-country-query.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,y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c,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAChE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;mDAK3C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,iCAAc,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IACnE,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+DAIpC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;mDAEhD;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AApCU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CAqC3B;AArCY,0CAAe","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { GeoContinent } from '../geo-continent/geo-continent'\nimport { GeoCountry } from './geo-country'\nimport { GeoCountryList } from './geo-country-type'\n\n@Resolver(GeoCountry)\nexport class GeoCountryQuery {\n @Query(returns => GeoCountry, { description: 'To fetch a GeoCountry' })\n async geoCountry(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<GeoCountry> {\n return await getRepository(GeoCountry).findOne({\n where: { id }\n })\n }\n\n @Query(returns => GeoCountryList, { description: 'To fetch multiple GeoCountries' })\n async geoCountries(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<GeoCountryList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(GeoCountry).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @Query(returns => GeoCountryList, { description: 'To fetch multiple GeoCountries without params' })\n async geoCountriesWithoutParam(@Ctx() context: ResolverContext): Promise<GeoCountryList> {\n const [items, total] = await getRepository(GeoCountry).findAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => GeoContinent)\n async geoContinent(@Root() geoCountry: GeoCountry): Promise<GeoContinent> {\n return await getRepository(GeoContinent).findOneBy({ id: geoCountry.geoContinentId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() geoCountry: GeoCountry): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoCountry.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() geoCountry: GeoCountry): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoCountry.creatorId })\n }\n}\n"]}
@@ -1,72 +1,64 @@
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
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.GeoCountryList = exports.GeoCountryPatch = exports.NewGeoCountry = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const geo_country_1 = require("./geo-country");
15
7
  let NewGeoCountry = class NewGeoCountry {
16
8
  };
17
- __decorate([
9
+ tslib_1.__decorate([
18
10
  (0, type_graphql_1.Field)(),
19
- __metadata("design:type", String)
11
+ tslib_1.__metadata("design:type", String)
20
12
  ], NewGeoCountry.prototype, "name", void 0);
21
- __decorate([
13
+ tslib_1.__decorate([
22
14
  (0, type_graphql_1.Field)({ nullable: true }),
23
- __metadata("design:type", String)
15
+ tslib_1.__metadata("design:type", String)
24
16
  ], NewGeoCountry.prototype, "description", void 0);
25
- __decorate([
17
+ tslib_1.__decorate([
26
18
  (0, type_graphql_1.Field)({ nullable: true }),
27
- __metadata("design:type", String)
19
+ tslib_1.__metadata("design:type", String)
28
20
  ], NewGeoCountry.prototype, "isoCode", void 0);
29
- NewGeoCountry = __decorate([
21
+ NewGeoCountry = tslib_1.__decorate([
30
22
  (0, type_graphql_1.InputType)()
31
23
  ], NewGeoCountry);
32
24
  exports.NewGeoCountry = NewGeoCountry;
33
25
  let GeoCountryPatch = class GeoCountryPatch {
34
26
  };
35
- __decorate([
27
+ tslib_1.__decorate([
36
28
  (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
37
- __metadata("design:type", String)
29
+ tslib_1.__metadata("design:type", String)
38
30
  ], GeoCountryPatch.prototype, "id", void 0);
39
- __decorate([
31
+ tslib_1.__decorate([
40
32
  (0, type_graphql_1.Field)({ nullable: true }),
41
- __metadata("design:type", String)
33
+ tslib_1.__metadata("design:type", String)
42
34
  ], GeoCountryPatch.prototype, "name", void 0);
43
- __decorate([
35
+ tslib_1.__decorate([
44
36
  (0, type_graphql_1.Field)({ nullable: true }),
45
- __metadata("design:type", String)
37
+ tslib_1.__metadata("design:type", String)
46
38
  ], GeoCountryPatch.prototype, "description", void 0);
47
- __decorate([
39
+ tslib_1.__decorate([
48
40
  (0, type_graphql_1.Field)({ nullable: true }),
49
- __metadata("design:type", String)
41
+ tslib_1.__metadata("design:type", String)
50
42
  ], GeoCountryPatch.prototype, "isoCode", void 0);
51
- __decorate([
43
+ tslib_1.__decorate([
52
44
  (0, type_graphql_1.Field)(),
53
- __metadata("design:type", String)
45
+ tslib_1.__metadata("design:type", String)
54
46
  ], GeoCountryPatch.prototype, "cuFlag", void 0);
55
- GeoCountryPatch = __decorate([
47
+ GeoCountryPatch = tslib_1.__decorate([
56
48
  (0, type_graphql_1.InputType)()
57
49
  ], GeoCountryPatch);
58
50
  exports.GeoCountryPatch = GeoCountryPatch;
59
51
  let GeoCountryList = class GeoCountryList {
60
52
  };
61
- __decorate([
53
+ tslib_1.__decorate([
62
54
  (0, type_graphql_1.Field)(type => [geo_country_1.GeoCountry]),
63
- __metadata("design:type", Array)
55
+ tslib_1.__metadata("design:type", Array)
64
56
  ], GeoCountryList.prototype, "items", void 0);
65
- __decorate([
57
+ tslib_1.__decorate([
66
58
  (0, type_graphql_1.Field)(type => type_graphql_1.Int),
67
- __metadata("design:type", Number)
59
+ tslib_1.__metadata("design:type", Number)
68
60
  ], GeoCountryList.prototype, "total", void 0);
69
- GeoCountryList = __decorate([
61
+ GeoCountryList = tslib_1.__decorate([
70
62
  (0, type_graphql_1.ObjectType)()
71
63
  ], GeoCountryList);
72
64
  exports.GeoCountryList = GeoCountryList;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-country-type.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AACpE,+CAA0C;AAG1C,IAAa,aAAa,GAA1B,MAAa,aAAa;CASzB,CAAA;AAPC;IADC,IAAA,oBAAK,GAAE;;2CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AARL,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CASzB;AATY,sCAAa;AAY1B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAe3B,CAAA;AAbC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGhB;IADC,IAAA,oBAAK,GAAE;;+CACM;AAdH,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAe3B;AAfY,0CAAe;AAkB5B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,CAAC;;6CACT;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;6CACN;AALF,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc"}
1
+ {"version":3,"file":"geo-country-type.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,+CAA0C;AAG1C,IAAa,aAAa,GAA1B,MAAa,aAAa;CASzB,CAAA;AAPC;IADC,IAAA,oBAAK,GAAE;;2CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AARL,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CASzB;AATY,sCAAa;AAY1B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAe3B,CAAA;AAbC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGhB;IADC,IAAA,oBAAK,GAAE;;+CACM;AAdH,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAe3B;AAfY,0CAAe;AAkB5B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,CAAC;;6CACT;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;6CACN;AALF,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\nimport { GeoCountry } from './geo-country'\n\n@InputType()\nexport class NewGeoCountry {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n isoCode?: string\n}\n\n@InputType()\nexport class GeoCountryPatch {\n @Field(type => ID, { 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 isoCode?: string\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class GeoCountryList {\n @Field(type => [GeoCountry])\n items: GeoCountry[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1,86 +1,77 @@
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.GeoCountry = void 0;
4
+ const tslib_1 = require("tslib");
14
5
  const auth_base_1 = require("@things-factory/auth-base");
15
6
  const type_graphql_1 = require("type-graphql");
16
7
  const typeorm_1 = require("typeorm");
17
8
  const geo_continent_1 = require("../geo-continent/geo-continent");
18
9
  let GeoCountry = class GeoCountry {
19
10
  };
20
- __decorate([
11
+ tslib_1.__decorate([
21
12
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
13
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
- __metadata("design:type", String)
14
+ tslib_1.__metadata("design:type", String)
24
15
  ], GeoCountry.prototype, "id", void 0);
25
- __decorate([
16
+ tslib_1.__decorate([
26
17
  (0, typeorm_1.ManyToOne)(type => geo_continent_1.GeoContinent),
27
18
  (0, type_graphql_1.Field)(),
28
- __metadata("design:type", geo_continent_1.GeoContinent)
19
+ tslib_1.__metadata("design:type", geo_continent_1.GeoContinent)
29
20
  ], GeoCountry.prototype, "geoContinent", void 0);
30
- __decorate([
21
+ tslib_1.__decorate([
31
22
  (0, typeorm_1.RelationId)((geoCountry) => geoCountry.geoContinent),
32
- __metadata("design:type", String)
23
+ tslib_1.__metadata("design:type", String)
33
24
  ], GeoCountry.prototype, "geoContinentId", void 0);
34
- __decorate([
25
+ tslib_1.__decorate([
35
26
  (0, typeorm_1.Column)(),
36
27
  (0, type_graphql_1.Field)(),
37
- __metadata("design:type", String)
28
+ tslib_1.__metadata("design:type", String)
38
29
  ], GeoCountry.prototype, "name", void 0);
39
- __decorate([
30
+ tslib_1.__decorate([
40
31
  (0, typeorm_1.Column)({
41
32
  nullable: true
42
33
  }),
43
34
  (0, type_graphql_1.Field)({ nullable: true }),
44
- __metadata("design:type", String)
35
+ tslib_1.__metadata("design:type", String)
45
36
  ], GeoCountry.prototype, "description", void 0);
46
- __decorate([
37
+ tslib_1.__decorate([
47
38
  (0, typeorm_1.Column)({ nullable: true }),
48
39
  (0, type_graphql_1.Field)({ nullable: true }),
49
- __metadata("design:type", String)
40
+ tslib_1.__metadata("design:type", String)
50
41
  ], GeoCountry.prototype, "isoCode", void 0);
51
- __decorate([
42
+ tslib_1.__decorate([
52
43
  (0, typeorm_1.CreateDateColumn)(),
53
44
  (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", Date)
45
+ tslib_1.__metadata("design:type", Date)
55
46
  ], GeoCountry.prototype, "createdAt", void 0);
56
- __decorate([
47
+ tslib_1.__decorate([
57
48
  (0, typeorm_1.UpdateDateColumn)(),
58
49
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", Date)
50
+ tslib_1.__metadata("design:type", Date)
60
51
  ], GeoCountry.prototype, "updatedAt", void 0);
61
- __decorate([
52
+ tslib_1.__decorate([
62
53
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
63
54
  nullable: true
64
55
  }),
65
56
  (0, type_graphql_1.Field)({ nullable: true }),
66
- __metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
57
+ tslib_1.__metadata("design:type", auth_base_1.User)
67
58
  ], GeoCountry.prototype, "creator", void 0);
68
- __decorate([
59
+ tslib_1.__decorate([
69
60
  (0, typeorm_1.RelationId)((geoCountry) => geoCountry.creator),
70
- __metadata("design:type", String)
61
+ tslib_1.__metadata("design:type", String)
71
62
  ], GeoCountry.prototype, "creatorId", void 0);
72
- __decorate([
63
+ tslib_1.__decorate([
73
64
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
74
65
  nullable: true
75
66
  }),
76
67
  (0, type_graphql_1.Field)({ nullable: true }),
77
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
68
+ tslib_1.__metadata("design:type", auth_base_1.User)
78
69
  ], GeoCountry.prototype, "updater", void 0);
79
- __decorate([
70
+ tslib_1.__decorate([
80
71
  (0, typeorm_1.RelationId)((geoCountry) => geoCountry.creator),
81
- __metadata("design:type", String)
72
+ tslib_1.__metadata("design:type", String)
82
73
  ], GeoCountry.prototype, "updaterId", void 0);
83
- GeoCountry = __decorate([
74
+ GeoCountry = tslib_1.__decorate([
84
75
  (0, typeorm_1.Entity)(),
85
76
  (0, typeorm_1.Index)('ix_geo_country_0', (geoCountry) => [geoCountry.geoContinent, geoCountry.name], { unique: true }),
86
77
  (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoCountry' })
@@ -1 +1 @@
1
- {"version":3,"file":"geo-country.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,kEAA6D;AAK7D,IAAa,UAAU,GAAvB,MAAa,UAAU;CAmDtB,CAAA;AAhDC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,CAAC;IAC/B,IAAA,oBAAK,GAAE;8BACM,4BAAY;gDAAA;AAG1B;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;;kDAC1C;AAItB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,G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AAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;6CAAA;AAMhB;IAJC,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;sCAChB,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;AAMlB;IAJC,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;sCAChB,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;AAlDP,UAAU;IAHtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACnH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAmDtB;AAnDY,gCAAU","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { GeoContinent } from '../geo-continent/geo-continent'\n\n@Entity()\n@Index('ix_geo_country_0', (geoCountry: GeoCountry) => [geoCountry.geoContinent, geoCountry.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoCountry' })\nexport class GeoCountry {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoContinent)\n @Field()\n geoContinent: GeoContinent\n\n @RelationId((geoCountry: GeoCountry) => geoCountry.geoContinent)\n geoContinentId: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n isoCode?: 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 @RelationId((geoCountry: GeoCountry) => geoCountry.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((geoCountry: GeoCountry) => geoCountry.creator)\n updaterId?: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-country/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-country/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA","sourcesContent":["import { GeoCountry } from './geo-country'\nimport { GeoCountryQuery } from './geo-country-query'\nimport { GeoCountryMutation } from './geo-country-mutation'\n\nexport const entities = [GeoCountry]\nexport const resolvers = [GeoCountryQuery, GeoCountryMutation]\n"]}