@yolo-croket-dev/amqp-access 0.7.138 → 0.7.139-hj-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.
- package/manage-service/dto/exchange-rate/query/get-exchange-rate-by-country-code.dto.d.ts +10 -0
- package/manage-service/dto/exchange-rate/query/get-exchange-rate-by-country-code.dto.js +20 -0
- package/manage-service/dto/exchange-rate/query/index.d.ts +1 -0
- package/manage-service/dto/exchange-rate/query/index.js +1 -0
- package/manage-service/services/amqp-exchange-rate.service.d.ts +2 -1
- package/manage-service/services/amqp-exchange-rate.service.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class GetExchangeRateByCountryCodePayload {
|
|
2
|
+
countryCode: string;
|
|
3
|
+
}
|
|
4
|
+
/** @description isArray */
|
|
5
|
+
export interface GetExchangeRateByCountryCodeResult {
|
|
6
|
+
isSupported: boolean;
|
|
7
|
+
baseDate?: string;
|
|
8
|
+
exchangeRate?: number;
|
|
9
|
+
currencyCode?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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.GetExchangeRateByCountryCodePayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class GetExchangeRateByCountryCodePayload {
|
|
15
|
+
}
|
|
16
|
+
exports.GetExchangeRateByCountryCodePayload = GetExchangeRateByCountryCodePayload;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], GetExchangeRateByCountryCodePayload.prototype, "countryCode", void 0);
|
|
@@ -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("./get-exchange-rate.dto"), exports);
|
|
18
|
+
__exportStar(require("./get-exchange-rate-by-country-code.dto"), exports);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
-
import { GetExchangeRateResult } from '../dto';
|
|
3
|
+
import { GetExchangeRateByCountryCodePayload, GetExchangeRateByCountryCodeResult, GetExchangeRateResult } from '../dto';
|
|
4
4
|
export declare class AmqpExchangeRateService {
|
|
5
5
|
private readonly client;
|
|
6
6
|
private readonly amqpManager;
|
|
7
7
|
constructor(client: ClientProxy);
|
|
8
8
|
getExchangeRate(param: AbstractParam): Promise<GetExchangeRateResult[]>;
|
|
9
|
+
getExchangeRateByCountryCode(payload: GetExchangeRateByCountryCodePayload, param: AbstractParam): Promise<GetExchangeRateByCountryCodeResult>;
|
|
9
10
|
}
|
|
@@ -24,6 +24,9 @@ let AmqpExchangeRateService = class AmqpExchangeRateService {
|
|
|
24
24
|
async getExchangeRate(param) {
|
|
25
25
|
return this.amqpManager.call('환율 조회', 'exchange-rate.get.by-currency-code', {}, param, { isErrorThrowing: true });
|
|
26
26
|
}
|
|
27
|
+
async getExchangeRateByCountryCode(payload, param) {
|
|
28
|
+
return this.amqpManager.call('환율 조회 - 국가 코드로', 'exchange-rate.get.by-dates', payload, param, { isErrorThrowing: true });
|
|
29
|
+
}
|
|
27
30
|
};
|
|
28
31
|
exports.AmqpExchangeRateService = AmqpExchangeRateService;
|
|
29
32
|
exports.AmqpExchangeRateService = AmqpExchangeRateService = __decorate([
|