@yolo-croket-dev/amqp-access 0.4.105-sj13 → 0.4.105-sj15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.4.105-sj13",
3
+ "version": "0.4.105-sj15",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -22,7 +22,7 @@
22
22
  "@yolo-croket-dev/domain": "0.1.4",
23
23
  "@yolo-croket-dev/dto-v2": "^0.1.7",
24
24
  "@yolo-croket-dev/entity": "^0.2.10",
25
- "@yolo-croket-dev/entity-v2": "^0.1.48-sj1",
25
+ "@yolo-croket-dev/entity-v2": "^0.1.48-sj3",
26
26
  "class-transformer": "^0.5.1",
27
27
  "class-validator": "^0.13.2",
28
28
  "dotenv": "^16.3.1"
@@ -15,7 +15,7 @@ class GetBrandsByBrandNamesPayload {
15
15
  }
16
16
  exports.GetBrandsByBrandNamesPayload = GetBrandsByBrandNamesPayload;
17
17
  __decorate([
18
+ (0, class_validator_1.IsArray)(),
18
19
  (0, class_validator_1.IsString)({ each: true }),
19
- (0, class_validator_1.IsNotEmpty)(),
20
20
  __metadata("design:type", Array)
21
21
  ], GetBrandsByBrandNamesPayload.prototype, "brandNames", void 0);
