@yolo-croket-dev/amqp-access 0.0.90-jun.3 → 0.0.90-jun.30

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.
Files changed (43) hide show
  1. package/coupon-server/amqp.coupon-server.module.js +2 -0
  2. package/coupon-server/dto/index.d.ts +1 -0
  3. package/coupon-server/dto/index.js +1 -0
  4. package/coupon-server/dto/issued-coupon/index.d.ts +1 -0
  5. package/coupon-server/dto/issued-coupon/index.js +17 -0
  6. package/coupon-server/dto/issued-coupon/query/check-can-use-coupon-for-payment.dto.d.ts +6 -0
  7. package/coupon-server/dto/issued-coupon/query/check-can-use-coupon-for-payment.dto.js +33 -0
  8. package/coupon-server/dto/issued-coupon/query/get-selected-issued-coupons-by-ids.dto.d.ts +11 -0
  9. package/coupon-server/dto/issued-coupon/query/get-selected-issued-coupons-by-ids.dto.js +32 -0
  10. package/coupon-server/dto/issued-coupon/query/index.d.ts +2 -0
  11. package/coupon-server/dto/issued-coupon/query/index.js +18 -0
  12. package/coupon-server/services/amqp.issued-coupon.service.d.ts +10 -0
  13. package/coupon-server/services/amqp.issued-coupon.service.js +36 -0
  14. package/coupon-server/services/index.d.ts +1 -0
  15. package/coupon-server/services/index.js +1 -0
  16. package/order-server/dto/bundle-p-info/index.d.ts +1 -0
  17. package/order-server/dto/bundle-p-info/index.js +1 -0
  18. package/order-server/dto/bundle-p-info/query/get-bundle-p-info-for-pay-log.dto.d.ts +12 -0
  19. package/order-server/dto/bundle-p-info/query/get-bundle-p-info-for-pay-log.dto.js +23 -0
  20. package/order-server/dto/bundle-p-info/query/index.d.ts +1 -0
  21. package/order-server/dto/bundle-p-info/query/index.js +17 -0
  22. package/order-server/services/amqp.bundle-p-info.service.d.ts +2 -1
  23. package/order-server/services/amqp.bundle-p-info.service.js +3 -0
  24. package/package.json +2 -2
  25. package/user-service/amqp.user-service.module.js +2 -0
  26. package/user-service/dto/cart/query/get-carts-for-write-pay.dto.d.ts +54 -0
  27. package/user-service/dto/cart/query/get-carts-for-write-pay.dto.js +45 -0
  28. package/user-service/dto/cart/query/index.d.ts +1 -1
  29. package/user-service/dto/cart/query/index.js +4 -15
  30. package/user-service/dto/user/command/index.d.ts +1 -0
  31. package/user-service/dto/user/command/index.js +17 -0
  32. package/user-service/dto/user/command/save-shipping-address.dto.d.ts +6 -0
  33. package/user-service/dto/user/command/save-shipping-address.dto.js +33 -0
  34. package/user-service/dto/user/index.d.ts +1 -0
  35. package/user-service/dto/user/index.js +1 -0
  36. package/user-service/services/amqp.cart.service.d.ts +9 -0
  37. package/user-service/services/amqp.cart.service.js +33 -0
  38. package/user-service/services/amqp.user-entity.service.d.ts +2 -0
  39. package/user-service/services/amqp.user-entity.service.js +3 -0
  40. package/user-service/services/index.d.ts +1 -0
  41. package/user-service/services/index.js +1 -0
  42. package/user-service/dto/cart/query/get-carts-by-ids.dto.d.ts +0 -12
  43. package/user-service/dto/cart/query/get-carts-by-ids.dto.js +0 -2
@@ -18,11 +18,13 @@ AmqpCouponServerModule = __decorate([
18
18
  amqp_coupon_server_provider_1.CouponServerProvider,
19
19
  services_1.AmqpCouponTemplateService,
20
20
  services_1.AmqpBundleCouponService,
21
+ services_1.AmqpIssuedCouponService,
21
22
  ],
22
23
  exports: [
23
24
  amqp_coupon_server_provider_1.CouponServerProvider,
24
25
  services_1.AmqpCouponTemplateService,
25
26
  services_1.AmqpBundleCouponService,
27
+ services_1.AmqpIssuedCouponService,
26
28
  ],
27
29
  })
