From eebd85e68f456d70d74e65ec7edb418a0190af2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Ba=C4=8Dov=C4=8Din?= Date: Mon, 2 Mar 2026 06:42:12 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74595=20[invit?= =?UTF-8?q?y-api]=20add=20subdivision=20to=20lists=20and=20statusUrl=20to?= =?UTF-8?q?=20trades=20by=20@hehe100596?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/invity-api/index.d.ts | 13 +++++-- types/invity-api/invity-api-tests.ts | 55 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/types/invity-api/index.d.ts b/types/invity-api/index.d.ts index 0c0caf9fc5ff8c..a85e0a35d9e41d 100644 --- a/types/invity-api/index.d.ts +++ b/types/invity-api/index.d.ts @@ -100,6 +100,10 @@ export interface BuySellProviderMetadata extends ProviderMetadata { disabledSubdivisions?: Subdivisions; } +export interface TradeCommon { + statusUrl?: string | null; // URL with ID assigned to the trade by the provider to check status; if null, do not show any status url +} + // buy types export type BuyTradeFinalStatus = @@ -160,6 +164,7 @@ export interface BuyProviderInfo extends BuySellProviderMetadata { export interface BuyListResponse { country: string; + subdivision?: string; suggestedFiatCurrency?: string | undefined; // optional field, fiat currency based on user's IP providers: BuyProviderInfo[]; defaultAmountsOfFiatCurrencies: FiatCurrenciesProps; @@ -180,7 +185,7 @@ export interface BuyTradeQuoteRequest { export type BuyTradeQuoteResponse = BuyTrade[]; -export interface BuyTrade { +export interface BuyTrade extends TradeCommon { fiatAmount?: number | undefined; // 1000 - DEPRECATED, used only for TREZOR fiatStringAmount?: string | undefined; // 1000 - will pay fiat amount fiatCurrency?: string | undefined; // EUR @@ -294,7 +299,7 @@ export type DexApprovalType = | "ZERO" // resets approval | "PRESET"; // PRESET takes value from approvalStringAmount -export interface ExchangeTrade { +export interface ExchangeTrade extends TradeCommon { send?: CryptoId | undefined; // bitcoin sendStringAmount?: string | undefined; // "0.01" @@ -314,7 +319,6 @@ export interface ExchangeTrade { signature?: string | undefined; // Evercoin only, passed from createTrade response to confirmTrade request orderId?: string | undefined; // internal ID assigned to the trade by the exchange quoteId?: string | undefined; - statusUrl?: string | undefined; // internal URL + ID assigned to the trade by the exchange to check status status?: ExchangeTradeStatus | undefined; // state of trade after confirmTrade error?: string | undefined; // something went wrong after confirmTrade receiveTxHash?: string | undefined; // hash of tx from exchange to user or DEX swap @@ -494,6 +498,7 @@ export interface SellProviderInfo extends BuySellProviderMetadata { export interface SellListResponse { country: string; + subdivision?: string; providers: SellProviderInfo[]; } @@ -515,7 +520,7 @@ export interface SellFiatTradeQuoteRequest { export type SellFiatTradeQuoteResponse = SellFiatTrade[]; -export interface SellFiatTrade { +export interface SellFiatTrade extends TradeCommon { amountInCrypto?: boolean | undefined; // true for cryptoAmount, false for fiatAmount fiatStringAmount?: string | undefined; // 1000 fiatCurrency?: string | undefined; // EUR diff --git a/types/invity-api/invity-api-tests.ts b/types/invity-api/invity-api-tests.ts index 7e9c8b8043fb54..16e41d94e69d03 100644 --- a/types/invity-api/invity-api-tests.ts +++ b/types/invity-api/invity-api-tests.ts @@ -1,4 +1,5 @@ import { + BuyListResponse, BuyProviderInfo, BuyTrade, ConfirmExchangeTradeRequest, @@ -12,6 +13,7 @@ import { InfoResponse, SellFiatTrade, SellFiatTradeSigned, + SellListResponse, SellProviderInfo, WatchSellTradeResponse, } from "invity-api"; @@ -178,3 +180,56 @@ const exchangeTradeQuoteRequest: ExchangeTradeQuoteRequest = { fromAddress: "fromAddress", receiveAddress: "receiveAddress", }; + +const buyListResponse: BuyListResponse = { + country: "US", + subdivision: "WA", + suggestedFiatCurrency: "USD", + providers: [providerInfo], + defaultAmountsOfFiatCurrencies: { + usd: 1, + eur: 1, + gbp: 1, + aed: 1, + ars: 1, + aud: 1, + bdt: 1, + brl: 1, + cad: 1, + chf: 1, + clp: 1, + cny: 1, + czk: 1, + dkk: 1, + hkd: 1, + huf: 1, + idr: 1, + ils: 1, + inr: 1, + jpy: 1, + krw: 1, + kwd: 1, + lkr: 1, + mxn: 1, + myr: 1, + nok: 1, + nzd: 1, + php: 1, + pln: 1, + rub: 1, + sar: 1, + sek: 1, + sgd: 1, + thb: 1, + try: 1, + twd: 1, + vnd: 1, + zar: 1, + }, +}; + +const sellListResponse: SellListResponse = { + country: "US", + subdivision: "WA", + providers: [sellProviderInfo], +}; From 73ce84c3a8bb17c542e7f9a8ef00eae6b24a28d9 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 2 Mar 2026 08:24:24 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A4=96=20Update=20CODEOWNERS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4ff44126e3a0c5..67b425461f044d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3445,6 +3445,7 @@ /types/is-color/ @VitorLuizC /types/is-core-module/ @peterblazejewicz /types/is-data-descriptor/ @Richienb +/types/is-deflate/ @MattIPv4 /types/is-dom/ @peterblazejewicz /types/is-domain-name/ @BendingBender /types/is-dotdir/ @BendingBender @@ -3618,6 +3619,7 @@ /types/jquery/ @leonard-thieu @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @terrymun @martin-badin @princefishthrower /types/jquery/v1/ @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @leonard-thieu /types/jquery/v2/ @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @leonard-thieu +/types/jquery/v3/ @leonard-thieu @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @terrymun @martin-badin @princefishthrower /types/jquery-ajax-chain/ @humana-fragilitas /types/jquery-alertable/ @stever /types/jquery-animate-scroll/ @AndersonFriaca From 8a4c291cdd13ce1ab5b165d1baa000b5f1568b6d Mon Sep 17 00:00:00 2001 From: Elias Watson Date: Mon, 2 Mar 2026 08:58:19 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74537=20svg-to?= =?UTF-8?q?-pdfkit:=20Update=20types=20by=20@EliasWatson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/svg-to-pdfkit/index.d.ts | 43 +++++++++++++++++++--- types/svg-to-pdfkit/svg-to-pdfkit-tests.ts | 17 ++++----- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/types/svg-to-pdfkit/index.d.ts b/types/svg-to-pdfkit/index.d.ts index b9f7f5a46c7b81..b93e2744aa14fb 100644 --- a/types/svg-to-pdfkit/index.d.ts +++ b/types/svg-to-pdfkit/index.d.ts @@ -1,30 +1,63 @@ import PDFDocument = require("pdfkit"); +/** + * Insert SVG into a PDF document created with PDFKit. + * + * @param doc the PDF document created with PDFKit + * @param svg the SVG object or XML code + * @param x the x position where the SVG will be added + * @param y the y position where the SVG will be added + * @param options See {@link SVGtoPDF.Options} + */ declare function SVGtoPDF( doc: typeof PDFDocument, svg: SVGElement | string, x?: number, y?: number, - options?: SVGtoPDF.SVGtoPDFOptions, + options?: SVGtoPDF.Options, ): void; declare namespace SVGtoPDF { - interface SVGtoPDFOptions { + type Color = [[number, number, number], number]; + interface Options { + /** initial viewport width, by default it's the page width */ width?: number; + + /** initial viewport width, by default it's the page height */ height?: number; + + /** override alignment of the SVG content inside its viewport */ preserveAspectRatio?: string; + + /** use the CSS styles computed by the browser (for SVGElement only) */ useCSS?: boolean; + + /** function called to get the fonts, see source code */ fontCallback?: ( family: string, bold: boolean, italic: boolean, fontOptions: { fauxItalic: boolean; fauxBold: boolean }, ) => string; + + /** same as above for the images (for Node.js) */ imageCallback?: (link: string) => string; - documentCallback?: (file: string) => string; - colorCallback?: (result: string, raw: string) => [[number, number, number], number]; - warningCallback?: (str: string) => void; + + /** same as above for the external SVG documents */ + documentCallback?: ( + file: string, + ) => SVGElement | string | (SVGElement | string)[]; + + /** function called to get color, making mapping to CMYK possible */ + colorCallback?: (color: Color) => Color; + + /** function called when there is a warning */ + warningCallback?: (warning: string) => void; + + /** assume that units are PDF points instead of SVG pixels */ assumePt?: boolean; + + /** precision factor for approximate calculations (default = 3) */ precision?: number; } } diff --git a/types/svg-to-pdfkit/svg-to-pdfkit-tests.ts b/types/svg-to-pdfkit/svg-to-pdfkit-tests.ts index 1ce557de13dddb..b11668c094d4e0 100644 --- a/types/svg-to-pdfkit/svg-to-pdfkit-tests.ts +++ b/types/svg-to-pdfkit/svg-to-pdfkit-tests.ts @@ -9,13 +9,13 @@ SvgToPdf(doc, "", 100, 100); // $ExpectType void SvgToPdf(doc, "", 100, 100, {}); // $ExpectType void -// https://github.com/alafr/SVG-to-PDFKit/blob/4d2d8746bda1e9335c47bbe9ad91277c51fd5a07/source.js#L2477 -const options: SvgToPdf.SVGtoPDFOptions = { +// https://github.com/alafr/SVG-to-PDFKit/blob/b091ebd4e7b7d2310eb1003511cd5de480f7e0e1/source.js#L2617 +const options: SvgToPdf.Options = { width: 100, height: 100, preserveAspectRatio: "xMinYMin", useCSS: true, - // https://github.com/alafr/SVG-to-PDFKit/blob/4d2d8746bda1e9335c47bbe9ad91277c51fd5a07/source.js#L2500 + // https://github.com/alafr/SVG-to-PDFKit/blob/b091ebd4e7b7d2310eb1003511cd5de480f7e0e1/source.js#L2640 fontCallback: (family, bold, italic, fontOptions) => { family; // $ExpectType string bold; // $ExpectType boolean @@ -24,18 +24,17 @@ const options: SvgToPdf.SVGtoPDFOptions = { fontOptions.fauxItalic; // $ExpectType boolean return family; }, - // https://github.com/alafr/SVG-to-PDFKit/blob/4d2d8746bda1e9335c47bbe9ad91277c51fd5a07/source.js#L2558 + // https://github.com/alafr/SVG-to-PDFKit/blob/b091ebd4e7b7d2310eb1003511cd5de480f7e0e1/source.js#L2698 imageCallback: link => { link; // $ExpectType string return link; }, - // https://github.com/alafr/SVG-to-PDFKit/blob/4d2d8746bda1e9335c47bbe9ad91277c51fd5a07/source.js#L2562 - colorCallback: (result, row) => { - result; // $ExpectType string - row; // $ExpectType string + // https://github.com/alafr/SVG-to-PDFKit/blob/b091ebd4e7b7d2310eb1003511cd5de480f7e0e1/source.js#L2703 + colorCallback: (color) => { + color; // $ExpectType Color return [[255, 255, 255], 1]; }, - // https://github.com/alafr/SVG-to-PDFKit/blob/4d2d8746bda1e9335c47bbe9ad91277c51fd5a07/source.js#L2494 + // https://github.com/alafr/SVG-to-PDFKit/blob/b091ebd4e7b7d2310eb1003511cd5de480f7e0e1/source.js#L2635 warningCallback: str => { str; // $ExpectType string console.log(str);