@yolo-croket-dev/amqp-access 0.0.90-jun.29 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.0.90-jun.29",
3
+ "version": "0.0.90-jun.30",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -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);
@@ -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)(),