28
30
  ], AmqpCouponServerModule);
@@ -1,2 +1,3 @@
1
1
  export * from './coupon-template';
2
2
  export * from './bundle-coupon';
3
+ export * from './issued-coupon';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./coupon-template"), exports);
18
18
  __exportStar(require("./bundle-coupon"), exports);
19
+ __exportStar(require("./issued-coupon"), exports);
@@ -0,0 +1 @@
1
+ export * from './query';
@@ -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("./query"), exports);
@@ -0,0 +1,6 @@
1
+ export declare class CheckCanUseCouponForPaymentPayload {
2
+ purchasedNums: number;
3
+ storeItemId: string;
4
+ issuedCouponId: string;
5
+ paymentMethod?: string;
6
+ }
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CheckCanUseCouponForPaymentPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CheckCanUseCouponForPaymentPayload {
15
+ }
16
+ __decorate([
17
+ (0, class_validator_1.IsNumber)(),
18
+ __metadata("design:type", Number)
19
+ ], CheckCanUseCouponForPaymentPayload.prototype, "purchasedNums", void 0);
20
+ __decorate([
21
+ (0, class_validator_1.IsMongoId)(),
22
+ __metadata("design:type", String)
23
+ ], CheckCanUseCouponForPaymentPayload.prototype, "storeItemId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsMongoId)(),
26
+ __metadata("design:type", String)
27
+ ], CheckCanUseCouponForPaymentPayload.prototype, "issuedCouponId", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.IsOptional)(),
31
+ __metadata("design:type", String)
32
+ ], CheckCanUseCouponForPaymentPayload.prototype, "paymentMethod", void 0);
33
+ exports.CheckCanUseCouponForPaymentPayload = CheckCanUseCouponForPaymentPayload;
@@ -0,0 +1,11 @@
1
+ import { IssuedCouponEntity } from '@yolo-croket-dev/entity/src/issued-coupon/issued-coupon.entity';
2
+ export declare class GetSelectedIssuedCouponsByIdsPayload {
3
+ issuedCouponIds: string[];
4
+ /** 검색 포함 필드 */
5
+ includeFields: string[];
6
+ /** 검색 제외 필드 */
7
+ excludeFields?: string[];
8
+ }
9
+ export declare class GetSelectedIssuedCouponsByIdsResult {
10
+ issuedCoupons: IssuedCouponEntity[];
11
+ }
@@ -0,0 +1,32 @@
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.GetSelectedIssuedCouponsByIdsResult = exports.GetSelectedIssuedCouponsByIdsPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class GetSelectedIssuedCouponsByIdsPayload {
15
+ }
16
+ __decorate([
17
+ (0, class_validator_1.IsMongoId)({ each: true }),
18
+ __metadata("design:type", Array)
19
+ ], GetSelectedIssuedCouponsByIdsPayload.prototype, "issuedCouponIds", void 0);
20
+ __decorate([
21
+ (0, class_validator_1.IsString)({ each: true }),
22
+ __metadata("design:type", Array)
23
+ ], GetSelectedIssuedCouponsByIdsPayload.prototype, "includeFields", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsOptional)(),
26
+ (0, class_validator_1.IsString)({ each: true }),
27
+ __metadata("design:type", Array)
28
+ ], GetSelectedIssuedCouponsByIdsPayload.prototype, "excludeFields", void 0);
29
+ exports.GetSelectedIssuedCouponsByIdsPayload = GetSelectedIssuedCouponsByIdsPayload;
30
+ class GetSelectedIssuedCouponsByIdsResult {
31
+ }
32
+ exports.GetSelectedIssuedCouponsByIdsResult = GetSelectedIssuedCouponsByIdsResult;
@@ -0,0 +1,2 @@
1
+ export * from './check-can-use-coupon-for-payment.dto';
2
+ export * from './get-selected-issued-coupons-by-ids.dto';
@@ -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("./check-can-use-coupon-for-payment.dto"), exports);
18
+ __exportStar(require("./get-selected-issued-coupons-by-ids.dto"), exports);
@@ -0,0 +1,10 @@
1
+ import { ClientProxy } from '@nestjs/microservices';
2
+ import { AbstractParam } from '@yolo-croket-dev/core';
3
+ import { CheckCanUseCouponForPaymentPayload, GetSelectedIssuedCouponsByIdsPayload, GetSelectedIssuedCouponsByIdsResult } from '../dto/issued-coupon';
4
+ export declare class AmqpIssuedCouponService {
5
+ private readonly client;
6
+ private readonly amqpManager;
7
+ constructor(client: ClientProxy);
8
+ checkCanUseCouponForPayment(payload: CheckCanUseCouponForPaymentPayload, param: AbstractParam): Promise<void>;
9
+ getSelectedIssuedCouponsByIds(payload: GetSelectedIssuedCouponsByIdsPayload, param: AbstractParam): Promise<GetSelectedIssuedCouponsByIdsResult>;
10
+ }
@@ -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.AmqpIssuedCouponService = 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 AmqpIssuedCouponService = class AmqpIssuedCouponService {
20
+ constructor(client) {
21
+ this.client = client;
22
+ this.amqpManager = new functions_1.AmqpManagement(this.client);
23
+ }
24
+ async checkCanUseCouponForPayment(payload, param) {
25
+ return this.amqpManager.call('결제시 해당 쿠폰 사용가능한지 체크', 'coupon-template.get.datas-for-item-max-discount-coupon', payload, param, { isErrorThrowing: true });
26
+ }
27
+ async getSelectedIssuedCouponsByIds(payload, param) {
28
+ return this.amqpManager.call('발급된 쿠폰 중 선택한 데이터만 가져오기', 'issued-coupon.get.selected-issued-coupons-by-ids', payload, param, { isErrorThrowing: true });
29
+ }
30
+ };
31
+ AmqpIssuedCouponService = __decorate([
32
+ (0, common_1.Injectable)(),
33
+ __param(0, (0, common_1.Inject)('COUPON_SERVER_PROVIDER')),
34
+ __metadata("design:paramtypes", [microservices_1.ClientProxy])
35
+ ], AmqpIssuedCouponService);
36
+ exports.AmqpIssuedCouponService = AmqpIssuedCouponService;
@@ -1,2 +1,3 @@
1
1
  export * from './amqp.coupon-template.service';
