@yolo-croket-dev/amqp-access 0.7.257-sj3 → 0.7.257
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 +11 -0
- package/manage-service/dto/exchange-rate/query/get-exchange-rate-by-country-code.dto.js +23 -1
- package/manage-service/services/amqp-exchange-rate.service.d.ts +2 -2
- package/order-server/dto/purchased-info.modules/purchased-info-admin/command/transfer-p-info-seller.dto.d.ts +0 -2
- package/order-server/dto/purchased-info.modules/purchased-info-admin/command/transfer-p-info-seller.dto.js +0 -5
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/index.d.ts +0 -1
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/index.js +0 -1
- package/order-server/dto/purchasedinfos/query/atlas/get-facet-p-infos-for-manage-buyer-by-atlas.dto.d.ts +0 -2
- package/order-server/dto/purchasedinfos/query/atlas/get-facet-p-infos-for-manage-buyer-by-atlas.dto.js +0 -4
- package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.d.ts +0 -3
- package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.js +0 -5
- package/order-server/services/purchased-info.modules/amqp.purchased-info-admin.service.d.ts +1 -3
- package/order-server/services/purchased-info.modules/amqp.purchased-info-admin.service.js +0 -4
- package/package.json +4 -4
- package/scripts/verify-exchange-rate-contract.mjs +98 -0
- package/test-fixtures/exchange-rate-contract/bad-currency.json +1 -0
- package/test-fixtures/exchange-rate-contract/bad-date.json +1 -0
- package/test-fixtures/exchange-rate-contract/bad-rate.json +6 -0
- package/test-fixtures/exchange-rate-contract/unsupported-extra-key.json +1 -0
- package/test-fixtures/exchange-rate-contract/unsupported-only.json +1 -0
- package/test-fixtures/exchange-rate-contract/valid-cad.json +1 -0
- package/test-fixtures/exchange-rate-contract/valid-jpy.json +1 -0
- package/test-fixtures/exchange-rate-contract/valid-usd.json +1 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-infos-for-admin.dto.d.ts +0 -42
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-infos-for-admin.dto.js +0 -58
|
@@ -10,3 +10,14 @@ export interface GetExchangeRateByCountryCodeResult {
|
|
|
10
10
|
exchangeRate?: number;
|
|
11
11
|
currencyCode?: string;
|
|
12
12
|
}
|
|
13
|
+
export type ExchangeRateBaseDate = string;
|
|
14
|
+
export type ExchangeRateCurrencyCode = Uppercase<string>;
|
|
15
|
+
export type GetExchangeRateByCountryCodeExactResult = {
|
|
16
|
+
readonly isSupported: true;
|
|
17
|
+
readonly baseDate: ExchangeRateBaseDate;
|
|
18
|
+
readonly exchangeRate: number;
|
|
19
|
+
readonly currencyCode: ExchangeRateCurrencyCode;
|
|
20
|
+
} | {
|
|
21
|
+
readonly isSupported: false;
|
|
22
|
+
};
|
|
23
|
+
export declare function isGetExchangeRateByCountryCodeExactResult(value: unknown): value is GetExchangeRateByCountryCodeExactResult;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GetExchangeRateByCountryCodePayload = void 0;
|
|
12
|
+
exports.isGetExchangeRateByCountryCodeExactResult = exports.GetExchangeRateByCountryCodePayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
class GetExchangeRateByCountryCodePayload {
|
|
15
15
|
}
|
|
@@ -23,3 +23,25 @@ __decorate([
|
|
|
23
23
|
(0, class_validator_1.IsOptional)(),
|
|
24
24
|
__metadata("design:type", Date)
|
|
25
25
|
], GetExchangeRateByCountryCodePayload.prototype, "asOfDate", void 0);
|
|
26
|
+
function isObjectRecord(value) {
|
|
27
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
28
|
+
}
|
|
29
|
+
function isGetExchangeRateByCountryCodeExactResult(value) {
|
|
30
|
+
if (!isObjectRecord(value)) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const keys = Object.keys(value).sort();
|
|
34
|
+
if (value.isSupported === false) {
|
|
35
|
+
return keys.length === 1 && keys[0] === 'isSupported';
|
|
36
|
+
}
|
|
37
|
+
return value.isSupported === true
|
|
38
|
+
&& keys.join(',') === 'baseDate,currencyCode,exchangeRate,isSupported'
|
|
39
|
+
&& typeof value.baseDate === 'string'
|
|
40
|
+
&& /^\d{8}$/.test(value.baseDate)
|
|
41
|
+
&& typeof value.currencyCode === 'string'
|
|
42
|
+
&& /^[A-Z]{3}$/.test(value.currencyCode)
|
|
43
|
+
&& typeof value.exchangeRate === 'number'
|
|
44
|
+
&& Number.isFinite(value.exchangeRate)
|
|
45
|
+
&& value.exchangeRate > 0;
|
|
46
|
+
}
|
|
47
|
+
exports.isGetExchangeRateByCountryCodeExactResult = isGetExchangeRateByCountryCodeExactResult;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
-
import { GetExchangedAmountByCountryCodePayload, GetExchangedAmountByCountryCodeResult, GetExchangeFeeByCountryCodePayload, GetExchangeFeeByCountryCodeResult, GetExchangeRateByCountryCodePayload,
|
|
3
|
+
import { GetExchangedAmountByCountryCodePayload, GetExchangedAmountByCountryCodeResult, GetExchangeFeeByCountryCodePayload, GetExchangeFeeByCountryCodeResult, GetExchangeRateByCountryCodePayload, GetExchangeRateByCountryCodeExactResult, 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<
|
|
9
|
+
getExchangeRateByCountryCode(payload: GetExchangeRateByCountryCodePayload, param: AbstractParam): Promise<GetExchangeRateByCountryCodeExactResult>;
|
|
10
10
|
getExchangeFeeByCountryCode(payload: GetExchangeFeeByCountryCodePayload, param: AbstractParam): Promise<GetExchangeFeeByCountryCodeResult>;
|
|
11
11
|
getExchangedAmountByCountryCode(payload: GetExchangedAmountByCountryCodePayload, param: AbstractParam): Promise<GetExchangedAmountByCountryCodeResult>;
|
|
12
12
|
refreshCurrentBaseDateExchangeRate(param: AbstractParam): Promise<void>;
|
|
@@ -26,8 +26,3 @@ __decorate([
|
|
|
26
26
|
(0, class_validator_1.IsMongoId)(),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], TransferPInfoSellerPayload.prototype, "newSellerId", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_validator_1.IsBoolean)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
__metadata("design:type", Boolean)
|
|
33
|
-
], TransferPInfoSellerPayload.prototype, "isRefundWaitingTransfer", void 0);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './get-purchased-infos-for-admin.dto';
|
|
2
|
-
export * from './get-refund-waiting-purchased-infos-for-admin.dto';
|
|
3
2
|
export * from './get-purchased-info-detail-for-admin-edit.dto';
|
|
4
3
|
export * from './get-purchased-info-logs-for-coupon-info.dto';
|
|
5
4
|
export * from './get-delivery-list-for-admin.dto';
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./get-purchased-infos-for-admin.dto"), exports);
|
|
18
|
-
__exportStar(require("./get-refund-waiting-purchased-infos-for-admin.dto"), exports);
|
|
19
18
|
__exportStar(require("./get-purchased-info-detail-for-admin-edit.dto"), exports);
|
|
20
19
|
__exportStar(require("./get-purchased-info-logs-for-coupon-info.dto"), exports);
|
|
21
20
|
__exportStar(require("./get-delivery-list-for-admin.dto"), exports);
|
|
@@ -14,12 +14,10 @@ export declare class GetFacetPInfosForManageBuyerByAtlasPayload {
|
|
|
14
14
|
paymentSDate?: Date;
|
|
15
15
|
paymentEDate?: Date;
|
|
16
16
|
searchText?: string;
|
|
17
|
-
isTransferred?: boolean;
|
|
18
17
|
}
|
|
19
18
|
export declare class GetFacetPInfosForManageBuyerByAtlasResult {
|
|
20
19
|
allCount: number;
|
|
21
20
|
facets: FacetPInfo[];
|
|
22
21
|
allCount_v2: number;
|
|
23
22
|
facets_v2: FacetPInfoV2[];
|
|
24
|
-
transferPInfoNums?: number;
|
|
25
23
|
}
|
|
@@ -44,10 +44,6 @@ __decorate([
|
|
|
44
44
|
(0, class_validator_1.IsOptional)(),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], GetFacetPInfosForManageBuyerByAtlasPayload.prototype, "searchText", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsOptional)(),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], GetFacetPInfosForManageBuyerByAtlasPayload.prototype, "isTransferred", void 0);
|
|
51
47
|
class GetFacetPInfosForManageBuyerByAtlasResult {
|
|
52
48
|
}
|
|
53
49
|
exports.GetFacetPInfosForManageBuyerByAtlasResult = GetFacetPInfosForManageBuyerByAtlasResult;
|
package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.d.ts
CHANGED
|
@@ -25,8 +25,6 @@ export declare class GetPInfosForManageBuyerByAtlasPayload {
|
|
|
25
25
|
isUsedItem?: boolean;
|
|
26
26
|
/** 개인통관고유부호 등록 예정 모아보기 필터 여부 */
|
|
27
27
|
isPcccDeferred?: boolean;
|
|
28
|
-
/** 이관 완료 거래만 조회한다. */
|
|
29
|
-
isTransferred?: boolean;
|
|
30
28
|
}
|
|
31
29
|
export declare class GetPInfosForManageBuyerByAtlasResult {
|
|
32
30
|
allCount: number;
|
|
@@ -35,5 +33,4 @@ export declare class GetPInfosForManageBuyerByAtlasResult {
|
|
|
35
33
|
splitDeliveryPInfoNums?: number;
|
|
36
34
|
usedPInfoNums?: number;
|
|
37
35
|
pcccDeferredPInfoNums?: number;
|
|
38
|
-
transferPInfoNums?: number;
|
|
39
36
|
}
|
package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.js
CHANGED
|
@@ -87,11 +87,6 @@ __decorate([
|
|
|
87
87
|
(0, class_validator_1.IsOptional)(),
|
|
88
88
|
__metadata("design:type", Boolean)
|
|
89
89
|
], GetPInfosForManageBuyerByAtlasPayload.prototype, "isPcccDeferred", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, class_validator_1.IsBoolean)(),
|
|
92
|
-
(0, class_validator_1.IsOptional)(),
|
|
93
|
-
__metadata("design:type", Boolean)
|
|
94
|
-
], GetPInfosForManageBuyerByAtlasPayload.prototype, "isTransferred", void 0);
|
|
95
90
|
class GetPInfosForManageBuyerByAtlasResult {
|
|
96
91
|
}
|
|
97
92
|
exports.GetPInfosForManageBuyerByAtlasResult = GetPInfosForManageBuyerByAtlasResult;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
-
import { GetPurchasedInfosForAdminPayload, GetPurchasedInfosForAdminResult,
|
|
3
|
+
import { GetPurchasedInfosForAdminPayload, GetPurchasedInfosForAdminResult, GetPurchasedInfoDetailForAdminEditPayload, GetPurchasedInfoDetailForAdminEditResult, EditPInfoEtcDataPayload, EditPInfoMemoPayload, EditPInfoPricePayload, EditPInfoProcessPayload, EditPInfoReceiverInfoPayload, EditPInfoWaitingReceiveInfoPayload, EditPInfoUsedCouponInfoPayload, DeletePInfoUsedCouponInfoPayload, GetPurchasedInfoLogsForCouponInfoPayload, GetPurchasedInfoLogsForCouponInfoResult, UpdateProcessFinishedToCancelledPayload, GetDeliveryListForAdminPayload, GetDeliveryListForAdminResult, UpsertInvoiceForAdminPayload, DeleteInvoiceForAdminPayload, UpsertSplitInvoiceForAdminPayload, DeleteSplitInvoiceForAdminPayload, TransferPInfoSellerPayload, GetPInfosByYgTypePayload, GetPInfosByYgTypeResult, GetCrawlerProxyOrderListForAdminPayload, GetCrawlerProxyOrderListForAdminResult, UpdateCrawlerProxyOrderInfoForAdminPayload, UpdateCrawlerProxyOrderPurchaseOrderNumberBulkPayload, UpdateCrawlerProxyOrderPurchaseOrderNumberBulkResult, UpdateCrawlerProxyOrderPurchaseInvoiceBulkPayload, UpdateCrawlerProxyOrderPurchaseInvoiceBulkResult, AcceptCrawlerProxyOrderForAdminPayload, CheckCrawlerProxyOrderStockForAdminPayload, RequestCrawlerProxyOrderPaymentForAdminPayload, GetPriceCompareAffiliatePInfosForAdminPayload, GetPriceCompareAffiliatePInfosForAdminResult, GetPriceCompareAffiliatePInfosForAdminExcelResult, GetPriceCompareAffiliateSettleDoneRefundedPInfosForAdminPayload, GetPriceCompareAffiliateSettleDoneRefundedPInfosForAdminExcelResult, UpdatePriceCompareAffiliateSettleStatusPayload, GetCrawlerForwardingAgentsForAdminPayload, GetCrawlerForwardingAgentsForAdminResult, CreateCrawlerForwardingAgentForAdminPayload, UpdateCrawlerForwardingAgentForAdminPayload, UpdateCrawlerForwardingAgentActiveForAdminPayload, GetShippingForwarderApplicationSnapshotPayload, GetShippingForwarderApplicationSnapshotResult, RegisterShippingForwarderDomesticInvoicePayload, RegisterShippingForwarderDomesticInvoiceResult } from '../../dto/purchased-info.modules/purchased-info-admin';
|
|
4
4
|
export declare class AmqpPurchasedInfoAdminService {
|
|
5
5
|
private readonly client;
|
|
6
6
|
private readonly amqpManager;
|
|
7
7
|
constructor(client: ClientProxy);
|
|
8
8
|
getPurchasedInfosForAdmin(payload: GetPurchasedInfosForAdminPayload, param: AbstractParam): Promise<GetPurchasedInfosForAdminResult>;
|
|
9
|
-
/** 관리자 환불 대기 운영 큐를 조회한다. */
|
|
10
|
-
getRefundWaitingPurchasedInfosForAdmin(payload: GetRefundWaitingPurchasedInfosForAdminPayload, param: AbstractParam): Promise<GetRefundWaitingPurchasedInfosForAdminResult>;
|
|
11
9
|
getPurchasedInfoDetailForAdminEdit(payload: GetPurchasedInfoDetailForAdminEditPayload, param: AbstractParam): Promise<GetPurchasedInfoDetailForAdminEditResult>;
|
|
12
10
|
editPInfoEtcData(payload: EditPInfoEtcDataPayload, param: AbstractParam): Promise<void>;
|
|
13
11
|
editPInfoMemo(payload: EditPInfoMemoPayload, param: AbstractParam): Promise<void>;
|
|
@@ -25,10 +25,6 @@ let AmqpPurchasedInfoAdminService = class AmqpPurchasedInfoAdminService {
|
|
|
25
25
|
async getPurchasedInfosForAdmin(payload, param) {
|
|
26
26
|
return this.amqpManager.call('결제 리스트 조회 (관리자)', 'purchased-info-admin.get.list', payload, param, { isErrorThrowing: true });
|
|
27
27
|
}
|
|
28
|
-
/** 관리자 환불 대기 운영 큐를 조회한다. */
|
|
29
|
-
async getRefundWaitingPurchasedInfosForAdmin(payload, param) {
|
|
30
|
-
return this.amqpManager.call('환불 대기 결제 리스트 조회 (관리자)', 'purchased-info-admin.get.refund-waiting-list', payload, param, { isErrorThrowing: true });
|
|
31
|
-
}
|
|
32
28
|
async getPurchasedInfoDetailForAdminEdit(payload, param) {
|
|
33
29
|
return this.amqpManager.call('결제 상세 조회 (관리자 수정용)', 'purchased-info-admin.get.detail-for-edit', payload, param, { isErrorThrowing: true });
|
|
34
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/amqp-access",
|
|
3
|
-
"version": "0.7.257
|
|
3
|
+
"version": "0.7.257",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 amqp-access npm",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "node ../../node_modules/typescript/bin/tsc",
|
|
12
|
-
"lint": "eslint
|
|
12
|
+
"lint": "eslint \"manage-service/**/*.ts\" --ignore-pattern \"**/*.d.ts\"",
|
|
13
13
|
"fix": "eslint --fix src/**/*.ts",
|
|
14
14
|
"clean": "node ../../node_modules/typescript/bin/tsc --build --clean",
|
|
15
15
|
"prepublishOnly": "npm run build",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"@yolo-croket-dev/domain": "0.2.40",
|
|
24
24
|
"@yolo-croket-dev/dto-v2": "0.2.23",
|
|
25
25
|
"@yolo-croket-dev/entity": "0.2.98",
|
|
26
|
-
"@yolo-croket-dev/entity-v2": "0.3.
|
|
26
|
+
"@yolo-croket-dev/entity-v2": "0.3.16",
|
|
27
27
|
"class-transformer": "^0.5.1",
|
|
28
28
|
"class-validator": "^0.13.2",
|
|
29
29
|
"dotenv": "^16.3.1"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
|
|
6
|
+
const packageRoot = resolve(import.meta.dirname, '..');
|
|
7
|
+
const fixtureRoot = resolve(packageRoot, 'test-fixtures/exchange-rate-contract');
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const compileOptions = [
|
|
10
|
+
'--noEmit',
|
|
11
|
+
'--strict',
|
|
12
|
+
'--skipLibCheck',
|
|
13
|
+
'--target',
|
|
14
|
+
'es2019',
|
|
15
|
+
'--module',
|
|
16
|
+
'commonjs',
|
|
17
|
+
'--moduleResolution',
|
|
18
|
+
'node',
|
|
19
|
+
'--experimentalDecorators',
|
|
20
|
+
'--emitDecoratorMetadata',
|
|
21
|
+
'--allowSyntheticDefaultImports',
|
|
22
|
+
'--resolveJsonModule',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
function runTypeFixture(name, expectedExitCode) {
|
|
26
|
+
const result = spawnSync(
|
|
27
|
+
process.execPath,
|
|
28
|
+
[
|
|
29
|
+
'node_modules/typescript/bin/tsc',
|
|
30
|
+
...compileOptions,
|
|
31
|
+
resolve(fixtureRoot, `${name}.ts`),
|
|
32
|
+
],
|
|
33
|
+
{ cwd: resolve(packageRoot, '../..'), encoding: 'utf8' },
|
|
34
|
+
);
|
|
35
|
+
if (result.status !== expectedExitCode) {
|
|
36
|
+
throw new Error(`${name}: expected tsc exit ${expectedExitCode}, got ${result.status}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function readJsonFixture(name) {
|
|
41
|
+
return JSON.parse(readFileSync(resolve(fixtureRoot, `${name}.json`), 'utf8'));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
for (const name of ['legacy-compatibility', 'supported-usd', 'supported-cad', 'supported-jpy', 'unsupported-only']) {
|
|
45
|
+
runTypeFixture(name, 0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const name of ['missing-field', 'bad-currency', 'unsupported-extra-key']) {
|
|
49
|
+
const result = spawnSync(
|
|
50
|
+
process.execPath,
|
|
51
|
+
[
|
|
52
|
+
'node_modules/typescript/bin/tsc',
|
|
53
|
+
...compileOptions,
|
|
54
|
+
resolve(fixtureRoot, `${name}.ts`),
|
|
55
|
+
],
|
|
56
|
+
{ cwd: resolve(packageRoot, '../..'), encoding: 'utf8' },
|
|
57
|
+
);
|
|
58
|
+
if (result.status === 0) {
|
|
59
|
+
throw new Error(`${name}: expected type fixture failure`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const packageBuild = spawnSync(
|
|
64
|
+
process.execPath,
|
|
65
|
+
['node_modules/typescript/bin/tsc', '-p', 'packages/amqp-access/tsconfig.json'],
|
|
66
|
+
{ cwd: resolve(packageRoot, '../..'), encoding: 'utf8' },
|
|
67
|
+
);
|
|
68
|
+
if (packageBuild.status !== 0) {
|
|
69
|
+
throw new Error(`package build: expected exit 0, got ${packageBuild.status}`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const { isGetExchangeRateByCountryCodeExactResult } = require(
|
|
73
|
+
resolve(packageRoot, 'manage-service/dto/exchange-rate/query/get-exchange-rate-by-country-code.dto.js'),
|
|
74
|
+
);
|
|
75
|
+
for (const name of ['valid-usd', 'valid-cad', 'valid-jpy', 'unsupported-only']) {
|
|
76
|
+
const value = readJsonFixture(name);
|
|
77
|
+
if (!isGetExchangeRateByCountryCodeExactResult(value)) {
|
|
78
|
+
throw new Error(`${name}: expected runtime validation success`);
|
|
79
|
+
}
|
|
80
|
+
const expectedKeys = value.isSupported ? 'baseDate,currencyCode,exchangeRate,isSupported' : 'isSupported';
|
|
81
|
+
if (Object.keys(value).sort().join(',') !== expectedKeys) {
|
|
82
|
+
throw new Error(`${name}: unexpected serialized key set`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
for (const value of [
|
|
87
|
+
readJsonFixture('bad-rate'),
|
|
88
|
+
{ isSupported: true, baseDate: '20260810', exchangeRate: Number.POSITIVE_INFINITY, currencyCode: 'USD' },
|
|
89
|
+
readJsonFixture('bad-date'),
|
|
90
|
+
readJsonFixture('bad-currency'),
|
|
91
|
+
readJsonFixture('unsupported-extra-key'),
|
|
92
|
+
]) {
|
|
93
|
+
if (isGetExchangeRateByCountryCodeExactResult(value)) {
|
|
94
|
+
throw new Error(`invalid runtime fixture accepted: ${JSON.stringify(value)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
console.log('exchange-rate contract fixtures verified');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":true,"baseDate":"20260810","exchangeRate":10.25,"currencyCode":"usd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":true,"baseDate":"2026-08-10","exchangeRate":10.25,"currencyCode":"USD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":false,"baseDate":"20260810"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":true,"baseDate":"20260810","exchangeRate":7.45,"currencyCode":"CAD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":true,"baseDate":"20260810","exchangeRate":9.01,"currencyCode":"JPY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"isSupported":true,"baseDate":"20260810","exchangeRate":10.25,"currencyCode":"USD"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { RefundWaitingInfo, RefundWaitingStatusEnum } from '@yolo-croket-dev/entity-v2/purchased-info';
|
|
2
|
-
/**
|
|
3
|
-
* @author sj
|
|
4
|
-
* @description 관리자 환불 대기 결제건 목록 조회 조건
|
|
5
|
-
* @process 활성 환불 대기 상태를 기본 조회하고, 운영 이력 확인이 필요하면 상태 배열로 범위를 확장한다.
|
|
6
|
-
*/
|
|
7
|
-
export declare class GetRefundWaitingPurchasedInfosForAdminPayload {
|
|
8
|
-
/** 기본값은 관리자가 이관 또는 이관 불가를 처리할 수 있는 활성 상태다. */
|
|
9
|
-
statuses?: RefundWaitingStatusEnum[];
|
|
10
|
-
/** 한 번에 조회할 최대 결제건 수. 인덱스 없는 운영 조회의 부하를 제한한다. */
|
|
11
|
-
limit?: number;
|
|
12
|
-
/** 1부터 시작하는 페이지 번호 */
|
|
13
|
-
page?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @author sj
|
|
17
|
-
* @description 관리자 환불 대기 운영 큐의 결제건 한 건
|
|
18
|
-
*/
|
|
19
|
-
export declare class RefundWaitingPurchasedInfoForAdmin {
|
|
20
|
-
PInfoId: string;
|
|
21
|
-
publicId?: string;
|
|
22
|
-
buyerId: string;
|
|
23
|
-
sellerId: string;
|
|
24
|
-
storeId?: string;
|
|
25
|
-
pastName?: string;
|
|
26
|
-
pastImg?: string;
|
|
27
|
-
paymentDate?: Date;
|
|
28
|
-
process: string;
|
|
29
|
-
process_v2?: string;
|
|
30
|
-
refundWaitingInfo: RefundWaitingInfo;
|
|
31
|
-
transferCount: number;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @author sj
|
|
35
|
-
* @description 관리자 환불 대기 운영 큐 조회 결과
|
|
36
|
-
*/
|
|
37
|
-
export declare class GetRefundWaitingPurchasedInfosForAdminResult {
|
|
38
|
-
allCount: number;
|
|
39
|
-
page: number;
|
|
40
|
-
limit: number;
|
|
41
|
-
pInfos: RefundWaitingPurchasedInfoForAdmin[];
|
|
42
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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.GetRefundWaitingPurchasedInfosForAdminResult = exports.RefundWaitingPurchasedInfoForAdmin = exports.GetRefundWaitingPurchasedInfosForAdminPayload = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const purchased_info_1 = require("@yolo-croket-dev/entity-v2/purchased-info");
|
|
16
|
-
/**
|
|
17
|
-
* @author sj
|
|
18
|
-
* @description 관리자 환불 대기 결제건 목록 조회 조건
|
|
19
|
-
* @process 활성 환불 대기 상태를 기본 조회하고, 운영 이력 확인이 필요하면 상태 배열로 범위를 확장한다.
|
|
20
|
-
*/
|
|
21
|
-
class GetRefundWaitingPurchasedInfosForAdminPayload {
|
|
22
|
-
}
|
|
23
|
-
exports.GetRefundWaitingPurchasedInfosForAdminPayload = GetRefundWaitingPurchasedInfosForAdminPayload;
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsOptional)(),
|
|
26
|
-
(0, class_validator_1.IsArray)(),
|
|
27
|
-
(0, class_validator_1.IsEnum)(purchased_info_1.RefundWaitingStatusEnum, { each: true }),
|
|
28
|
-
__metadata("design:type", Array)
|
|
29
|
-
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "statuses", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, class_transformer_1.Type)(() => Number),
|
|
32
|
-
(0, class_validator_1.IsInt)(),
|
|
33
|
-
(0, class_validator_1.Min)(1),
|
|
34
|
-
(0, class_validator_1.Max)(100),
|
|
35
|
-
(0, class_validator_1.IsOptional)(),
|
|
36
|
-
__metadata("design:type", Number)
|
|
37
|
-
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "limit", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_transformer_1.Type)(() => Number),
|
|
40
|
-
(0, class_validator_1.IsInt)(),
|
|
41
|
-
(0, class_validator_1.Min)(1),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "page", void 0);
|
|
45
|
-
/**
|
|
46
|
-
* @author sj
|
|
47
|
-
* @description 관리자 환불 대기 운영 큐의 결제건 한 건
|
|
48
|
-
*/
|
|
49
|
-
class RefundWaitingPurchasedInfoForAdmin {
|
|
50
|
-
}
|
|
51
|
-
exports.RefundWaitingPurchasedInfoForAdmin = RefundWaitingPurchasedInfoForAdmin;
|
|
52
|
-
/**
|
|
53
|
-
* @author sj
|
|
54
|
-
* @description 관리자 환불 대기 운영 큐 조회 결과
|
|
55
|
-
*/
|
|
56
|
-
class GetRefundWaitingPurchasedInfosForAdminResult {
|
|
57
|
-
}
|
|
58
|
-
exports.GetRefundWaitingPurchasedInfosForAdminResult = GetRefundWaitingPurchasedInfosForAdminResult;
|