@yolo-croket-dev/amqp-access 0.5.5 → 0.5.6-sj2

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.5.5",
3
+ "version": "0.5.6-sj2",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -1,11 +1,15 @@
1
1
  import { BrandCohortForAdminEntity } from '@yolo-croket-dev/entity-v2';
2
+ export declare enum BrandCohortSearchTypeEnum {
3
+ COHORT_NAME = "COHORT_NAME",
4
+ RELATED_BRAND = "RELATED_BRAND"
5
+ }
2
6
  export declare class GetBrandCohortsForAdminPayload {
3
- cohortName?: string;
4
- brandName?: string;
7
+ searchKeyword?: string;
8
+ searchType?: BrandCohortSearchTypeEnum;
5
9
  page: number;
6
10
  limit: number;
7
11
  }
8
12
  export interface GetBrandCohortsForAdminResult {
9
13
  brandCohorts: BrandCohortForAdminEntity[];
10
- maxPage: number;
14
+ totalCount: number;
11
15
  }
@@ -9,8 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GetBrandCohortsForAdminPayload = void 0;
12
+ exports.GetBrandCohortsForAdminPayload = exports.BrandCohortSearchTypeEnum = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ var BrandCohortSearchTypeEnum;
15
+ (function (BrandCohortSearchTypeEnum) {
16
+ BrandCohortSearchTypeEnum["COHORT_NAME"] = "COHORT_NAME";
17
+ BrandCohortSearchTypeEnum["RELATED_BRAND"] = "RELATED_BRAND";
18
+ })(BrandCohortSearchTypeEnum || (exports.BrandCohortSearchTypeEnum = BrandCohortSearchTypeEnum = {}));
14
19
  class GetBrandCohortsForAdminPayload {
15
20
  }
16
21
  exports.GetBrandCohortsForAdminPayload = GetBrandCohortsForAdminPayload;
@@ -18,12 +23,12 @@ __decorate([
18
23
  (0, class_validator_1.IsString)(),
19
24
  (0, class_validator_1.IsOptional)(),
20
25
  __metadata("design:type", String)
21
- ], GetBrandCohortsForAdminPayload.prototype, "cohortName", void 0);
26
+ ], GetBrandCohortsForAdminPayload.prototype, "searchKeyword", void 0);
22
27
  __decorate([
23
- (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.IsEnum)(BrandCohortSearchTypeEnum),
24
29
  (0, class_validator_1.IsOptional)(),
25
30
  __metadata("design:type", String)
26
- ], GetBrandCohortsForAdminPayload.prototype, "brandName", void 0);
31
+ ], GetBrandCohortsForAdminPayload.prototype, "searchType", void 0);
27
32
  __decorate([
28
33
  (0, class_validator_1.IsNumber)(),
29
34
  __metadata("design:type", Number)
@@ -0,0 +1,15 @@
1
+ export declare class GetUsersByBrandCohortPayload {
2
+ brandCohortId: string;
3
+ }
4
+ export declare class BrandCohortUser {
5
+ userId: string;
6
+ appPush: boolean;
7
+ brandNewsAppPush: boolean;
8
+ phone: boolean;
9
+ phoneNumber: string;
10
+ brandName: string;
11
+ brandLatestBookmarkDate: Date;
12
+ }
13
+ export interface GetUsersByBrandCohortResult {
14
+ users: BrandCohortUser[];
15
+ }
@@ -0,0 +1,24 @@
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.BrandCohortUser = exports.GetUsersByBrandCohortPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class GetUsersByBrandCohortPayload {
15
+ }
16
+ exports.GetUsersByBrandCohortPayload = GetUsersByBrandCohortPayload;
17
+ __decorate([
18
+ (0, class_validator_1.IsMongoId)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], GetUsersByBrandCohortPayload.prototype, "brandCohortId", void 0);
22
+ class BrandCohortUser {
23
+ }
24
+ exports.BrandCohortUser = BrandCohortUser;
@@ -1 +1,2 @@
1
1
  export * from './get-brand-cohorts-for-admin.dto';
2
+ export * from './get-users-by-brand-cohort.dto';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-brand-cohorts-for-admin.dto"), exports);
18
+ __exportStar(require("./get-users-by-brand-cohort.dto"), exports);
@@ -1,7 +1,7 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
3
  import { BrandCohortForAdminEntity } from '@yolo-croket-dev/entity-v2';
4
- import { CreateBrandCohortPayload, DeleteBrandCohortPayload, UpdateBrandCohortPayload, GetBrandCohortsForAdminPayload } from '../dto/brand-cohort';
4
+ import { CreateBrandCohortPayload, DeleteBrandCohortPayload, UpdateBrandCohortPayload, GetBrandCohortsForAdminPayload, GetUsersByBrandCohortResult, GetUsersByBrandCohortPayload } from '../dto/brand-cohort';
5
5
  export declare class AmqpBrandCohortService {
6
6
  private readonly client;
7
7
  private readonly amqpManager;
@@ -10,4 +10,5 @@ export declare class AmqpBrandCohortService {
10
10
  updateBrandCohort(payload: UpdateBrandCohortPayload, param: AbstractParam): Promise<void>;
11
11
  deleteBrandCohort(payload: DeleteBrandCohortPayload, param: AbstractParam): Promise<void>;
12
12
  getBrandCohortsForAdmin(payload: GetBrandCohortsForAdminPayload, param: AbstractParam): Promise<BrandCohortForAdminEntity[]>;
13
+ getUsersByBrandCohort(payload: GetUsersByBrandCohortPayload, param: AbstractParam): Promise<GetUsersByBrandCohortResult>;
13
14
  }
@@ -31,7 +31,10 @@ let AmqpBrandCohortService = class AmqpBrandCohortService {
31
31
  return this.amqpManager.call('브랜드 코호트 삭제', 'brand-cohort.delete', payload, param, { isErrorThrowing: true });
32
32
  }
33
33
  async getBrandCohortsForAdmin(payload, param) {
34
- return this.amqpManager.call('브랜드 코호트 조회', 'brand-cohort.get-for-admin', payload, param, { isErrorThrowing: true });
34
+ return this.amqpManager.call('브랜드 코호트 조회', 'brand-cohort.get.list-for-admin', payload, param, { isErrorThrowing: true });
35
+ }
36
+ async getUsersByBrandCohort(payload, param) {
37
+ return this.amqpManager.call('브랜드 코호트 유저 조회', 'brand-cohort.get.users-by-brand-cohort', payload, param, { isErrorThrowing: true });
35
38
  }
36
39
  };
37
40
  exports.AmqpBrandCohortService = AmqpBrandCohortService;