@things-factory/geography 5.0.0 → 5.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) 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 +33 -44
  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 +29 -40
  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 +36 -44
  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 +33 -44
  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 +34 -45
  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 +32 -40
  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 +33 -44
  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 +24 -35
  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 -28
  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 +33 -44
  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 +29 -40
  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 -34
  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 +33 -44
  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 +29 -40
  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 -36
  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 +4 -4
  57. package/server/routes.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,21 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./migrations"), exports);
18
- __exportStar(require("./middlewares"), exports);
19
- __exportStar(require("./service"), exports);
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./migrations"), exports);
5
+ tslib_1.__exportStar(require("./middlewares"), exports);
6
+ tslib_1.__exportStar(require("./service"), exports);
20
7
  require("./routes");
21
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,gDAA6B;AAC7B,4CAAyB;AAEzB,oBAAiB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB;AAEzB,oBAAiB","sourcesContent":["export * from './migrations'\nexport * from './middlewares'\nexport * from './service'\n\nimport './routes'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC","sourcesContent":["export function initMiddlewares(app) {\n /* can add middlewares into app */\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
@@ -1,4 +1,3 @@
1
- const debug = require('debug')('things-factory:geography:routes');
2
1
  process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
3
2
  /*
4
3
  * can add global public routes to application (auth not required, tenancy not required)
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,iCAAiC,CAAC,CAAA;AAEjE,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA","sourcesContent":["process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n /*\n * can add global public routes to application (auth not required, tenancy not required)\n *\n * ex) routes.get('/path', async(context, next) => {})\n * ex) routes.post('/path', async(context, next) => {})\n */\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {\n /*\n * can add global private routes to application (auth required, tenancy not required)\n */\n})\n\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n /*\n * can add domain public routes to application (auth not required, tenancy required)\n */\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n /*\n * can add domain private routes to application (auth required, tenancy required)\n */\n})\n"]}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  Object.defineProperty(exports, "__esModule", { value: true });
15
3
  exports.GeoAreaMutation = 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_area_1 = require("./geo-area");
@@ -66,53 +55,53 @@ let GeoAreaMutation = class GeoAreaMutation {
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_area_1.GeoArea, { description: 'To create new GeoArea' }),
72
- __param(0, (0, type_graphql_1.Arg)('geoArea')),
73
- __param(1, (0, type_graphql_1.Ctx)()),
74
- __metadata("design:type", Function),
75
- __metadata("design:paramtypes", [geo_area_type_1.NewGeoArea, Object]),
76
- __metadata("design:returntype", Promise)
61
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('geoArea')),
62
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
63
+ tslib_1.__metadata("design:type", Function),
64
+ tslib_1.__metadata("design:paramtypes", [geo_area_type_1.NewGeoArea, Object]),
65
+ tslib_1.__metadata("design:returntype", Promise)
77
66
  ], GeoAreaMutation.prototype, "createGeoArea", null);