@@ -0,0 +1,5 @@
1
+ export declare class CreateBrandCohortPayload {
2
+ cohortName: string;
3
+ brandNames: string[];
4
+ memo?: string;
5
+ }
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateBrandCohortPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateBrandCohortPayload {
15
+ }
16
+ exports.CreateBrandCohortPayload = CreateBrandCohortPayload;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], CreateBrandCohortPayload.prototype, "cohortName", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsArray)(),
24
+ (0, class_validator_1.IsString)({ each: true }),
25
+ __metadata("design:type", Array)
26
+ ], CreateBrandCohortPayload.prototype, "brandNames", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], CreateBrandCohortPayload.prototype, "memo", void 0);
@@ -0,0 +1,3 @@
1
+ export declare class DeleteBrandCohortPayload {
2
+ brandCohortId: string;
3
+ }
@@ -0,0 +1,21 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeleteBrandCohortPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class DeleteBrandCohortPayload {
15
+ }
16
+ exports.DeleteBrandCohortPayload = DeleteBrandCohortPayload;
17
+ __decorate([
18
+ (0, class_validator_1.IsMongoId)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], DeleteBrandCohortPayload.prototype, "brandCohortId", void 0);
@@ -0,0 +1,3 @@
1
+ export * from './update-brand-cohort.dto';
2
+ export * from './delete-brand-cohort.dto';
3
+ export * from './create-brand-cohort.dto';
@@ -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("./update-brand-cohort.dto"), exports);
18
+ __exportStar(require("./delete-brand-cohort.dto"), exports);
19
+ __exportStar(require("./create-brand-cohort.dto"), exports);
@@ -0,0 +1,6 @@
1
+ export declare class UpdateBrandCohortPayload {
2
+ brandCohortId: string;
3
+ cohortName: string;
4
+ brandNames: string[];
5
+ memo?: string;
6
+ }
@@ -0,0 +1,36 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateBrandCohortPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UpdateBrandCohortPayload {
15
+ }
16
+ exports.UpdateBrandCohortPayload = UpdateBrandCohortPayload;
17
+ __decorate([
18
+ (0, class_validator_1.IsMongoId)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], UpdateBrandCohortPayload.prototype, "brandCohortId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], UpdateBrandCohortPayload.prototype, "cohortName", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsArray)(),
29
+ (0, class_validator_1.IsString)({ each: true }),
30
+ __metadata("design:type", Array)
31
+ ], UpdateBrandCohortPayload.prototype, "brandNames", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", String)
36
+ ], UpdateBrandCohortPayload.prototype, "memo", void 0);
@@ -0,0 +1,2 @@
1
+ export * from './command';
2
+ export * from './query';
@@ -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("./command"), exports);
18
+ __exportStar(require("./query"), exports);
@@ -0,0 +1,39 @@
1
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/aggregate" />
2
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/callback" />
3
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/collection" />
4
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/connection" />
5
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/cursor" />
6
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/document" />
7
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/error" />
8
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/expressions" />
9
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/helpers" />
10
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/middlewares" />
11
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/indexes" />
12
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/models" />
13
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/mongooseoptions" />
14
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/pipelinestage" />
15
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/populate" />
16
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/query" />
17
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/schemaoptions" />
18
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/schematypes" />
19
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/session" />
20
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/types" />
21
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/utility" />
22
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/validation" />
23
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/virtuals" />
24
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose" />
25
+ /// <reference types="@yolo-croket-dev/dto/node_modules/mongoose/types/inferschematype" />
26
+ import { BrandCohortForAdminEntity } from '@yolo-croket-dev/entity-v2';
27
+ import { Types } from 'mongoose';
28
+ export declare class GetBrandCohortsForAdminPayload {
29
+ cohortName?: string;
30
+ brandName?: string;
31
+ }
32
+ export interface GetBrandCohortsForAdminResult extends BrandCohortForAdminEntity {
33
+ _id: Types.ObjectId | string;
34
+ cohortName: string;
35
+ brandNames: string[];
36
+ memo?: string;
37
+ regDate: Date;
38
+ lastModifyDate: Date;
39
+ }
@@ -0,0 +1,26 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GetBrandCohortsForAdminPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class GetBrandCohortsForAdminPayload {
15
+ }
16
+ exports.GetBrandCohortsForAdminPayload = GetBrandCohortsForAdminPayload;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsOptional)(),
20
+ __metadata("design:type", String)
21
+ ], GetBrandCohortsForAdminPayload.prototype, "cohortName", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], GetBrandCohortsForAdminPayload.prototype, "brandName", void 0);
@@ -0,0 +1 @@
1
+ export * from './get-brand-cohorts-for-admin.dto';
@@ -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("./get-brand-cohorts-for-admin.dto"), exports);
@@ -0,0 +1,13 @@
1
+ import { ClientProxy } from '@nestjs/microservices';
2
+ import { AbstractParam } from '@yolo-croket-dev/core';
3
+ import { BrandCohortForAdminEntity } from '@yolo-croket-dev/entity-v2';
4
+ import { CreateBrandCohortPayload, DeleteBrandCohortPayload, UpdateBrandCohortPayload, GetBrandCohortsForAdminPayload } from '../dto/brand-cohort';
5
+ export declare class AmqpBrandCohortService {
6
+ private readonly client;
7
+ private readonly amqpManager;
8
+ constructor(client: ClientProxy);
9
+ createBrandCohort(payload: CreateBrandCohortPayload, param: AbstractParam): Promise<void>;
10
+ updateBrandCohort(payload: UpdateBrandCohortPayload, param: AbstractParam): Promise<void>;
11
+ deleteBrandCohort(payload: DeleteBrandCohortPayload, param: AbstractParam): Promise<void>;
12
+ getBrandCohortsForAdmin(payload: GetBrandCohortsForAdminPayload, param: AbstractParam): Promise<BrandCohortForAdminEntity[]>;
13
+ }
@@ -0,0 +1,42 @@
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.AmqpBrandCohortService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const microservices_1 = require("@nestjs/microservices");
18
+ const functions_1 = require("@yolo-croket-dev/core/functions");
19
+ let AmqpBrandCohortService = class AmqpBrandCohortService {
20
+ constructor(client) {
21
+ this.client = client;
22
+ this.amqpManager = new functions_1.AmqpManagement(this.client);
23
+ }
24
+ async createBrandCohort(payload, param) {
25
+ return this.amqpManager.call('브랜드 코호트 생성', 'brand-cohort.create', payload, param, { isErrorThrowing: true });
26
+ }
27
+ async updateBrandCohort(payload, param) {
28
+ return this.amqpManager.call('브랜드 코호트 수정', 'brand-cohort.update', payload, param, { isErrorThrowing: true });
29
+ }
30
+ async deleteBrandCohort(payload, param) {
31
+ return this.amqpManager.call('브랜드 코호트 삭제', 'brand-cohort.delete', payload, param, { isErrorThrowing: true });
32
+ }
33
+ async getBrandCohortsForAdmin(payload, param) {
34
+ return this.amqpManager.call('브랜드 코호트 조회', 'brand-cohort.get-for-admin', payload, param, { isErrorThrowing: true });
35
+ }
36
+ };
37
+ exports.AmqpBrandCohortService = AmqpBrandCohortService;
38
+ exports.AmqpBrandCohortService = AmqpBrandCohortService = __decorate([
39
+ (0, common_1.Injectable)(),
40
+ __param(0, (0, common_1.Inject)('STORE_ITEM_SERVER_PROVIDER')),
41
+ __metadata("design:paramtypes", [microservices_1.ClientProxy])
42
+ ], AmqpBrandCohortService);
@@ -0,0 +1,11 @@
1
+ import { ClientProxy } from '@nestjs/microservices';
2
+ import { AbstractParam } from '@yolo-croket-dev/core';
3
+ import { BanWord } from '@yolo-croket-dev/entity/src/ban-word';
4
+ import { IsExistsBanWordsPayload, SearchBanWordsPayload } from '../dto/ban-word';
5
+ export declare class AmqpBrandService {
6
+ private readonly client;
7
+ private readonly amqpManager;
8
+ constructor(client: ClientProxy);
9
+ isExistsBanWords(payload: IsExistsBanWordsPayload, param: AbstractParam): Promise<boolean>;
10
+ searchBanWords(payload: SearchBanWordsPayload, param: AbstractParam): Promise<BanWord[]>;
11
+ }
@@ -0,0 +1,36 @@
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.AmqpBrandService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const microservices_1 = require("@nestjs/microservices");
18
+ const functions_1 = require("@yolo-croket-dev/core/functions");
19
+ let AmqpBrandService = class AmqpBrandService {
20
+ constructor(client) {
21
+ this.client = client;
22
+ this.amqpManager = new functions_1.AmqpManagement(this.client);
23
+ }
24
+ async isExistsBanWords(payload, param) {
25
+ return this.amqpManager.call('밴 단어 존재 여부 확인', 'ban-word.is-exists', payload, param, { isErrorThrowing: true });
26
+ }
27
+ async searchBanWords(payload, param) {
28
+ return this.amqpManager.call('밴 단어 검색', 'ban-word.search', payload, param, { isErrorThrowing: true });
29
+ }
30
+ };
31
+ exports.AmqpBrandService = AmqpBrandService;
32
+ exports.AmqpBrandService = AmqpBrandService = __decorate([
33
+ (0, common_1.Injectable)(),
34
+ __param(0, (0, common_1.Inject)('STORE_ITEM_SERVER_PROVIDER')),
35
+ __metadata("design:paramtypes", [microservices_1.ClientProxy])
36
+ ], AmqpBrandService);