@yolo-croket-dev/amqp-access 0.7.270 → 0.7.272

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.
@@ -24,7 +24,9 @@ type UppercaseAsciiLetter = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I'
24
24
  export type ExchangeRateCurrencyCode = `${UppercaseAsciiLetter}${UppercaseAsciiLetter}${UppercaseAsciiLetter}`;
25
25
  export type GetExchangeRateByCountryCodeExactResult = {
26
26
  readonly isSupported: true;
27
- readonly baseDate: ExchangeRateBaseDate;
27
+ readonly baseDate: string;
28
+ /** @description 실제 선택된 환율 기준일(YYYYMMDD). 기존 baseDate는 캐시 갱신 시각을 담고 있어 유지하고, 정확한 값은 이 필드로 별도 제공한다 */
29
+ readonly exactBaseDate: ExchangeRateBaseDate;
28
30
  readonly exchangeRate: number;
29
31
  readonly currencyCode: ExchangeRateCurrencyCode;
30
32
  } | {
@@ -46,9 +46,10 @@ function isGetExchangeRateByCountryCodeExactResult(value) {
46
46
  return keys.length === 1 && keys[0] === 'isSupported';
47
47
  }
48
48
  return value.isSupported === true
49
- && keys.join(',') === 'baseDate,currencyCode,exchangeRate,isSupported'
49
+ && keys.join(',') === 'baseDate,currencyCode,exactBaseDate,exchangeRate,isSupported'
50
50
  && typeof value.baseDate === 'string'
51
- && isExchangeRateBaseDate(value.baseDate)
51
+ && typeof value.exactBaseDate === 'string'
52
+ && isExchangeRateBaseDate(value.exactBaseDate)
52
53
  && typeof value.currencyCode === 'string'
53
54
  && /^[A-Z]{3}$/.test(value.currencyCode)
54
55
  && typeof value.exchangeRate === 'number'
@@ -1,10 +1,10 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { GetAdgroupListPayload, GetAdgroupListResult, GetCampaignListResult } from '../../dto/naver-search-ad.modules/naver-search-ad/query';
3
+ import { GetAdgroupListPayload, GetAdgroupListResult, GetCampaignListPayload, GetCampaignListResult } from '../../dto/naver-search-ad.modules/naver-search-ad/query';
4
4
  export declare class AmqpNaverSearchAdService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
- getCampaignList(payload: void, param: AbstractParam): Promise<GetCampaignListResult>;
8
+ getCampaignList(payload: GetCampaignListPayload, param: AbstractParam): Promise<GetCampaignListResult>;
9
9
  getAdgroupList(payload: GetAdgroupListPayload, param: AbstractParam): Promise<GetAdgroupListResult>;
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.270",
3
+ "version": "0.7.272",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -93,7 +93,7 @@ for (const name of ['valid-usd', 'valid-cad', 'valid-jpy', 'unsupported-only'])
93
93
  if (!isGetExchangeRateByCountryCodeExactResult(value)) {
94
94
  throw new Error(`${name}: expected runtime validation success`);
95
95
  }
96
- const expectedKeys = value.isSupported ? 'baseDate,currencyCode,exchangeRate,isSupported' : 'isSupported';
96
+ const expectedKeys = value.isSupported ? 'baseDate,currencyCode,exactBaseDate,exchangeRate,isSupported' : 'isSupported';
97
97
  if (Object.keys(value).sort().join(',') !== expectedKeys) {
98
98
  throw new Error(`${name}: unexpected serialized key set`);
99
99
  }
@@ -101,16 +101,16 @@ for (const name of ['valid-usd', 'valid-cad', 'valid-jpy', 'unsupported-only'])
101
101
 
102
102
  for (const [name, value, field] of [
103
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'],
104
+ ['bad-nonfinite-rate', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260810', exchangeRate: Number.POSITIVE_INFINITY, currencyCode: 'USD' }, 'exchangeRate'],
105
+ ['bad-date', readJsonFixture('bad-date'), 'exactBaseDate'],
106
+ ['bad-date-short', { isSupported: true, baseDate: '20260810', exactBaseDate: '2026081', exchangeRate: 10.25, currencyCode: 'USD' }, 'exactBaseDate'],
107
+ ['bad-date-long', { isSupported: true, baseDate: '20260810', exactBaseDate: '202608100', exchangeRate: 10.25, currencyCode: 'USD' }, 'exactBaseDate'],
108
+ ['bad-date-alpha', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260A10', exchangeRate: 10.25, currencyCode: 'USD' }, 'exactBaseDate'],
109
+ ['bad-date-fullwidth', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260810', exchangeRate: 10.25, currencyCode: 'USD' }, 'exactBaseDate'],
110
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'],
111
+ ['bad-currency-digit', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260810', exchangeRate: 10.25, currencyCode: 'US1' }, 'currencyCode'],
112
+ ['bad-currency-short', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260810', exchangeRate: 10.25, currencyCode: 'US' }, 'currencyCode'],
113
+ ['bad-currency-long', { isSupported: true, baseDate: '20260810', exactBaseDate: '20260810', exchangeRate: 10.25, currencyCode: 'USDX' }, 'currencyCode'],
114
114
  ['unsupported-extra-key', readJsonFixture('unsupported-extra-key'), 'unsupported key set'],
115
115
  ]) {
116
116
  if (isGetExchangeRateByCountryCodeExactResult(value)) {
@@ -1 +1 @@
1
- {"isSupported":true,"baseDate":"20260810","exchangeRate":10.25,"currencyCode":"usd"}
1
+ {"isSupported":true,"baseDate":"20260810","exactBaseDate":"20260810","exchangeRate":10.25,"currencyCode":"usd"}
@@ -1 +1 @@
1
- {"isSupported":true,"baseDate":"2026-08-10","exchangeRate":10.25,"currencyCode":"USD"}
1
+ {"isSupported":true,"baseDate":"20260810","exactBaseDate":"2026-08-10","exchangeRate":10.25,"currencyCode":"USD"}
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "isSupported": true,
3
3
  "baseDate": "20260810",
4
+ "exactBaseDate": "20260810",
4
5
  "exchangeRate": 0,
5
6
  "currencyCode": "USD"
6
7
  }
@@ -1 +1 @@
1
- {"isSupported":true,"baseDate":"20260810","exchangeRate":7.45,"currencyCode":"CAD"}
1
+ {"isSupported":true,"baseDate":"20260810","exactBaseDate":"20260810","exchangeRate":7.45,"currencyCode":"CAD"}
@@ -1 +1 @@
1
- {"isSupported":true,"baseDate":"20260810","exchangeRate":9.01,"currencyCode":"JPY"}
1
+ {"isSupported":true,"baseDate":"20260810","exactBaseDate":"20260810","exchangeRate":9.01,"currencyCode":"JPY"}
@@ -1 +1 @@
1
- {"isSupported":true,"baseDate":"20260810","exchangeRate":10.25,"currencyCode":"USD"}
1
+ {"isSupported":true,"baseDate":"20260810","exactBaseDate":"20260810","exchangeRate":10.25,"currencyCode":"USD"}