@vendure/core 2.0.0-next.17 → 2.0.0-next.19
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/api/config/generate-permissions.js +29 -29
- package/dist/api/config/generate-resolvers.d.ts +3 -0
- package/dist/api/resolvers/admin/collection.resolver.d.ts +4 -5
- package/dist/api/resolvers/admin/collection.resolver.js +44 -17
- package/dist/api/resolvers/admin/collection.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/facet.resolver.d.ts +5 -1
- package/dist/api/resolvers/admin/facet.resolver.js +39 -1
- package/dist/api/resolvers/admin/facet.resolver.js.map +1 -1
- package/dist/api/resolvers/admin/product.resolver.d.ts +4 -1
- package/dist/api/resolvers/admin/product.resolver.js +40 -0
- package/dist/api/resolvers/admin/product.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/collection-entity.resolver.d.ts +5 -2
- package/dist/api/resolvers/entity/collection-entity.resolver.js +24 -2
- package/dist/api/resolvers/entity/collection-entity.resolver.js.map +1 -1
- package/dist/api/schema/admin-api/collection.api.graphql +19 -0
- package/dist/api/schema/admin-api/facet.api.graphql +30 -0
- package/dist/api/schema/admin-api/product.api.graphql +9 -0
- package/dist/common/configurable-operation.js +1 -1
- package/dist/common/configurable-operation.js.map +1 -1
- package/dist/common/error/generated-graphql-admin-errors.d.ts +16 -0
- package/dist/common/error/generated-graphql-admin-errors.js +19 -2
- package/dist/common/error/generated-graphql-admin-errors.js.map +1 -1
- package/dist/config/order/changed-price-handling-strategy.d.ts +2 -1
- package/dist/config/order/order-item-price-calculation-strategy.d.ts +2 -1
- package/dist/config/promotion/actions/order-fixed-discount-action.js +1 -1
- package/dist/config/promotion/actions/order-fixed-discount-action.js.map +1 -1
- package/dist/config/promotion/promotion-action.d.ts +48 -0
- package/dist/config/promotion/promotion-action.js +18 -2
- package/dist/config/promotion/promotion-action.js.map +1 -1
- package/dist/entity/collection/collection-translation.entity.js +1 -0
- package/dist/entity/collection/collection-translation.entity.js.map +1 -1
- package/dist/entity/order/order.entity.js +5 -3
- package/dist/entity/order/order.entity.js.map +1 -1
- package/dist/entity/product/product-translation.entity.js +1 -0
- package/dist/entity/product/product-translation.entity.js.map +1 -1
- package/dist/entity/promotion/promotion.entity.d.ts +2 -0
- package/dist/entity/promotion/promotion.entity.js +12 -0
- package/dist/entity/promotion/promotion.entity.js.map +1 -1
- package/dist/i18n/messages/en.json +5 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +10 -5
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js +5 -5
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js +4 -4
- package/dist/service/helpers/order-calculator/order-calculator.d.ts +1 -0
- package/dist/service/helpers/order-calculator/order-calculator.js +11 -0
- package/dist/service/helpers/order-calculator/order-calculator.js.map +1 -1
- package/dist/service/helpers/order-modifier/order-modifier.js +6 -16
- package/dist/service/helpers/order-modifier/order-modifier.js.map +1 -1
- package/dist/service/helpers/order-state-machine/order-state-machine.js +0 -1
- package/dist/service/helpers/order-state-machine/order-state-machine.js.map +1 -1
- package/dist/service/index.d.ts +1 -0
- package/dist/service/index.js +1 -0
- package/dist/service/index.js.map +1 -1
- package/dist/service/services/collection.service.d.ts +14 -2
- package/dist/service/services/collection.service.js +69 -3
- package/dist/service/services/collection.service.js.map +1 -1
- package/dist/service/services/facet-value.service.d.ts +1 -1
- package/dist/service/services/facet-value.service.js +21 -7
- package/dist/service/services/facet-value.service.js.map +1 -1
- package/dist/service/services/facet.service.d.ts +15 -2
- package/dist/service/services/facet.service.js +80 -3
- package/dist/service/services/facet.service.js.map +1 -1
- package/dist/service/services/order-testing.service.js +1 -1
- package/dist/service/services/order-testing.service.js.map +1 -1
- package/dist/service/services/order.service.js +25 -20
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/product.service.js +14 -19
- package/dist/service/services/product.service.js.map +1 -1
- package/dist/service/services/promotion.service.d.ts +8 -1
- package/dist/service/services/promotion.service.js +45 -2
- package/dist/service/services/promotion.service.js.map +1 -1
- package/dist/service/services/role.service.d.ts +5 -0
- package/dist/service/services/role.service.js +13 -1
- package/dist/service/services/role.service.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,35 +4,35 @@ exports.generatePermissionEnum = void 0;
|
|
|
4
4
|
const stitch_1 = require("@graphql-tools/stitch");
|
|
5
5
|
const graphql_1 = require("graphql");
|
|
6
6
|
const constants_1 = require("../../common/constants");
|
|
7
|
-
const PERMISSION_DESCRIPTION = `@description
|
|
8
|
-
Permissions for administrators and customers. Used to control access to
|
|
9
|
-
GraphQL resolvers via the {@link Allow} decorator.
|
|
10
|
-
|
|
11
|
-
## Understanding Permission.Owner
|
|
12
|
-
|
|
13
|
-
\`Permission.Owner\` is a special permission which is used in some Vendure resolvers to indicate that that resolver should only
|
|
14
|
-
be accessible to the "owner" of that resource.
|
|
15
|
-
|
|
16
|
-
For example, the Shop API \`activeCustomer\` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
|
|
17
|
-
based on the activeUserId of the current session. As a result, the resolver code looks like this:
|
|
18
|
-
|
|
19
|
-
@example
|
|
20
|
-
\`\`\`TypeScript
|
|
21
|
-
\\@Query()
|
|
22
|
-
\\@Allow(Permission.Owner)
|
|
23
|
-
async activeCustomer(\\@Ctx() ctx: RequestContext): Promise<Customer | undefined> {
|
|
24
|
-
const userId = ctx.activeUserId;
|
|
25
|
-
if (userId) {
|
|
26
|
-
return this.customerService.findOneByUserId(ctx, userId);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
\`\`\`
|
|
30
|
-
|
|
31
|
-
Here we can see that the "ownership" must be enforced by custom logic inside the resolver. Since "ownership" cannot be defined generally
|
|
32
|
-
nor statically encoded at build-time, any resolvers using \`Permission.Owner\` **must** include logic to enforce that only the owner
|
|
33
|
-
of the resource has access. If not, then it is the equivalent of using \`Permission.Public\`.
|
|
34
|
-
|
|
35
|
-
|
|
7
|
+
const PERMISSION_DESCRIPTION = `@description
|
|
8
|
+
Permissions for administrators and customers. Used to control access to
|
|
9
|
+
GraphQL resolvers via the {@link Allow} decorator.
|
|
10
|
+
|
|
11
|
+
## Understanding Permission.Owner
|
|
12
|
+
|
|
13
|
+
\`Permission.Owner\` is a special permission which is used in some Vendure resolvers to indicate that that resolver should only
|
|
14
|
+
be accessible to the "owner" of that resource.
|
|
15
|
+
|
|
16
|
+
For example, the Shop API \`activeCustomer\` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
|
|
17
|
+
based on the activeUserId of the current session. As a result, the resolver code looks like this:
|
|
18
|
+
|
|
19
|
+
@example
|
|
20
|
+
\`\`\`TypeScript
|
|
21
|
+
\\@Query()
|
|
22
|
+
\\@Allow(Permission.Owner)
|
|
23
|
+
async activeCustomer(\\@Ctx() ctx: RequestContext): Promise<Customer | undefined> {
|
|
24
|
+
const userId = ctx.activeUserId;
|
|
25
|
+
if (userId) {
|
|
26
|
+
return this.customerService.findOneByUserId(ctx, userId);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
Here we can see that the "ownership" must be enforced by custom logic inside the resolver. Since "ownership" cannot be defined generally
|
|
32
|
+
nor statically encoded at build-time, any resolvers using \`Permission.Owner\` **must** include logic to enforce that only the owner
|
|
33
|
+
of the resource has access. If not, then it is the equivalent of using \`Permission.Public\`.
|
|
34
|
+
|
|
35
|
+
|
|
36
36
|
@docsCategory common`;
|
|
37
37
|
/**
|
|
38
38
|
* Generates the `Permission` GraphQL enum based on the default & custom permission definitions.
|
|
@@ -45,6 +45,9 @@ export declare function generateResolvers(configService: ConfigService, customFi
|
|
|
45
45
|
RefundOrderResult: {
|
|
46
46
|
__resolveType(value: any): any;
|
|
47
47
|
};
|
|
48
|
+
RemoveFacetFromChannelResult: {
|
|
49
|
+
__resolveType(value: any): any;
|
|
50
|
+
};
|
|
48
51
|
RemoveOptionGroupFromProductResult: {
|
|
49
52
|
__resolveType(value: any): any;
|
|
50
53
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurableOperationDefinition, DeletionResponse, MutationCreateCollectionArgs, MutationDeleteCollectionArgs, MutationMoveCollectionArgs, MutationUpdateCollectionArgs, QueryCollectionArgs, QueryCollectionsArgs, QueryPreviewCollectionVariantsArgs } from '@vendure/common/lib/generated-types';
|
|
1
|
+
import { ConfigurableOperationDefinition, DeletionResponse, MutationAssignCollectionsToChannelArgs, MutationCreateCollectionArgs, MutationDeleteCollectionArgs, MutationDeleteCollectionsArgs, MutationMoveCollectionArgs, MutationRemoveCollectionsFromChannelArgs, MutationUpdateCollectionArgs, QueryCollectionArgs, QueryCollectionsArgs, QueryPreviewCollectionVariantsArgs } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { PaginatedList } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { Translated } from '../../../common/types/locale-types';
|
|
4
4
|
import { Collection } from '../../../entity/collection/collection.entity';
|
|
@@ -20,8 +20,7 @@ export declare class CollectionResolver {
|
|
|
20
20
|
updateCollection(ctx: RequestContext, args: MutationUpdateCollectionArgs): Promise<Translated<Collection>>;
|
|
21
21
|
moveCollection(ctx: RequestContext, args: MutationMoveCollectionArgs): Promise<Translated<Collection>>;
|
|
22
22
|
deleteCollection(ctx: RequestContext, args: MutationDeleteCollectionArgs): Promise<DeletionResponse>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
private encodeFilters;
|
|
23
|
+
deleteCollections(ctx: RequestContext, args: MutationDeleteCollectionsArgs): Promise<DeletionResponse[]>;
|
|
24
|
+
assignCollectionsToChannel(ctx: RequestContext, args: MutationAssignCollectionsToChannelArgs): Promise<Array<Translated<Collection>>>;
|
|
25
|
+
removeCollectionsFromChannel(ctx: RequestContext, args: MutationRemoveCollectionsFromChannelArgs): Promise<Array<Translated<Collection>>>;
|
|
27
26
|
}
|
|
@@ -31,24 +31,12 @@ let CollectionResolver = class CollectionResolver {
|
|
|
31
31
|
this.collectionService = collectionService;
|
|
32
32
|
this.facetValueService = facetValueService;
|
|
33
33
|
this.configurableOperationCodec = configurableOperationCodec;
|
|
34
|
-
/**
|
|
35
|
-
* Encodes any entity IDs used in the filter arguments.
|
|
36
|
-
*/
|
|
37
|
-
this.encodeFilters = (collection) => {
|
|
38
|
-
if (collection) {
|
|
39
|
-
this.configurableOperationCodec.encodeConfigurableOperationIds(collection_filter_1.CollectionFilter, collection.filters);
|
|
40
|
-
}
|
|
41
|
-
return collection;
|
|
42
|
-
};
|
|
43
34
|
}
|
|
44
35
|
async collectionFilters(ctx, args) {
|
|
45
36
|
return this.collectionService.getAvailableFilters(ctx);
|
|
46
37
|
}
|
|
47
38
|
async collections(ctx, args, relations) {
|
|
48
|
-
return this.collectionService.findAll(ctx, args.options || undefined, relations)
|
|
49
|
-
res.items.forEach(this.encodeFilters);
|
|
50
|
-
return res;
|
|
51
|
-
});
|
|
39
|
+
return this.collectionService.findAll(ctx, args.options || undefined, relations);
|
|
52
40
|
}
|
|
53
41
|
async collection(ctx, args, relations) {
|
|
54
42
|
let collection;
|
|
@@ -64,7 +52,7 @@ let CollectionResolver = class CollectionResolver {
|
|
|
64
52
|
else {
|
|
65
53
|
throw new errors_1.UserInputError(`error.collection-id-or-slug-must-be-provided`);
|
|
66
54
|
}
|
|
67
|
-
return
|
|
55
|
+
return collection;
|
|
68
56
|
}
|
|
69
57
|
previewCollectionVariants(ctx, args) {
|
|
70
58
|
this.configurableOperationCodec.decodeConfigurableOperationIds(collection_filter_1.CollectionFilter, args.input.filters);
|
|
@@ -73,20 +61,29 @@ let CollectionResolver = class CollectionResolver {
|
|
|
73
61
|
async createCollection(ctx, args) {
|
|
74
62
|
const { input } = args;
|
|
75
63
|
this.configurableOperationCodec.decodeConfigurableOperationIds(collection_filter_1.CollectionFilter, input.filters);
|
|
76
|
-
return this.collectionService.create(ctx, input)
|
|
64
|
+
return this.collectionService.create(ctx, input);
|
|
77
65
|
}
|
|
78
66
|
async updateCollection(ctx, args) {
|
|
79
67
|
const { input } = args;
|
|
80
68
|
this.configurableOperationCodec.decodeConfigurableOperationIds(collection_filter_1.CollectionFilter, input.filters || []);
|
|
81
|
-
return this.collectionService.update(ctx, input)
|
|
69
|
+
return this.collectionService.update(ctx, input);
|
|
82
70
|
}
|
|
83
71
|
async moveCollection(ctx, args) {
|
|
84
72
|
const { input } = args;
|
|
85
|
-
return this.collectionService.move(ctx, input)
|
|
73
|
+
return this.collectionService.move(ctx, input);
|
|
86
74
|
}
|
|
87
75
|
async deleteCollection(ctx, args) {
|
|
88
76
|
return this.collectionService.delete(ctx, args.id);
|
|
89
77
|
}
|
|
78
|
+
async deleteCollections(ctx, args) {
|
|
79
|
+
return Promise.all(args.ids.map(id => this.collectionService.delete(ctx, id)));
|
|
80
|
+
}
|
|
81
|
+
async assignCollectionsToChannel(ctx, args) {
|
|
82
|
+
return await this.collectionService.assignCollectionsToChannel(ctx, args.input);
|
|
83
|
+
}
|
|
84
|
+
async removeCollectionsFromChannel(ctx, args) {
|
|
85
|
+
return await this.collectionService.removeCollectionsFromChannel(ctx, args.input);
|
|
86
|
+
}
|
|
90
87
|
};
|
|
91
88
|
__decorate([
|
|
92
89
|
(0, graphql_1.Query)(),
|
|
@@ -172,6 +169,36 @@ __decorate([
|
|
|
172
169
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
173
170
|
__metadata("design:returntype", Promise)
|
|
174
171
|
], CollectionResolver.prototype, "deleteCollection", null);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
174
|
+
(0, graphql_1.Mutation)(),
|
|
175
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteCollection),
|
|
176
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
177
|
+
__param(1, (0, graphql_1.Args)()),
|
|
178
|
+
__metadata("design:type", Function),
|
|
179
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
180
|
+
__metadata("design:returntype", Promise)
|
|
181
|
+
], CollectionResolver.prototype, "deleteCollections", null);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
184
|
+
(0, graphql_1.Mutation)(),
|
|
185
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.CreateCatalog, generated_types_1.Permission.CreateCollection),
|
|
186
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
187
|
+
__param(1, (0, graphql_1.Args)()),
|
|
188
|
+
__metadata("design:type", Function),
|
|
189
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
190
|
+
__metadata("design:returntype", Promise)
|
|
191
|
+
], CollectionResolver.prototype, "assignCollectionsToChannel", null);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
194
|
+
(0, graphql_1.Mutation)(),
|
|
195
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteCollection),
|
|
196
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
197
|
+
__param(1, (0, graphql_1.Args)()),
|
|
198
|
+
__metadata("design:type", Function),
|
|
199
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
200
|
+
__metadata("design:returntype", Promise)
|
|
201
|
+
], CollectionResolver.prototype, "removeCollectionsFromChannel", null);
|
|
175
202
|
CollectionResolver = __decorate([
|
|
176
203
|
(0, graphql_1.Resolver)(),
|
|
177
204
|
__metadata("design:paramtypes", [collection_service_1.CollectionService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/admin/collection.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"collection.resolver.js","source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 +1,6 @@
|
|
|
1
|
-
import { DeletionResponse, MutationCreateFacetArgs, MutationCreateFacetValuesArgs, MutationDeleteFacetArgs, MutationDeleteFacetValuesArgs, MutationUpdateFacetArgs, MutationUpdateFacetValuesArgs, QueryFacetArgs, QueryFacetsArgs } from '@vendure/common/lib/generated-types';
|
|
1
|
+
import { DeletionResponse, MutationAssignFacetsToChannelArgs, MutationCreateFacetArgs, MutationCreateFacetValuesArgs, MutationDeleteFacetArgs, MutationDeleteFacetsArgs, MutationDeleteFacetValuesArgs, MutationRemoveFacetsFromChannelArgs, MutationUpdateFacetArgs, MutationUpdateFacetValuesArgs, QueryFacetArgs, QueryFacetsArgs, RemoveFacetFromChannelResult } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { PaginatedList } from '@vendure/common/lib/shared-types';
|
|
3
|
+
import { ErrorResultUnion } from '../../../common/index';
|
|
3
4
|
import { Translated } from '../../../common/types/locale-types';
|
|
4
5
|
import { ConfigService } from '../../../config/config.service';
|
|
5
6
|
import { FacetValue } from '../../../entity/facet-value/facet-value.entity';
|
|
@@ -18,7 +19,10 @@ export declare class FacetResolver {
|
|
|
18
19
|
createFacet(ctx: RequestContext, args: MutationCreateFacetArgs): Promise<Translated<Facet>>;
|
|
19
20
|
updateFacet(ctx: RequestContext, args: MutationUpdateFacetArgs): Promise<Translated<Facet>>;
|
|
20
21
|
deleteFacet(ctx: RequestContext, args: MutationDeleteFacetArgs): Promise<DeletionResponse>;
|
|
22
|
+
deleteFacets(ctx: RequestContext, args: MutationDeleteFacetsArgs): Promise<DeletionResponse[]>;
|
|
21
23
|
createFacetValues(ctx: RequestContext, args: MutationCreateFacetValuesArgs): Promise<Array<Translated<FacetValue>>>;
|
|
22
24
|
updateFacetValues(ctx: RequestContext, args: MutationUpdateFacetValuesArgs): Promise<Array<Translated<FacetValue>>>;
|
|
23
25
|
deleteFacetValues(ctx: RequestContext, args: MutationDeleteFacetValuesArgs): Promise<DeletionResponse[]>;
|
|
26
|
+
assignFacetsToChannel(ctx: RequestContext, args: MutationAssignFacetsToChannelArgs): Promise<Facet[]>;
|
|
27
|
+
removeFacetsFromChannel(ctx: RequestContext, args: MutationRemoveFacetsFromChannelArgs): Promise<Array<ErrorResultUnion<RemoveFacetFromChannelResult, Facet>>>;
|
|
24
28
|
}
|
|
@@ -55,6 +55,9 @@ let FacetResolver = class FacetResolver {
|
|
|
55
55
|
async deleteFacet(ctx, args) {
|
|
56
56
|
return this.facetService.delete(ctx, args.id, args.force || false);
|
|
57
57
|
}
|
|
58
|
+
async deleteFacets(ctx, args) {
|
|
59
|
+
return Promise.all(args.ids.map(id => this.facetService.delete(ctx, id, args.force || false)));
|
|
60
|
+
}
|
|
58
61
|
async createFacetValues(ctx, args) {
|
|
59
62
|
const { input } = args;
|
|
60
63
|
const facetId = input[0].facetId;
|
|
@@ -74,13 +77,18 @@ let FacetResolver = class FacetResolver {
|
|
|
74
77
|
return Promise.all(input.map(facetValue => this.facetValueService.update(ctx, facetValue)));
|
|
75
78
|
}
|
|
76
79
|
async deleteFacetValues(ctx, args) {
|
|
77
|
-
// return Promise.all(args.ids.map(id => this.facetValueService.delete(ctx, id, args.force || false)));
|
|
78
80
|
const results = [];
|
|
79
81
|
for (const id of args.ids) {
|
|
80
82
|
results.push(await this.facetValueService.delete(ctx, id, args.force || false));
|
|
81
83
|
}
|
|
82
84
|
return results;
|
|
83
85
|
}
|
|
86
|
+
async assignFacetsToChannel(ctx, args) {
|
|
87
|
+
return await this.facetService.assignFacetsToChannel(ctx, args.input);
|
|
88
|
+
}
|
|
89
|
+
async removeFacetsFromChannel(ctx, args) {
|
|
90
|
+
return await this.facetService.removeFacetsFromChannel(ctx, args.input);
|
|
91
|
+
}
|
|
84
92
|
};
|
|
85
93
|
__decorate([
|
|
86
94
|
(0, graphql_1.Query)(),
|
|
@@ -132,6 +140,16 @@ __decorate([
|
|
|
132
140
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
133
141
|
__metadata("design:returntype", Promise)
|
|
134
142
|
], FacetResolver.prototype, "deleteFacet", null);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
145
|
+
(0, graphql_1.Mutation)(),
|
|
146
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteFacet),
|
|
147
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
148
|
+
__param(1, (0, graphql_1.Args)()),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], FacetResolver.prototype, "deleteFacets", null);
|
|
135
153
|
__decorate([
|
|
136
154
|
(0, transaction_decorator_1.Transaction)(),
|
|
137
155
|
(0, graphql_1.Mutation)(),
|
|
@@ -162,6 +180,26 @@ __decorate([
|
|
|
162
180
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
163
181
|
__metadata("design:returntype", Promise)
|
|
164
182
|
], FacetResolver.prototype, "deleteFacetValues", null);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
185
|
+
(0, graphql_1.Mutation)(),
|
|
186
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.CreateCatalog, generated_types_1.Permission.CreateFacet),
|
|
187
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
188
|
+
__param(1, (0, graphql_1.Args)()),
|
|
189
|
+
__metadata("design:type", Function),
|
|
190
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
191
|
+
__metadata("design:returntype", Promise)
|
|
192
|
+
], FacetResolver.prototype, "assignFacetsToChannel", null);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
195
|
+
(0, graphql_1.Mutation)(),
|
|
196
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteFacet),
|
|
197
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
198
|
+
__param(1, (0, graphql_1.Args)()),
|
|
199
|
+
__metadata("design:type", Function),
|
|
200
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
201
|
+
__metadata("design:returntype", Promise)
|
|
202
|
+
], FacetResolver.prototype, "removeFacetsFromChannel", null);
|
|
165
203
|
FacetResolver = __decorate([
|
|
166
204
|
(0, graphql_1.Resolver)('Facet'),
|
|
167
205
|
__metadata("design:paramtypes", [facet_service_1.FacetService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/admin/facet.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"facet.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/admin/facet.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAClE,yEAe6C;AAG7C,yDAAmE;AAGnE,mEAA+D;AAE/D,qEAA2D;AAC3D,uFAAkF;AAClF,2EAAuE;AACvE,kEAA8D;AAC9D,sEAAyD;AACzD,8EAAgF;AAChF,0FAAiE;AACjE,kFAAqE;AAGrE,IAAa,aAAa,GAA1B,MAAa,aAAa;IACtB,YACY,YAA0B,EAC1B,iBAAoC,EACpC,aAA4B;QAF5B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,kBAAa,GAAb,aAAa,CAAe;IACrC,CAAC;IAIJ,MAAM,CACK,GAAmB,EAClB,IAAqB,EACX,SAA+B;QAEjD,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,SAAS,CAAC,CAAC;IAChF,CAAC;IAID,KAAK,CAAC,KAAK,CACA,GAAmB,EAClB,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,GAAE;IACV,IAAA,uBAAK,EAAC,4BAAU,CAAC,aAAa,EAAE,4BAAU,CAAC,WAAW,CAAC;IAEnD,WAAA,IAAA,+BAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAI,GAAE,CAAA;;qCADK,gCAAc;;sDAQ7B;AAKD;IAHC,IAAA,mCAAW,GAAE;IACb,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAK,EAAC,4BAAU,CAAC,aAAa,EAAE,4BAAU,CAAC,WAAW,CAAC;IAEnD,WAAA,IAAA,+BAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAI,GAAE,CAAA;;qCADK,gCAAc;;0DAI7B;AAKD;IAHC,IAAA,mCAAW,GAAE;IACb,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAK,EAAC,4BAAU,CAAC,aAAa,EAAE,4BAAU,CAAC,WAAW,CAAC;IAEnD,WAAA,IAAA,+BAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAI,GAAE,CAAA;;qCADK,gCAAc;;4DAI7B;AA7IQ,aAAa;IADzB,IAAA,kBAAQ,EAAC,OAAO,CAAC;qCAGY,4BAAY;QACP,uCAAiB;QACrB,8BAAa;GAJ/B,aAAa,CA8IzB;AA9IY,sCAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeletionResponse, MutationAddOptionGroupToProductArgs, MutationAssignProductsToChannelArgs, MutationAssignProductVariantsToChannelArgs, MutationCreateProductArgs, MutationCreateProductVariantsArgs, MutationDeleteProductArgs, MutationDeleteProductVariantArgs, MutationRemoveOptionGroupFromProductArgs, MutationRemoveProductsFromChannelArgs, MutationRemoveProductVariantsFromChannelArgs, MutationUpdateProductArgs, MutationUpdateProductVariantsArgs, QueryProductArgs, QueryProductsArgs, QueryProductVariantArgs, QueryProductVariantsArgs, RemoveOptionGroupFromProductResult } from '@vendure/common/lib/generated-types';
|
|
1
|
+
import { DeletionResponse, MutationAddOptionGroupToProductArgs, MutationAssignProductsToChannelArgs, MutationAssignProductVariantsToChannelArgs, MutationCreateProductArgs, MutationCreateProductVariantsArgs, MutationDeleteProductArgs, MutationDeleteProductsArgs, MutationDeleteProductVariantArgs, MutationDeleteProductVariantsArgs, MutationRemoveOptionGroupFromProductArgs, MutationRemoveProductsFromChannelArgs, MutationRemoveProductVariantsFromChannelArgs, MutationUpdateProductArgs, MutationUpdateProductsArgs, MutationUpdateProductVariantsArgs, QueryProductArgs, QueryProductsArgs, QueryProductVariantArgs, QueryProductVariantsArgs, RemoveOptionGroupFromProductResult } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { PaginatedList } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { ErrorResultUnion } from '../../../common/error/error-result';
|
|
4
4
|
import { Translated } from '../../../common/types/locale-types';
|
|
@@ -20,12 +20,15 @@ export declare class ProductResolver {
|
|
|
20
20
|
productVariant(ctx: RequestContext, args: QueryProductVariantArgs): Promise<Translated<ProductVariant> | undefined>;
|
|
21
21
|
createProduct(ctx: RequestContext, args: MutationCreateProductArgs): Promise<Translated<Product>>;
|
|
22
22
|
updateProduct(ctx: RequestContext, args: MutationUpdateProductArgs): Promise<Translated<Product>>;
|
|
23
|
+
updateProducts(ctx: RequestContext, args: MutationUpdateProductsArgs): Promise<Array<Translated<Product>>>;
|
|
23
24
|
deleteProduct(ctx: RequestContext, args: MutationDeleteProductArgs): Promise<DeletionResponse>;
|
|
25
|
+
deleteProducts(ctx: RequestContext, args: MutationDeleteProductsArgs): Promise<DeletionResponse[]>;
|
|
24
26
|
addOptionGroupToProduct(ctx: RequestContext, args: MutationAddOptionGroupToProductArgs): Promise<Translated<Product>>;
|
|
25
27
|
removeOptionGroupFromProduct(ctx: RequestContext, args: MutationRemoveOptionGroupFromProductArgs): Promise<ErrorResultUnion<RemoveOptionGroupFromProductResult, Translated<Product>>>;
|
|
26
28
|
createProductVariants(ctx: RequestContext, args: MutationCreateProductVariantsArgs): Promise<Array<Translated<ProductVariant>>>;
|
|
27
29
|
updateProductVariants(ctx: RequestContext, args: MutationUpdateProductVariantsArgs): Promise<Array<Translated<ProductVariant>>>;
|
|
28
30
|
deleteProductVariant(ctx: RequestContext, args: MutationDeleteProductVariantArgs): Promise<DeletionResponse>;
|
|
31
|
+
deleteProductVariants(ctx: RequestContext, args: MutationDeleteProductVariantsArgs): Promise<DeletionResponse[]>;
|
|
29
32
|
assignProductsToChannel(ctx: RequestContext, args: MutationAssignProductsToChannelArgs): Promise<Array<Translated<Product>>>;
|
|
30
33
|
removeProductsFromChannel(ctx: RequestContext, args: MutationRemoveProductsFromChannelArgs): Promise<Array<Translated<Product>>>;
|
|
31
34
|
assignProductVariantsToChannel(ctx: RequestContext, args: MutationAssignProductVariantsToChannelArgs): Promise<Array<Translated<ProductVariant>>>;
|
|
@@ -67,9 +67,16 @@ let ProductResolver = class ProductResolver {
|
|
|
67
67
|
const { input } = args;
|
|
68
68
|
return await this.productService.update(ctx, input);
|
|
69
69
|
}
|
|
70
|
+
async updateProducts(ctx, args) {
|
|
71
|
+
const { input } = args;
|
|
72
|
+
return await Promise.all(args.input.map(i => this.productService.update(ctx, i)));
|
|
73
|
+
}
|
|
70
74
|
async deleteProduct(ctx, args) {
|
|
71
75
|
return this.productService.softDelete(ctx, args.id);
|
|
72
76
|
}
|
|
77
|
+
async deleteProducts(ctx, args) {
|
|
78
|
+
return Promise.all(args.ids.map(id => this.productService.softDelete(ctx, id)));
|
|
79
|
+
}
|
|
73
80
|
async addOptionGroupToProduct(ctx, args) {
|
|
74
81
|
const { productId, optionGroupId } = args;
|
|
75
82
|
return this.productService.addOptionGroupToProduct(ctx, productId, optionGroupId);
|
|
@@ -89,6 +96,9 @@ let ProductResolver = class ProductResolver {
|
|
|
89
96
|
async deleteProductVariant(ctx, args) {
|
|
90
97
|
return this.productVariantService.softDelete(ctx, args.id);
|
|
91
98
|
}
|
|
99
|
+
async deleteProductVariants(ctx, args) {
|
|
100
|
+
return Promise.all(args.ids.map(id => this.productVariantService.softDelete(ctx, id)));
|
|
101
|
+
}
|
|
92
102
|
async assignProductsToChannel(ctx, args) {
|
|
93
103
|
return this.productService.assignProductsToChannel(ctx, args.input);
|
|
94
104
|
}
|
|
@@ -161,6 +171,16 @@ __decorate([
|
|
|
161
171
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
162
172
|
__metadata("design:returntype", Promise)
|
|
163
173
|
], ProductResolver.prototype, "updateProduct", null);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
176
|
+
(0, graphql_1.Mutation)(),
|
|
177
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.UpdateCatalog, generated_types_1.Permission.UpdateProduct),
|
|
178
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
179
|
+
__param(1, (0, graphql_1.Args)()),
|
|
180
|
+
__metadata("design:type", Function),
|
|
181
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
182
|
+
__metadata("design:returntype", Promise)
|
|
183
|
+
], ProductResolver.prototype, "updateProducts", null);
|
|
164
184
|
__decorate([
|
|
165
185
|
(0, transaction_decorator_1.Transaction)(),
|
|
166
186
|
(0, graphql_1.Mutation)(),
|
|
@@ -171,6 +191,16 @@ __decorate([
|
|
|
171
191
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
172
192
|
__metadata("design:returntype", Promise)
|
|
173
193
|
], ProductResolver.prototype, "deleteProduct", null);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
196
|
+
(0, graphql_1.Mutation)(),
|
|
197
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteProduct),
|
|
198
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
199
|
+
__param(1, (0, graphql_1.Args)()),
|
|
200
|
+
__metadata("design:type", Function),
|
|
201
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
202
|
+
__metadata("design:returntype", Promise)
|
|
203
|
+
], ProductResolver.prototype, "deleteProducts", null);
|
|
174
204
|
__decorate([
|
|
175
205
|
(0, transaction_decorator_1.Transaction)(),
|
|
176
206
|
(0, graphql_1.Mutation)(),
|
|
@@ -221,6 +251,16 @@ __decorate([
|
|
|
221
251
|
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
222
252
|
__metadata("design:returntype", Promise)
|
|
223
253
|
], ProductResolver.prototype, "deleteProductVariant", null);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, transaction_decorator_1.Transaction)(),
|
|
256
|
+
(0, graphql_1.Mutation)(),
|
|
257
|
+
(0, allow_decorator_1.Allow)(generated_types_1.Permission.DeleteCatalog, generated_types_1.Permission.DeleteProduct),
|
|
258
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
259
|
+
__param(1, (0, graphql_1.Args)()),
|
|
260
|
+
__metadata("design:type", Function),
|
|
261
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, Object]),
|
|
262
|
+
__metadata("design:returntype", Promise)
|
|
263
|
+
], ProductResolver.prototype, "deleteProductVariants", null);
|
|
224
264
|
__decorate([
|
|
225
265
|
(0, transaction_decorator_1.Transaction)(),
|
|
226
266
|
(0, graphql_1.Mutation)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/admin/product.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"product.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/admin/product.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkE;AAClE,yEAuB6C;AAI7C,yDAA8D;AAE9D,mGAAwF;AACxF,2EAAiE;AACjE,uFAAkF;AAClF,+FAA0F;AAC1F,+EAA2E;AAC3E,kEAA8D;AAC9D,sEAAyD;AACzD,8EAAgF;AAChF,0FAAiE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EAI7B;AAKD;IAHC,IAAA,mCAAW,GAAE;IACb,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAK,EAAC,4BAAU,CAAC,aAAa,EAAE,4BAAU,CAAC,aAAa,CAAC;IAErD,WAAA,IAAA,+BAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAI,GAAE,CAAA;;qCADK,gCAAc;;qEAI7B;AAKD;IAHC,IAAA,mCAAW,GAAE;IACb,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAK,EAAC,4BAAU,CAAC,aAAa,EAAE,4BAAU,CAAC,aAAa,CAAC;IAErD,WAAA,IAAA,+BAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAI,GAAE,CAAA;;qCADK,gCAAc;;uEAI7B;AA5NQ,eAAe;IAD3B,IAAA,kBAAQ,GAAE;qCAGqB,gCAAc;QACP,+CAAqB;QACzB,uCAAiB;GAJvC,eAAe,CA6N3B;AA7NY,0CAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionBreadcrumb, ProductVariantListOptions } from '@vendure/common/lib/generated-types';
|
|
1
|
+
import { CollectionBreadcrumb, ConfigurableOperation, ProductVariantListOptions } from '@vendure/common/lib/generated-types';
|
|
2
2
|
import { PaginatedList } from '@vendure/common/lib/shared-types';
|
|
3
3
|
import { Translated } from '../../../common/types/locale-types';
|
|
4
4
|
import { Asset, Collection, ProductVariant } from '../../../entity';
|
|
@@ -6,6 +6,7 @@ import { LocaleStringHydrator } from '../../../service/helpers/locale-string-hyd
|
|
|
6
6
|
import { AssetService } from '../../../service/services/asset.service';
|
|
7
7
|
import { CollectionService } from '../../../service/services/collection.service';
|
|
8
8
|
import { ProductVariantService } from '../../../service/services/product-variant.service';
|
|
9
|
+
import { ConfigurableOperationCodec } from '../../common/configurable-operation-codec';
|
|
9
10
|
import { ApiType } from '../../common/get-api-type';
|
|
10
11
|
import { RequestContext } from '../../common/request-context';
|
|
11
12
|
import { RelationPaths } from '../../decorators/relations.decorator';
|
|
@@ -14,7 +15,8 @@ export declare class CollectionEntityResolver {
|
|
|
14
15
|
private collectionService;
|
|
15
16
|
private assetService;
|
|
16
17
|
private localeStringHydrator;
|
|
17
|
-
|
|
18
|
+
private configurableOperationCodec;
|
|
19
|
+
constructor(productVariantService: ProductVariantService, collectionService: CollectionService, assetService: AssetService, localeStringHydrator: LocaleStringHydrator, configurableOperationCodec: ConfigurableOperationCodec);
|
|
18
20
|
name(ctx: RequestContext, collection: Collection): Promise<string>;
|
|
19
21
|
slug(ctx: RequestContext, collection: Collection): Promise<string>;
|
|
20
22
|
description(ctx: RequestContext, collection: Collection): Promise<string>;
|
|
@@ -27,4 +29,5 @@ export declare class CollectionEntityResolver {
|
|
|
27
29
|
children(ctx: RequestContext, collection: Collection, apiType: ApiType): Promise<Collection[]>;
|
|
28
30
|
featuredAsset(ctx: RequestContext, collection: Collection): Promise<Asset | undefined>;
|
|
29
31
|
assets(ctx: RequestContext, collection: Collection): Promise<Asset[] | undefined>;
|
|
32
|
+
filters(ctx: RequestContext, collection: Collection): ConfigurableOperation[];
|
|
30
33
|
}
|
|
@@ -13,22 +13,26 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CollectionEntityResolver = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
16
17
|
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
+
const index_1 = require("../../../config/index");
|
|
17
19
|
const entity_1 = require("../../../entity");
|
|
18
20
|
const locale_string_hydrator_1 = require("../../../service/helpers/locale-string-hydrator/locale-string-hydrator");
|
|
19
21
|
const asset_service_1 = require("../../../service/services/asset.service");
|
|
20
22
|
const collection_service_1 = require("../../../service/services/collection.service");
|
|
21
23
|
const product_variant_service_1 = require("../../../service/services/product-variant.service");
|
|
24
|
+
const configurable_operation_codec_1 = require("../../common/configurable-operation-codec");
|
|
22
25
|
const request_context_1 = require("../../common/request-context");
|
|
23
26
|
const api_decorator_1 = require("../../decorators/api.decorator");
|
|
24
27
|
const relations_decorator_1 = require("../../decorators/relations.decorator");
|
|
25
28
|
const request_context_decorator_1 = require("../../decorators/request-context.decorator");
|
|
26
29
|
let CollectionEntityResolver = class CollectionEntityResolver {
|
|
27
|
-
constructor(productVariantService, collectionService, assetService, localeStringHydrator) {
|
|
30
|
+
constructor(productVariantService, collectionService, assetService, localeStringHydrator, configurableOperationCodec) {
|
|
28
31
|
this.productVariantService = productVariantService;
|
|
29
32
|
this.collectionService = collectionService;
|
|
30
33
|
this.assetService = assetService;
|
|
31
34
|
this.localeStringHydrator = localeStringHydrator;
|
|
35
|
+
this.configurableOperationCodec = configurableOperationCodec;
|
|
32
36
|
}
|
|
33
37
|
name(ctx, collection) {
|
|
34
38
|
return this.localeStringHydrator.hydrateLocaleStringField(ctx, collection, 'name');
|
|
@@ -81,6 +85,15 @@ let CollectionEntityResolver = class CollectionEntityResolver {
|
|
|
81
85
|
async assets(ctx, collection) {
|
|
82
86
|
return this.assetService.getEntityAssets(ctx, collection);
|
|
83
87
|
}
|
|
88
|
+
filters(ctx, collection) {
|
|
89
|
+
try {
|
|
90
|
+
return this.configurableOperationCodec.encodeConfigurableOperationIds(index_1.CollectionFilter, collection.filters);
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
common_1.Logger.error(`Could not decode the collection filter arguments for "${collection.name}" (id: ${collection.id}). Error message: ${e.message}`);
|
|
94
|
+
return [];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
84
97
|
};
|
|
85
98
|
__decorate([
|
|
86
99
|
(0, graphql_1.ResolveField)(),
|
|
@@ -172,12 +185,21 @@ __decorate([
|
|
|
172
185
|
__metadata("design:paramtypes", [request_context_1.RequestContext, entity_1.Collection]),
|
|
173
186
|
__metadata("design:returntype", Promise)
|
|
174
187
|
], CollectionEntityResolver.prototype, "assets", null);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, graphql_1.ResolveField)(),
|
|
190
|
+
__param(0, (0, request_context_decorator_1.Ctx)()),
|
|
191
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
192
|
+
__metadata("design:type", Function),
|
|
193
|
+
__metadata("design:paramtypes", [request_context_1.RequestContext, entity_1.Collection]),
|
|
194
|
+
__metadata("design:returntype", Array)
|
|
195
|
+
], CollectionEntityResolver.prototype, "filters", null);
|
|
175
196
|
CollectionEntityResolver = __decorate([
|
|
176
197
|
(0, graphql_1.Resolver)('Collection'),
|
|
177
198
|
__metadata("design:paramtypes", [product_variant_service_1.ProductVariantService,
|
|
178
199
|
collection_service_1.CollectionService,
|
|
179
200
|
asset_service_1.AssetService,
|
|
180
|
-
locale_string_hydrator_1.LocaleStringHydrator
|
|
201
|
+
locale_string_hydrator_1.LocaleStringHydrator,
|
|
202
|
+
configurable_operation_codec_1.ConfigurableOperationCodec])
|
|
181
203
|
], CollectionEntityResolver);
|
|
182
204
|
exports.CollectionEntityResolver = CollectionEntityResolver;
|
|
183
205
|
//# sourceMappingURL=collection-entity.resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-entity.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/entity/collection-entity.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAuE;
|
|
1
|
+
{"version":3,"file":"collection-entity.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/entity/collection-entity.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,6CAAuE;AAUvE,iDAAyD;AACzD,4CAA6E;AAC7E,mHAA8G;AAC9G,2EAAuE;AACvE,qFAAiF;AACjF,+FAA0F;AAC1F,4FAAuF;AAEvF,kEAA8D;AAC9D,kEAAqD;AACrD,8EAAgF;AAChF,0FAAiE;AAGjE,IAAa,wBAAwB,GAArC,MAAa,wBAAwB;IACjC,YACY,qBAA4C,EAC5C,iBAAoC,EACpC,YAA0B,EAC1B,oBAA0C,EA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