@blizzard-api/hs 3.1.1 → 3.1.2
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/dist/decks/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getDeck } from "../index-
|
|
1
|
+
import { t as getDeck } from "../index-BqB5vnYO.js";
|
|
2
2
|
export { getDeck };
|
package/dist/decks/index.js
CHANGED
|
@@ -12,7 +12,8 @@ function getDeck(options) {
|
|
|
12
12
|
return {
|
|
13
13
|
parameters: {
|
|
14
14
|
hero: options.hero?.toString(),
|
|
15
|
-
ids: options.ids?.join(",")
|
|
15
|
+
ids: options.ids?.join(","),
|
|
16
|
+
sideboardCards: Array.isArray(options.sideboardCards) ? options.sideboardCards.join(",") : options.sideboardCards
|
|
16
17
|
},
|
|
17
18
|
path: "hearthstone/deck"
|
|
18
19
|
};
|
package/dist/decks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/decks/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { DeckResponse, DeckSearchParameters } from './types';\n\n/**\n * Returns a deck based on the code provided.\n * @param options The options for fetching a deck.\n * @returns The deck resource. See {@link DeckResponse}.\n */\nexport function getDeck(\n options
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/decks/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { DeckResponse, DeckSearchParameters } from './types';\n\n/**\n * Returns a deck based on the code provided.\n * @param options The options for fetching a deck.\n * @returns The deck resource. See {@link DeckResponse}.\n */\nexport function getDeck(\n options:\n | { code: string }\n | {\n hero?: number | string;\n ids: Array<number | string>;\n //Undocumented parameter used for sideboard cards for Zilliax Deluxe 3000 and E.T.C., Band Manager.\n sideboardCards?: `${number}:${number}` | Array<`${number}:${number}`>;\n },\n): Resource<DeckResponse, DeckSearchParameters> {\n if ('code' in options) {\n return {\n parameters: {\n code: encodeURI(options.code),\n },\n path: 'hearthstone/deck',\n };\n }\n\n return {\n parameters: {\n hero: options.hero?.toString(),\n ids: options.ids?.join(','),\n sideboardCards: Array.isArray(options.sideboardCards) ? options.sideboardCards.join(',') : options.sideboardCards,\n },\n path: 'hearthstone/deck',\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,QACd,SAQ8C;CAC9C,IAAI,UAAU,SACZ,OAAO;EACL,YAAY,EACV,MAAM,UAAU,QAAQ,IAAI,EAC9B;EACA,MAAM;CACR;CAGF,OAAO;EACL,YAAY;GACV,MAAM,QAAQ,MAAM,SAAS;GAC7B,KAAK,QAAQ,KAAK,KAAK,GAAG;GAC1B,gBAAgB,MAAM,QAAQ,QAAQ,cAAc,IAAI,QAAQ,eAAe,KAAK,GAAG,IAAI,QAAQ;EACrG;EACA,MAAM;CACR;AACF"}
|
|
@@ -15,6 +15,7 @@ type DeckSearchParameters = {
|
|
|
15
15
|
} | {
|
|
16
16
|
hero?: string;
|
|
17
17
|
ids: string;
|
|
18
|
+
sideboardCards?: string;
|
|
18
19
|
};
|
|
19
20
|
interface Card {
|
|
20
21
|
armor?: number;
|
|
@@ -88,7 +89,8 @@ declare function getDeck(options: {
|
|
|
88
89
|
} | {
|
|
89
90
|
hero?: number | string;
|
|
90
91
|
ids: Array<number | string>;
|
|
92
|
+
sideboardCards?: `${number}:${number}` | Array<`${number}:${number}`>;
|
|
91
93
|
}): Resource<DeckResponse, DeckSearchParameters>;
|
|
92
94
|
//#endregion
|
|
93
95
|
export { DeckResponse as n, DeckSearchParameters as r, getDeck as t };
|
|
94
|
-
//# sourceMappingURL=index-
|
|
96
|
+
//# sourceMappingURL=index-BqB5vnYO.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SearchOptions, i as CardBackSearchResponse, n as fetchOneCardBack, o as SingleCardBackSearchResponse, r as CardBackSearchParameters, s as SortOptions, t as cardBackSearch } from "./index-DISoZUa9.js";
|
|
2
2
|
import { a as CardSearchResponse, i as CardSearchParameters, n as fetchOneCard, o as FetchOneCardResponse, r as BlizzardCardSearchParameters, s as GameMode, t as cardSearch } from "./index-D6Vnhl2r.js";
|
|
3
|
-
import { n as DeckResponse, r as DeckSearchParameters, t as getDeck } from "./index-
|
|
3
|
+
import { n as DeckResponse, r as DeckSearchParameters, t as getDeck } from "./index-BqB5vnYO.js";
|
|
4
4
|
import { i as SpecificMetadataResponse, n as specificMetadata, r as AllMetadataResponse, t as allMetadata } from "./index-hPXfx360.js";
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
declare const hs: {
|