2
2
  export * from './amqp.bundle-coupon.service';
3
+ export * from './amqp.issued-coupon.service';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./amqp.coupon-template.service"), exports);
18
18
  __exportStar(require("./amqp.bundle-coupon.service"), exports);
19
+ __exportStar(require("./amqp.issued-coupon.service"), exports);
@@ -1 +1,2 @@
1
1
  export * from './command';
2
+ export * from './query';
@@ -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("./command"), exports);
18
+ __exportStar(require("./query"), exports);
@@ -0,0 +1,12 @@
1
+ import { BundlePurchasedInfoEntity } from '@yolo-croket-dev/entity-v2/bundle-purchased-info';
2
+ import { PurchasedInfoEntity } from '@yolo-croket-dev/entity/src/purchased-info/purchased-info.entity';
3
+ export declare class GetBundlePInfoForPayLogPayload {
4
+ pInfoId: string;
5
+ }
6
+ export declare class GetBundlePInfoForPayLogResult {
7
+ bundlePInfo: SearchedBundlePInfo;
8
+ }
9
+ export declare type SearchedBundlePInfo = Pick<BundlePurchasedInfoEntity, '_id' | 'PInfoList'> & {
10
+ _purchasedInfos: SearchedPurchasedInfo[];
11
+ };
12
+ export declare type SearchedPurchasedInfo = Pick<PurchasedInfoEntity, '_id' | 'buyerId' | 'storeId' | 'pastStoreItemInfo' | 'deliveryMethod'>;
@@ -0,0 +1,23 @@
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.GetBundlePInfoForPayLogResult = exports.GetBundlePInfoForPayLogPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class GetBundlePInfoForPayLogPayload {
15
+ }
16
+ __decorate([
17
+ (0, class_validator_1.IsMongoId)(),
18
+ __metadata("design:type", String)
19
+ ], GetBundlePInfoForPayLogPayload.prototype, "pInfoId", void 0);
20
+ exports.GetBundlePInfoForPayLogPayload = GetBundlePInfoForPayLogPayload;
21
+ class GetBundlePInfoForPayLogResult {
22
+ }
23
+ exports.GetBundlePInfoForPayLogResult = GetBundlePInfoForPayLogResult;
@@ -0,0 +1 @@
1
+ export * from './get-bundle-p-info-for-pay-log.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-bundle-p-info-for-pay-log.dto"), exports);
@@ -1,10 +1,11 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { AddBundlePInfoPayload, RegBundlePInfoPayload } from '../dto/bundle-p-info';
3
+ import { AddBundlePInfoPayload, RegBundlePInfoPayload, GetBundlePInfoForPayLogPayload, GetBundlePInfoForPayLogResult } from '../dto/bundle-p-info';
4
4
  export declare class AmqpBundlePInfoService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
