@yolo-croket-dev/amqp-access 0.0.90-jun.4 → 0.0.90-jun.6

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.0.90-jun.4",
3
+ "version": "0.0.90-jun.6",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -0,0 +1,22 @@
1
+ import { CartEntity } from '@yolo-croket-dev/entity-v2/cart';
2
+ import { StoreItem } from '@yolo-croket-dev/entity/src/store-item/store-item.entity';
3
+ import { UserEntity } from '@yolo-croket-dev/entity-v2/user/user.entity';
4
+ declare type SearchedUser = Pick<UserEntity, '_id' | 'username'>;
5
+ declare type SearchedStoreItem = Pick<StoreItem, '_id' | 'selectionInfos' | 'itemPrice' | 'insuranceInfo' | 'mainCategory' | 'subCategory' | 'sellerId'> & {
6
+ _seller: SearchedUser;
7
+ };
8
+ declare type CartForWritePay = Pick<CartEntity, 'itemId' | 'storeId' | 'pOption' | 'pOptionInfo' | 'itemName_past' | 'itemPrice_past' | 'sellingInfo_past' | 'cartType'> & {
9
+ _item: SearchedStoreItem;
10
+ };
11
+ export declare class GetCartsForWritePayPayload {
12
+ /** 장바구니 아이디 리스트 */
13
+ cartIds: string[];
14
+ /** 검색 포함 필드 */
15
+ includeFields?: string[];
16
+ /** 검색 제외 필드 */
17
+ excludeFields?: string[];
18
+ }
19
+ export declare class GetCartsByIdsResult {
20
+ carts: CartForWritePay[];
21
+ }
22
+ export {};
@@ -1 +1 @@
1
- export * from './get-carts-by-ids.dto';
1
+ export * from './get-carts-for-write-pay.dto';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-carts-by-ids.dto"), exports);
17
+ __exportStar(require("./get-carts-for-write-pay.dto"), exports);
@@ -0,0 +1,9 @@
1
+ import { ClientProxy } from '@nestjs/microservices';
2
+ import { AbstractParam } from '@yolo-croket-dev/core';
3
+ import { GetCartsForWritePayPayload, GetCartsByIdsResult } from '@yolo-croket-dev/amqp-access/user-service/dto/cart';
4
+ export declare class AmqpCartService {
5
+ private readonly client;
6
+ private readonly amqpManager;
7
+ constructor(client: ClientProxy);
8
+ getCartsByIds(payload: GetCartsForWritePayPayload, param: AbstractParam): Promise<GetCartsByIdsResult>;
9
+ }
@@ -0,0 +1,33 @@
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.AmqpCartService = 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 AmqpCartService = class AmqpCartService {
20
+ constructor(client) {
21
+ this.client = client;
22
+ this.amqpManager = new functions_1.AmqpManagement(this.client);
23
+ }
24
+ async getCartsByIds(payload, param) {
25
+ return this.amqpManager.call('장바구니 아이디로 데이터 조회', 'cart.get.carts-by-ids', payload, param, { isErrorThrowing: true });
26
+ }
27
+ };
28
+ AmqpCartService = __decorate([
29
+ (0, common_1.Injectable)(),
30
+ __param(0, (0, common_1.Inject)('USER_SERVICE_PROVIDER')),
31
+ __metadata("design:paramtypes", [microservices_1.ClientProxy])
32
+ ], AmqpCartService);
33
+ exports.AmqpCartService = AmqpCartService;
@@ -7,3 +7,4 @@ export * from './amqp.user-entity.service';
7
7
  export * from './amqp.store.service';
8
8
  export * from './ask';
9
9
  export * from './amqp.inflow-session.service';
10
+ export * from './amqp.cart.service';
@@ -23,3 +23,4 @@ __exportStar(require("./amqp.user-entity.service"), exports);
23
23
  __exportStar(require("./amqp.store.service"), exports);
24
24
  __exportStar(require("./ask"), exports);
25
25
  __exportStar(require("./amqp.inflow-session.service"), exports);
26
+ __exportStar(require("./amqp.cart.service"), exports);
@@ -1,12 +0,0 @@
1
- import { CartEntity } from '@yolo-croket-dev/entity-v2/cart';
2
- export declare class GetCartsByIdsPayload {
3
- /** 장바구니 아이디 리스트 */
4
- cartIds: string[];
5
- /** 검색 포함 필드 */
6
- includeFields?: string[];
7
- /** 검색 제외 필드 */
8
- excludeFields?: string[];
9
- }
10
- export declare class GetCartsByIdsResult {
11
- carts: CartEntity[];
12
- }