78
- __decorate([
67
+ tslib_1.__decorate([
79
68
  (0, type_graphql_1.Directive)('@transaction'),
80
69
  (0, type_graphql_1.Mutation)(returns => geo_area_1.GeoArea, { description: 'To modify GeoArea 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_area_type_1.GeoAreaPatch, 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_area_type_1.GeoAreaPatch, Object]),
75
+ tslib_1.__metadata("design:returntype", Promise)
87
76
  ], GeoAreaMutation.prototype, "updateGeoArea", null);
88
- __decorate([
77
+ tslib_1.__decorate([
89
78
  (0, type_graphql_1.Directive)('@transaction'),
90
79
  (0, type_graphql_1.Mutation)(returns => [geo_area_1.GeoArea], { description: "To modify multiple GeoAreas' information" }),
91
- __param(0, (0, type_graphql_1.Arg)('patches', type => [geo_area_type_1.GeoAreaPatch])),
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_area_type_1.GeoAreaPatch])),
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
  ], GeoAreaMutation.prototype, "updateMultipleGeoArea", 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 GeoArea' }),
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
  ], GeoAreaMutation.prototype, "deleteGeoArea", 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 geoAreas' }),
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
  ], GeoAreaMutation.prototype, "deleteGeoAreas", null);
115
- GeoAreaMutation = __decorate([
104
+ GeoAreaMutation = tslib_1.__decorate([
116
105
  (0, type_graphql_1.Resolver)(geo_area_1.GeoArea)
117
106
  ], GeoAreaMutation);
118
107
  exports.GeoAreaMutation = GeoAreaMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-area-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-area/geo-area-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,yCAAoC;AACpC,mDAA0D;AAG1D,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,kBAAO,CAAC,CAAC,IAAI,iCACtC,OAAO,KACV,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,aAAa,CAAY,EAAU,EAAgB,KAAmB,EAAS,OAAY;QAC/F,MAAM,EAAE,IAAI,EAAE,E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A,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,CAAC,CAAA;IACtC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAuCP;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAKhD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAQvE;AA9FU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,kBAAO,CAAC;GACL,eAAe,CA+F3B;AA/FY,0CAAe","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { GeoArea } from './geo-area'\nimport { GeoAreaPatch, NewGeoArea } from './geo-area-type'\n\n@Resolver(GeoArea)\nexport class GeoAreaMutation {\n @Directive('@transaction')\n @Mutation(returns => GeoArea, { description: 'To create new GeoArea' })\n async createGeoArea(@Arg('geoArea') geoArea: NewGeoArea, @Ctx() context: any): Promise<GeoArea> {\n const { user, tx } = context.state\n\n return await tx.getRepository(GeoArea).save({\n ...geoArea,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => GeoArea, { description: 'To modify GeoArea information' })\n async updateGeoArea(@Arg('id') id: string, @Arg('patch') patch: GeoAreaPatch, @Ctx() context: any): Promise<GeoArea> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(GeoArea)\n const geoArea = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...geoArea,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [GeoArea], { description: \"To modify multiple GeoAreas' information\" })\n async updateMultipleGeoArea(\n @Arg('patches', type => [GeoAreaPatch]) patches: GeoAreaPatch[],\n @Ctx() context: any\n ): Promise<GeoArea[]> {\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 geoAreaRepo = tx.getRepository(GeoArea)\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 geoAreaRepo.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 geoArea = await geoAreaRepo.findOne(newRecord.id)\n\n const result = await geoAreaRepo.save({\n ...geoArea,\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 GeoArea' })\n async deleteGeoArea(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoArea).delete({ id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple geoAreas' })\n async deleteGeoAreas(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(GeoArea).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -1,19 +1,8 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
2
  var _a;
15
3
  Object.defineProperty(exports, "__esModule", { value: true });
16
4
  exports.GeoAreaQuery = void 0;
5
+ const tslib_1 = require("tslib");
17
6
  const auth_base_1 = require("@things-factory/auth-base");
18
7
  const shell_1 = require("@things-factory/shell");
19
8
  const type_graphql_1 = require("type-graphql");
@@ -42,44 +31,44 @@ let GeoAreaQuery = class GeoAreaQuery {
42
31
  return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoArea.creatorId);
43
32
  }
44
33
  };
45
- __decorate([
34
+ tslib_1.__decorate([
46
35
  (0, type_graphql_1.Query)(returns => geo_area_1.GeoArea, { description: 'To fetch a GeoArea' }),
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)
36
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
37
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
38
+ tslib_1.__metadata("design:type", Function),
39
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
40
+ tslib_1.__metadata("design:returntype", Promise)
52
41
  ], GeoAreaQuery.prototype, "geoArea", null);
53
- __decorate([
42
+ tslib_1.__decorate([
54
43
  (0, type_graphql_1.Query)(returns => geo_area_type_1.GeoAreaList, { description: 'To fetch multiple GeoAreas' }),
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)
44
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
45
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
46
+ tslib_1.__metadata("design:type", Function),
47
+ tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
48
+ tslib_1.__metadata("design:returntype", Promise)
60
49
  ], GeoAreaQuery.prototype, "geoAreas", null);
61
- __decorate([
50
+ tslib_1.__decorate([
62
51
  (0, type_graphql_1.FieldResolver)(type => geo_city_1.GeoCity),
63
- __param(0, (0, type_graphql_1.Root)()),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [geo_area_1.GeoArea]),
66
- __metadata("design:returntype", Promise)
52
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
53
+ tslib_1.__metadata("design:type", Function),
54
+ tslib_1.__metadata("design:paramtypes", [geo_area_1.GeoArea]),
55
+ tslib_1.__metadata("design:returntype", Promise)
67
56
  ], GeoAreaQuery.prototype, "geoCity", null);
68
- __decorate([
57
+ tslib_1.__decorate([
69
58
  (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_area_1.GeoArea]),
73
- __metadata("design:returntype", Promise)
59
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
60
+ tslib_1.__metadata("design:type", Function),
61
+ tslib_1.__metadata("design:paramtypes", [geo_area_1.GeoArea]),
62
+ tslib_1.__metadata("design:returntype", Promise)
74
63
  ], GeoAreaQuery.prototype, "updater", null);
75
- __decorate([
64
+ tslib_1.__decorate([
76
65
  (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_area_1.GeoArea]),
80
- __metadata("design:returntype", Promise)
66
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
67
+ tslib_1.__metadata("design:type", Function),
68
+ tslib_1.__metadata("design:paramtypes", [geo_area_1.GeoArea]),
69
+ tslib_1.__metadata("design:returntype", Promise)
81
70
  ], GeoAreaQuery.prototype, "creator", null);
82
- GeoAreaQuery = __decorate([
71
+ GeoAreaQuery = tslib_1.__decorate([
83
72
  (0, type_graphql_1.Resolver)(geo_area_1.GeoArea)
84
73
  ], GeoAreaQuery);
85
74
  exports.GeoAreaQuery = GeoAreaQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-area-query.js","sourceRoot":"","sources":["../../../server/service/geo-area/geo-area-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAgD;AAChD,iDAAoE;AACpE,+CAAmF;AACnF,qCAAuC;AACvC,mDAA8C;AAC9C,yCAAoC;AACpC,mDAA6C;AAG7C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAEvB,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,OAAY;QACtD,OAAO,MAAM,IAAA,uBAAa,EAAC,kBAAO,CAAC,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,QAAQ,CAAS,MAAiB,EAAS,OAAY;QAC3D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,kBAAO,CAAC,CA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IAGD,KAAK,CAAC,OAAO,CAAS,OAAgB;QACpC,OAAO,MAAM,IAAA,uBAAa,EAAC,gBAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC7D,CAAC;CACF,CAAA;AA5BC;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,kBAAO,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAClD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2CAI1C;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,2BAAW,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IAC7D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;4CAKvC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAO,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAU,kBAAO;;2CAErC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAU,kBAAO;;2CAErC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAU,kBAAO;;2CAErC;AA7BU,YAAY;IADxB,IAAA,uBAAQ,EAAC,kBAAO,CAAC;GACL,YAAY,CA8BxB;AA9BY,oCAAY","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { convertListParams, ListParam } from '@things-factory/shell'\nimport { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\nimport { GeoCity } from '../geo-city/geo-city'\nimport { GeoArea } from './geo-area'\nimport { GeoAreaList } from './geo-area-type'\n\n@Resolver(GeoArea)\nexport class GeoAreaQuery {\n @Query(returns => GeoArea, { description: 'To fetch a GeoArea' })\n async geoArea(@Arg('id') id: string, @Ctx() context: any): Promise<GeoArea> {\n return await getRepository(GeoArea).findOne({\n where: { id }\n })\n }\n\n @Query(returns => GeoAreaList, { description: 'To fetch multiple GeoAreas' })\n async geoAreas(@Args() params: ListParam, @Ctx() context: any): Promise<GeoAreaList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(GeoArea).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @FieldResolver(type => GeoCity)\n async geoCity(@Root() geoArea: GeoArea): Promise<GeoCity> {\n return await getRepository(GeoCity).findOne(geoArea.geoCityId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() geoArea: GeoArea): Promise<User> {\n return await getRepository(User).findOne(geoArea.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() geoArea: GeoArea): Promise<User> {\n return await getRepository(User).findOne(geoArea.creatorId)\n }\n}\n"]}
@@ -1,112 +1,104 @@
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.GeoAreaList = exports.GeoAreaPatch = exports.NewGeoArea = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const geo_area_1 = require("./geo-area");
15
7
  let NewGeoArea = class NewGeoArea {
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
  ], NewGeoArea.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
  ], NewGeoArea.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
  ], NewGeoArea.prototype, "countryCode", void 0);
29
- __decorate([
21
+ tslib_1.__decorate([
30
22
  (0, type_graphql_1.Field)({ nullable: true }),
31
- __metadata("design:type", String)
23
+ tslib_1.__metadata("design:type", String)
32
24
  ], NewGeoArea.prototype, "cityName", void 0);
33
- __decorate([
25
+ tslib_1.__decorate([
34
26
  (0, type_graphql_1.Field)({ nullable: true }),
35
- __metadata("design:type", String)
27
+ tslib_1.__metadata("design:type", String)
36
28
  ], NewGeoArea.prototype, "stateName", void 0);
37
- __decorate([
29
+ tslib_1.__decorate([
38
30
  (0, type_graphql_1.Field)({ nullable: true }),
39
- __metadata("design:type", String)
31
+ tslib_1.__metadata("design:type", String)
40
32
  ], NewGeoArea.prototype, "postalCode", void 0);
41
- __decorate([
33
+ tslib_1.__decorate([
42
34
  (0, type_graphql_1.Field)({ nullable: true }),
43
- __metadata("design:type", String)
35
+ tslib_1.__metadata("design:type", String)
44
36
  ], NewGeoArea.prototype, "latitude", void 0);
45
- __decorate([
37
+ tslib_1.__decorate([
46
38
  (0, type_graphql_1.Field)({ nullable: true }),
47
- __metadata("design:type", String)
39
+ tslib_1.__metadata("design:type", String)
48
40
  ], NewGeoArea.prototype, "longitude", void 0);
49
- NewGeoArea = __decorate([
41
+ NewGeoArea = tslib_1.__decorate([
50
42
  (0, type_graphql_1.InputType)()
51
43
  ], NewGeoArea);
52
44
  exports.NewGeoArea = NewGeoArea;
53
45
  let GeoAreaPatch = class GeoAreaPatch {
54
46
  };
55
- __decorate([
47
+ tslib_1.__decorate([
56
48
  (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
57
- __metadata("design:type", String)
49
+ tslib_1.__metadata("design:type", String)
58
50
  ], GeoAreaPatch.prototype, "id", void 0);
59
- __decorate([
51
+ tslib_1.__decorate([
60
52
  (0, type_graphql_1.Field)({ nullable: true }),
61
- __metadata("design:type", String)
53
+ tslib_1.__metadata("design:type", String)
62
54
  ], GeoAreaPatch.prototype, "name", void 0);
63
- __decorate([
55
+ tslib_1.__decorate([
64
56
  (0, type_graphql_1.Field)({ nullable: true }),
65
- __metadata("design:type", String)
57
+ tslib_1.__metadata("design:type", String)
66
58
  ], GeoAreaPatch.prototype, "description", void 0);
67
- __decorate([
59
+ tslib_1.__decorate([
68
60
  (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", String)
61
+ tslib_1.__metadata("design:type", String)
70
62
  ], GeoAreaPatch.prototype, "countryCode", void 0);
71
- __decorate([
63
+ tslib_1.__decorate([
72
64
  (0, type_graphql_1.Field)({ nullable: true }),
73
- __metadata("design:type", String)
65
+ tslib_1.__metadata("design:type", String)
74
66
  ], GeoAreaPatch.prototype, "cityName", void 0);
75
- __decorate([
67
+ tslib_1.__decorate([
76
68
  (0, type_graphql_1.Field)({ nullable: true }),
77
- __metadata("design:type", String)
69
+ tslib_1.__metadata("design:type", String)
78
70
  ], GeoAreaPatch.prototype, "stateName", void 0);
79
- __decorate([
71
+ tslib_1.__decorate([
80
72
  (0, type_graphql_1.Field)({ nullable: true }),
81
- __metadata("design:type", String)
73
+ tslib_1.__metadata("design:type", String)
82
74
  ], GeoAreaPatch.prototype, "postalCode", void 0);
83
- __decorate([
75
+ tslib_1.__decorate([
84
76
  (0, type_graphql_1.Field)({ nullable: true }),
85
- __metadata("design:type", String)
77
+ tslib_1.__metadata("design:type", String)
86
78
  ], GeoAreaPatch.prototype, "latitude", void 0);
87
- __decorate([
79
+ tslib_1.__decorate([
88
80
  (0, type_graphql_1.Field)({ nullable: true }),
89
- __metadata("design:type", String)
81
+ tslib_1.__metadata("design:type", String)
90
82
  ], GeoAreaPatch.prototype, "longitude", void 0);
91
- __decorate([
83
+ tslib_1.__decorate([
92
84
  (0, type_graphql_1.Field)(),
93
- __metadata("design:type", String)
85
+ tslib_1.__metadata("design:type", String)
94
86
  ], GeoAreaPatch.prototype, "cuFlag", void 0);
95
- GeoAreaPatch = __decorate([
87
+ GeoAreaPatch = tslib_1.__decorate([
96
88
  (0, type_graphql_1.InputType)()
97
89
  ], GeoAreaPatch);
98
90
  exports.GeoAreaPatch = GeoAreaPatch;
99
91
  let GeoAreaList = class GeoAreaList {
100
92
  };
101
- __decorate([
93
+ tslib_1.__decorate([
102
94
  (0, type_graphql_1.Field)(type => [geo_area_1.GeoArea]),
103
- __metadata("design:type", Array)
95
+ tslib_1.__metadata("design:type", Array)
104
96
  ], GeoAreaList.prototype, "items", void 0);
105
- __decorate([
97
+ tslib_1.__decorate([
106
98
  (0, type_graphql_1.Field)(type => type_graphql_1.Int),
107
- __metadata("design:type", Number)
99
+ tslib_1.__metadata("design:type", Number)
108
100
  ], GeoAreaList.prototype, "total", void 0);
109
- GeoAreaList = __decorate([
101
+ GeoAreaList = tslib_1.__decorate([
110
102
  (0, type_graphql_1.ObjectType)()
111
103
  ], GeoAreaList);
112
104
  exports.GeoAreaList = GeoAreaList;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-area-type.js","sourceRoot":"","sources":["../../../server/service/geo-area/geo-area-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AACpE,yCAAoC;AAGpC,IAAa,UAAU,GAAvB,MAAa,UAAU;CAwBtB,CAAA;AAtBC;IADC,IA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C;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\nimport { GeoArea } from './geo-area'\n\n@InputType()\nexport class NewGeoArea {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n countryCode?: string\n\n @Field({ nullable: true })\n cityName?: string\n\n @Field({ nullable: true })\n stateName?: string\n\n @Field({ nullable: true })\n postalCode?: string\n\n @Field({ nullable: true })\n latitude?: string\n\n @Field({ nullable: true })\n longitude?: string\n}\n\n@InputType()\nexport class GeoAreaPatch {\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 countryCode?: string\n\n @Field({ nullable: true })\n cityName?: string\n\n @Field({ nullable: true })\n stateName?: string\n\n @Field({ nullable: true })\n postalCode?: string\n\n @Field({ nullable: true })\n latitude?: string\n\n @Field({ nullable: true })\n longitude?: string\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class GeoAreaList {\n @Field(type => [GeoArea])\n items: GeoArea[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1,105 +1,97 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
2
  var _a, _b;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.GeoArea = void 0;
5
+ const tslib_1 = require("tslib");
14
6
  const auth_base_1 = require("@things-factory/auth-base");
15
7
  const type_graphql_1 = require("type-graphql");
16
8
  const typeorm_1 = require("typeorm");
17
9
  const geo_city_1 = require("../geo-city/geo-city");
18
10
  let GeoArea = class GeoArea {
19
11
  };
20
- __decorate([
12
+ tslib_1.__decorate([
21
13
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
14
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
- __metadata("design:type", String)
15
+ tslib_1.__metadata("design:type", String)
24
16
  ], GeoArea.prototype, "id", void 0);
25
- __decorate([
17
+ tslib_1.__decorate([
26
18
  (0, typeorm_1.ManyToOne)(type => geo_city_1.GeoCity),
27
19
  (0, type_graphql_1.Field)({ nullable: true }),
28
- __metadata("design:type", geo_city_1.GeoCity)
20
+ tslib_1.__metadata("design:type", geo_city_1.GeoCity)
29
21
  ], GeoArea.prototype, "geoCity", void 0);
30
- __decorate([
22
+ tslib_1.__decorate([
31
23
  (0, typeorm_1.RelationId)((geoArea) => geoArea.geoCity),
32
- __metadata("design:type", String)
24
+ tslib_1.__metadata("design:type", String)
33
25
  ], GeoArea.prototype, "geoCityId", void 0);
34
- __decorate([
26
+ tslib_1.__decorate([
35
27
  (0, typeorm_1.Column)(),
36
28
  (0, type_graphql_1.Field)(),
37
- __metadata("design:type", String)
29
+ tslib_1.__metadata("design:type", String)
38
30
  ], GeoArea.prototype, "name", void 0);
39
- __decorate([
31
+ tslib_1.__decorate([
40
32
  (0, typeorm_1.Column)({ nullable: true }),
41
33
  (0, type_graphql_1.Field)({ nullable: true }),
42
- __metadata("design:type", String)
34
+ tslib_1.__metadata("design:type", String)
43
35
  ], GeoArea.prototype, "description", void 0);
44
- __decorate([
36
+ tslib_1.__decorate([
45
37
  (0, typeorm_1.Column)({ nullable: true }),
46
38
  (0, type_graphql_1.Field)({ nullable: true }),
47
- __metadata("design:type", String)
39
+ tslib_1.__metadata("design:type", String)
48
40
  ], GeoArea.prototype, "countryCode", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, typeorm_1.Column)({ nullable: true }),
51
43
  (0, type_graphql_1.Field)({ nullable: true }),
52
- __metadata("design:type", String)
44
+ tslib_1.__metadata("design:type", String)
53
45
  ], GeoArea.prototype, "cityName", void 0);
54
- __decorate([
46
+ tslib_1.__decorate([
55
47
  (0, typeorm_1.Column)({ nullable: true }),
56
48
  (0, type_graphql_1.Field)({ nullable: true }),
57
- __metadata("design:type", String)
49
+ tslib_1.__metadata("design:type", String)
58
50
  ], GeoArea.prototype, "stateName", void 0);
59
- __decorate([
51
+ tslib_1.__decorate([
60
52
  (0, typeorm_1.Column)({ nullable: true }),
61
53
  (0, type_graphql_1.Field)({ nullable: true }),
62
- __metadata("design:type", String)
54
+ tslib_1.__metadata("design:type", String)
63
55
  ], GeoArea.prototype, "postalCode", void 0);
64
- __decorate([
56
+ tslib_1.__decorate([
65
57
  (0, typeorm_1.Column)({ nullable: true }),
66
58
  (0, type_graphql_1.Field)({ nullable: true }),
67
- __metadata("design:type", String)
59
+ tslib_1.__metadata("design:type", String)
68
60
  ], GeoArea.prototype, "latitude", void 0);
69
- __decorate([
61
+ tslib_1.__decorate([
70
62
  (0, typeorm_1.Column)({ nullable: true }),
71
63
  (0, type_graphql_1.Field)({ nullable: true }),
72
- __metadata("design:type", String)
64
+ tslib_1.__metadata("design:type", String)
73
65
  ], GeoArea.prototype, "longitude", void 0);
74
- __decorate([
66
+ tslib_1.__decorate([
75
67
  (0, typeorm_1.CreateDateColumn)(),
76
68
  (0, type_graphql_1.Field)({ nullable: true }),
77
- __metadata("design:type", Date)
69
+ tslib_1.__metadata("design:type", Date)
78
70
  ], GeoArea.prototype, "createdAt", void 0);
79
- __decorate([
71
+ tslib_1.__decorate([
80
72
  (0, typeorm_1.UpdateDateColumn)(),
81
73
  (0, type_graphql_1.Field)({ nullable: true }),
82
- __metadata("design:type", Date)
74
+ tslib_1.__metadata("design:type", Date)
83
75
  ], GeoArea.prototype, "updatedAt", void 0);
84
- __decorate([
76
+ tslib_1.__decorate([
85
77
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
86
78
  (0, type_graphql_1.Field)({ nullable: true }),
87
- __metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
79
+ tslib_1.__metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
88
80
  ], GeoArea.prototype, "creator", void 0);
89
- __decorate([
81
+ tslib_1.__decorate([
90
82
  (0, typeorm_1.RelationId)((geoArea) => geoArea.creator),
91
- __metadata("design:type", String)
83
+ tslib_1.__metadata("design:type", String)
92
84
  ], GeoArea.prototype, "creatorId", void 0);
93
- __decorate([
85
+ tslib_1.__decorate([
94
86
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
95
87
  (0, type_graphql_1.Field)({ nullable: true }),
96
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
88
+ tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
97
89
  ], GeoArea.prototype, "updater", void 0);
98
- __decorate([
90
+ tslib_1.__decorate([
99
91
  (0, typeorm_1.RelationId)((geoArea) => geoArea.creator),
100
- __metadata("design:type", String)
92
+ tslib_1.__metadata("design:type", String)
101
93
  ], GeoArea.prototype, "updaterId", void 0);
102
- GeoArea = __decorate([
94
+ GeoArea = tslib_1.__decorate([
103
95
  (0, typeorm_1.Entity)(),
104
96
  (0, typeorm_1.Index)('ix_geo_area_0', (geoArea) => [geoArea.geoCity, geoArea.name], { unique: true }),
105
97
  (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoArea' })