8
  addBundlePInfo(payload: AddBundlePInfoPayload, param: AbstractParam): Promise<void>;
9
9
  regBundlePInfo(payload: RegBundlePInfoPayload, param: AbstractParam): Promise<void>;
10
+ getBundlePInfoForPayLog(payload: GetBundlePInfoForPayLogPayload, param: AbstractParam): Promise<GetBundlePInfoForPayLogResult>;
10
11
  }
@@ -29,6 +29,9 @@ let AmqpBundlePInfoService = class AmqpBundlePInfoService {
29
29
  // eslint-disable-next-line max-len
30
30
  return this.amqpManager.call('묶음 결제 생성', 'bundle-p-info.create', payload, param, { isErrorThrowing: true });
31
31
  }
32
+ async getBundlePInfoForPayLog(payload, param) {
33
+ return this.amqpManager.call('묶음 결제 검색 for pay log', 'bundle-p-info.get.for-pay-log', payload, param, { isErrorThrowing: true });
34
+ }
32
35
  };
33
36
  AmqpBundlePInfoService = __decorate([
34
37
  (0, common_1.Injectable)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.0.90-jun.3",
3
+ "version": "0.0.90-jun.30",
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/core": "^1.4.52",
23
23
  "@yolo-croket-dev/dto-v2": "^0.0.149",
24
24
  "@yolo-croket-dev/entity": "^0.1.108",
25
- "@yolo-croket-dev/entity-v2": "^0.0.36",
25
+ "@yolo-croket-dev/entity-v2": "^0.0.37",
26
26
  "class-transformer": "^0.5.1",
27
27
  "class-validator": "^0.13.2",
28
28
  "dotenv": "^16.3.1"
@@ -27,6 +27,7 @@ AmqpUserServiceModule = __decorate([
27
27
  services_1.AmqpStoreService,
28
28
  services_1.AmqpAskService,
29
29
  services_1.AmqpInflowSessionByUserService,
30
+ services_1.AmqpCartService,
30
31
  ],
31
32
  exports: [
32
33
  amqp_user_service_provider_1.UserServiceProvider,
@@ -40,6 +41,7 @@ AmqpUserServiceModule = __decorate([
40
41
  services_1.AmqpStoreService,
41
42
  services_1.AmqpAskService,
42
43
  services_1.AmqpInflowSessionByUserService,
44
+ services_1.AmqpCartService,
43
45
  ],
44
46
  })
45
47
  ], AmqpUserServiceModule);
@@ -0,0 +1,54 @@
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 SearchedUserForWritePay = Pick<UserEntity, '_id' | 'username'>;
5
+ declare type SearchedStoreItemForWritePay = Pick<StoreItem, '_id' | 'selectionInfos' | 'itemPrice' | 'insuranceInfo' | 'mainCategory' | 'subCategory' | 'sellerId' | 'isLimitSale' | 'itemName' | 'itemPriceForBuyer' | 'sellingInfo' | 'adultItemInfo' | 'limitSaleInfo' | 'itemImg' | 'purchased' | 'storeId'> & {
6
+ _seller: SearchedUserForWritePay;
7
+ };
8
+ export declare type CartForWritePay = Pick<CartEntity, '_id' | 'itemId' | 'storeId' | 'pOption' | 'pOptionInfo' | 'itemName_past' | 'itemPrice_past' | 'sellingInfo_past' | 'cartType' | 'ownerId' | 'isChecked' | 'requirement'> & {
9
+ _item: SearchedStoreItemForWritePay;
10
+ };
11
+ export declare const SearchedUserForWritePaySelect: {
12
+ _id: number;
13
+ username: number;
14
+ };
15
+ export declare const SearchedStoreItemForWritePaySelect: {
16
+ _id: number;
17
+ selectionInfos: number;
18
+ itemPrice: number;
19
+ insuranceInfo: number;
20
+ mainCategory: number;
21
+ subCategory: number;
22
+ sellerId: number;
23
+ isLimitSale: number;
24
+ itemName: number;
25
+ itemPriceForBuyer: number;
26
+ sellingInfo: number;
27
+ adultItemInfo: number;
28
+ limitSaleInfo: number;
29
+ itemImg: number;
30
+ purchased: number;
31
+ storeId: number;
32
+ };
33
+ export declare const CartForWritePaySelect: {
34
+ _id: number;
35
+ itemId: number;
36
+ storeId: number;
37
+ pOption: number;
38
+ pOptionInfo: number;
39
+ itemName_past: number;
40
+ itemPrice_past: number;
41
+ sellingInfo_past: number;
42
+ cartType: number;
43
+ ownerId: number;
44
+ isChecked: number;
45
+ requirement: number;
46
+ };
47
+ export declare class GetCartsForWritePayPayload {
48
+ /** 장바구니 아이디 리스트 */
49
+ cartIds: string[];
50
+ }
51
+ export declare class GetCartsForWritePayResult {
52
+ carts: CartForWritePay[];
53
+ }
54
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetCartsForWritePayResult = exports.GetCartsForWritePayPayload = exports.CartForWritePaySelect = exports.SearchedStoreItemForWritePaySelect = exports.SearchedUserForWritePaySelect = void 0;
4
+ exports.SearchedUserForWritePaySelect = {
5
+ _id: 1,
6
+ username: 1,
7
+ };
8
+ exports.SearchedStoreItemForWritePaySelect = {
9
+ _id: 1,
10
+ selectionInfos: 1,
11
+ itemPrice: 1,
12
+ insuranceInfo: 1,
13
+ mainCategory: 1,
14
+ subCategory: 1,
15
+ sellerId: 1,
16
+ isLimitSale: 1,
17
+ itemName: 1,
18
+ itemPriceForBuyer: 1,
19
+ sellingInfo: 1,
20
+ adultItemInfo: 1,
21
+ limitSaleInfo: 1,
22
+ itemImg: 1,
23
+ purchased: 1,
24
+ storeId: 1,
25
+ };
26
+ exports.CartForWritePaySelect = {
27
+ _id: 1,
28
+ itemId: 1,
29
+ storeId: 1,
30
+ pOption: 1,
31
+ pOptionInfo: 1,
32
+ itemName_past: 1,
33
+ itemPrice_past: 1,
34
+ sellingInfo_past: 1,
35
+ cartType: 1,
36
+ ownerId: 1,
37
+ isChecked: 1,
38
+ requirement: 1,
39
+ };
40
+ class GetCartsForWritePayPayload {
41
+ }
42
+ exports.GetCartsForWritePayPayload = GetCartsForWritePayPayload;
43
+ class GetCartsForWritePayResult {
44
+ }
45
+ exports.GetCartsForWritePayResult = GetCartsForWritePayResult;
@@ -1 +1 @@
1
- export * from './get-carts-by-ids.dto';
1
+ export { GetCartsForWritePayPayload, GetCartsForWritePayResult, } from './get-carts-for-write-pay.dto';
@@ -1,17 +1,6 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-carts-by-ids.dto"), exports);
3
+ exports.GetCartsForWritePayResult = exports.GetCartsForWritePayPayload = void 0;
4
+ var get_carts_for_write_pay_dto_1 = require("./get-carts-for-write-pay.dto");
5
+ Object.defineProperty(exports, "GetCartsForWritePayPayload", { enumerable: true, get: function () { return get_carts_for_write_pay_dto_1.GetCartsForWritePayPayload; } });
6
+ Object.defineProperty(exports, "GetCartsForWritePayResult", { enumerable: true, get: function () { return get_carts_for_write_pay_dto_1.GetCartsForWritePayResult; } });
@@ -0,0 +1 @@
1
+ export * from './save-shipping-address.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("./save-shipping-address.dto"), exports);
@@ -0,0 +1,6 @@
1
+ export declare class SaveShippingAddressPayload {
2
+ userId: string;
3
+ postCode: string;
4
+ address1: string;
5
+ address2?: string;
6
+ }
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SaveShippingAddressPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class SaveShippingAddressPayload {
15
+ }
16
+ __decorate([
17
+ (0, class_validator_1.IsMongoId)(),
18
+ __metadata("design:type", String)
19
+ ], SaveShippingAddressPayload.prototype, "userId", void 0);
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ __metadata("design:type", String)
23
+ ], SaveShippingAddressPayload.prototype, "postCode", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], SaveShippingAddressPayload.prototype, "address1", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.IsOptional)(),
31
+ __metadata("design:type", String)
32
+ ], SaveShippingAddressPayload.prototype, "address2", void 0);
33
+ exports.SaveShippingAddressPayload = SaveShippingAddressPayload;
@@ -1 +1,2 @@
1
1
  export * from './query';
