@things-factory/geography 7.0.0-alpha.9 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/index.d.ts +4 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routes.d.ts +0 -0
- package/dist-server/service/geo-area/geo-area-mutation.d.ts +9 -0
- package/dist-server/service/geo-area/geo-area-mutation.js +2 -2
- package/dist-server/service/geo-area/geo-area-mutation.js.map +1 -1
- package/dist-server/service/geo-area/geo-area-query.d.ts +17 -0
- package/dist-server/service/geo-area/geo-area-query.js +3 -3
- package/dist-server/service/geo-area/geo-area-query.js.map +1 -1
- package/dist-server/service/geo-area/geo-area-type.d.ts +27 -0
- package/dist-server/service/geo-area/geo-area-type.js +6 -6
- package/dist-server/service/geo-area/geo-area-type.js.map +1 -1
- package/dist-server/service/geo-area/geo-area.d.ts +21 -0
- package/dist-server/service/geo-area/geo-area.js +4 -4
- package/dist-server/service/geo-area/geo-area.js.map +1 -1
- package/dist-server/service/geo-area/index.d.ts +5 -0
- package/dist-server/service/geo-city/geo-city-mutation.d.ts +9 -0
- package/dist-server/service/geo-city/geo-city-mutation.js +2 -2
- package/dist-server/service/geo-city/geo-city-mutation.js.map +1 -1
- package/dist-server/service/geo-city/geo-city-query.d.ts +14 -0
- package/dist-server/service/geo-city/geo-city-query.js +3 -3
- package/dist-server/service/geo-city/geo-city-query.js.map +1 -1
- package/dist-server/service/geo-city/geo-city-type.d.ts +19 -0
- package/dist-server/service/geo-city/geo-city-type.js +6 -6
- package/dist-server/service/geo-city/geo-city-type.js.map +1 -1
- package/dist-server/service/geo-city/geo-city.d.ts +20 -0
- package/dist-server/service/geo-city/geo-city.js +4 -4
- package/dist-server/service/geo-city/geo-city.js.map +1 -1
- package/dist-server/service/geo-city/index.d.ts +5 -0
- package/dist-server/service/geo-continent/geo-continent-mutation.d.ts +9 -0
- package/dist-server/service/geo-continent/geo-continent-mutation.js +2 -2
- package/dist-server/service/geo-continent/geo-continent-mutation.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent-query.d.ts +10 -0
- package/dist-server/service/geo-continent/geo-continent-query.js +3 -3
- package/dist-server/service/geo-continent/geo-continent-query.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent-type.d.ts +15 -0
- package/dist-server/service/geo-continent/geo-continent-type.js +6 -6
- package/dist-server/service/geo-continent/geo-continent-type.js.map +1 -1
- package/dist-server/service/geo-continent/geo-continent.d.ts +12 -0
- package/dist-server/service/geo-continent/geo-continent.js +4 -4
- package/dist-server/service/geo-continent/geo-continent.js.map +1 -1
- package/dist-server/service/geo-continent/index.d.ts +5 -0
- package/dist-server/service/geo-country/geo-country-mutation.d.ts +9 -0
- package/dist-server/service/geo-country/geo-country-mutation.js +2 -2
- package/dist-server/service/geo-country/geo-country-mutation.js.map +1 -1
- package/dist-server/service/geo-country/geo-country-query.d.ts +13 -0
- package/dist-server/service/geo-country/geo-country-query.js +3 -3
- package/dist-server/service/geo-country/geo-country-query.js.map +1 -1
- package/dist-server/service/geo-country/geo-country-type.d.ts +17 -0
- package/dist-server/service/geo-country/geo-country-type.js +6 -6
- package/dist-server/service/geo-country/geo-country-type.js.map +1 -1
- package/dist-server/service/geo-country/geo-country.d.ts +16 -0
- package/dist-server/service/geo-country/geo-country.js +4 -4
- package/dist-server/service/geo-country/geo-country.js.map +1 -1
- package/dist-server/service/geo-country/index.d.ts +5 -0
- package/dist-server/service/geo-state/geo-state-mutation.d.ts +9 -0
- package/dist-server/service/geo-state/geo-state-mutation.js +2 -2
- package/dist-server/service/geo-state/geo-state-mutation.js.map +1 -1
- package/dist-server/service/geo-state/geo-state-query.d.ts +12 -0
- package/dist-server/service/geo-state/geo-state-query.js +3 -3
- package/dist-server/service/geo-state/geo-state-query.js.map +1 -1
- package/dist-server/service/geo-state/geo-state-type.d.ts +19 -0
- package/dist-server/service/geo-state/geo-state-type.js +6 -6
- package/dist-server/service/geo-state/geo-state-type.js.map +1 -1
- package/dist-server/service/geo-state/geo-state.d.ts +17 -0
- package/dist-server/service/geo-state/geo-state.js +4 -4
- package/dist-server/service/geo-state/geo-state.js.map +1 -1
- package/dist-server/service/geo-state/index.d.ts +5 -0
- package/dist-server/service/index.d.ts +9 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/geo-area/geo-area-query.ts +1 -1
- package/server/service/geo-area/geo-area.ts +2 -2
- package/server/service/geo-city/geo-city-query.ts +1 -1
- package/server/service/geo-city/geo-city.ts +2 -2
- package/server/service/geo-continent/geo-continent-query.ts +4 -1
- package/server/service/geo-continent/geo-continent.ts +2 -2
- package/server/service/geo-country/geo-country-query.ts +4 -1
- package/server/service/geo-country/geo-country.ts +2 -2
- package/server/service/geo-state/geo-state-query.ts +1 -1
- package/server/service/geo-state/geo-state.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-country.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,kEAA6D;AAKtD,IAAM,UAAU,GAAhB,MAAM,UAAU;CAmDtB,CAAA;
|
|
1
|
+
{"version":3,"file":"geo-country.js","sourceRoot":"","sources":["../../../server/service/geo-country/geo-country.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,kEAA6D;AAKtD,IAAM,UAAU,GAAhB,MAAM,UAAU;CAmDtB,CAAA;AAnDY,gCAAU;AAGZ;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI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E,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;qBAlDP,UAAU;IAHtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACnH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAmDtB","sourcesContent":["import { User } from '@things-factory/auth-base'\nimport { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { GeoContinent } from '../geo-continent/geo-continent'\n\n@Entity()\n@Index('ix_geo_country_0', (geoCountry: GeoCountry) => [geoCountry.geoContinent, geoCountry.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoCountry' })\nexport class GeoCountry {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoContinent)\n @Field()\n geoContinent: GeoContinent\n\n @RelationId((geoCountry: GeoCountry) => geoCountry.geoContinent)\n geoContinentId: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n isoCode?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((geoCountry: GeoCountry) => geoCountry.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((geoCountry: GeoCountry) => geoCountry.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeoCountry } from './geo-country';
|
|
2
|
+
import { GeoCountryQuery } from './geo-country-query';
|
|
3
|
+
import { GeoCountryMutation } from './geo-country-mutation';
|
|
4
|
+
export declare const entities: (typeof GeoCountry)[];
|
|
5
|
+
export declare const resolvers: (typeof GeoCountryQuery | typeof GeoCountryMutation)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GeoState } from './geo-state';
|
|
2
|
+
import { GeoStatePatch, NewGeoState } from './geo-state-type';
|
|
3
|
+
export declare class GeoStateMutation {
|
|
4
|
+
createGeoState(geoState: NewGeoState, context: ResolverContext): Promise<GeoState>;
|
|
5
|
+
updateGeoState(id: string, patch: GeoStatePatch, context: ResolverContext): Promise<GeoState>;
|
|
6
|
+
updateMultipleGeoState(patches: GeoStatePatch[], context: ResolverContext): Promise<GeoState[]>;
|
|
7
|
+
deleteGeoState(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteGeoStates(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
}
|
|
@@ -55,6 +55,7 @@ let GeoStateMutation = class GeoStateMutation {
|
|
|
55
55
|
return true;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
+
exports.GeoStateMutation = GeoStateMutation;
|
|
58
59
|
tslib_1.__decorate([
|
|
59
60
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
60
61
|
(0, type_graphql_1.Mutation)(returns => geo_state_1.GeoState, { description: 'To create new GeoState' }),
|
|
@@ -101,8 +102,7 @@ tslib_1.__decorate([
|
|
|
101
102
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
102
103
|
tslib_1.__metadata("design:returntype", Promise)
|
|
103
104
|
], GeoStateMutation.prototype, "deleteGeoStates", null);
|
|
104
|
-
GeoStateMutation = tslib_1.__decorate([
|
|
105
|
+
exports.GeoStateMutation = GeoStateMutation = tslib_1.__decorate([
|
|
105
106
|
(0, type_graphql_1.Resolver)(geo_state_1.GeoState)
|
|
106
107
|
], GeoStateMutation);
|
|
107
|
-
exports.GeoStateMutation = GeoStateMutation;
|
|
108
108
|
//# sourceMappingURL=geo-state-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-state-mutation.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,2CAAsC;AACtC,qDAA6D;AAGtD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGrB,AAAN,KAAK,CAAC,cAAc,CAAkB,QAAqB,EAAS,OAAwB;QAC1F,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,oBAAQ,CAAC,CAAC,IAAI,iCACvC,QAAQ,KACX,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CACP,EAAU,EACP,KAAoB,EAC3B,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,oBAAQ,CAAC,CAAA;QAC7C,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,QAAQ,GACR,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,sBAAsB,CACe,OAAwB,EAC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;uDASP;2BArGU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,oBAAQ,CAAC;GACN,gBAAgB,CAsG5B","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { GeoState } from './geo-state'\nimport { GeoStatePatch, NewGeoState } from './geo-state-type'\n\n@Resolver(GeoState)\nexport class GeoStateMutation {\n @Directive('@transaction')\n @Mutation(returns => GeoState, { description: 'To create new GeoState' })\n async createGeoState(@Arg('geoState') geoState: NewGeoState, @Ctx() context: ResolverContext): Promise<GeoState> {\n const { user, tx } = context.state\n\n return await tx.getRepository(GeoState).save({\n ...geoState,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => GeoState, { description: 'To modify GeoState information' })\n async updateGeoState(\n @Arg('id') id: string,\n @Arg('patch') patch: GeoStatePatch,\n @Ctx() context: ResolverContext\n ): Promise<GeoState> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(GeoState)\n const geoState = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...geoState,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [GeoState], { description: \"To modify multiple GeoStates' information\" })\n async updateMultipleGeoState(\n @Arg('patches', type => [GeoStatePatch]) patches: GeoStatePatch[],\n @Ctx() context: ResolverContext\n ): Promise<GeoState[]> {\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 geoStateRepo = tx.getRepository(GeoState)\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 geoStateRepo.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 geoState = await geoStateRepo.findOneBy({ id: newRecord.id })\n\n const result = await geoStateRepo.save({\n ...geoState,\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 GeoState' })\n async deleteGeoState(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoState).delete({ id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple geoStates' })\n async deleteGeoStates(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(GeoState).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { ListParam } from '@things-factory/shell';
|
|
3
|
+
import { GeoCountry } from '../geo-country/geo-country';
|
|
4
|
+
import { GeoState } from './geo-state';
|
|
5
|
+
import { GeoStateList } from './geo-state-type';
|
|
6
|
+
export declare class GeoStateQuery {
|
|
7
|
+
geoState(id: string, context: ResolverContext): Promise<GeoState>;
|
|
8
|
+
geoStates(params: ListParam, context: ResolverContext): Promise<GeoStateList>;
|
|
9
|
+
geoCountry(geoState: GeoState): Promise<GeoCountry>;
|
|
10
|
+
updater(geoState: GeoState): Promise<User>;
|
|
11
|
+
creator(geoState: GeoState): Promise<User>;
|
|
12
|
+
}
|
|
@@ -29,6 +29,7 @@ let GeoStateQuery = class GeoStateQuery {
|
|
|
29
29
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoState.creatorId });
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
exports.GeoStateQuery = GeoStateQuery;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, type_graphql_1.Query)(returns => geo_state_1.GeoState, { description: 'To fetch a GeoState' }),
|
|
34
35
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -39,7 +40,7 @@ tslib_1.__decorate([
|
|
|
39
40
|
], GeoStateQuery.prototype, "geoState", null);
|
|
40
41
|
tslib_1.__decorate([
|
|
41
42
|
(0, type_graphql_1.Query)(returns => geo_state_type_1.GeoStateList, { description: 'To fetch multiple GeoStates' }),
|
|
42
|
-
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
43
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
43
44
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
44
45
|
tslib_1.__metadata("design:type", Function),
|
|
45
46
|
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
@@ -66,8 +67,7 @@ tslib_1.__decorate([
|
|
|
66
67
|
tslib_1.__metadata("design:paramtypes", [geo_state_1.GeoState]),
|
|
67
68
|
tslib_1.__metadata("design:returntype", Promise)
|
|
68
69
|
], GeoStateQuery.prototype, "creator", null);
|
|
69
|
-
GeoStateQuery = tslib_1.__decorate([
|
|
70
|
+
exports.GeoStateQuery = GeoStateQuery = tslib_1.__decorate([
|
|
70
71
|
(0, type_graphql_1.Resolver)(geo_state_1.GeoState)
|
|
71
72
|
], GeoStateQuery);
|
|
72
|
-
exports.GeoStateQuery = GeoStateQuery;
|
|
73
73
|
//# sourceMappingURL=geo-state-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-state-query.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAmF;AAEnF,4DAAuD;AACvD,2CAAsC;AACtC,qDAA+C;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,QAAQ,CAAY,EAAU,EAAS,OAAwB;QACnE,OAAO,MAAM,IA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AAN,KAAK,CAAC,OAAO,CAAS,QAAkB;QACtC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAA;IACxE,CAAC;CACF,CAAA;AA9BY,sCAAa;AAElB;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,oBAAQ,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACnD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6CAI3C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6BAAY,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC9D,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8CAKzD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,oBAAQ;;+CAE1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,oBAAQ;;4CAEvC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,oBAAQ;;4CAEvC;wBA7BU,aAAa;IADzB,IAAA,uBAAQ,EAAC,oBAAQ,CAAC;GACN,aAAa,CA8BzB","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { GeoCountry } from '../geo-country/geo-country'\nimport { GeoState } from './geo-state'\nimport { GeoStateList } from './geo-state-type'\n\n@Resolver(GeoState)\nexport class GeoStateQuery {\n @Query(returns => GeoState, { description: 'To fetch a GeoState' })\n async geoState(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<GeoState> {\n return await getRepository(GeoState).findOne({\n where: { id }\n })\n }\n\n @Query(returns => GeoStateList, { description: 'To fetch multiple GeoStates' })\n async geoStates(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<GeoStateList> {\n const convertedParams = convertListParams(params)\n const [items, total] = await getRepository(GeoState).findAndCount(convertedParams)\n\n return { items, total }\n }\n\n @FieldResolver(type => GeoCountry)\n async geoCountry(@Root() geoState: GeoState): Promise<GeoCountry> {\n return await getRepository(GeoCountry).findOneBy({ id: geoState.geoCountryId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() geoState: GeoState): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoState.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() geoState: GeoState): Promise<User> {\n return await getRepository(User).findOneBy({ id: geoState.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GeoState } from './geo-state';
|
|
2
|
+
export declare class NewGeoState {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
latitude?: string;
|
|
6
|
+
longitude?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class GeoStatePatch {
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
latitude?: string;
|
|
13
|
+
longitude?: string;
|
|
14
|
+
cuFlag: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class GeoStateList {
|
|
17
|
+
items: GeoState[];
|
|
18
|
+
total: number;
|
|
19
|
+
}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const geo_state_1 = require("./geo-state");
|
|
7
7
|
let NewGeoState = class NewGeoState {
|
|
8
8
|
};
|
|
9
|
+
exports.NewGeoState = NewGeoState;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -22,12 +23,12 @@ tslib_1.__decorate([
|
|
|
22
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
24
|
tslib_1.__metadata("design:type", String)
|
|
24
25
|
], NewGeoState.prototype, "longitude", void 0);
|
|
25
|
-
NewGeoState = tslib_1.__decorate([
|
|
26
|
+
exports.NewGeoState = NewGeoState = tslib_1.__decorate([
|
|
26
27
|
(0, type_graphql_1.InputType)()
|
|
27
28
|
], NewGeoState);
|
|
28
|
-
exports.NewGeoState = NewGeoState;
|
|
29
29
|
let GeoStatePatch = class GeoStatePatch {
|
|
30
30
|
};
|
|
31
|
+
exports.GeoStatePatch = GeoStatePatch;
|
|
31
32
|
tslib_1.__decorate([
|
|
32
33
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
33
34
|
tslib_1.__metadata("design:type", String)
|
|
@@ -52,12 +53,12 @@ tslib_1.__decorate([
|
|
|
52
53
|
(0, type_graphql_1.Field)(),
|
|
53
54
|
tslib_1.__metadata("design:type", String)
|
|
54
55
|
], GeoStatePatch.prototype, "cuFlag", void 0);
|
|
55
|
-
GeoStatePatch = tslib_1.__decorate([
|
|
56
|
+
exports.GeoStatePatch = GeoStatePatch = tslib_1.__decorate([
|
|
56
57
|
(0, type_graphql_1.InputType)()
|
|
57
58
|
], GeoStatePatch);
|
|
58
|
-
exports.GeoStatePatch = GeoStatePatch;
|
|
59
59
|
let GeoStateList = class GeoStateList {
|
|
60
60
|
};
|
|
61
|
+
exports.GeoStateList = GeoStateList;
|
|
61
62
|
tslib_1.__decorate([
|
|
62
63
|
(0, type_graphql_1.Field)(type => [geo_state_1.GeoState]),
|
|
63
64
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -66,8 +67,7 @@ tslib_1.__decorate([
|
|
|
66
67
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
67
68
|
tslib_1.__metadata("design:type", Number)
|
|
68
69
|
], GeoStateList.prototype, "total", void 0);
|
|
69
|
-
GeoStateList = tslib_1.__decorate([
|
|
70
|
+
exports.GeoStateList = GeoStateList = tslib_1.__decorate([
|
|
70
71
|
(0, type_graphql_1.ObjectType)()
|
|
71
72
|
], GeoStateList);
|
|
72
|
-
exports.GeoStateList = GeoStateList;
|
|
73
73
|
//# sourceMappingURL=geo-state-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-state-type.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,2CAAsC;AAG/B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAYvB,CAAA;
|
|
1
|
+
{"version":3,"file":"geo-state-type.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,2CAAsC;AAG/B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAYvB,CAAA;AAZY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;sBAXP,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAYvB;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAkBzB,CAAA;AAlBY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACR;AAGlB;IADC,IAAA,oBAAK,GAAE;;6CACM;wBAjBH,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAkBzB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oBAAQ,CAAC,CAAC;;2CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;uBALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\nimport { GeoState } from './geo-state'\n\n@InputType()\nexport class NewGeoState {\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 GeoStatePatch {\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 GeoStateList {\n @Field(type => [GeoState])\n items: GeoState[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { GeoCountry } from '../geo-country/geo-country';
|
|
3
|
+
export declare class GeoState {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
geoCountry: GeoCountry;
|
|
6
|
+
geoCountryId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
latitude?: string;
|
|
10
|
+
longitude?: string;
|
|
11
|
+
createdAt?: Date;
|
|
12
|
+
updatedAt?: Date;
|
|
13
|
+
creator?: User;
|
|
14
|
+
creatorId?: string;
|
|
15
|
+
updater?: User;
|
|
16
|
+
updaterId?: string;
|
|
17
|
+
}
|
|
@@ -8,6 +8,7 @@ const typeorm_1 = require("typeorm");
|
|
|
8
8
|
const geo_country_1 = require("../geo-country/geo-country");
|
|
9
9
|
let GeoState = class GeoState {
|
|
10
10
|
};
|
|
11
|
+
exports.GeoState = GeoState;
|
|
11
12
|
tslib_1.__decorate([
|
|
12
13
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
13
14
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -58,7 +59,7 @@ tslib_1.__decorate([
|
|
|
58
59
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
59
60
|
nullable: true
|
|
60
61
|
}),
|
|
61
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
62
63
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
63
64
|
], GeoState.prototype, "creator", void 0);
|
|
64
65
|
tslib_1.__decorate([
|
|
@@ -69,17 +70,16 @@ tslib_1.__decorate([
|
|
|
69
70
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
70
71
|
nullable: true
|
|
71
72
|
}),
|
|
72
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
73
74
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
74
75
|
], GeoState.prototype, "updater", void 0);
|
|
75
76
|
tslib_1.__decorate([
|
|
76
77
|
(0, typeorm_1.RelationId)((geoState) => geoState.updater),
|
|
77
78
|
tslib_1.__metadata("design:type", String)
|
|
78
79
|
], GeoState.prototype, "updaterId", void 0);
|
|
79
|
-
GeoState = tslib_1.__decorate([
|
|
80
|
+
exports.GeoState = GeoState = tslib_1.__decorate([
|
|
80
81
|
(0, typeorm_1.Entity)(),
|
|
81
82
|
(0, typeorm_1.Index)('ix_geo_state_0', (geoState) => [geoState.geoCountry, geoState.name], { unique: true }),
|
|
82
83
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for GeoState' })
|
|
83
84
|
], GeoState);
|
|
84
|
-
exports.GeoState = GeoState;
|
|
85
85
|
//# sourceMappingURL=geo-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-state.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,4DAAuD;AAKhD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAuDpB,CAAA;
|
|
1
|
+
{"version":3,"file":"geo-state.js","sourceRoot":"","sources":["../../../server/service/geo-state/geo-state.ts"],"names":[],"mappings":";;;;AAAA,yDAAgD;AAChD,+CAAoD;AACpD,qCASgB;AAChB,4DAAuD;AAKhD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAuDpB,CAAA;AAvDY,4BAAQ;AAGV;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC;IAC7B,IAAA,oBAAK,GAAE;sCACI,wBAAU;4CAAA;AAGtB;IADC,IAAA,oBAAU,EAAC,CA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,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;mBAtDP,QAAQ;IAHpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAuDpB","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'\n\n@Entity()\n@Index('ix_geo_state_0', (geoState: GeoState) => [geoState.geoCountry, geoState.name], { unique: true })\n@ObjectType({ description: 'Entity for GeoState' })\nexport class GeoState {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => GeoCountry)\n @Field()\n geoCountry: GeoCountry\n\n @RelationId((geoState: GeoState) => geoState.geoCountry)\n geoCountryId: 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(type => User, { nullable: true })\n creator?: User\n\n @RelationId((geoState: GeoState) => geoState.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((geoState: GeoState) => geoState.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeoState } from './geo-state';
|
|
2
|
+
import { GeoStateQuery } from './geo-state-query';
|
|
3
|
+
import { GeoStateMutation } from './geo-state-mutation';
|
|
4
|
+
export declare const entities: (typeof GeoState)[];
|
|
5
|
+
export declare const resolvers: (typeof GeoStateQuery | typeof GeoStateMutation)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './geo-area/geo-area';
|
|
2
|
+
export * from './geo-city/geo-city';
|
|
3
|
+
export * from './geo-state/geo-state';
|
|
4
|
+
export * from './geo-country/geo-country';
|
|
5
|
+
export * from './geo-continent/geo-continent';
|
|
6
|
+
export declare const entities: typeof import("./geo-continent/geo-continent").GeoContinent[];
|
|
7
|
+
export declare const schema: {
|
|
8
|
+
resolverClasses: (typeof import("./geo-area/geo-area-query").GeoAreaQuery | typeof import("./geo-area/geo-area-mutation").GeoAreaMutation | typeof import("./geo-city/geo-city-query").GeoCityQuery | typeof import("./geo-city/geo-city-mutation").GeoCityMutation | typeof import("./geo-state/geo-state-query").GeoStateQuery | typeof import("./geo-state/geo-state-mutation").GeoStateMutation | typeof import("./geo-country/geo-country-query").GeoCountryQuery | typeof import("./geo-country/geo-country-mutation").GeoCountryMutation | typeof import("./geo-continent/geo-continent-query").GeoContinentQuery | typeof import("./geo-continent/geo-continent-mutation").GeoContinentMutation)[];
|
|
9
|
+
};
|