@yolo-croket-dev/amqp-access 0.2.25 → 0.2.26-sj-2

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 './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 @@
1
+ export * from './search-purchase-receipts.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("./search-purchase-receipts.dto"), exports);
@@ -0,0 +1,16 @@
1
+ import { PurchasedProcessV2Enum } from '@yolo-croket-dev/entity-v2/purchased-info/purchased-info.entity';
2
+ import { PurchaseReceiptDomain, CustomPurchaseReceiptPurchasedInfo } from '@yolo-croket-dev/domain';
3
+ export declare class SearchPurchaseReceiptsPayload {
4
+ sDate?: Date;
5
+ eDate?: Date;
6
+ processList?: PurchasedProcessV2Enum[];
7
+ limit: number;
8
+ searchToken?: string;
9
+ }
10
+ export declare class SearchPurchaseReceiptsResult implements Pick<PurchaseReceiptDomain, '_id' | 'paymentNumber' | 'paymentMethod' | 'purchasedInfos' | 'paymentDate'> {
11
+ _id: string;
12
+ paymentNumber: string;
13
+ paymentMethod: string;
14
+ purchasedInfos: CustomPurchaseReceiptPurchasedInfo[];
15
+ paymentDate: Date;
16
+ }
@@ -0,0 +1,47 @@
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.SearchPurchaseReceiptsResult = exports.SearchPurchaseReceiptsPayload = 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
+ class SearchPurchaseReceiptsPayload {
16
+ }
17
+ exports.SearchPurchaseReceiptsPayload = SearchPurchaseReceiptsPayload;
18
+ __decorate([
19
+ (0, class_validator_1.IsDateString)(),
20
+ (0, class_validator_1.IsOptional)(),
21
+ __metadata("design:type", Date)
22
+ ], SearchPurchaseReceiptsPayload.prototype, "sDate", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsDateString)(),
25
+ (0, class_validator_1.IsOptional)(),
26
+ __metadata("design:type", Date)
27
+ ], SearchPurchaseReceiptsPayload.prototype, "eDate", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsEnum)(purchased_info_entity_1.PurchasedProcessV2Enum, { each: true }),
30
+ (0, class_validator_1.IsArray)(),
31
+ (0, class_validator_1.IsOptional)(),
32
+ __metadata("design:type", Array)
33
+ ], SearchPurchaseReceiptsPayload.prototype, "processList", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsNumber)(),
36
+ (0, class_validator_1.IsNotEmpty)(),
37
+ __metadata("design:type", Number)
38
+ ], SearchPurchaseReceiptsPayload.prototype, "limit", void 0);
39
+ __decorate([
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_validator_1.IsOptional)(),
42
+ __metadata("design:type", String)
43
+ ], SearchPurchaseReceiptsPayload.prototype, "searchToken", void 0);
44
+ // eslint-disable-next-line max-len
45
+ class SearchPurchaseReceiptsResult {
46
+ }
47
+ exports.SearchPurchaseReceiptsResult = SearchPurchaseReceiptsResult;
@@ -1,6 +1,6 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { CreatePurchaseReceiptPayload, UpdatePurchaseReceiptPayload } from '../dto/purchase-receipt';
3
+ import { CreatePurchaseReceiptPayload, SearchPurchaseReceiptsPayload, SearchPurchaseReceiptsResult, UpdatePurchaseReceiptPayload } from '../dto/purchase-receipt';
4
4
  export declare class AmqpPurchaseReceiptService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
@@ -8,4 +8,5 @@ export declare class AmqpPurchaseReceiptService {
8
8
  createPurchaseReceipt(payload: CreatePurchaseReceiptPayload, param: AbstractParam): Promise<void>;
9
9
  updatePurchaseReceipt(payload: UpdatePurchaseReceiptPayload, param: AbstractParam): Promise<void>;
10
10
  migrationPurchaseReceipt(param: AbstractParam): Promise<void>;
11
+ searchPurchaseReceipts(payload: SearchPurchaseReceiptsPayload, param: AbstractParam): Promise<SearchPurchaseReceiptsResult>;
11
12
  }
@@ -30,6 +30,9 @@ let AmqpPurchaseReceiptService = class AmqpPurchaseReceiptService {
30
30
  async migrationPurchaseReceipt(param) {
31
31
  return this.amqpManager.call('주문서 데이터 마이그레이션', 'purchase-receipt.migration', {}, param, { isErrorThrowing: true });
32
32
  }
33
+ async searchPurchaseReceipts(payload, param) {
34
+ return this.amqpManager.call('구매자 주문서 리스트 조회', 'purchase-receipt.get.list', payload, param, { isErrorThrowing: true });
35
+ }
33
36
  };
34
37
  exports.AmqpPurchaseReceiptService = AmqpPurchaseReceiptService;
35
38
  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.25",
3
+ "version": "0.2.26-sj-2",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -23,6 +23,7 @@
23
23
  "@yolo-croket-dev/dto-v2": "^0.0.162",
24
24
  "@yolo-croket-dev/entity": "^0.1.133",
25
25
  "@yolo-croket-dev/entity-v2": "^0.0.100",
26
+ "@yolo-croket-dev/domain": "^0.0.1-sj-1",
26
27
  "class-transformer": "^0.5.1",
27
28
  "class-validator": "^0.13.2",
28
29
  "dotenv": "^16.3.1"