@things-factory/fav-base 7.0.1-beta.8 → 7.0.1-rc.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/index.d.ts +1 -0
- package/dist-server/service/favorite/favorite-mutation.d.ts +6 -0
- package/dist-server/service/favorite/favorite-mutation.js +2 -2
- package/dist-server/service/favorite/favorite-mutation.js.map +1 -1
- package/dist-server/service/favorite/favorite-query.d.ts +8 -0
- package/dist-server/service/favorite/favorite-query.js +3 -3
- package/dist-server/service/favorite/favorite-query.js.map +1 -1
- package/dist-server/service/favorite/favorite-type.d.ts +8 -0
- package/dist-server/service/favorite/favorite-type.js +4 -4
- package/dist-server/service/favorite/favorite-type.js.map +1 -1
- package/dist-server/service/favorite/favorite.d.ts +16 -0
- package/dist-server/service/favorite/favorite.js +2 -2
- package/dist-server/service/favorite/favorite.js.map +1 -1
- package/dist-server/service/favorite/index.d.ts +5 -0
- package/dist-server/service/index.d.ts +6 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/server/service/favorite/favorite-query.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './service';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Favorite } from './favorite';
|
|
2
|
+
import { NewFavorite } from './favorite-type';
|
|
3
|
+
export declare class FavoriteMutation {
|
|
4
|
+
createFavorite(favorite: NewFavorite, context: ResolverContext): Promise<Favorite>;
|
|
5
|
+
deleteFavorite(routing: string, context: ResolverContext): Promise<boolean>;
|
|
6
|
+
}
|
|
@@ -27,6 +27,7 @@ let FavoriteMutation = class FavoriteMutation {
|
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
+
exports.FavoriteMutation = FavoriteMutation;
|
|
30
31
|
tslib_1.__decorate([
|
|
31
32
|
(0, type_graphql_1.Mutation)(returns => favorite_1.Favorite, { description: 'To create new Favorite' }),
|
|
32
33
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('favorite')),
|
|
@@ -43,8 +44,7 @@ tslib_1.__decorate([
|
|
|
43
44
|
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
44
45
|
tslib_1.__metadata("design:returntype", Promise)
|
|
45
46
|
], FavoriteMutation.prototype, "deleteFavorite", null);
|
|
46
|
-
FavoriteMutation = tslib_1.__decorate([
|
|
47
|
+
exports.FavoriteMutation = FavoriteMutation = tslib_1.__decorate([
|
|
47
48
|
(0, type_graphql_1.Resolver)(favorite_1.Favorite)
|
|
48
49
|
], FavoriteMutation);
|
|
49
|
-
exports.FavoriteMutation = FavoriteMutation;
|
|
50
50
|
//# sourceMappingURL=favorite-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-mutation.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAE3D,iDAAqD;AAErD,yCAAqC;AACrC,mDAA6C;AAGtC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,AAAN,KAAK,CAAC,cAAc,CAAkB,QAAqB,EAAS,OAAwB;QAC1F,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE1C,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC;YAC3B,MAAM;YACN,IAAI;YACJ,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,cAAc,CAAiB,OAAe,EAAS,OAAwB;QACnF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QACtC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE1C,MAAM,UAAU,CAAC,MAAM,CAAC;YACtB,MAAM,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AAW,EAAE,wBAAwB,EAAE,CAAC;IACnD,mBAAA,IAAA,kBAAG,EAAC,UAAU,CAAC,CAAA;IAAyB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAnB,2BAAW;;sDAU1D;AAGK;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,SAAS,CAAC,CAAA;IAAmB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sDAW3D;2BA1BU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,gBAAgB,CA2B5B","sourcesContent":["import { Arg, Ctx, Mutation, Resolver } from 'type-graphql'\n\nimport { getRepository } from '@things-factory/shell'\n\nimport { Favorite } from './favorite'\nimport { NewFavorite } from './favorite-type'\n\n@Resolver(Favorite)\nexport class FavoriteMutation {\n @Mutation(returns => Favorite, { description: 'To create new Favorite' })\n async createFavorite(@Arg('favorite') favorite: NewFavorite, @Ctx() context: ResolverContext): Promise<Favorite> {\n const { user, domain } = context.state\n\n const repository = getRepository(Favorite)\n\n return await repository.save({\n domain,\n user,\n routing: favorite.routing\n })\n }\n\n @Mutation(returns => Boolean, { description: 'To delete Favorite' })\n async deleteFavorite(@Arg('routing') routing: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, user } = context.state\n const repository = getRepository(Favorite)\n\n await repository.delete({\n domain: { id: domain.id },\n user: { id: user.id },\n routing\n })\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListParam } from '@things-factory/shell';
|
|
2
|
+
import { Favorite } from './favorite';
|
|
3
|
+
import { FavoriteList } from './favorite-type';
|
|
4
|
+
export declare class FavoriteQuery {
|
|
5
|
+
favorite(id: string, context: ResolverContext): Promise<Favorite>;
|
|
6
|
+
favorites(params: ListParam, context: ResolverContext): Promise<FavoriteList>;
|
|
7
|
+
myFavorites(context: ResolverContext): Promise<Favorite[]>;
|
|
8
|
+
}
|
|
@@ -29,6 +29,7 @@ let FavoriteQuery = class FavoriteQuery {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
exports.FavoriteQuery = FavoriteQuery;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, type_graphql_1.Query)(returns => favorite_1.Favorite, { description: 'To fetch a Favorite' }),
|
|
34
35
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -39,7 +40,7 @@ tslib_1.__decorate([
|
|
|
39
40
|
], FavoriteQuery.prototype, "favorite", null);
|
|
40
41
|
tslib_1.__decorate([
|
|
41
42
|
(0, type_graphql_1.Query)(returns => favorite_type_1.FavoriteList, { description: 'To fetch multiple Favorites' }),
|
|
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]),
|
|
@@ -52,8 +53,7 @@ tslib_1.__decorate([
|
|
|
52
53
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
53
54
|
tslib_1.__metadata("design:returntype", Promise)
|
|
54
55
|
], FavoriteQuery.prototype, "myFavorites", null);
|
|
55
|
-
FavoriteQuery = tslib_1.__decorate([
|
|
56
|
+
exports.FavoriteQuery = FavoriteQuery = tslib_1.__decorate([
|
|
56
57
|
(0, type_graphql_1.Resolver)(favorite_1.Favorite)
|
|
57
58
|
], FavoriteQuery);
|
|
58
|
-
exports.FavoriteQuery = FavoriteQuery;
|
|
59
59
|
//# sourceMappingURL=favorite-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-query.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8D;AAE9D,iDAA+F;AAE/F,yCAAqC;AACrC,mDAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,QAAQ,CAAY,EAAU,EAAS,OAAwB;QACnE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IACnF,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"favorite-query.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8D;AAE9D,iDAA+F;AAE/F,yCAAqC;AACrC,mDAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,QAAQ,CAAY,EAAU,EAAS,OAAwB;QACnE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IACnF,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAA0B,MAAiB,EAAS,OAAwB;QACzF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,IAAA,qBAAa,EAAC,mBAAQ,CAAC;YACnC,KAAK,EAAE,UAAU;SAClB,CAAC,CAAA;QAEF,MAAM,C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import { Arg, Args, Ctx, Query, Resolver } from 'type-graphql'\n\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { Favorite } from './favorite'\nimport { FavoriteList } from './favorite-type'\n\n@Resolver(Favorite)\nexport class FavoriteQuery {\n @Query(returns => Favorite, { description: 'To fetch a Favorite' })\n async favorite(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Favorite> {\n const { domain } = context.state\n\n return await getRepository(Favorite).findOneBy({ domain: { id: domain.id }, id })\n }\n\n @Query(returns => FavoriteList, { description: 'To fetch multiple Favorites' })\n async favorites(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<FavoriteList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: getRepository(Favorite),\n alias: 'favorite'\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => [Favorite], { description: \"To fetch current user's Favorites\" })\n async myFavorites(@Ctx() context: ResolverContext): Promise<Favorite[]> {\n const { domain, user } = context.state\n\n return await getRepository(Favorite).find({\n where: { domain: { id: domain.id }, user: { id: user.id } }\n })\n }\n}\n"]}
|
|
@@ -6,16 +6,17 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const favorite_1 = require("./favorite");
|
|
7
7
|
let NewFavorite = class NewFavorite {
|
|
8
8
|
};
|
|
9
|
+
exports.NewFavorite = NewFavorite;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
12
13
|
], NewFavorite.prototype, "routing", void 0);
|
|
13
|
-
NewFavorite = tslib_1.__decorate([
|
|
14
|
+
exports.NewFavorite = NewFavorite = tslib_1.__decorate([
|
|
14
15
|
(0, type_graphql_1.InputType)()
|
|
15
16
|
], NewFavorite);
|
|
16
|
-
exports.NewFavorite = NewFavorite;
|
|
17
17
|
let FavoriteList = class FavoriteList {
|
|
18
18
|
};
|
|
19
|
+
exports.FavoriteList = FavoriteList;
|
|
19
20
|
tslib_1.__decorate([
|
|
20
21
|
(0, type_graphql_1.Field)(type => [favorite_1.Favorite]),
|
|
21
22
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -24,8 +25,7 @@ tslib_1.__decorate([
|
|
|
24
25
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
25
26
|
tslib_1.__metadata("design:type", Number)
|
|
26
27
|
], FavoriteList.prototype, "total", void 0);
|
|
27
|
-
FavoriteList = tslib_1.__decorate([
|
|
28
|
+
exports.FavoriteList = FavoriteList = tslib_1.__decorate([
|
|
28
29
|
(0, type_graphql_1.ObjectType)()
|
|
29
30
|
], FavoriteList);
|
|
30
|
-
exports.FavoriteList = FavoriteList;
|
|
31
31
|
//# sourceMappingURL=favorite-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite-type.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,yCAAqC;AAG9B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAGvB,CAAA;
|
|
1
|
+
{"version":3,"file":"favorite-type.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,yCAAqC;AAG9B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAGvB,CAAA;AAHY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;4CACO;sBAFJ,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAGvB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,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 { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Favorite } from './favorite'\n\n@InputType()\nexport class NewFavorite {\n @Field()\n routing: string\n}\n\n@ObjectType()\nexport class FavoriteList {\n @Field(type => [Favorite])\n items: Favorite[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
export declare class Favorite {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
domain?: Domain;
|
|
6
|
+
domainId?: string;
|
|
7
|
+
user: User;
|
|
8
|
+
userId?: string;
|
|
9
|
+
routing: string;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
creator?: User;
|
|
13
|
+
creatorId?: string;
|
|
14
|
+
updater?: User;
|
|
15
|
+
updaterId?: string;
|
|
16
|
+
}
|
|
@@ -8,6 +8,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
8
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
9
|
let Favorite = class Favorite {
|
|
10
10
|
};
|
|
11
|
+
exports.Favorite = Favorite;
|
|
11
12
|
tslib_1.__decorate([
|
|
12
13
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
13
14
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -64,10 +65,9 @@ tslib_1.__decorate([
|
|
|
64
65
|
(0, typeorm_1.RelationId)((favorite) => favorite.updater),
|
|
65
66
|
tslib_1.__metadata("design:type", String)
|
|
66
67
|
], Favorite.prototype, "updaterId", void 0);
|
|
67
|
-
Favorite = tslib_1.__decorate([
|
|
68
|
+
exports.Favorite = Favorite = tslib_1.__decorate([
|
|
68
69
|
(0, typeorm_1.Entity)(),
|
|
69
70
|
(0, typeorm_1.Index)('ix_favorite_0', (favorite) => [favorite.domain, favorite.user, favorite.routing], { unique: true }),
|
|
70
71
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Favorite' })
|
|
71
72
|
], Favorite);
|
|
72
|
-
exports.Favorite = Favorite;
|
|
73
73
|
//# sourceMappingURL=favorite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAAoD;AAEpD,iDAA8C;AAC9C,yDAAgD;AAKzC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CA4CpB,CAAA;
|
|
1
|
+
{"version":3,"file":"favorite.js","sourceRoot":"","sources":["../../../server/service/favorite/favorite.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAAoD;AAEpD,iDAA8C;AAC9C,yDAAgD;AAKzC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CA4CpB,CAAA;AA5CY,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,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;wCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;;0CACnC;AAIjB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACvB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;sCACd,gBAAI;sCAAA;AAGV;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;;wC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,EAAE,CAAC;GACtC,QAAQ,CA4CpB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Entity()\n@Index('ix_favorite_0', (favorite: Favorite) => [favorite.domain, favorite.user, favorite.routing], { unique: true })\n@ObjectType({ description: 'Entity for Favorite' })\nexport class Favorite {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((favorite: Favorite) => favorite.domain)\n domainId?: string\n\n @ManyToOne(type => User)\n @Field(type => User)\n user: User\n\n @RelationId((favorite: Favorite) => favorite.user)\n userId?: string\n\n @Column()\n @Field()\n routing: 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(type => User, { nullable: true })\n creator?: User\n\n @RelationId((favorite: Favorite) => favorite.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((favorite: Favorite) => favorite.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Favorite } from './favorite';
|
|
2
|
+
import { FavoriteQuery } from './favorite-query';
|
|
3
|
+
import { FavoriteMutation } from './favorite-mutation';
|
|
4
|
+
export declare const entities: (typeof Favorite)[];
|
|
5
|
+
export declare const resolvers: (typeof FavoriteQuery | typeof FavoriteMutation)[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './favorite/favorite';
|
|
2
|
+
export * from './favorite/favorite-type';
|
|
3
|
+
export declare const entities: typeof import("./favorite/favorite").Favorite[];
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
resolverClasses: (typeof import("./favorite/favorite-query").FavoriteQuery | typeof import("./favorite/favorite-mutation").FavoriteMutation)[];
|
|
6
|
+
};
|