@yolo-croket-dev/amqp-access 0.2.0 → 0.2.1

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.
@@ -1 +1,2 @@
1
1
  export * from './crate-purchase-receipt.dto';
2
+ export * from './update-purchase-receipt.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("./crate-purchase-receipt.dto"), exports);
18
+ __exportStar(require("./update-purchase-receipt.dto"), exports);
@@ -0,0 +1,19 @@
1
+ import { PurchasedProcessV2Enum } from '@yolo-croket-dev/entity-v2/purchased-info/purchased-info.entity';
2
+ declare class PurchaseReceiptReceiveInfo {
3
+ buyerName: string;
4
+ buyerPhoneNumber: string;
5
+ buyerPostCode?: string;
6
+ buyerAddress1?: string;
7
+ buyerAddress2?: string;
8
+ buyerDirectAddress?: string;
9
+ PCCC: string;
10
+ requirement?: string;
11
+ }
12
+ export declare class UpdatePurchaseReceiptPayload {
13
+ purchaseReceiptId: string;
14
+ process?: PurchasedProcessV2Enum;
15
+ paymentDate?: Date;
16
+ receiveInfo?: PurchaseReceiptReceiveInfo;
17
+ PInfoIds?: string[];
18
+ }
19
+ export {};
@@ -0,0 +1,86 @@
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.UpdatePurchaseReceiptPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const purchased_info_entity_1 = require("@yolo-croket-dev/entity-v2/purchased-info/purchased-info.entity");
15
+ const class_transformer_1 = require("class-transformer");
16
+ class PurchaseReceiptReceiveInfo {
17
+ }
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.IsNotEmpty)(),
21
+ __metadata("design:type", String)
22
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerName", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsString)(),
25
+ (0, class_validator_1.IsNotEmpty)(),
26
+ __metadata("design:type", String)
27
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerPhoneNumber", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.IsOptional)(),
31
+ __metadata("design:type", String)
32
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerPostCode", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.IsOptional)(),
36
+ __metadata("design:type", String)
37
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerAddress1", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.IsOptional)(),
41
+ __metadata("design:type", String)
42
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerAddress2", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsString)(),
45
+ (0, class_validator_1.IsOptional)(),
46
+ __metadata("design:type", String)
47
+ ], PurchaseReceiptReceiveInfo.prototype, "buyerDirectAddress", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsString)(),
50
+ (0, class_validator_1.IsNotEmpty)(),
51
+ __metadata("design:type", String)
52
+ ], PurchaseReceiptReceiveInfo.prototype, "PCCC", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", String)
57
+ ], PurchaseReceiptReceiveInfo.prototype, "requirement", void 0);
58
+ class UpdatePurchaseReceiptPayload {
59
+ }
60
+ exports.UpdatePurchaseReceiptPayload = UpdatePurchaseReceiptPayload;
61
+ __decorate([
62
+ (0, class_validator_1.IsMongoId)(),
63
+ (0, class_validator_1.IsNotEmpty)(),
64
+ __metadata("design:type", String)
65
+ ], UpdatePurchaseReceiptPayload.prototype, "purchaseReceiptId", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsEnum)(purchased_info_entity_1.PurchasedProcessV2Enum),
68
+ (0, class_validator_1.IsOptional)(),
69
+ __metadata("design:type", String)
70
+ ], UpdatePurchaseReceiptPayload.prototype, "process", void 0);
71
+ __decorate([
72
+ (0, class_validator_1.IsDateString)(),
73
+ (0, class_validator_1.IsOptional)(),
74
+ __metadata("design:type", Date)
75
+ ], UpdatePurchaseReceiptPayload.prototype, "paymentDate", void 0);
76
+ __decorate([
77
+ (0, class_transformer_1.Type)(() => PurchaseReceiptReceiveInfo),
78
+ (0, class_validator_1.IsOptional)(),
79
+ __metadata("design:type", PurchaseReceiptReceiveInfo)
80
+ ], UpdatePurchaseReceiptPayload.prototype, "receiveInfo", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsArray)(),
83
+ (0, class_validator_1.IsMongoId)({ each: true }),
84
+ (0, class_validator_1.IsOptional)(),
85
+ __metadata("design:type", Array)
86
+ ], UpdatePurchaseReceiptPayload.prototype, "PInfoIds", void 0);
@@ -1,9 +1,10 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { CreatePurchaseReceiptPayload } from '../dto/purchase-receipt';
3
+ import { CreatePurchaseReceiptPayload, UpdatePurchaseReceiptPayload } from '../dto/purchase-receipt';
4
4
  export declare class AmqpPurchaseReceiptService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
8
  createPurchaseReceipt(payload: CreatePurchaseReceiptPayload, param: AbstractParam): Promise<void>;
9
+ updatePurchaseReceipt(payload: UpdatePurchaseReceiptPayload, param: AbstractParam): Promise<void>;
9
10
  }
@@ -24,6 +24,9 @@ let AmqpPurchaseReceiptService = class AmqpPurchaseReceiptService {
24
24
  async createPurchaseReceipt(payload, param) {
25
25
  return this.amqpManager.call('주문서 생성', 'purchase-receipt.create', payload, param, { isErrorThrowing: true });
26
26
  }
27
+ async updatePurchaseReceipt(payload, param) {
28
+ return this.amqpManager.call('주문서 수정', 'purchase-receipt.update', payload, param, { isErrorThrowing: true });
29
+ }
27
30
  };
28
31
  exports.AmqpPurchaseReceiptService = AmqpPurchaseReceiptService;
29
32
  exports.AmqpPurchaseReceiptService = AmqpPurchaseReceiptService = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",