2
+ export * from './command';
@@ -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("./query"), exports);
18
+ __exportStar(require("./command"), exports);
@@ -0,0 +1,9 @@
1
+ import { ClientProxy } from '@nestjs/microservices';
2
+ import { AbstractParam } from '@yolo-croket-dev/core';
3
+ import { GetCartsForWritePayPayload, GetCartsForWritePayResult } 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<GetCartsForWritePayResult>;
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;
@@ -2,10 +2,12 @@ import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
3
  /** @dto -v2 */
4
4
  import { DecodePhoneNumbersPayload, PhoneDecodedData } from '@yolo-croket-dev/dto-v2/user-service';
5
+ import { SaveShippingAddressPayload } from '../dto/user/command/save-shipping-address.dto';
5
6
  /** 기존 userService 와 이름이 겹쳐 userEntityService로 임시 사용 */
6
7
  export declare class AmqpUserEntityService {
7
8
  private readonly client;
8
9
  private readonly amqpManager;
9
10
  constructor(client: ClientProxy);
10
11
  decodePhoneNumbers(payload: DecodePhoneNumbersPayload, param: AbstractParam): Promise<PhoneDecodedData[]>;
12
+ saveShippingAddress(payload: SaveShippingAddressPayload, param: AbstractParam): Promise<void>;
11
13
  }
@@ -25,6 +25,9 @@ let AmqpUserEntityService = class AmqpUserEntityService {
25
25
  async decodePhoneNumbers(payload, param) {
26
26
  return this.amqpManager.call('휴대폰 번호들 decode', 'user.decode.phone-numbers', payload, param, { isErrorThrowing: true });
27
27
  }
28
+ async saveShippingAddress(payload, param) {
29
+ return this.amqpManager.call('유저 - 배송 주소 정보 저장', 'user.save.shipping-address', payload, param, { isErrorThrowing: true });
30
+ }
28
31
  };
29
32
  AmqpUserEntityService = __decorate([
30
33
  (0, common_1.Injectable)(),
@@ -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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });