@things-factory/geography 4.3.671 → 4.3.672

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 (63) hide show
  1. package/dist-server/controllers/index.js +1 -0
  2. package/dist-server/controllers/index.js.map +1 -0
  3. package/dist-server/index.js +21 -0
  4. package/dist-server/index.js.map +1 -0
  5. package/dist-server/middlewares/index.js +8 -0
  6. package/dist-server/middlewares/index.js.map +1 -0
  7. package/dist-server/migrations/index.js +12 -0
  8. package/dist-server/migrations/index.js.map +1 -0
  9. package/dist-server/routes.js +25 -0
  10. package/dist-server/routes.js.map +1 -0
  11. package/dist-server/service/geo-area/geo-area-mutation.js +119 -0
  12. package/dist-server/service/geo-area/geo-area-mutation.js.map +1 -0
  13. package/dist-server/service/geo-area/geo-area-query.js +126 -0
  14. package/dist-server/service/geo-area/geo-area-query.js.map +1 -0
  15. package/dist-server/service/geo-area/geo-area-type.js +113 -0
  16. package/dist-server/service/geo-area/geo-area-type.js.map +1 -0
  17. package/dist-server/service/geo-area/geo-area.js +108 -0
  18. package/dist-server/service/geo-area/geo-area.js.map +1 -0
  19. package/dist-server/service/geo-area/index.js +9 -0
  20. package/dist-server/service/geo-area/index.js.map +1 -0
  21. package/dist-server/service/geo-city/geo-city-mutation.js +119 -0
  22. package/dist-server/service/geo-city/geo-city-mutation.js.map +1 -0
  23. package/dist-server/service/geo-city/geo-city-query.js +97 -0
  24. package/dist-server/service/geo-city/geo-city-query.js.map +1 -0
  25. package/dist-server/service/geo-city/geo-city-type.js +81 -0
  26. package/dist-server/service/geo-city/geo-city-type.js.map +1 -0
  27. package/dist-server/service/geo-city/geo-city.js +104 -0
  28. package/dist-server/service/geo-city/geo-city.js.map +1 -0
  29. package/dist-server/service/geo-city/index.js +9 -0
  30. package/dist-server/service/geo-city/index.js.map +1 -0
  31. package/dist-server/service/geo-continent/geo-continent-mutation.js +119 -0
  32. package/dist-server/service/geo-continent/geo-continent-mutation.js.map +1 -0
  33. package/dist-server/service/geo-continent/geo-continent-query.js +75 -0
  34. package/dist-server/service/geo-continent/geo-continent-query.js.map +1 -0
  35. package/dist-server/service/geo-continent/geo-continent-type.js +65 -0
  36. package/dist-server/service/geo-continent/geo-continent-type.js.map +1 -0
  37. package/dist-server/service/geo-continent/geo-continent.js +74 -0
  38. package/dist-server/service/geo-continent/geo-continent.js.map +1 -0
  39. package/dist-server/service/geo-continent/index.js +9 -0
  40. package/dist-server/service/geo-continent/index.js.map +1 -0
  41. package/dist-server/service/geo-country/geo-country-mutation.js +119 -0
  42. package/dist-server/service/geo-country/geo-country-mutation.js.map +1 -0
  43. package/dist-server/service/geo-country/geo-country-query.js +112 -0
  44. package/dist-server/service/geo-country/geo-country-query.js.map +1 -0
  45. package/dist-server/service/geo-country/geo-country-type.js +77 -0
  46. package/dist-server/service/geo-country/geo-country-type.js.map +1 -0
  47. package/dist-server/service/geo-country/geo-country.js +96 -0
  48. package/dist-server/service/geo-country/geo-country.js.map +1 -0
  49. package/dist-server/service/geo-country/index.js +9 -0
  50. package/dist-server/service/geo-country/index.js.map +1 -0
  51. package/dist-server/service/geo-state/geo-state-mutation.js +119 -0
  52. package/dist-server/service/geo-state/geo-state-mutation.js.map +1 -0
  53. package/dist-server/service/geo-state/geo-state-query.js +86 -0
  54. package/dist-server/service/geo-state/geo-state-query.js.map +1 -0
  55. package/dist-server/service/geo-state/geo-state-type.js +81 -0
  56. package/dist-server/service/geo-state/geo-state-type.js.map +1 -0
  57. package/dist-server/service/geo-state/geo-state.js +94 -0
  58. package/dist-server/service/geo-state/geo-state.js.map +1 -0
  59. package/dist-server/service/geo-state/index.js +9 -0
  60. package/dist-server/service/geo-state/index.js.map +1 -0
  61. package/dist-server/service/index.js +48 -0
  62. package/dist-server/service/index.js.map +1 -0
  63. package/package.json +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-continent-query.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-query.ts"],"names":[],"mappings":";;;;;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,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAClE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;sDAK5C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAe,4BAAY;;gDAE/C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAe,4BAAY;;gDAE/C;AAxBU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,4BAAY,CAAC;GACV,iBAAiB,CAyB7B;AAzBY,8CAAiB"}
