@things-factory/geography 5.0.7 → 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":"geo-area.js","sourceRoot":"","sources":["../../../server/service/geo-area/geo-area.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,mDAA8C;AAK9C,IAAa,OAAO,GAApB,MAAa,OAAO;CAiEnB,CAAA;AA9DC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,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;IAHnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC/F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CAiEnB;AAjEY,0BAAO","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 { GeoCity } from '../geo-city/geo-city'\n\n@Entity()\n@Index('ix_geo_area_0', (geoArea: GeoArea) => [geoArea.geoCity, geoArea.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoArea' })\nexport class GeoArea {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoCity)\n @Field({ nullable: true })\n geoCity?: GeoCity\n\n @RelationId((geoArea: GeoArea) => geoArea.geoCity)\n geoCityId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n countryCode?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cityName?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n stateName?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n postalCode?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n latitude?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n longitude?: 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, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((geoArea: GeoArea) => geoArea.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((geoArea: GeoArea) => geoArea.creator)\n updaterId?: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-area/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-area/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA","sourcesContent":["import { GeoArea } from './geo-area'\nimport { GeoAreaQuery } from './geo-area-query'\nimport { GeoAreaMutation } from './geo-area-mutation'\n\nexport const entities = [GeoArea]\nexport const resolvers = [GeoAreaQuery, GeoAreaMutation]\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.GeoCityMutation = 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_city_1 = require("./geo-city");
@@ -66,53 +55,53 @@ let GeoCityMutation = class GeoCityMutation {
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_city_1.GeoCity, { description: 'To create new GeoCity' }),
72
- __param(0, (0, type_graphql_1.Arg)('geoCity')),
73
- __param(1, (0, type_graphql_1.Ctx)()),
74
- __metadata("design:type", Function),
75
- __metadata("design:paramtypes", [geo_city_type_1.NewGeoCity, Object]),
76
- __metadata("design:returntype", Promise)
61
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('geoCity')),
62
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
63
+ tslib_1.__metadata("design:type", Function),
64
+ tslib_1.__metadata("design:paramtypes", [geo_city_type_1.NewGeoCity, Object]),
65
+ tslib_1.__metadata("design:returntype", Promise)
77
66
  ], GeoCityMutation.prototype, "createGeoCity", null);
