protobuf-platform 1.2.752 → 1.2.754

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.752",
3
+ "version": "1.2.754",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ const assert = require('node:assert/strict');
3
+ const { config } = require('..');
4
+ const { HistoricalCurrencyRatesRequest: Request, HistoricalCurrencyRatesResponse: Response,
5
+ HistoricalCurrencyRateItem: Item, CurrencyRatesMapRequest: Legacy } = config.messages;
6
+ const r = new Request();
7
+ r.setEnvironment('staging'); r.setCustomer('rtp'); r.setUtcDate('2026-07-02');
8
+ r.setBaseCurrency('EUR'); r.setQuoteCurrenciesList(['USD', 'GBP']);
9
+ assert.deepEqual(Request.deserializeBinary(r.serializeBinary()).toObject(), r.toObject());
10
+ const item = new Item();
11
+ item.setBaseCurrency('EUR'); item.setQuoteCurrency('USD');
12
+ item.setRequestedDate('2026-07-02'); item.setEffectiveDate('2026-07-02');
13
+ item.setRateDecimal('1.123456789012345678901234'); item.setPrecision(24);
14
+ item.setSource('frankfurter'); item.setProvenance('historical_reference');
15
+ item.setUnresolvedReason(''); item.setEvidenceJson('{"rate":"1.123456789012345678901234"}');
16
+ const response = new Response(); response.setItemsList([item]);
17
+ assert.deepEqual(Response.deserializeBinary(response.serializeBinary()).toObject(), response.toObject());
18
+ assert.equal(typeof config.service.ConfigService.getHistoricalCurrencyRates.requestSerialize, 'function');
19
+ assert.equal(typeof new Legacy().setWithdrawalLastKnownRate, 'function');
20
+ console.log('Historical FX contract: exact decimal wire, provenance, RPC and legacy compatibility PASS');