@@ -0,0 +1,65 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GeoContinentList = exports.GeoContinentPatch = exports.NewGeoContinent = void 0;
13
+ const type_graphql_1 = require("type-graphql");
14
+ const geo_continent_1 = require("./geo-continent");
15
+ let NewGeoContinent = class NewGeoContinent {
16
+ };
17
+ __decorate([
18
+ (0, type_graphql_1.Field)(),
19
+ __metadata("design:type", String)
20
+ ], NewGeoContinent.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], NewGeoContinent.prototype, "description", void 0);
25
+ NewGeoContinent = __decorate([
26
+ (0, type_graphql_1.InputType)()
27
+ ], NewGeoContinent);
28
+ exports.NewGeoContinent = NewGeoContinent;
29
+ let GeoContinentPatch = class GeoContinentPatch {
30
+ };
31
+ __decorate([
32
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
33
+ __metadata("design:type", String)
34
+ ], GeoContinentPatch.prototype, "id", void 0);
35
+ __decorate([
36
+ (0, type_graphql_1.Field)({ nullable: true }),
37
+ __metadata("design:type", String)
38
+ ], GeoContinentPatch.prototype, "name", void 0);
39
+ __decorate([
40
+ (0, type_graphql_1.Field)({ nullable: true }),
41
+ __metadata("design:type", String)
42
+ ], GeoContinentPatch.prototype, "description", void 0);
43
+ __decorate([
44
+ (0, type_graphql_1.Field)(),
45
+ __metadata("design:type", String)
46
+ ], GeoContinentPatch.prototype, "cuFlag", void 0);
47
+ GeoContinentPatch = __decorate([
48
+ (0, type_graphql_1.InputType)()
49
+ ], GeoContinentPatch);
50
+ exports.GeoContinentPatch = GeoContinentPatch;
51
+ let GeoContinentList = class GeoContinentList {
52
+ };
53
+ __decorate([
54
+ (0, type_graphql_1.Field)(type => [geo_continent_1.GeoContinent]),
55
+ __metadata("design:type", Array)
56
+ ], GeoContinentList.prototype, "items", void 0);
57
+ __decorate([
58
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
59
+ __metadata("design:type", Number)
60
+ ], GeoContinentList.prototype, "total", void 0);
61
+ GeoContinentList = __decorate([
62
+ (0, type_graphql_1.ObjectType)()
63
+ ], GeoContinentList);
64
+ exports.GeoContinentList = GeoContinentList;
65
+ //# sourceMappingURL=geo-continent-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-continent-type.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AACpE,mDAA8C;AAGvC,IAAM,eAAe,GAArB,MAAM,eAAe;CAM3B,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;6CACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AALT,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAM3B;AANY,0CAAe;AASrB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAY7B,CAAA;AAXC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACN;AAEpB;IAAC,IAAA,oBAAK,GAAE;;iDACM;AAXH,iBAAiB;IAD7B,IAAA,wBAAS,GAAE;GACC,iBAAiB,CAY7B;AAZY,8CAAiB;AAevB,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAM5B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,CAAC;;+CACT;AAErB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;+CACN;AALF,gBAAgB;IAD5B,IAAA,yBAAU,GAAE;GACA,gBAAgB,CAM5B;AANY,4CAAgB"}
@@ -0,0 +1,74 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.GeoContinent = void 0;
14
+ const auth_base_1 = require("@things-factory/auth-base");
15
+ const type_graphql_1 = require("type-graphql");
16
+ const typeorm_1 = require("typeorm");
17
+ let GeoContinent = class GeoContinent {
18
+ };
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
21
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
22
+ __metadata("design:type", String)
23
+ ], GeoContinent.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)(),
26
+ (0, type_graphql_1.Field)(),
27
+ __metadata("design:type", String)
28
+ ], GeoContinent.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({
31
+ nullable: true
32
+ }),
33
+ (0, type_graphql_1.Field)({ nullable: true }),
34
+ __metadata("design:type", String)
35
+ ], GeoContinent.prototype, "description", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.CreateDateColumn)(),
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ __metadata("design:type", Date)
40
+ ], GeoContinent.prototype, "createdAt", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.UpdateDateColumn)(),
43
+ (0, type_graphql_1.Field)({ nullable: true }),
44
+ __metadata("design:type", Date)
45
+ ], GeoContinent.prototype, "updatedAt", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
48
+ nullable: true
49
+ }),
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ __metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
52
+ ], GeoContinent.prototype, "creator", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.RelationId)((geoContinent) => geoContinent.creator),
55
+ __metadata("design:type", String)
56
+ ], GeoContinent.prototype, "creatorId", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
59
+ nullable: true
60
+ }),
61
+ (0, type_graphql_1.Field)({ nullable: true }),
62
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
63
+ ], GeoContinent.prototype, "updater", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.RelationId)((geoContinent) => geoContinent.creator),
66
+ __metadata("design:type", String)
67
+ ], GeoContinent.prototype, "updaterId", void 0);
68
+ GeoContinent = __decorate([
69
+ (0, typeorm_1.Entity)(),
70
+ (0, typeorm_1.Index)('ix_geo_continent_0', (geoContinent) => [geoContinent.name], { unique: true }),
71
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoContinent' })
72
+ ], GeoContinent);
73
+ exports.GeoContinent = GeoContinent;
74
+ //# sourceMappingURL=geo-continent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-continent.js","sourceRoot":"","sources":["../../../server/service/geo-continent/geo-continent.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAKT,IAAM,YAAY,GAAlB,MAAM,YAAY;CAwCxB,CAAA;AAvCC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;wCACC;AAEnB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;0CACI;AAEZ;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EA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_continent_1 = require("./geo-continent");
5
+ const geo_continent_query_1 = require("./geo-continent-query");
6
+ const geo_continent_mutation_1 = require("./geo-continent-mutation");
7
+ exports.entities = [geo_continent_1.GeoContinent];
8
+ exports.resolvers = [geo_continent_query_1.GeoContinentQuery, geo_continent_mutation_1.GeoContinentMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
@@ -0,0 +1,119 @@
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.GeoCountryMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const typeorm_1 = require("typeorm");
18
+ const geo_country_1 = require("./geo-country");
19
+ const geo_country_type_1 = require("./geo-country-type");
20
+ let GeoCountryMutation = class GeoCountryMutation {
21
+ async createGeoCountry(geoCountry, context) {
22
+ const { user, tx } = context.state;
23
+ return await tx.getRepository(geo_country_1.GeoCountry).save(Object.assign(Object.assign({}, geoCountry), { creator: user, updater: user }));
24
+ }
25
+ async updateGeoCountry(id, patch, context) {
26
+ const { user, tx } = context.state;
27
+ const repository = tx.getRepository(geo_country_1.GeoCountry);
28
+ const geoCountry = await repository.findOne({
29
+ where: { id }
30
+ });
31
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, geoCountry), patch), { updater: user }));
32
+ }
33
+ async updateMultipleGeoCountry(patches, context) {
34
+ const { user, tx } = context.state;
35
+ let results = [];
36
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
37
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
38
+ const geoCountryRepo = tx.getRepository(geo_country_1.GeoCountry);
39
+ if (_createRecords.length > 0) {
40
+ for (let i = 0; i < _createRecords.length; i++) {
41
+ const newRecord = _createRecords[i];
42
+ const result = await geoCountryRepo.save(Object.assign(Object.assign({}, newRecord), { creator: user, updater: user }));
43
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
44
+ }
45
+ }
46
+ if (_updateRecords.length > 0) {
47
+ for (let i = 0; i < _updateRecords.length; i++) {
48
+ const newRecord = _updateRecords[i];
49
+ const geoCountry = await geoCountryRepo.findOne(newRecord.id);
50
+ const result = await geoCountryRepo.save(Object.assign(Object.assign(Object.assign({}, geoCountry), newRecord), { updater: user }));
51
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
+ }
53
+ }
54
+ return results;
55
+ }
56
+ async deleteGeoCountry(id, context) {
57
+ const { tx } = context.state;
58
+ await tx.getRepository(geo_country_1.GeoCountry).delete({ id });
59
+ return true;
60
+ }
61
+ async deleteGeoCountries(ids, context) {
62
+ const { tx } = context.state;
63
+ await tx.getRepository(geo_country_1.GeoCountry).delete({
64
+ id: (0, typeorm_1.In)(ids)
65
+ });
66
+ return true;
67
+ }
68
+ };
69
+ __decorate([
70
+ (0, type_graphql_1.Directive)('@transaction'),
71
+ (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)
77
+ ], GeoCountryMutation.prototype, "createGeoCountry", null);
78
+ __decorate([
79
+ (0, type_graphql_1.Directive)('@transaction'),
80
+ (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)
87
+ ], GeoCountryMutation.prototype, "updateGeoCountry", null);
88
+ __decorate([
89
+ (0, type_graphql_1.Directive)('@transaction'),
90
+ (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)
96
+ ], GeoCountryMutation.prototype, "updateMultipleGeoCountry", null);
97
+ __decorate([
98
+ (0, type_graphql_1.Directive)('@transaction'),
99
+ (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)
105
+ ], GeoCountryMutation.prototype, "deleteGeoCountry", null);
106
+ __decorate([
107
+ (0, type_graphql_1.Directive)('@transaction'),
108
+ (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)
114
+ ], GeoCountryMutation.prototype, "deleteGeoCountries", null);
115
+ GeoCountryMutation = __decorate([
116
+ (0, type_graphql_1.Resolver)(geo_country_1.GeoCountry)
117
+ ], GeoCountryMutation);
118
+ exports.GeoCountryMutation = GeoCountryMutation;
119
+ //# sourceMappingURL=geo-country-mutation.js.map
@@ -0,0 +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;AAG5D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGvB,AAAN,KAAK,CAAC,gBAAgB,CAAoB,UAAyB,EAAS,OAAY;QACtF,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;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACT,EAAU,EACP,KAAsB,EAC7B,OAAY;QAEnB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAA;QAC/C,MAA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@@ -0,0 +1,112 @@
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;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GeoCountryQuery = void 0;
17
+ const auth_base_1 = require("@things-factory/auth-base");
18
+ const shell_1 = require("@things-factory/shell");
19
+ const type_graphql_1 = require("type-graphql");
20
+ const typeorm_1 = require("typeorm");
21
+ const geo_continent_1 = require("../geo-continent/geo-continent");
22
+ const geo_country_1 = require("./geo-country");
23
+ const geo_country_type_1 = require("./geo-country-type");
24
+ let GeoCountryQuery = class GeoCountryQuery {
25
+ async geoCountry(id, context) {
26
+ return await (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).findOne({
27
+ where: { id }
28
+ });
29
+ }
30
+ async geoCountries(params, context) {
31
+ const convertedParams = (0, shell_1.convertListParams)(params);
32
+ const [items, total] = await (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).findAndCount(convertedParams);
33
+ return { items, total };
34
+ }
35
+ async geoCountriesWithoutParam(params, context) {
36
+ var _a, _b, _c;
37
+ const nameFilter = (_a = params.filters) === null || _a === void 0 ? void 0 : _a.find((param) => param.name == 'name');
38
+ const descFilter = (_b = params.filters) === null || _b === void 0 ? void 0 : _b.find((param) => param.name == 'description');
39
+ const qb = (0, typeorm_1.getRepository)(geo_country_1.GeoCountry).createQueryBuilder('gc');
40
+ if (((_c = params.filters) === null || _c === void 0 ? void 0 : _c.length) > 1) {
41
+ qb.where(`gc.name ilike :name`, { name: nameFilter.value });
42
+ qb.andWhere(`gc.description ilike :description`, { description: descFilter.value });
43
+ }
44
+ else if (nameFilter && nameFilter.value) {
45
+ qb.where(`gc.name ilike :name`, { name: nameFilter.value });
46
+ }
47
+ else if (descFilter && descFilter.value) {
48
+ qb.where(`gc.description ilike :description`, { description: descFilter.value });
49
+ }
50
+ const [items, total] = await qb.getManyAndCount();
51
+ return { items, total };
52
+ }
53
+ async geoContinent(geoCountry) {
54
+ return await (0, typeorm_1.getRepository)(geo_continent_1.GeoContinent).findOne(geoCountry.geoContinentId);
55
+ }
56
+ async updater(geoCountry) {
57
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCountry.updaterId);
58
+ }
59
+ async creator(geoCountry) {
60
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCountry.creatorId);
61
+ }
62
+ };
63
+ __decorate([
64
+ (0, type_graphql_1.Query)(returns => geo_country_1.GeoCountry, { description: 'To fetch a GeoCountry' }),
65
+ __param(0, (0, type_graphql_1.Arg)('id')),
66
+ __param(1, (0, type_graphql_1.Ctx)()),
67
+ __metadata("design:type", Function),
68
+ __metadata("design:paramtypes", [String, Object]),
69
+ __metadata("design:returntype", Promise)
70
+ ], GeoCountryQuery.prototype, "geoCountry", null);
71
+ __decorate([
72
+ (0, type_graphql_1.Query)(returns => geo_country_type_1.GeoCountryList, { description: 'To fetch multiple GeoCountries' }),
73
+ __param(0, (0, type_graphql_1.Args)()),
74
+ __param(1, (0, type_graphql_1.Ctx)()),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
77
+ __metadata("design:returntype", Promise)
78
+ ], GeoCountryQuery.prototype, "geoCountries", null);
79
+ __decorate([
80
+ (0, type_graphql_1.Query)(returns => geo_country_type_1.GeoCountryList, { description: 'To fetch multiple GeoCountries without params' }),
81
+ __param(0, (0, type_graphql_1.Args)()),
82
+ __param(1, (0, type_graphql_1.Ctx)()),
83
+ __metadata("design:type", Function),
84
+ __metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
85
+ __metadata("design:returntype", Promise)
86
+ ], GeoCountryQuery.prototype, "geoCountriesWithoutParam", null);
87
+ __decorate([
88
+ (0, type_graphql_1.FieldResolver)(type => geo_continent_1.GeoContinent),
89
+ __param(0, (0, type_graphql_1.Root)()),
90
+ __metadata("design:type", Function),
91
+ __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
92
+ __metadata("design:returntype", Promise)
93
+ ], GeoCountryQuery.prototype, "geoContinent", null);
94
+ __decorate([
95
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
96
+ __param(0, (0, type_graphql_1.Root)()),
97
+ __metadata("design:type", Function),
98
+ __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
99
+ __metadata("design:returntype", Promise)
100
+ ], GeoCountryQuery.prototype, "updater", null);
101
+ __decorate([
102
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
103
+ __param(0, (0, type_graphql_1.Root)()),
104
+ __metadata("design:type", Function),
105
+ __metadata("design:paramtypes", [geo_country_1.GeoCountry]),
106
+ __metadata("design:returntype", Promise)
107
+ ], GeoCountryQuery.prototype, "creator", null);
108
+ GeoCountryQuery = __decorate([
109
+ (0, type_graphql_1.Resolver)(geo_country_1.GeoCountry)
110
+ ], GeoCountryQuery);
111
+ exports.GeoCountryQuery = GeoCountryQuery;
112
+ //# sourceMappingURL=geo-country-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-country-query.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country-query.ts"],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;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAI7C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,iCAAc,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAChE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;mDAK3C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,iCAAc,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IACnE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;+DAkBvD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAa,wBAAU;;mDAEhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAa,wBAAU;;8CAE3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAa,wBAAU;;8CAE3C;AAlDU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CAmD3B;AAnDY,0CAAe"}
@@ -0,0 +1,77 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GeoCountryList = exports.GeoCountryPatch = exports.NewGeoCountry = void 0;
13
+ const type_graphql_1 = require("type-graphql");
14
+ const geo_country_1 = require("./geo-country");
15
+ let NewGeoCountry = class NewGeoCountry {
16
+ };
17
+ __decorate([
18
+ (0, type_graphql_1.Field)(),
19
+ __metadata("design:type", String)
20
+ ], NewGeoCountry.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], NewGeoCountry.prototype, "description", void 0);
25
+ __decorate([
26
+ (0, type_graphql_1.Field)({ nullable: true }),
27
+ __metadata("design:type", String)
28
+ ], NewGeoCountry.prototype, "isoCode", void 0);
29
+ NewGeoCountry = __decorate([
30
+ (0, type_graphql_1.InputType)()
31
+ ], NewGeoCountry);
32
+ exports.NewGeoCountry = NewGeoCountry;
33
+ let GeoCountryPatch = class GeoCountryPatch {
34
+ };
35
+ __decorate([
36
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
37
+ __metadata("design:type", String)
38
+ ], GeoCountryPatch.prototype, "id", void 0);
39
+ __decorate([
40
+ (0, type_graphql_1.Field)({ nullable: true }),
41
+ __metadata("design:type", String)
42
+ ], GeoCountryPatch.prototype, "name", void 0);
43
+ __decorate([
44
+ (0, type_graphql_1.Field)({ nullable: true }),
45
+ __metadata("design:type", String)
46
+ ], GeoCountryPatch.prototype, "description", void 0);
47
+ __decorate([
48
+ (0, type_graphql_1.Field)({ nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], GeoCountryPatch.prototype, "isoCode", void 0);
51
+ __decorate([
52
+ (0, type_graphql_1.Field)({ nullable: true }),
53
+ __metadata("design:type", String)
54
+ ], GeoCountryPatch.prototype, "timezone", void 0);
55
+ __decorate([
56
+ (0, type_graphql_1.Field)(),
57
+ __metadata("design:type", String)
58
+ ], GeoCountryPatch.prototype, "cuFlag", void 0);
59
+ GeoCountryPatch = __decorate([
60
+ (0, type_graphql_1.InputType)()
61
+ ], GeoCountryPatch);
62
+ exports.GeoCountryPatch = GeoCountryPatch;
63
+ let GeoCountryList = class GeoCountryList {
64
+ };
65
+ __decorate([
66
+ (0, type_graphql_1.Field)(type => [geo_country_1.GeoCountry]),
67
+ __metadata("design:type", Array)
68
+ ], GeoCountryList.prototype, "items", void 0);
69
+ __decorate([
70
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
71
+ __metadata("design:type", Number)
72
+ ], GeoCountryList.prototype, "total", void 0);
73
+ GeoCountryList = __decorate([
74
+ (0, type_graphql_1.ObjectType)()
75
+ ], GeoCountryList);
76
+ exports.GeoCountryList = GeoCountryList;
77
+ //# sourceMappingURL=geo-country-type.js.map
@@ -0,0 +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;AAGnC,IAAM,aAAa,GAAnB,MAAM,aAAa;CASzB,CAAA;AARC;IAAC,IAAA,oBAAK,GAAE;;2CACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AARL,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CASzB;AATY,sCAAa;AAYnB,IAAM,eAAe,GAArB,MAAM,eAAe;CAkB3B,CAAA;AAjBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACT;AAEjB;IAAC,IAAA,oBAAK,GAAE;;+CACM;AAjBH,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAkB3B;AAlBY,0CAAe;AAqBrB,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,CAAC;;6CACT;AAEnB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;6CACN;AALF,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc"}
@@ -0,0 +1,96 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.GeoCountry = void 0;
14
+ const auth_base_1 = require("@things-factory/auth-base");
15
+ const type_graphql_1 = require("type-graphql");
16
+ const typeorm_1 = require("typeorm");
17
+ const geo_continent_1 = require("../geo-continent/geo-continent");
18
+ let GeoCountry = class GeoCountry {
19
+ };
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
+ __metadata("design:type", String)
24
+ ], GeoCountry.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(type => geo_continent_1.GeoContinent),
27
+ (0, type_graphql_1.Field)(),
28
+ __metadata("design:type", geo_continent_1.GeoContinent)
29
+ ], GeoCountry.prototype, "geoContinent", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.RelationId)((geoCountry) => geoCountry.geoContinent),
32
+ __metadata("design:type", String)
33
+ ], GeoCountry.prototype, "geoContinentId", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)(),
36
+ (0, type_graphql_1.Field)(),
37
+ __metadata("design:type", String)
38
+ ], GeoCountry.prototype, "name", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({
41
+ nullable: true
42
+ }),
43
+ (0, type_graphql_1.Field)({ nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], GeoCountry.prototype, "description", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ nullable: true }),
48
+ (0, type_graphql_1.Field)({ nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], GeoCountry.prototype, "isoCode", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ nullable: true }),
53
+ (0, type_graphql_1.Field)({ nullable: true }),
54
+ __metadata("design:type", String)
55
+ ], GeoCountry.prototype, "timezone", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.CreateDateColumn)(),
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ __metadata("design:type", Date)
60
+ ], GeoCountry.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
+ ], GeoCountry.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 (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
72
+ ], GeoCountry.prototype, "creator", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.RelationId)((geoCountry) => geoCountry.creator),
75
+ __metadata("design:type", String)
76
+ ], GeoCountry.prototype, "creatorId", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
79
+ nullable: true
80
+ }),
81
+ (0, type_graphql_1.Field)({ nullable: true }),
82
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
83
+ ], GeoCountry.prototype, "updater", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.RelationId)((geoCountry) => geoCountry.creator),
86
+ __metadata("design:type", String)
87
+ ], GeoCountry.prototype, "updaterId", void 0);
88
+ GeoCountry = __decorate([
89
+ (0, typeorm_1.Entity)(),
90
+ (0, typeorm_1.Index)('ix_geo_country_0', (geoCountry) => [geoCountry.geoContinent, geoCountry.name], { unique: true }),
91
+ (0, typeorm_1.Index)('ix_geo_country_1', (geoCountry) => [geoCountry.name], { unique: true }),
92
+ (0, typeorm_1.Index)('ix_geo_country_2', (geoCountry) => [geoCountry.description], { unique: true }),
93
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoCountry' })
94
+ ], GeoCountry);
95
+ exports.GeoCountry = GeoCountry;
96
+ //# sourceMappingURL=geo-country.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-country.js","sourceRoot":"","sources":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exports.resolvers = exports.entities = void 0;
4
+ const geo_country_1 = require("./geo-country");
5
+ const geo_country_query_1 = require("./geo-country-query");
6
+ const geo_country_mutation_1 = require("./geo-country-mutation");
7
+ exports.entities = [geo_country_1.GeoCountry];
8
+ exports.resolvers = [geo_country_query_1.GeoCountryQuery, geo_country_mutation_1.GeoCountryMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}