@buunguyen3589/collections-module 1.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/app/index.d.ts +1 -0
- package/dist/app/index.js +17 -0
- package/dist/app/usecases/command/create-collection.usecase.d.ts +16 -0
- package/dist/app/usecases/command/create-collection.usecase.js +66 -0
- package/dist/app/usecases/command/delete-collection.usecase.d.ts +13 -0
- package/dist/app/usecases/command/delete-collection.usecase.js +57 -0
- package/dist/app/usecases/command/index.d.ts +5 -0
- package/dist/app/usecases/command/index.js +21 -0
- package/dist/app/usecases/command/post-collection/index.d.ts +1 -0
- package/dist/app/usecases/command/post-collection/index.js +17 -0
- package/dist/app/usecases/command/post-collection/upsert-post-collection.usecase.d.ts +14 -0
- package/dist/app/usecases/command/post-collection/upsert-post-collection.usecase.js +63 -0
- package/dist/app/usecases/command/product-collection/add-all-products-collection.usecase.d.ts +24 -0
- package/dist/app/usecases/command/product-collection/add-all-products-collection.usecase.js +93 -0
- package/dist/app/usecases/command/product-collection/create-product-collection.usecase.d.ts +24 -0
- package/dist/app/usecases/command/product-collection/create-product-collection.usecase.js +94 -0
- package/dist/app/usecases/command/product-collection/delete-product-collection.usecase.d.ts +14 -0
- package/dist/app/usecases/command/product-collection/delete-product-collection.usecase.js +56 -0
- package/dist/app/usecases/command/product-collection/index.d.ts +3 -0
- package/dist/app/usecases/command/product-collection/index.js +19 -0
- package/dist/app/usecases/command/update-collection.usecase.d.ts +15 -0
- package/dist/app/usecases/command/update-collection.usecase.js +73 -0
- package/dist/app/usecases/index.d.ts +2 -0
- package/dist/app/usecases/index.js +18 -0
- package/dist/app/usecases/query/get-detail-collection.usecase.d.ts +36 -0
- package/dist/app/usecases/query/get-detail-collection.usecase.js +216 -0
- package/dist/app/usecases/query/get-list-collection.usecase.d.ts +23 -0
- package/dist/app/usecases/query/get-list-collection.usecase.js +96 -0
- package/dist/app/usecases/query/get-products-by-collections-internal.usecase.d.ts +19 -0
- package/dist/app/usecases/query/get-products-by-collections-internal.usecase.js +65 -0
- package/dist/app/usecases/query/get-products-by-collections.usecase.d.ts +44 -0
- package/dist/app/usecases/query/get-products-by-collections.usecase.js +130 -0
- package/dist/app/usecases/query/index.d.ts +4 -0
- package/dist/app/usecases/query/index.js +20 -0
- package/dist/collection.module.d.ts +2 -0
- package/dist/collection.module.js +62 -0
- package/dist/domain/aggregates/enums/collection.enum.d.ts +5 -0
- package/dist/domain/aggregates/enums/collection.enum.js +9 -0
- package/dist/domain/aggregates/enums/index.d.ts +1 -0
- package/dist/domain/aggregates/enums/index.js +17 -0
- package/dist/domain/aggregates/index.d.ts +2 -0
- package/dist/domain/aggregates/index.js +18 -0
- package/dist/domain/aggregates/types/collection.type.d.ts +14 -0
- package/dist/domain/aggregates/types/collection.type.js +2 -0
- package/dist/domain/aggregates/types/index.d.ts +3 -0
- package/dist/domain/aggregates/types/index.js +19 -0
- package/dist/domain/aggregates/types/post-collection.type.d.ts +12 -0
- package/dist/domain/aggregates/types/post-collection.type.js +2 -0
- package/dist/domain/aggregates/types/product-collection.type.d.ts +11 -0
- package/dist/domain/aggregates/types/product-collection.type.js +2 -0
- package/dist/domain/builders/collection.builder.d.ts +8 -0
- package/dist/domain/builders/collection.builder.js +38 -0
- package/dist/domain/builders/index.d.ts +3 -0
- package/dist/domain/builders/index.js +19 -0
- package/dist/domain/builders/post-collection.builder.d.ts +8 -0
- package/dist/domain/builders/post-collection.builder.js +38 -0
- package/dist/domain/builders/product-collection.builder.d.ts +8 -0
- package/dist/domain/builders/product-collection.builder.js +38 -0
- package/dist/domain/consts/event-collection.name.const.d.ts +5 -0
- package/dist/domain/consts/event-collection.name.const.js +8 -0
- package/dist/domain/consts/event-post-collection.name.const.d.ts +6 -0
- package/dist/domain/consts/event-post-collection.name.const.js +9 -0
- package/dist/domain/consts/event-product-collection.name.const.d.ts +5 -0
- package/dist/domain/consts/event-product-collection.name.const.js +8 -0
- package/dist/domain/consts/index.d.ts +3 -0
- package/dist/domain/consts/index.js +19 -0
- package/dist/domain/dtos/collection.dto.d.ts +4 -0
- package/dist/domain/dtos/collection.dto.js +2 -0
- package/dist/domain/dtos/index.d.ts +3 -0
- package/dist/domain/dtos/index.js +19 -0
- package/dist/domain/dtos/post-collection.dto.d.ts +4 -0
- package/dist/domain/dtos/post-collection.dto.js +2 -0
- package/dist/domain/dtos/product-collection.dto.d.ts +4 -0
- package/dist/domain/dtos/product-collection.dto.js +2 -0
- package/dist/domain/entities/collection.entity.d.ts +40 -0
- package/dist/domain/entities/collection.entity.js +87 -0
- package/dist/domain/entities/index.d.ts +3 -0
- package/dist/domain/entities/index.js +19 -0
- package/dist/domain/entities/post-collection.entity.d.ts +33 -0
- package/dist/domain/entities/post-collection.entity.js +70 -0
- package/dist/domain/entities/product-collection.entity.d.ts +30 -0
- package/dist/domain/entities/product-collection.entity.js +55 -0
- package/dist/domain/index.d.ts +6 -0
- package/dist/domain/index.js +22 -0
- package/dist/domain/mappers/collection.mapper.d.ts +11 -0
- package/dist/domain/mappers/collection.mapper.js +56 -0
- package/dist/domain/mappers/index.d.ts +3 -0
- package/dist/domain/mappers/index.js +19 -0
- package/dist/domain/mappers/post-collection.mapper.d.ts +11 -0
- package/dist/domain/mappers/post-collection.mapper.js +50 -0
- package/dist/domain/mappers/product-collection.mapper.d.ts +11 -0
- package/dist/domain/mappers/product-collection.mapper.js +48 -0
- package/dist/domain/repositories/collection.repository.d.ts +21 -0
- package/dist/domain/repositories/collection.repository.js +93 -0
- package/dist/domain/repositories/index.d.ts +3 -0
- package/dist/domain/repositories/index.js +19 -0
- package/dist/domain/repositories/post-collection.repository.d.ts +21 -0
- package/dist/domain/repositories/post-collection.repository.js +107 -0
- package/dist/domain/repositories/product-collection.repository.d.ts +21 -0
- package/dist/domain/repositories/product-collection.repository.js +98 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +23 -0
- package/dist/infra/daos/collection.dao.d.ts +7 -0
- package/dist/infra/daos/collection.dao.js +36 -0
- package/dist/infra/daos/index.d.ts +3 -0
- package/dist/infra/daos/index.js +19 -0
- package/dist/infra/daos/post-collection.dao.d.ts +10 -0
- package/dist/infra/daos/post-collection.dao.js +70 -0
- package/dist/infra/daos/product-collection.dao.d.ts +9 -0
- package/dist/infra/daos/product-collection.dao.js +69 -0
- package/dist/infra/event-handlers/collection.event-emitter.d.ts +6 -0
- package/dist/infra/event-handlers/collection.event-emitter.js +27 -0
- package/dist/infra/event-handlers/index.d.ts +3 -0
- package/dist/infra/event-handlers/index.js +19 -0
- package/dist/infra/event-handlers/post-collection.event-emitter.d.ts +6 -0
- package/dist/infra/event-handlers/post-collection.event-emitter.js +27 -0
- package/dist/infra/event-handlers/product-collection.event-emitter.d.ts +6 -0
- package/dist/infra/event-handlers/product-collection.event-emitter.js +27 -0
- package/dist/infra/filters/collection.filter.d.ts +25 -0
- package/dist/infra/filters/collection.filter.js +84 -0
- package/dist/infra/filters/index.d.ts +3 -0
- package/dist/infra/filters/index.js +19 -0
- package/dist/infra/filters/post-collection.filter.d.ts +16 -0
- package/dist/infra/filters/post-collection.filter.js +54 -0
- package/dist/infra/filters/product-collection.filter.d.ts +13 -0
- package/dist/infra/filters/product-collection.filter.js +44 -0
- package/dist/infra/index.d.ts +6 -0
- package/dist/infra/index.js +22 -0
- package/dist/infra/mappers/collection.mapper.d.ts +8 -0
- package/dist/infra/mappers/collection.mapper.js +31 -0
- package/dist/infra/mappers/index.d.ts +3 -0
- package/dist/infra/mappers/index.js +19 -0
- package/dist/infra/mappers/post-collection.mapper.d.ts +8 -0
- package/dist/infra/mappers/post-collection.mapper.js +25 -0
- package/dist/infra/mappers/product-collection.mapper.d.ts +8 -0
- package/dist/infra/mappers/product-collection.mapper.js +24 -0
- package/dist/infra/query-configs/collection.query-config.d.ts +3 -0
- package/dist/infra/query-configs/collection.query-config.js +46 -0
- package/dist/infra/query-configs/index.d.ts +3 -0
- package/dist/infra/query-configs/index.js +19 -0
- package/dist/infra/query-configs/post-collection.query-config.d.ts +3 -0
- package/dist/infra/query-configs/post-collection.query-config.js +31 -0
- package/dist/infra/query-configs/product-collection.query-config.d.ts +3 -0
- package/dist/infra/query-configs/product-collection.query-config.js +26 -0
- package/dist/infra/records/collection.record.d.ts +11 -0
- package/dist/infra/records/collection.record.js +2 -0
- package/dist/infra/records/index.d.ts +3 -0
- package/dist/infra/records/index.js +19 -0
- package/dist/infra/records/post-collection.record.d.ts +7 -0
- package/dist/infra/records/post-collection.record.js +2 -0
- package/dist/infra/records/product-collection.record.d.ts +7 -0
- package/dist/infra/records/product-collection.record.js +2 -0
- package/dist/presentation/controllers/index.d.ts +2 -0
- package/dist/presentation/controllers/index.js +18 -0
- package/dist/presentation/controllers/internals/index.d.ts +1 -0
- package/dist/presentation/controllers/internals/index.js +17 -0
- package/dist/presentation/controllers/internals/product-collection.internal.rest.d.ts +8 -0
- package/dist/presentation/controllers/internals/product-collection.internal.rest.js +45 -0
- package/dist/presentation/controllers/storefront/collection.storefront.rest.d.ts +26 -0
- package/dist/presentation/controllers/storefront/collection.storefront.rest.js +155 -0
- package/dist/presentation/controllers/storefront/index.d.ts +3 -0
- package/dist/presentation/controllers/storefront/index.js +19 -0
- package/dist/presentation/controllers/storefront/post-collection.storefront.d.ts +7 -0
- package/dist/presentation/controllers/storefront/post-collection.storefront.js +37 -0
- package/dist/presentation/controllers/storefront/product-collection.storefront.rest.d.ts +5 -0
- package/dist/presentation/controllers/storefront/product-collection.storefront.rest.js +50 -0
- package/dist/presentation/index.d.ts +1 -0
- package/dist/presentation/index.js +17 -0
- package/dist/shared/configs/index.d.ts +1 -0
- package/dist/shared/configs/index.js +17 -0
- package/dist/shared/configs/pagination.config.d.ts +4 -0
- package/dist/shared/configs/pagination.config.js +7 -0
- package/dist/shared/constants/collection-inject-tokens.const.d.ts +56 -0
- package/dist/shared/constants/collection-inject-tokens.const.js +61 -0
- package/dist/shared/constants/collection-table-names.const.d.ts +12 -0
- package/dist/shared/constants/collection-table-names.const.js +16 -0
- package/dist/shared/constants/component-inject-tokens.const.d.ts +7 -0
- package/dist/shared/constants/component-inject-tokens.const.js +11 -0
- package/dist/shared/constants/error-codes.const.d.ts +6 -0
- package/dist/shared/constants/error-codes.const.js +10 -0
- package/dist/shared/constants/index.d.ts +4 -0
- package/dist/shared/constants/index.js +21 -0
- package/dist/shared/core/filter.d.ts +80 -0
- package/dist/shared/core/filter.js +554 -0
- package/dist/shared/core/index.d.ts +1 -0
- package/dist/shared/core/index.js +17 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +21 -0
- package/dist/shared/interfaces/ambassador-dao.interface.d.ts +5 -0
- package/dist/shared/interfaces/ambassador-dao.interface.js +2 -0
- package/dist/shared/interfaces/ambassador-usecase.interface.d.ts +16 -0
- package/dist/shared/interfaces/ambassador-usecase.interface.js +2 -0
- package/dist/shared/interfaces/campaign-service.interface.d.ts +3 -0
- package/dist/shared/interfaces/campaign-service.interface.js +4 -0
- package/dist/shared/interfaces/index.d.ts +6 -0
- package/dist/shared/interfaces/index.js +22 -0
- package/dist/shared/interfaces/post-product-dao.interface.d.ts +8 -0
- package/dist/shared/interfaces/post-product-dao.interface.js +2 -0
- package/dist/shared/interfaces/product-service.interface.d.ts +6 -0
- package/dist/shared/interfaces/product-service.interface.js +2 -0
- package/dist/shared/interfaces/ugc-management-service.interface.d.ts +11 -0
- package/dist/shared/interfaces/ugc-management-service.interface.js +2 -0
- package/dist/shared/types/common.type.d.ts +4 -0
- package/dist/shared/types/common.type.js +2 -0
- package/dist/shared/types/discount.enum.d.ts +4 -0
- package/dist/shared/types/discount.enum.js +8 -0
- package/dist/shared/types/index.d.ts +4 -0
- package/dist/shared/types/index.js +20 -0
- package/dist/shared/types/shopify.type.d.ts +28 -0
- package/dist/shared/types/shopify.type.js +2 -0
- package/dist/shared/types/ugc.type.d.ts +41 -0
- package/dist/shared/types/ugc.type.js +2 -0
- package/package.json +56 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostCollectionQueryConfig = void 0;
|
|
4
|
+
const filters_1 = require("../filters");
|
|
5
|
+
exports.PostCollectionQueryConfig = {
|
|
6
|
+
id: {
|
|
7
|
+
sortable: true,
|
|
8
|
+
filterable: true,
|
|
9
|
+
filterClass: filters_1.PostCollectionIdFilter,
|
|
10
|
+
},
|
|
11
|
+
collectionId: {
|
|
12
|
+
sortable: true,
|
|
13
|
+
filterable: true,
|
|
14
|
+
filterClass: filters_1.PostCollectionCollectionIdFilter,
|
|
15
|
+
},
|
|
16
|
+
ambassadorId: {
|
|
17
|
+
sortable: true,
|
|
18
|
+
filterable: true,
|
|
19
|
+
filterClass: filters_1.PostCollectionAmbassadorIdFilter,
|
|
20
|
+
},
|
|
21
|
+
postId: {
|
|
22
|
+
sortable: true,
|
|
23
|
+
filterable: true,
|
|
24
|
+
filterClass: filters_1.PostCollectionPostIdFilter,
|
|
25
|
+
},
|
|
26
|
+
hidden: {
|
|
27
|
+
sortable: true,
|
|
28
|
+
filterable: true,
|
|
29
|
+
filterClass: filters_1.PostCollectionHiddenFilter,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductCollectionQueryConfig = void 0;
|
|
4
|
+
const filters_1 = require("../filters");
|
|
5
|
+
exports.ProductCollectionQueryConfig = {
|
|
6
|
+
id: {
|
|
7
|
+
sortable: true,
|
|
8
|
+
filterable: true,
|
|
9
|
+
filterClass: filters_1.ProductCollectionIdFilter,
|
|
10
|
+
},
|
|
11
|
+
collectionId: {
|
|
12
|
+
sortable: true,
|
|
13
|
+
filterable: true,
|
|
14
|
+
filterClass: filters_1.ProductCollectionCollectionIdFilter,
|
|
15
|
+
},
|
|
16
|
+
productId: {
|
|
17
|
+
sortable: true,
|
|
18
|
+
filterable: true,
|
|
19
|
+
filterClass: filters_1.ProductCollectionProductIdFilter,
|
|
20
|
+
},
|
|
21
|
+
ambassadorId: {
|
|
22
|
+
sortable: true,
|
|
23
|
+
filterable: true,
|
|
24
|
+
filterClass: filters_1.ProductCollectionAmbassadorIdFilter,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CollectionTypeEnum } from '../../domain';
|
|
2
|
+
export type CollectionRecord = {
|
|
3
|
+
id: string;
|
|
4
|
+
ambassador_id: string;
|
|
5
|
+
collection_name: string;
|
|
6
|
+
collection_type: CollectionTypeEnum;
|
|
7
|
+
description: string;
|
|
8
|
+
is_favorite: boolean;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./collection.record"), exports);
|
|
18
|
+
__exportStar(require("./product-collection.record"), exports);
|
|
19
|
+
__exportStar(require("./post-collection.record"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./storefront"), exports);
|
|
18
|
+
__exportStar(require("./internals"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product-collection.internal.rest';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./product-collection.internal.rest"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IGetProductsByCollectionInternalUseCase } from '../../../app';
|
|
2
|
+
import { FilterInput } from '@cbidigital/aqua-ddd';
|
|
3
|
+
export declare class ProductCollectionInternalRest {
|
|
4
|
+
getProductsByCollection(useCase: IGetProductsByCollectionInternalUseCase, offset?: string, limit?: string, sort?: string, filter?: FilterInput): Promise<{
|
|
5
|
+
totalCount: number;
|
|
6
|
+
items: Partial<import("../../..").ProductCollectionDto>[];
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductCollectionInternalRest = void 0;
|
|
16
|
+
const common_1 = require("@heronjs/common");
|
|
17
|
+
const http_status_codes_1 = require("http-status-codes");
|
|
18
|
+
const shared_1 = require("../../../shared");
|
|
19
|
+
const aqua_ddd_1 = require("@cbidigital/aqua-ddd");
|
|
20
|
+
let ProductCollectionInternalRest = class ProductCollectionInternalRest {
|
|
21
|
+
async getProductsByCollection(useCase, offset, limit, sort, filter) {
|
|
22
|
+
const input = aqua_ddd_1.PaginationUtil.transform({
|
|
23
|
+
offset,
|
|
24
|
+
limit,
|
|
25
|
+
sort,
|
|
26
|
+
filter,
|
|
27
|
+
}, shared_1.PAGINATION_CONFIG);
|
|
28
|
+
return useCase.exec(input);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, common_1.Get)({ uri: '/get-products', code: http_status_codes_1.StatusCodes.OK }),
|
|
33
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.GET_PRODUCTS_BY_COLLECTIONS_INTERNAL)),
|
|
34
|
+
__param(1, (0, common_1.Query)('offset')),
|
|
35
|
+
__param(2, (0, common_1.Query)('limit')),
|
|
36
|
+
__param(3, (0, common_1.Query)('sort')),
|
|
37
|
+
__param(4, (0, common_1.Query)('filter')),
|
|
38
|
+
__metadata("design:type", Function),
|
|
39
|
+
__metadata("design:paramtypes", [Object, String, String, String, Object]),
|
|
40
|
+
__metadata("design:returntype", Promise)
|
|
41
|
+
], ProductCollectionInternalRest.prototype, "getProductsByCollection", null);
|
|
42
|
+
ProductCollectionInternalRest = __decorate([
|
|
43
|
+
(0, common_1.Rest)('/internal/collections')
|
|
44
|
+
], ProductCollectionInternalRest);
|
|
45
|
+
exports.ProductCollectionInternalRest = ProductCollectionInternalRest;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FilterInput } from '@cbidigital/aqua-ddd';
|
|
2
|
+
import { CreateCollectionInput, UpdateCollectionInput } from '../../../domain';
|
|
3
|
+
import { ICreateCollectionUseCase, IDeleteCollectionUseCase, IGetDetailCollectionUseCase, IGetListCollectionUseCase, IGetProductsByCollectionUseCase, IUpdateCollectionUseCase } from '../../../app';
|
|
4
|
+
export declare class CollectionStorefrontRest {
|
|
5
|
+
getListCollection(useCase: IGetListCollectionUseCase, offset?: string, limit?: string, sort?: string, filter?: FilterInput): Promise<{
|
|
6
|
+
totalCount: number;
|
|
7
|
+
items: Partial<import("../../../domain").CollectionDto>[];
|
|
8
|
+
}>;
|
|
9
|
+
getListCollectionByAbs(useCase: IGetListCollectionUseCase, ambassadorId: string, offset?: string, limit?: string, sort?: string, filter?: FilterInput): Promise<{
|
|
10
|
+
totalCount: number;
|
|
11
|
+
items: Partial<import("../../../domain").CollectionDto>[];
|
|
12
|
+
}>;
|
|
13
|
+
getProductsByCollection(useCase: IGetProductsByCollectionUseCase, ambassadorId: string, offset?: string, limit?: string, sort?: string, filter?: FilterInput): Promise<{
|
|
14
|
+
totalCount: number;
|
|
15
|
+
items: Partial<import("../../../shared").ShopifyProduct>[];
|
|
16
|
+
}>;
|
|
17
|
+
getById(useCase: IGetDetailCollectionUseCase, id: string, sort?: string, offset?: string, limit?: string): Promise<{
|
|
18
|
+
collection: Partial<import("../../../domain").CollectionDto>;
|
|
19
|
+
totalCount: number;
|
|
20
|
+
posts: import("../../../shared").UGCPost[];
|
|
21
|
+
products: import("../../../shared").ShopifyProduct[];
|
|
22
|
+
}>;
|
|
23
|
+
createCollection(useCase: ICreateCollectionUseCase, body: CreateCollectionInput, ambassadorId: string): Promise<import("../../../app").CreateCollectionUseCaseOutput>;
|
|
24
|
+
updateCollection(useCase: IUpdateCollectionUseCase, id: string, ambassadorId: string, body: UpdateCollectionInput): Promise<import("../../../app").UpdateCollectionUseCaseOutput>;
|
|
25
|
+
deleteCollection(useCase: IDeleteCollectionUseCase, ambassadorId: string, id: string): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CollectionStorefrontRest = void 0;
|
|
16
|
+
const aqua_ddd_1 = require("@cbidigital/aqua-ddd");
|
|
17
|
+
const common_1 = require("@heronjs/common");
|
|
18
|
+
const http_status_codes_1 = require("http-status-codes");
|
|
19
|
+
const shared_1 = require("../../../shared");
|
|
20
|
+
let CollectionStorefrontRest = class CollectionStorefrontRest {
|
|
21
|
+
async getListCollection(useCase, offset, limit, sort, filter) {
|
|
22
|
+
const input = aqua_ddd_1.PaginationUtil.transform({
|
|
23
|
+
offset,
|
|
24
|
+
limit,
|
|
25
|
+
sort,
|
|
26
|
+
filter,
|
|
27
|
+
}, shared_1.PAGINATION_CONFIG);
|
|
28
|
+
return useCase.exec(input);
|
|
29
|
+
}
|
|
30
|
+
async getListCollectionByAbs(useCase, ambassadorId, offset, limit, sort, filter) {
|
|
31
|
+
const input = aqua_ddd_1.PaginationUtil.transform({
|
|
32
|
+
offset,
|
|
33
|
+
limit,
|
|
34
|
+
sort,
|
|
35
|
+
filter,
|
|
36
|
+
}, shared_1.PAGINATION_CONFIG);
|
|
37
|
+
return useCase.exec({ ...input, ambassadorId });
|
|
38
|
+
}
|
|
39
|
+
async getProductsByCollection(useCase, ambassadorId, offset, limit, sort, filter) {
|
|
40
|
+
const input = aqua_ddd_1.PaginationUtil.transform({
|
|
41
|
+
offset,
|
|
42
|
+
limit,
|
|
43
|
+
sort,
|
|
44
|
+
filter,
|
|
45
|
+
}, shared_1.PAGINATION_CONFIG);
|
|
46
|
+
return useCase.exec({
|
|
47
|
+
...input,
|
|
48
|
+
ambassadorId,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async getById(useCase, id, sort, offset, limit) {
|
|
52
|
+
const input = aqua_ddd_1.PaginationUtil.transform({
|
|
53
|
+
offset,
|
|
54
|
+
limit,
|
|
55
|
+
sort,
|
|
56
|
+
}, shared_1.PAGINATION_CONFIG);
|
|
57
|
+
return useCase.exec({ ...input, id });
|
|
58
|
+
}
|
|
59
|
+
async createCollection(useCase, body, ambassadorId) {
|
|
60
|
+
return useCase.exec({ ...body, ambassadorId });
|
|
61
|
+
}
|
|
62
|
+
async updateCollection(useCase, id, ambassadorId, body) {
|
|
63
|
+
return useCase.exec({
|
|
64
|
+
...body,
|
|
65
|
+
id,
|
|
66
|
+
ambassadorId: ambassadorId,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async deleteCollection(useCase, ambassadorId, id) {
|
|
70
|
+
return useCase.exec({ id, ambassadorId });
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, common_1.Get)({ uri: '/buyer', code: http_status_codes_1.StatusCodes.OK }),
|
|
75
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_GET_LIST)),
|
|
76
|
+
__param(1, (0, common_1.Query)('offset')),
|
|
77
|
+
__param(2, (0, common_1.Query)('limit')),
|
|
78
|
+
__param(3, (0, common_1.Query)('sort')),
|
|
79
|
+
__param(4, (0, common_1.Query)('filter')),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [Object, String, String, String, Object]),
|
|
82
|
+
__metadata("design:returntype", Promise)
|
|
83
|
+
], CollectionStorefrontRest.prototype, "getListCollection", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, common_1.Get)({ uri: '/abs', code: http_status_codes_1.StatusCodes.OK }),
|
|
86
|
+
(0, common_1.Guard)({ private: true }),
|
|
87
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_GET_LIST)),
|
|
88
|
+
__param(1, (0, common_1.Principal)('ambassadorId')),
|
|
89
|
+
__param(2, (0, common_1.Query)('offset')),
|
|
90
|
+
__param(3, (0, common_1.Query)('limit')),
|
|
91
|
+
__param(4, (0, common_1.Query)('sort')),
|
|
92
|
+
__param(5, (0, common_1.Query)('filter')),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Object, String, String, String, String, Object]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], CollectionStorefrontRest.prototype, "getListCollectionByAbs", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, common_1.Get)({ uri: '/get-products', code: http_status_codes_1.StatusCodes.OK }),
|
|
99
|
+
(0, common_1.Guard)({ private: true }),
|
|
100
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.GET_PRODUCTS_BY_COLLECTIONS)),
|
|
101
|
+
__param(1, (0, common_1.Principal)('ambassadorId')),
|
|
102
|
+
__param(2, (0, common_1.Query)('offset')),
|
|
103
|
+
__param(3, (0, common_1.Query)('limit')),
|
|
104
|
+
__param(4, (0, common_1.Query)('sort')),
|
|
105
|
+
__param(5, (0, common_1.Query)('filter')),
|
|
106
|
+
__metadata("design:type", Function),
|
|
107
|
+
__metadata("design:paramtypes", [Object, String, String, String, String, Object]),
|
|
108
|
+
__metadata("design:returntype", Promise)
|
|
109
|
+
], CollectionStorefrontRest.prototype, "getProductsByCollection", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, common_1.Get)({ uri: '/:id', code: http_status_codes_1.StatusCodes.OK }),
|
|
112
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_GET_DETAIL)),
|
|
113
|
+
__param(1, (0, common_1.Param)('id')),
|
|
114
|
+
__param(2, (0, common_1.Query)('sort')),
|
|
115
|
+
__param(3, (0, common_1.Query)('offset')),
|
|
116
|
+
__param(4, (0, common_1.Query)('limit')),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", [Object, String, String, String, String]),
|
|
119
|
+
__metadata("design:returntype", Promise)
|
|
120
|
+
], CollectionStorefrontRest.prototype, "getById", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, common_1.Post)({ uri: '/', code: http_status_codes_1.StatusCodes.CREATED }),
|
|
123
|
+
(0, common_1.Guard)({ private: true }),
|
|
124
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_CREATE)),
|
|
125
|
+
__param(1, (0, common_1.Body)()),
|
|
126
|
+
__param(2, (0, common_1.Principal)('ambassadorId')),
|
|
127
|
+
__metadata("design:type", Function),
|
|
128
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
129
|
+
__metadata("design:returntype", Promise)
|
|
130
|
+
], CollectionStorefrontRest.prototype, "createCollection", null);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, common_1.Patch)({ uri: '/:id', code: http_status_codes_1.StatusCodes.NO_CONTENT }),
|
|
133
|
+
(0, common_1.Guard)({ private: true }),
|
|
134
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_UPDATE)),
|
|
135
|
+
__param(1, (0, common_1.Param)('id')),
|
|
136
|
+
__param(2, (0, common_1.Principal)('ambassadorId')),
|
|
137
|
+
__param(3, (0, common_1.Body)()),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [Object, String, String, Object]),
|
|
140
|
+
__metadata("design:returntype", Promise)
|
|
141
|
+
], CollectionStorefrontRest.prototype, "updateCollection", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, common_1.Delete)({ uri: '/:id', code: http_status_codes_1.StatusCodes.NO_CONTENT }),
|
|
144
|
+
(0, common_1.Guard)({ private: true }),
|
|
145
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.COLLECTION_DELETE)),
|
|
146
|
+
__param(1, (0, common_1.Principal)('ambassadorId')),
|
|
147
|
+
__param(2, (0, common_1.Param)('id')),
|
|
148
|
+
__metadata("design:type", Function),
|
|
149
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
150
|
+
__metadata("design:returntype", Promise)
|
|
151
|
+
], CollectionStorefrontRest.prototype, "deleteCollection", null);
|
|
152
|
+
CollectionStorefrontRest = __decorate([
|
|
153
|
+
(0, common_1.Rest)('/storefront/collections')
|
|
154
|
+
], CollectionStorefrontRest);
|
|
155
|
+
exports.CollectionStorefrontRest = CollectionStorefrontRest;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./collection.storefront.rest"), exports);
|
|
18
|
+
__exportStar(require("./post-collection.storefront"), exports);
|
|
19
|
+
__exportStar(require("./product-collection.storefront.rest"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IUpsertPostCollectionUseCase } from '../../../app';
|
|
2
|
+
import { UpdatePostCollectionInput } from '../../../domain';
|
|
3
|
+
export declare class PostCollectionStorefrontRest {
|
|
4
|
+
createProductCollection(useCase: IUpsertPostCollectionUseCase, body: UpdatePostCollectionInput, ambassadorId: string): Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PostCollectionStorefrontRest = void 0;
|
|
16
|
+
const common_1 = require("@heronjs/common");
|
|
17
|
+
const http_status_codes_1 = require("http-status-codes");
|
|
18
|
+
const shared_1 = require("../../../shared");
|
|
19
|
+
let PostCollectionStorefrontRest = class PostCollectionStorefrontRest {
|
|
20
|
+
async createProductCollection(useCase, body, ambassadorId) {
|
|
21
|
+
return useCase.exec({ ...body, ambassadorId });
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, common_1.Post)({ uri: '/upsert-post', code: http_status_codes_1.StatusCodes.CREATED }),
|
|
26
|
+
(0, common_1.Guard)({ private: true }),
|
|
27
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.POST_COLLECTION_UPSERT)),
|
|
28
|
+
__param(1, (0, common_1.Body)()),
|
|
29
|
+
__param(2, (0, common_1.Principal)('ambassadorId')),
|
|
30
|
+
__metadata("design:type", Function),
|
|
31
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
32
|
+
__metadata("design:returntype", Promise)
|
|
33
|
+
], PostCollectionStorefrontRest.prototype, "createProductCollection", null);
|
|
34
|
+
PostCollectionStorefrontRest = __decorate([
|
|
35
|
+
(0, common_1.Rest)('/storefront/collections')
|
|
36
|
+
], PostCollectionStorefrontRest);
|
|
37
|
+
exports.PostCollectionStorefrontRest = PostCollectionStorefrontRest;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CreateProductCollectionUseCaseInput, DeleteProductCollectionUseCaseInput, ICreateProductCollectionUseCase, IDeleteProductCollectionUseCase } from '../../../app';
|
|
2
|
+
export declare class ProductCollectionStorefrontRest {
|
|
3
|
+
createProductCollection(useCase: ICreateProductCollectionUseCase, body: CreateProductCollectionUseCaseInput, ambassadorId: string): Promise<import("../../../app").CreateProductCollectionUseCaseOutput>;
|
|
4
|
+
deleteProducts(useCase: IDeleteProductCollectionUseCase, body: DeleteProductCollectionUseCaseInput, ambassadorId: string): Promise<void>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductCollectionStorefrontRest = void 0;
|
|
16
|
+
const common_1 = require("@heronjs/common");
|
|
17
|
+
const http_status_codes_1 = require("http-status-codes");
|
|
18
|
+
const shared_1 = require("../../../shared");
|
|
19
|
+
let ProductCollectionStorefrontRest = class ProductCollectionStorefrontRest {
|
|
20
|
+
async createProductCollection(useCase, body, ambassadorId) {
|
|
21
|
+
return useCase.exec({ ...body, ambassadorId });
|
|
22
|
+
}
|
|
23
|
+
async deleteProducts(useCase, body, ambassadorId) {
|
|
24
|
+
return useCase.exec({ ...body, ambassadorId });
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, common_1.Post)({ uri: '/add-products', code: http_status_codes_1.StatusCodes.CREATED }),
|
|
29
|
+
(0, common_1.Guard)({ private: true }),
|
|
30
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.PRODUCT_COLLECTION_CREATE)),
|
|
31
|
+
__param(1, (0, common_1.Body)()),
|
|
32
|
+
__param(2, (0, common_1.Principal)('ambassadorId')),
|
|
33
|
+
__metadata("design:type", Function),
|
|
34
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
35
|
+
__metadata("design:returntype", Promise)
|
|
36
|
+
], ProductCollectionStorefrontRest.prototype, "createProductCollection", null);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, common_1.Post)({ uri: '/delete-products', code: http_status_codes_1.StatusCodes.NO_CONTENT }),
|
|
39
|
+
(0, common_1.Guard)({ private: true }),
|
|
40
|
+
__param(0, (0, common_1.Fuse)(shared_1.COLLECTION_INJECT_TOKENS.USECASE.PRODUCT_COLLECTION_DELETE)),
|
|
41
|
+
__param(1, (0, common_1.Body)()),
|
|
42
|
+
__param(2, (0, common_1.Principal)('ambassadorId')),
|
|
43
|
+
__metadata("design:type", Function),
|
|
44
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
45
|
+
__metadata("design:returntype", Promise)
|
|
46
|
+
], ProductCollectionStorefrontRest.prototype, "deleteProducts", null);
|
|
47
|
+
ProductCollectionStorefrontRest = __decorate([
|
|
48
|
+
(0, common_1.Rest)('/storefront/collections')
|
|
49
|
+
], ProductCollectionStorefrontRest);
|
|
50
|
+
exports.ProductCollectionStorefrontRest = ProductCollectionStorefrontRest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './controllers';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./controllers"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagination.config';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./pagination.config"), exports);
|