@yolo-croket-dev/amqp-access 0.7.257 → 0.7.259
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 +15 -2
- package/manage-service/dto/exchange-rate/query/get-exchange-rate-by-country-code.dto.js +13 -2
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-info-detail-for-admin.dto.d.ts +35 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-info-detail-for-admin.dto.js +29 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-infos-for-admin.dto.d.ts +84 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/get-refund-waiting-purchased-infos-for-admin.dto.js +103 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/index.d.ts +2 -0
- package/order-server/dto/purchased-info.modules/purchased-info-admin/query/index.js +2 -0
- package/order-server/dto/purchasedinfos/query/atlas/get-facet-p-infos-for-manage-buyer-by-atlas.dto.d.ts +2 -0
- package/order-server/dto/purchasedinfos/query/atlas/get-facet-p-infos-for-manage-buyer-by-atlas.dto.js +4 -0
- package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.d.ts +3 -0
- package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.js +5 -0
- package/order-server/services/purchased-info.modules/amqp.purchased-info-admin.service.d.ts +5 -1
- package/order-server/services/purchased-info.modules/amqp.purchased-info-admin.service.js +8 -0
- package/package.json +4 -4
- package/payment-service/dto/ad-center-settle/query/get-ad-center-settles-for-google-sheet.dto.d.ts +1 -1
- package/scripts/verify-exchange-rate-contract.mjs +48 -25
|
@@ -10,8 +10,18 @@ export interface GetExchangeRateByCountryCodeResult {
|
|
|
10
10
|
exchangeRate?: number;
|
|
11
11
|
currencyCode?: string;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type AsciiDigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
|
|
14
|
+
type IsExactEightAsciiDigits<Value extends string, Digits extends unknown[] = []> = Value extends '' ? Digits['length'] extends 8 ? true : false : Digits['length'] extends 8 ? false : Value extends `${AsciiDigit}${infer Rest}` ? IsExactEightAsciiDigits<Rest, [...Digits, unknown]> : false;
|
|
15
|
+
export type ExchangeRateBaseDateLiteral<Value extends string> = string extends Value ? Value : IsExactEightAsciiDigits<Value> extends true ? Value : never;
|
|
16
|
+
type ExchangeRateBaseDateInput<Value extends string> = string extends Value ? unknown : ExchangeRateBaseDateLiteral<Value> extends never ? {
|
|
17
|
+
readonly exchangeRateBaseDateMustBeExactlyEightAsciiDigits: never;
|
|
18
|
+
} : unknown;
|
|
19
|
+
declare const exchangeRateBaseDateBrand: unique symbol;
|
|
20
|
+
export type ExchangeRateBaseDate = string & {
|
|
21
|
+
readonly [exchangeRateBaseDateBrand]: 'ExchangeRateBaseDate';
|
|
22
|
+
};
|
|
23
|
+
type UppercaseAsciiLetter = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
24
|
+
export type ExchangeRateCurrencyCode = `${UppercaseAsciiLetter}${UppercaseAsciiLetter}${UppercaseAsciiLetter}`;
|
|
15
25
|
export type GetExchangeRateByCountryCodeExactResult = {
|
|
16
26
|
readonly isSupported: true;
|
|
17
27
|
readonly baseDate: ExchangeRateBaseDate;
|
|
@@ -20,4 +30,7 @@ export type GetExchangeRateByCountryCodeExactResult = {
|
|
|
20
30
|
} | {
|
|
21
31
|
readonly isSupported: false;
|
|
22
32
|
};
|
|
33
|
+
export declare function isExchangeRateBaseDate(value: string): value is ExchangeRateBaseDate;
|
|
34
|
+
export declare function toExchangeRateBaseDate<const Value extends string>(value: Value & ExchangeRateBaseDateInput<Value>): ExchangeRateBaseDate;
|
|
23
35
|
export declare function isGetExchangeRateByCountryCodeExactResult(value: unknown): value is GetExchangeRateByCountryCodeExactResult;
|
|
36
|
+
export {};
|
|
@@ -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.isGetExchangeRateByCountryCodeExactResult = exports.GetExchangeRateByCountryCodePayload = void 0;
|
|
12
|
+
exports.isGetExchangeRateByCountryCodeExactResult = exports.toExchangeRateBaseDate = exports.isExchangeRateBaseDate = exports.GetExchangeRateByCountryCodePayload = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
class GetExchangeRateByCountryCodePayload {
|
|
15
15
|
}
|
|
@@ -26,6 +26,17 @@ __decorate([
|
|
|
26
26
|
function isObjectRecord(value) {
|
|
27
27
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
28
28
|
}
|
|
29
|
+
function isExchangeRateBaseDate(value) {
|
|
30
|
+
return /^\d{8}$/.test(value);
|
|
31
|
+
}
|
|
32
|
+
exports.isExchangeRateBaseDate = isExchangeRateBaseDate;
|
|
33
|
+
function toExchangeRateBaseDate(value) {
|
|
34
|
+
if (!isExchangeRateBaseDate(value)) {
|
|
35
|
+
throw new TypeError('Exchange-rate baseDate must be exactly eight ASCII digits');
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
exports.toExchangeRateBaseDate = toExchangeRateBaseDate;
|
|
29
40
|
function isGetExchangeRateByCountryCodeExactResult(value) {
|
|
30
41
|
if (!isObjectRecord(value)) {
|
|
31
42
|
return false;
|
|
@@ -37,7 +48,7 @@ function isGetExchangeRateByCountryCodeExactResult(value) {
|
|
|
37
48
|
return value.isSupported === true
|
|
38
49
|
&& keys.join(',') === 'baseDate,currencyCode,exchangeRate,isSupported'
|
|
39
50
|
&& typeof value.baseDate === 'string'
|
|
40
|
-
&&
|
|
51
|
+
&& isExchangeRateBaseDate(value.baseDate)
|
|
41
52
|
&& typeof value.currencyCode === 'string'
|
|
42
53
|
&& /^[A-Z]{3}$/.test(value.currencyCode)
|
|
43
54
|
&& typeof value.exchangeRate === 'number'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PInfoPOptionInfo, RefundWaitingInfo } from '@yolo-croket-dev/entity-v2/purchased-info';
|
|
2
|
+
import { Types } from 'mongoose';
|
|
3
|
+
/** @author sj */
|
|
4
|
+
export declare class GetRefundWaitingPurchasedInfoDetailForAdminPayload {
|
|
5
|
+
pInfoId: string;
|
|
6
|
+
}
|
|
7
|
+
/** @author sj */
|
|
8
|
+
export declare class RefundWaitingPurchasedInfoDetailForAdmin {
|
|
9
|
+
PInfoId: string;
|
|
10
|
+
publicId?: string;
|
|
11
|
+
buyerId: string;
|
|
12
|
+
buyerUsername?: string;
|
|
13
|
+
itemId?: string;
|
|
14
|
+
itemName?: string;
|
|
15
|
+
pOptionInfo?: PInfoPOptionInfo;
|
|
16
|
+
purchaseNumber?: number;
|
|
17
|
+
paidPrice?: number;
|
|
18
|
+
process: string;
|
|
19
|
+
processV2?: string;
|
|
20
|
+
refundWaitingInfo: RefundWaitingInfo;
|
|
21
|
+
transferSellerInfo?: {
|
|
22
|
+
isTransferred: boolean;
|
|
23
|
+
transferCount: number;
|
|
24
|
+
latestTransferDate?: Date;
|
|
25
|
+
history: Array<{
|
|
26
|
+
transferDate: Date;
|
|
27
|
+
oldSellerId: Types.ObjectId | string;
|
|
28
|
+
newSellerId: Types.ObjectId | string;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** @author sj */
|
|
33
|
+
export declare class GetRefundWaitingPurchasedInfoDetailForAdminResult {
|
|
34
|
+
pInfo: RefundWaitingPurchasedInfoDetailForAdmin;
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.GetRefundWaitingPurchasedInfoDetailForAdminResult = exports.RefundWaitingPurchasedInfoDetailForAdmin = exports.GetRefundWaitingPurchasedInfoDetailForAdminPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** @author sj */
|
|
15
|
+
class GetRefundWaitingPurchasedInfoDetailForAdminPayload {
|
|
16
|
+
}
|
|
17
|
+
exports.GetRefundWaitingPurchasedInfoDetailForAdminPayload = GetRefundWaitingPurchasedInfoDetailForAdminPayload;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsMongoId)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], GetRefundWaitingPurchasedInfoDetailForAdminPayload.prototype, "pInfoId", void 0);
|
|
22
|
+
/** @author sj */
|
|
23
|
+
class RefundWaitingPurchasedInfoDetailForAdmin {
|
|
24
|
+
}
|
|
25
|
+
exports.RefundWaitingPurchasedInfoDetailForAdmin = RefundWaitingPurchasedInfoDetailForAdmin;
|
|
26
|
+
/** @author sj */
|
|
27
|
+
class GetRefundWaitingPurchasedInfoDetailForAdminResult {
|
|
28
|
+
}
|
|
29
|
+
exports.GetRefundWaitingPurchasedInfoDetailForAdminResult = GetRefundWaitingPurchasedInfoDetailForAdminResult;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { RefundWaitingStatusEnum } from '@yolo-croket-dev/entity-v2/purchased-info';
|
|
2
|
+
/** @description 관리자 환불 대기 운영 화면에서 사용하는 상태 그룹 */
|
|
3
|
+
export declare enum RefundWaitingAdminStatusEnum {
|
|
4
|
+
/** 관리자 이관 또는 이관 불가 처리가 가능한 활성 대기 상태 */
|
|
5
|
+
WAITING = "WAITING",
|
|
6
|
+
/** 다른 셀러 이관이 완료되어 환불 대기 워크플로가 종료된 상태 */
|
|
7
|
+
TRANSFERRED = "TRANSFERRED",
|
|
8
|
+
/** 이관 불가가 확정되어 환불 절차로 진행된 상태 */
|
|
9
|
+
UNAVAILABLE = "UNAVAILABLE"
|
|
10
|
+
}
|
|
11
|
+
/** @description 관리자 환불 대기 운영 화면의 검색 대상 */
|
|
12
|
+
export declare enum GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum {
|
|
13
|
+
PUBLIC_ID = "PUBLIC_ID",
|
|
14
|
+
PINFO_ID = "PINFO_ID",
|
|
15
|
+
BUYER_USERNAME = "BUYER_USERNAME",
|
|
16
|
+
BUYER_ID = "BUYER_ID",
|
|
17
|
+
ITEM_NAME = "ITEM_NAME",
|
|
18
|
+
TRANSFERRED_SELLER_ID = "TRANSFERRED_SELLER_ID"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @author sj
|
|
22
|
+
* @description 관리자 환불 대기 결제건 목록 조회 조건
|
|
23
|
+
* @process 환불 대기 시작일 기준으로 운영 기간·상태·검색어를 조합해 운영 큐를 조회한다.
|
|
24
|
+
*/
|
|
25
|
+
export declare class GetRefundWaitingPurchasedInfosForAdminPayload {
|
|
26
|
+
/**
|
|
27
|
+
* 한국 날짜 시작 경계다.
|
|
28
|
+
* 서버는 전일 15:00:00.000Z(한국 시간 당일 00:00)로 변환해 조회한다.
|
|
29
|
+
*/
|
|
30
|
+
startDate?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 한국 날짜 종료 경계다.
|
|
33
|
+
* 서버는 해당 일자 15:00:00.000Z까지 포함해 조회한다.
|
|
34
|
+
*/
|
|
35
|
+
endDate?: string;
|
|
36
|
+
/** 생략하면 관리자가 액션을 수행할 수 있는 WAITING 그룹만 조회한다. */
|
|
37
|
+
statuses?: RefundWaitingAdminStatusEnum[];
|
|
38
|
+
/** searchKeyword와 함께 전달할 검색 대상 */
|
|
39
|
+
searchType?: GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum;
|
|
40
|
+
/** searchType에 해당하는 검색어 */
|
|
41
|
+
searchKeyword?: string;
|
|
42
|
+
/** 한 번에 조회할 최대 결제건 수. 인덱스 없는 운영 조회의 부하를 제한한다. */
|
|
43
|
+
limit?: number;
|
|
44
|
+
/** 1부터 시작하는 페이지 번호 */
|
|
45
|
+
page?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @author sj
|
|
49
|
+
* @description 관리자 환불 대기 운영 큐의 결제건 한 건
|
|
50
|
+
*/
|
|
51
|
+
export declare class RefundWaitingPurchasedInfoForAdmin {
|
|
52
|
+
/** 관리자 상세·이관 액션의 기준이 되는 결제건 ID */
|
|
53
|
+
PInfoId: string;
|
|
54
|
+
/** 구매자·운영자가 조회하는 주문번호 */
|
|
55
|
+
publicId?: string;
|
|
56
|
+
/** 이관 대상 상품을 식별하기 위한 상품 ID */
|
|
57
|
+
itemId?: string;
|
|
58
|
+
buyerId: string;
|
|
59
|
+
/** 결제 당시 저장한 구매자명 snapshot. users 조회 없이 목록에 표시한다. */
|
|
60
|
+
buyerUsername?: string;
|
|
61
|
+
/** 실제 상품명. itemId와 함께 관리자 화면의 상품 상세 랜딩 링크에 사용한다. */
|
|
62
|
+
itemName?: string;
|
|
63
|
+
/** 실제 배송 상태를 나타내는 결제 프로세스 */
|
|
64
|
+
process: string;
|
|
65
|
+
processV2?: string;
|
|
66
|
+
/** 환불 대기 워크플로 상태 */
|
|
67
|
+
refundWaitingStatus: RefundWaitingStatusEnum;
|
|
68
|
+
/** 셀러 환불 요청으로 환불 대기 워크플로가 시작된 시각 */
|
|
69
|
+
refundWaitingStartDate: Date;
|
|
70
|
+
/** 여러 번 이관된 경우 가장 최근 이관 대상 셀러 ID */
|
|
71
|
+
transferredSellerId?: string;
|
|
72
|
+
/** 여러 번 이관된 경우 가장 최근 이관 완료일 */
|
|
73
|
+
latestTransferDate?: Date;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @author sj
|
|
77
|
+
* @description 관리자 환불 대기 운영 큐 조회 결과
|
|
78
|
+
*/
|
|
79
|
+
export declare class GetRefundWaitingPurchasedInfosForAdminResult {
|
|
80
|
+
allCount: number;
|
|
81
|
+
page: number;
|
|
82
|
+
limit: number;
|
|
83
|
+
pInfos: RefundWaitingPurchasedInfoForAdmin[];
|
|
84
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 = exports.GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum = exports.RefundWaitingAdminStatusEnum = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** @description 관리자 환불 대기 운영 화면에서 사용하는 상태 그룹 */
|
|
16
|
+
var RefundWaitingAdminStatusEnum;
|
|
17
|
+
(function (RefundWaitingAdminStatusEnum) {
|
|
18
|
+
/** 관리자 이관 또는 이관 불가 처리가 가능한 활성 대기 상태 */
|
|
19
|
+
RefundWaitingAdminStatusEnum["WAITING"] = "WAITING";
|
|
20
|
+
/** 다른 셀러 이관이 완료되어 환불 대기 워크플로가 종료된 상태 */
|
|
21
|
+
RefundWaitingAdminStatusEnum["TRANSFERRED"] = "TRANSFERRED";
|
|
22
|
+
/** 이관 불가가 확정되어 환불 절차로 진행된 상태 */
|
|
23
|
+
RefundWaitingAdminStatusEnum["UNAVAILABLE"] = "UNAVAILABLE";
|
|
24
|
+
})(RefundWaitingAdminStatusEnum || (exports.RefundWaitingAdminStatusEnum = RefundWaitingAdminStatusEnum = {}));
|
|
25
|
+
/** @description 관리자 환불 대기 운영 화면의 검색 대상 */
|
|
26
|
+
var GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum;
|
|
27
|
+
(function (GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum) {
|
|
28
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["PUBLIC_ID"] = "PUBLIC_ID";
|
|
29
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["PINFO_ID"] = "PINFO_ID";
|
|
30
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["BUYER_USERNAME"] = "BUYER_USERNAME";
|
|
31
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["BUYER_ID"] = "BUYER_ID";
|
|
32
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["ITEM_NAME"] = "ITEM_NAME";
|
|
33
|
+
GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum["TRANSFERRED_SELLER_ID"] = "TRANSFERRED_SELLER_ID";
|
|
34
|
+
})(GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum || (exports.GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum = GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum = {}));
|
|
35
|
+
/**
|
|
36
|
+
* @author sj
|
|
37
|
+
* @description 관리자 환불 대기 결제건 목록 조회 조건
|
|
38
|
+
* @process 환불 대기 시작일 기준으로 운영 기간·상태·검색어를 조합해 운영 큐를 조회한다.
|
|
39
|
+
*/
|
|
40
|
+
class GetRefundWaitingPurchasedInfosForAdminPayload {
|
|
41
|
+
}
|
|
42
|
+
exports.GetRefundWaitingPurchasedInfosForAdminPayload = GetRefundWaitingPurchasedInfosForAdminPayload;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsDateString)(),
|
|
45
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "startDate", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsDateString)(),
|
|
51
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "endDate", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsOptional)()
|
|
57
|
+
/** Fastify는 query 값이 하나일 때 문자열로 파싱하므로 배열로 정규화한다. */
|
|
58
|
+
,
|
|
59
|
+
(0, class_transformer_1.Transform)(({ value }) => (value === undefined || value === null || Array.isArray(value) ? value : [value])),
|
|
60
|
+
(0, class_validator_1.IsArray)(),
|
|
61
|
+
(0, class_validator_1.IsEnum)(RefundWaitingAdminStatusEnum, { each: true }),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "statuses", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.ValidateIf)((payload) => payload.searchKeyword !== undefined),
|
|
66
|
+
(0, class_validator_1.IsEnum)(GetRefundWaitingPurchasedInfosForAdminSearchTypeEnum),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "searchType", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.ValidateIf)((payload) => payload.searchType !== undefined),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "searchKeyword", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
77
|
+
(0, class_validator_1.IsInt)(),
|
|
78
|
+
(0, class_validator_1.Min)(1),
|
|
79
|
+
(0, class_validator_1.Max)(100),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "limit", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
85
|
+
(0, class_validator_1.IsInt)(),
|
|
86
|
+
(0, class_validator_1.Min)(1),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], GetRefundWaitingPurchasedInfosForAdminPayload.prototype, "page", void 0);
|
|
90
|
+
/**
|
|
91
|
+
* @author sj
|
|
92
|
+
* @description 관리자 환불 대기 운영 큐의 결제건 한 건
|
|
93
|
+
*/
|
|
94
|
+
class RefundWaitingPurchasedInfoForAdmin {
|
|
95
|
+
}
|
|
96
|
+
exports.RefundWaitingPurchasedInfoForAdmin = RefundWaitingPurchasedInfoForAdmin;
|
|
97
|
+
/**
|
|
98
|
+
* @author sj
|
|
99
|
+
* @description 관리자 환불 대기 운영 큐 조회 결과
|
|
100
|
+
*/
|
|
101
|
+
class GetRefundWaitingPurchasedInfosForAdminResult {
|
|
102
|
+
}
|
|
103
|
+
exports.GetRefundWaitingPurchasedInfosForAdminResult = GetRefundWaitingPurchasedInfosForAdminResult;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './get-purchased-infos-for-admin.dto';
|
|
2
|
+
export * from './get-refund-waiting-purchased-infos-for-admin.dto';
|
|
3
|
+
export * from './get-refund-waiting-purchased-info-detail-for-admin.dto';
|
|
2
4
|
export * from './get-purchased-info-detail-for-admin-edit.dto';
|
|
3
5
|
export * from './get-purchased-info-logs-for-coupon-info.dto';
|
|
4
6
|
export * from './get-delivery-list-for-admin.dto';
|
|
@@ -15,6 +15,8 @@ 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
|
+
__exportStar(require("./get-refund-waiting-purchased-info-detail-for-admin.dto"), exports);
|
|
18
20
|
__exportStar(require("./get-purchased-info-detail-for-admin-edit.dto"), exports);
|
|
19
21
|
__exportStar(require("./get-purchased-info-logs-for-coupon-info.dto"), exports);
|
|
20
22
|
__exportStar(require("./get-delivery-list-for-admin.dto"), exports);
|
|
@@ -14,10 +14,12 @@ export declare class GetFacetPInfosForManageBuyerByAtlasPayload {
|
|
|
14
14
|
paymentSDate?: Date;
|
|
15
15
|
paymentEDate?: Date;
|
|
16
16
|
searchText?: string;
|
|
17
|
+
isTransferred?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export declare class GetFacetPInfosForManageBuyerByAtlasResult {
|
|
19
20
|
allCount: number;
|
|
20
21
|
facets: FacetPInfo[];
|
|
21
22
|
allCount_v2: number;
|
|
22
23
|
facets_v2: FacetPInfoV2[];
|
|
24
|
+
transferPInfoNums?: number;
|
|
23
25
|
}
|
|
@@ -44,6 +44,10 @@ __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);
|
|
47
51
|
class GetFacetPInfosForManageBuyerByAtlasResult {
|
|
48
52
|
}
|
|
49
53
|
exports.GetFacetPInfosForManageBuyerByAtlasResult = GetFacetPInfosForManageBuyerByAtlasResult;
|
package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export declare class GetPInfosForManageBuyerByAtlasPayload {
|
|
|
25
25
|
isUsedItem?: boolean;
|
|
26
26
|
/** 개인통관고유부호 등록 예정 모아보기 필터 여부 */
|
|
27
27
|
isPcccDeferred?: boolean;
|
|
28
|
+
/** 이관 완료 거래만 조회한다. */
|
|
29
|
+
isTransferred?: boolean;
|
|
28
30
|
}
|
|
29
31
|
export declare class GetPInfosForManageBuyerByAtlasResult {
|
|
30
32
|
allCount: number;
|
|
@@ -33,4 +35,5 @@ export declare class GetPInfosForManageBuyerByAtlasResult {
|
|
|
33
35
|
splitDeliveryPInfoNums?: number;
|
|
34
36
|
usedPInfoNums?: number;
|
|
35
37
|
pcccDeferredPInfoNums?: number;
|
|
38
|
+
transferPInfoNums?: number;
|
|
36
39
|
}
|
package/order-server/dto/purchasedinfos/query/atlas/get-p-infos-for-manage-buyer-by-atlas.dto.js
CHANGED
|
@@ -87,6 +87,11 @@ __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);
|
|
90
95
|
class GetPInfosForManageBuyerByAtlasResult {
|
|
91
96
|
}
|
|
92
97
|
exports.GetPInfosForManageBuyerByAtlasResult = GetPInfosForManageBuyerByAtlasResult;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
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';
|
|
3
|
+
import { GetPurchasedInfosForAdminPayload, GetPurchasedInfosForAdminResult, GetRefundWaitingPurchasedInfosForAdminPayload, GetRefundWaitingPurchasedInfosForAdminResult, GetRefundWaitingPurchasedInfoDetailForAdminPayload, GetRefundWaitingPurchasedInfoDetailForAdminResult, 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
|
+
/** 관리자 환불 대기 결제건 상세를 조회한다. */
|
|
12
|
+
getRefundWaitingPurchasedInfoDetailForAdmin(payload: GetRefundWaitingPurchasedInfoDetailForAdminPayload, param: AbstractParam): Promise<GetRefundWaitingPurchasedInfoDetailForAdminResult>;
|
|
9
13
|
getPurchasedInfoDetailForAdminEdit(payload: GetPurchasedInfoDetailForAdminEditPayload, param: AbstractParam): Promise<GetPurchasedInfoDetailForAdminEditResult>;
|
|
10
14
|
editPInfoEtcData(payload: EditPInfoEtcDataPayload, param: AbstractParam): Promise<void>;
|
|
11
15
|
editPInfoMemo(payload: EditPInfoMemoPayload, param: AbstractParam): Promise<void>;
|
|
@@ -25,6 +25,14 @@ 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
|
+
/** 관리자 환불 대기 결제건 상세를 조회한다. */
|
|
33
|
+
async getRefundWaitingPurchasedInfoDetailForAdmin(payload, param) {
|
|
34
|
+
return this.amqpManager.call('환불 대기 결제 상세 조회 (관리자)', 'purchased-info-admin.get.refund-waiting-detail', payload, param, { isErrorThrowing: true });
|
|
35
|
+
}
|
|
28
36
|
async getPurchasedInfoDetailForAdminEdit(payload, param) {
|
|
29
37
|
return this.amqpManager.call('결제 상세 조회 (관리자 수정용)', 'purchased-info-admin.get.detail-for-edit', payload, param, { isErrorThrowing: true });
|
|
30
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/amqp-access",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.259",
|
|
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 --no-error-on-unmatched-pattern src/**/*.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.18",
|
|
27
27
|
"class-transformer": "^0.5.1",
|
|
28
28
|
"class-validator": "^0.13.2",
|
|
29
29
|
"dotenv": "^16.3.1"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|
package/payment-service/dto/ad-center-settle/query/get-ad-center-settles-for-google-sheet.dto.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdCenterSettle } from '@yolo-croket-dev/entity/src/ad-center-settle/ad-center-settle.schema';
|
|
2
2
|
import { BusinessInfo } from '@yolo-croket-dev/entity/src/store';
|
|
3
|
-
declare const AdCenterSettleForGoogleSheet_base: import("@nestjs/common").Type<Pick<AdCenterSettle, "_id" | "sellerId" | "publicId" | "couponInfo" | "pastStoreInfo" | "expectedSettleDateString" | "adType" | "adCenterStartDateString" | "adCenterEndDateString" | "actualSettleDateString" | "PInfoId" | "transactionInfo" | "subtractionSettleAmountInfo" | "bizMemo" | "financeMemo" | "settlementManagerInfo" | "googleSheetInfo">>;
|
|
3
|
+
declare const AdCenterSettleForGoogleSheet_base: import("@nestjs/common/interfaces").Type<Pick<AdCenterSettle, "_id" | "sellerId" | "publicId" | "couponInfo" | "pastStoreInfo" | "expectedSettleDateString" | "adType" | "adCenterStartDateString" | "adCenterEndDateString" | "actualSettleDateString" | "PInfoId" | "transactionInfo" | "subtractionSettleAmountInfo" | "bizMemo" | "financeMemo" | "settlementManagerInfo" | "googleSheetInfo">>;
|
|
4
4
|
/** 구글 시트용 광고센터정산 데이터 */
|
|
5
5
|
export declare class AdCenterSettleForGoogleSheet extends AdCenterSettleForGoogleSheet_base {
|
|
6
6
|
storeInfo: {
|
|
@@ -22,8 +22,8 @@ const compileOptions = [
|
|
|
22
22
|
'--resolveJsonModule',
|
|
23
23
|
];
|
|
24
24
|
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function compileTypeFixture(name) {
|
|
26
|
+
return spawnSync(
|
|
27
27
|
process.execPath,
|
|
28
28
|
[
|
|
29
29
|
'node_modules/typescript/bin/tsc',
|
|
@@ -32,8 +32,23 @@ function runTypeFixture(name, expectedExitCode) {
|
|
|
32
32
|
],
|
|
33
33
|
{ cwd: resolve(packageRoot, '../..'), encoding: 'utf8' },
|
|
34
34
|
);
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function assertTypeFixturePasses(name) {
|
|
38
|
+
const result = compileTypeFixture(name);
|
|
39
|
+
if (result.status !== 0) {
|
|
40
|
+
throw new Error(`${name}: expected tsc exit 0, got ${result.status}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function assertTypeFixtureFails(name, expectedDiagnostic) {
|
|
45
|
+
const result = compileTypeFixture(name);
|
|
46
|
+
const output = `${result.stdout}${result.stderr}`;
|
|
47
|
+
if (result.status === 0) {
|
|
48
|
+
throw new Error(`${name}: expected tsc failure for ${expectedDiagnostic}`);
|
|
49
|
+
}
|
|
50
|
+
if (!expectedDiagnostic.test(output)) {
|
|
51
|
+
throw new Error(`${name}: missing expected diagnostic ${expectedDiagnostic}`);
|
|
37
52
|
}
|
|
38
53
|
}
|
|
39
54
|
|
|
@@ -42,22 +57,23 @@ function readJsonFixture(name) {
|
|
|
42
57
|
}
|
|
43
58
|
|
|
44
59
|
for (const name of ['legacy-compatibility', 'supported-usd', 'supported-cad', 'supported-jpy', 'unsupported-only']) {
|
|
45
|
-
|
|
60
|
+
assertTypeFixturePasses(name);
|
|
46
61
|
}
|
|
47
62
|
|
|
48
|
-
for (const name of [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
for (const [name, expectedDiagnostic] of [
|
|
64
|
+
['missing-field', /Property 'currencyCode' is missing/],
|
|
65
|
+
['bad-currency', /Type '"usd"' is not assignable/],
|
|
66
|
+
['bad-currency-digit', /Type '"US1"' is not assignable/],
|
|
67
|
+
['bad-currency-short', /Type '"US"' is not assignable/],
|
|
68
|
+
['bad-currency-long', /Type '"USDX"' is not assignable/],
|
|
69
|
+
['bad-date', /Argument of type '"2026-08-10"'[\s\S]*exchangeRateBaseDateMustBeExactlyEightAsciiDigits/],
|
|
70
|
+
['bad-date-short', /Argument of type '"2026081"'[\s\S]*exchangeRateBaseDateMustBeExactlyEightAsciiDigits/],
|
|
71
|
+
['bad-date-long', /Argument of type '"202608100"'[\s\S]*exchangeRateBaseDateMustBeExactlyEightAsciiDigits/],
|
|
72
|
+
['bad-date-alpha', /Argument of type '"20260A10"'[\s\S]*exchangeRateBaseDateMustBeExactlyEightAsciiDigits/],
|
|
73
|
+
['bad-date-fullwidth', /Argument of type '"20260810"'[\s\S]*exchangeRateBaseDateMustBeExactlyEightAsciiDigits/],
|
|
74
|
+
['unsupported-extra-key', /'baseDate' does not exist/],
|
|
75
|
+
]) {
|
|
76
|
+
assertTypeFixtureFails(name, expectedDiagnostic);
|
|
61
77
|
}
|
|
62
78
|
|
|
63
79
|
const packageBuild = spawnSync(
|
|
@@ -83,15 +99,22 @@ for (const name of ['valid-usd', 'valid-cad', 'valid-jpy', 'unsupported-only'])
|
|
|
83
99
|
}
|
|
84
100
|
}
|
|
85
101
|
|
|
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
|
-
|
|
91
|
-
|
|
102
|
+
for (const [name, value, field] of [
|
|
103
|
+
['bad-rate', readJsonFixture('bad-rate'), 'exchangeRate'],
|
|
104
|
+
['bad-nonfinite-rate', { isSupported: true, baseDate: '20260810', exchangeRate: Number.POSITIVE_INFINITY, currencyCode: 'USD' }, 'exchangeRate'],
|
|
105
|
+
['bad-date', readJsonFixture('bad-date'), 'baseDate'],
|
|
106
|
+
['bad-date-short', { isSupported: true, baseDate: '2026081', exchangeRate: 10.25, currencyCode: 'USD' }, 'baseDate'],
|
|
107
|
+
['bad-date-long', { isSupported: true, baseDate: '202608100', exchangeRate: 10.25, currencyCode: 'USD' }, 'baseDate'],
|
|
108
|
+
['bad-date-alpha', { isSupported: true, baseDate: '20260A10', exchangeRate: 10.25, currencyCode: 'USD' }, 'baseDate'],
|
|
109
|
+
['bad-date-fullwidth', { isSupported: true, baseDate: '20260810', exchangeRate: 10.25, currencyCode: 'USD' }, 'baseDate'],
|
|
110
|
+
['bad-currency', readJsonFixture('bad-currency'), 'currencyCode'],
|
|
111
|
+
['bad-currency-digit', { isSupported: true, baseDate: '20260810', exchangeRate: 10.25, currencyCode: 'US1' }, 'currencyCode'],
|
|
112
|
+
['bad-currency-short', { isSupported: true, baseDate: '20260810', exchangeRate: 10.25, currencyCode: 'US' }, 'currencyCode'],
|
|
113
|
+
['bad-currency-long', { isSupported: true, baseDate: '20260810', exchangeRate: 10.25, currencyCode: 'USDX' }, 'currencyCode'],
|
|
114
|
+
['unsupported-extra-key', readJsonFixture('unsupported-extra-key'), 'unsupported key set'],
|
|
92
115
|
]) {
|
|
93
116
|
if (isGetExchangeRateByCountryCodeExactResult(value)) {
|
|
94
|
-
throw new Error(
|
|
117
|
+
throw new Error(`${name}: runtime validation accepted invalid ${field}`);
|
|
95
118
|
}
|
|
96
119
|
}
|
|
97
120
|
|