78
- __decorate([
67
+ tslib_1.__decorate([
79
68
  (0, type_graphql_1.Directive)('@transaction'),
80
69
  (0, type_graphql_1.Mutation)(returns => geo_city_1.GeoCity, { description: 'To modify GeoCity 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_city_type_1.GeoCityPatch, 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_city_type_1.GeoCityPatch, Object]),
75
+ tslib_1.__metadata("design:returntype", Promise)
87
76
  ], GeoCityMutation.prototype, "updateGeoCity", null);
88
- __decorate([
77
+ tslib_1.__decorate([
89
78
  (0, type_graphql_1.Directive)('@transaction'),
90
79
  (0, type_graphql_1.Mutation)(returns => [geo_city_1.GeoCity], { description: "To modify multiple GeoCities' information" }),
91
- __param(0, (0, type_graphql_1.Arg)('patches', type => [geo_city_type_1.GeoCityPatch])),
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_city_type_1.GeoCityPatch])),
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
  ], GeoCityMutation.prototype, "updateMultipleGeoCity", 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 GeoCity' }),
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
  ], GeoCityMutation.prototype, "deleteGeoCity", 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 geoCitys' }),
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
  ], GeoCityMutation.prototype, "deleteGeoCities", null);
115
- GeoCityMutation = __decorate([
104
+ GeoCityMutation = tslib_1.__decorate([
116
105
  (0, type_graphql_1.Resolver)(geo_city_1.GeoCity)
117
106
  ], GeoCityMutation);
118
107
  exports.GeoCityMutation = GeoCityMutation;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-city-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-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,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AAC,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;IACtD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sDAQxE;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 { GeoCity } from './geo-city'\nimport { GeoCityPatch, NewGeoCity } from './geo-city-type'\n\n@Resolver(GeoCity)\nexport class GeoCityMutation {\n @Directive('@transaction')\n @Mutation(returns => GeoCity, { description: 'To create new GeoCity' })\n async createGeoCity(@Arg('geoCity') geoCity: NewGeoCity, @Ctx() context: any): Promise<GeoCity> {\n const { user, tx } = context.state\n\n return await tx.getRepository(GeoCity).save({\n ...geoCity,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => GeoCity, { description: 'To modify GeoCity information' })\n async updateGeoCity(@Arg('id') id: string, @Arg('patch') patch: GeoCityPatch, @Ctx() context: any): Promise<GeoCity> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(GeoCity)\n const geoCity = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...geoCity,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [GeoCity], { description: \"To modify multiple GeoCities' information\" })\n async updateMultipleGeoCity(\n @Arg('patches', type => [GeoCityPatch]) patches: GeoCityPatch[],\n @Ctx() context: any\n ): Promise<GeoCity[]> {\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 geoCityRepo = tx.getRepository(GeoCity)\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 geoCityRepo.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 geoCity = await geoCityRepo.findOne(newRecord.id)\n\n const result = await geoCityRepo.save({\n ...geoCity,\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 GeoCity' })\n async deleteGeoCity(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoCity).delete({ id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple geoCitys' })\n async deleteGeoCities(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoCity).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.GeoCityQuery = 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");
@@ -46,51 +35,51 @@ let GeoCityQuery = class GeoCityQuery {
46
35
  return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(geoCity.creatorId);
47
36
  }
48
37
  };
49
- __decorate([
38
+ tslib_1.__decorate([
50
39
  (0, type_graphql_1.Query)(returns => geo_city_1.GeoCity, { description: 'To fetch a GeoCity' }),
51
- __param(0, (0, type_graphql_1.Arg)('id')),
52
- __param(1, (0, type_graphql_1.Ctx)()),
53
- __metadata("design:type", Function),
54
- __metadata("design:paramtypes", [String, Object]),
55
- __metadata("design:returntype", Promise)
40
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
41
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
42
+ tslib_1.__metadata("design:type", Function),
43
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
44
+ tslib_1.__metadata("design:returntype", Promise)
56
45
  ], GeoCityQuery.prototype, "geoCity", null);
57
- __decorate([
46
+ tslib_1.__decorate([
58
47
  (0, type_graphql_1.Query)(returns => geo_city_type_1.GeoCityList, { description: 'To fetch multiple GeoCities' }),
59
- __param(0, (0, type_graphql_1.Args)()),
60
- __param(1, (0, type_graphql_1.Ctx)()),
61
- __metadata("design:type", Function),
62
- __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
63
- __metadata("design:returntype", Promise)
48
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
49
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
50
+ tslib_1.__metadata("design:type", Function),
51
+ tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
52
+ tslib_1.__metadata("design:returntype", Promise)
64
53
  ], GeoCityQuery.prototype, "geoCities", null);
65
- __decorate([
54
+ tslib_1.__decorate([
66
55
  (0, type_graphql_1.FieldResolver)(type => geo_country_1.GeoCountry),
67
- __param(0, (0, type_graphql_1.Root)()),
68
- __metadata("design:type", Function),
69
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
70
- __metadata("design:returntype", Promise)
56
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
57
+ tslib_1.__metadata("design:type", Function),
58
+ tslib_1.__metadata("design:paramtypes", [geo_city_1.GeoCity]),
59
+ tslib_1.__metadata("design:returntype", Promise)
71
60
  ], GeoCityQuery.prototype, "geoCountry", null);
72
- __decorate([
61
+ tslib_1.__decorate([
73
62
  (0, type_graphql_1.FieldResolver)(type => geo_state_1.GeoState),
74
- __param(0, (0, type_graphql_1.Root)()),
75
- __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
77
- __metadata("design:returntype", Promise)
63
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
64
+ tslib_1.__metadata("design:type", Function),
65
+ tslib_1.__metadata("design:paramtypes", [geo_city_1.GeoCity]),
66
+ tslib_1.__metadata("design:returntype", Promise)
78
67
  ], GeoCityQuery.prototype, "geoState", null);
79
- __decorate([
68
+ tslib_1.__decorate([
80
69
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
81
- __param(0, (0, type_graphql_1.Root)()),
82
- __metadata("design:type", Function),
83
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
84
- __metadata("design:returntype", Promise)
70
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
71
+ tslib_1.__metadata("design:type", Function),
72
+ tslib_1.__metadata("design:paramtypes", [geo_city_1.GeoCity]),
73
+ tslib_1.__metadata("design:returntype", Promise)
85
74
  ], GeoCityQuery.prototype, "updater", null);
86
- __decorate([
75
+ tslib_1.__decorate([
87
76
  (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
88
- __param(0, (0, type_graphql_1.Root)()),
89
- __metadata("design:type", Function),
90
- __metadata("design:paramtypes", [geo_city_1.GeoCity]),
91
- __metadata("design:returntype", Promise)
77
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
78
+ tslib_1.__metadata("design:type", Function),
79
+ tslib_1.__metadata("design:paramtypes", [geo_city_1.GeoCity]),
80
+ tslib_1.__metadata("design:returntype", Promise)
92
81
  ], GeoCityQuery.prototype, "creator", null);
93
- GeoCityQuery = __decorate([
82
+ GeoCityQuery = tslib_1.__decorate([
94
83
  (0, type_graphql_1.Resolver)(geo_city_1.GeoCity)
95
84
  ], GeoCityQuery);
96
85
  exports.GeoCityQuery = GeoCityQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-city-query.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAgD;AAChD,iDAAoE;AACpE,+CAAmF;AACnF,qCAAuC;AACvC,4DAAuD;AACvD,sDAAiD;AACjD,yCAAoC;AACpC,mDAA6C;AAG7C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAEvB,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,OAAY;QACtD,OAA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,EAAE,CAAC;IAC7D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;iEAAjB,iBAAS,oBAAT,iBAAS;;6CAKxC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAU,kBAAO;;8CAExC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAQ,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAU,kBAAO;;4CAEtC;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;AAlCU,YAAY;IADxB,IAAA,uBAAQ,EAAC,kBAAO,CAAC;GACL,YAAY,CAmCxB;AAnCY,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 { GeoCountry } from '../geo-country/geo-country'\nimport { GeoState } from '../geo-state/geo-state'\nimport { GeoCity } from './geo-city'\nimport { GeoCityList } from './geo-city-type'\n\n@Resolver(GeoCity)\nexport class GeoCityQuery {\n @Query(returns => GeoCity, { description: 'To fetch a GeoCity' })\n async geoCity(@Arg('id') id: string, @Ctx() context: any): Promise<GeoCity> {\n return await getRepository(GeoCity).findOne({\n where: { id }\n })\n }\n\n @Query(returns => GeoCityList, { description: 'To fetch multiple GeoCities' })\n async geoCities(@Args() params: ListParam, @Ctx() context: any): Promise<GeoCityList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(GeoCity).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @FieldResolver(type => GeoCountry)\n async geoCountry(@Root() geoCity: GeoCity): Promise<GeoCountry> {\n return await getRepository(GeoCountry).findOne(geoCity.geoCountryId)\n }\n\n @FieldResolver(type => GeoState)\n async geoState(@Root() geoCity: GeoCity): Promise<GeoState> {\n return await getRepository(GeoState).findOne(geoCity.geoStateId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() geoCity: GeoCity): Promise<User> {\n return await getRepository(User).findOne(geoCity.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() geoCity: GeoCity): Promise<User> {\n return await getRepository(User).findOne(geoCity.creatorId)\n }\n}\n"]}
@@ -1,80 +1,72 @@
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.GeoCityList = exports.GeoCityPatch = exports.NewGeoCity = void 0;
4
+ const tslib_1 = require("tslib");
13
5
  const type_graphql_1 = require("type-graphql");
14
6
  const geo_city_1 = require("./geo-city");
15
7
  let NewGeoCity = class NewGeoCity {
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
  ], NewGeoCity.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
  ], NewGeoCity.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
  ], NewGeoCity.prototype, "latitude", 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
  ], NewGeoCity.prototype, "longitude", void 0);
33
- NewGeoCity = __decorate([
25
+ NewGeoCity = tslib_1.__decorate([
34
26
  (0, type_graphql_1.InputType)()
35
27
  ], NewGeoCity);
36
28
  exports.NewGeoCity = NewGeoCity;
37
29
  let GeoCityPatch = class GeoCityPatch {
38
30
  };
39
- __decorate([
31
+ tslib_1.__decorate([
40
32
  (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
41
- __metadata("design:type", String)
33
+ tslib_1.__metadata("design:type", String)
42
34
  ], GeoCityPatch.prototype, "id", 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
  ], GeoCityPatch.prototype, "name", 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
  ], GeoCityPatch.prototype, "description", void 0);
51
- __decorate([
43
+ tslib_1.__decorate([
52
44
  (0, type_graphql_1.Field)({ nullable: true }),
53
- __metadata("design:type", String)
45
+ tslib_1.__metadata("design:type", String)
54
46
  ], GeoCityPatch.prototype, "latitude", void 0);
55
- __decorate([
47
+ tslib_1.__decorate([
56
48
  (0, type_graphql_1.Field)({ nullable: true }),
57
- __metadata("design:type", String)
49
+ tslib_1.__metadata("design:type", String)
58
50
  ], GeoCityPatch.prototype, "longitude", void 0);
59
- __decorate([
51
+ tslib_1.__decorate([
60
52
  (0, type_graphql_1.Field)(),
61
- __metadata("design:type", String)
53
+ tslib_1.__metadata("design:type", String)
62
54
  ], GeoCityPatch.prototype, "cuFlag", void 0);
63
- GeoCityPatch = __decorate([
55
+ GeoCityPatch = tslib_1.__decorate([
64
56
  (0, type_graphql_1.InputType)()
65
57
  ], GeoCityPatch);
66
58
  exports.GeoCityPatch = GeoCityPatch;
67
59
  let GeoCityList = class GeoCityList {
68
60
  };
69
- __decorate([
61
+ tslib_1.__decorate([
70
62
  (0, type_graphql_1.Field)(type => [geo_city_1.GeoCity]),
71
- __metadata("design:type", Array)
63
+ tslib_1.__metadata("design:type", Array)
72
64
  ], GeoCityList.prototype, "items", void 0);
73
- __decorate([
65
+ tslib_1.__decorate([
74
66
  (0, type_graphql_1.Field)(type => type_graphql_1.Int),
75
- __metadata("design:type", Number)
67
+ tslib_1.__metadata("design:type", Number)
76
68
  ], GeoCityList.prototype, "total", void 0);
77
- GeoCityList = __decorate([
69
+ GeoCityList = tslib_1.__decorate([
78
70
  (0, type_graphql_1.ObjectType)()
79
71
  ], GeoCityList);
80
72
  exports.GeoCityList = GeoCityList;
@@ -1 +1 @@
1
- {"version":3,"file":"geo-city-type.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AACpE,yCAAoC;AAGpC,IAAa,UAAU,GAAvB,MAAa,UAAU;CAYtB,CAAA;AAVC;IADC,IAAA,oBAAK,GAAE;;wCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;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AAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAXP,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAYtB;AAZY,gCAAU;AAevB,IAAa,YAAY,GAAzB,MAAa,YAAY;CAkBxB,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACR;AAGlB;IADC,IAAA,oBAAK,GAAE;;4CACM;AAjBH,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAkBxB;AAlBY,oCAAY;AAqBzB,IAAa,WAAW,GAAxB,MAAa,WAAW;CAMvB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,kBAAO,CAAC,CAAC;;0CACT;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\nimport { GeoCity } from './geo-city'\n\n@InputType()\nexport class NewGeoCity {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n latitude?: string\n\n @Field({ nullable: true })\n longitude?: string\n}\n\n@InputType()\nexport class GeoCityPatch {\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 latitude?: string\n\n @Field({ nullable: true })\n longitude?: string\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class GeoCityList {\n @Field(type => [GeoCity])\n items: GeoCity[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1,16 +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
2
  var _a, _b;
12
3
  Object.defineProperty(exports, "__esModule", { value: true });
13
4
  exports.GeoCity = 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");
@@ -18,84 +10,84 @@ const geo_country_1 = require("../geo-country/geo-country");
18
10
  const geo_state_1 = require("../geo-state/geo-state");
19
11
  let GeoCity = class GeoCity {
20
12
  };
21
- __decorate([
13
+ tslib_1.__decorate([
22
14
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
23
15
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
- __metadata("design:type", String)
16
+ tslib_1.__metadata("design:type", String)
25
17
  ], GeoCity.prototype, "id", void 0);
26
- __decorate([
18
+ tslib_1.__decorate([
27
19
  (0, typeorm_1.ManyToOne)(type => geo_country_1.GeoCountry),
28
20
  (0, type_graphql_1.Field)(),
29
- __metadata("design:type", geo_country_1.GeoCountry)
21
+ tslib_1.__metadata("design:type", geo_country_1.GeoCountry)
30
22
  ], GeoCity.prototype, "geoCountry", void 0);
31
- __decorate([
23
+ tslib_1.__decorate([
32
24
  (0, typeorm_1.RelationId)((geoCity) => geoCity.geoCountry),
33
- __metadata("design:type", String)
25
+ tslib_1.__metadata("design:type", String)
34
26
  ], GeoCity.prototype, "geoCountryId", void 0);
35
- __decorate([
27
+ tslib_1.__decorate([
36
28
  (0, typeorm_1.ManyToOne)(type => geo_state_1.GeoState),
37
29
  (0, type_graphql_1.Field)({ nullable: true }),
38
- __metadata("design:type", geo_state_1.GeoState)
30
+ tslib_1.__metadata("design:type", geo_state_1.GeoState)
39
31
  ], GeoCity.prototype, "geoState", void 0);
40
- __decorate([
32
+ tslib_1.__decorate([
41
33
  (0, typeorm_1.RelationId)((geoCity) => geoCity.geoState),
42
- __metadata("design:type", String)
34
+ tslib_1.__metadata("design:type", String)
43
35
  ], GeoCity.prototype, "geoStateId", void 0);
44
- __decorate([
36
+ tslib_1.__decorate([
45
37
  (0, typeorm_1.Column)(),
46
38
  (0, type_graphql_1.Field)(),
47
- __metadata("design:type", String)
39
+ tslib_1.__metadata("design:type", String)
48
40
  ], GeoCity.prototype, "name", void 0);
49
- __decorate([
41
+ tslib_1.__decorate([
50
42
  (0, typeorm_1.Column)({
51
43
  nullable: true
52
44
  }),
53
45
  (0, type_graphql_1.Field)({ nullable: true }),
54
- __metadata("design:type", String)
46
+ tslib_1.__metadata("design:type", String)
55
47
  ], GeoCity.prototype, "description", void 0);
56
- __decorate([
48
+ tslib_1.__decorate([
57
49
  (0, typeorm_1.Column)({ nullable: true }),
58
50
  (0, type_graphql_1.Field)({ nullable: true }),
59
- __metadata("design:type", String)
51
+ tslib_1.__metadata("design:type", String)
60
52
  ], GeoCity.prototype, "latitude", void 0);
61
- __decorate([
53
+ tslib_1.__decorate([
62
54
  (0, typeorm_1.Column)({ nullable: true }),
63
55
  (0, type_graphql_1.Field)({ nullable: true }),
64
- __metadata("design:type", String)
56
+ tslib_1.__metadata("design:type", String)
65
57
  ], GeoCity.prototype, "longitude", void 0);
66
- __decorate([
58
+ tslib_1.__decorate([
67
59
  (0, typeorm_1.CreateDateColumn)(),
68
60
  (0, type_graphql_1.Field)({ nullable: true }),
69
- __metadata("design:type", Date)
61
+ tslib_1.__metadata("design:type", Date)
70
62
  ], GeoCity.prototype, "createdAt", void 0);
71
- __decorate([
63
+ tslib_1.__decorate([
72
64
  (0, typeorm_1.UpdateDateColumn)(),
73
65
  (0, type_graphql_1.Field)({ nullable: true }),
74
- __metadata("design:type", Date)
66
+ tslib_1.__metadata("design:type", Date)
75
67
  ], GeoCity.prototype, "updatedAt", void 0);
76
- __decorate([
68
+ tslib_1.__decorate([
77
69
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
78
70
  nullable: true
79
71
  }),
80
72
  (0, type_graphql_1.Field)({ nullable: true }),
81
- __metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
73
+ tslib_1.__metadata("design:type", typeof (_a = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _a : Object)
82
74
  ], GeoCity.prototype, "creator", void 0);
83
- __decorate([
75
+ tslib_1.__decorate([
84
76
  (0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
85
- __metadata("design:type", String)
77
+ tslib_1.__metadata("design:type", String)
86
78
  ], GeoCity.prototype, "creatorId", void 0);
87
- __decorate([
79
+ tslib_1.__decorate([
88
80
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
89
81
  nullable: true
90
82
  }),
91
83
  (0, type_graphql_1.Field)({ nullable: true }),
92
- __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
84
+ tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
93
85
  ], GeoCity.prototype, "updater", void 0);
94
- __decorate([
86
+ tslib_1.__decorate([
95
87
  (0, typeorm_1.RelationId)((geoCity) => geoCity.creator),
96
- __metadata("design:type", String)
88
+ tslib_1.__metadata("design:type", String)
97
89
  ], GeoCity.prototype, "updaterId", void 0);
98
- GeoCity = __decorate([
90
+ GeoCity = tslib_1.__decorate([
99
91
  (0, typeorm_1.Entity)(),
100
92
  (0, typeorm_1.Index)('ix_geo_city_0', (geoCity) => [geoCity.geoCountry, geoCity.name], { unique: true }),
101
93
  (0, type_graphql_1.ObjectType)({ description: 'Entity for GeoCity' })
@@ -1 +1 @@
1
- {"version":3,"file":"geo-city.js","sourceRoot":"","sources":["../../../server/service/geo-city/geo-city.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,4DAAuD;AACvD,sDAAiD;AAKjD,IAAa,OAAO,GAApB,MAAa,OAAO;CA8DnB,CAAA;AA3DC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;mCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAC7B,IAAA,oBAAK,GAAE;8BACI,wBAAU;2CAAA;AAGtB;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;;6CAChC;AAIrB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAQ,CAAC;IAC3B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC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gBAAI,oBAAJ,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;AA7DP,OAAO;IAHnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CA8DnB;AA9DY,0BAAO","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 { GeoCountry } from '../geo-country/geo-country'\nimport { GeoState } from '../geo-state/geo-state'\n\n@Entity()\n@Index('ix_geo_city_0', (geoCity: GeoCity) => [geoCity.geoCountry, geoCity.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoCity' })\nexport class GeoCity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoCountry)\n @Field()\n geoCountry: GeoCountry\n\n @RelationId((geoCity: GeoCity) => geoCity.geoCountry)\n geoCountryId?: string\n\n @ManyToOne(type => GeoState)\n @Field({ nullable: true })\n geoState?: GeoState\n\n @RelationId((geoCity: GeoCity) => geoCity.geoState)\n geoStateId?: 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 latitude?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n longitude?: 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((geoCity: GeoCity) => geoCity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((geoCity: GeoCity) => geoCity.creator)\n updaterId?: string\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-city/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/geo-city/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAA+C;AAC/C,2DAAqD;AAExC,QAAA,QAAQ,GAAG,CAAC,kBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,6BAAY,EAAE,mCAAe,CAAC,CAAA","sourcesContent":["import { GeoCity } from './geo-city'\nimport { GeoCityQuery } from './geo-city-query'\nimport { GeoCityMutation } from './geo-city-mutation'\n\nexport const entities = [GeoCity]\nexport const resolvers = [GeoCityQuery, GeoCityMutation]\n"]}