scryfall-api 3.2.1 → 3.2.3

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.
Files changed (64) hide show
  1. package/dist/index.d.ts +589 -0
  2. package/dist/scryfall-api.mjs +307 -0
  3. package/dist/scryfall-api.umd.js +1 -0
  4. package/package.json +35 -49
  5. package/dist/declarations/dist/src/api/CardIdentifierBuilder.d.ts +0 -10
  6. package/dist/declarations/dist/src/api/Cards.d.ts +0 -19
  7. package/dist/declarations/dist/src/api/Catalog.d.ts +0 -18
  8. package/dist/declarations/dist/src/api/Rulings.d.ts +0 -11
  9. package/dist/declarations/dist/src/api/Sets.d.ts +0 -10
  10. package/dist/declarations/dist/src/api/Symbology.d.ts +0 -8
  11. package/dist/declarations/dist/src/error/MagicQueryError.d.ts +0 -5
  12. package/dist/declarations/dist/src/index.d.ts +0 -10
  13. package/dist/declarations/dist/src/query/MagicPageResult.d.ts +0 -18
  14. package/dist/declarations/dist/src/query/MagicQuery.d.ts +0 -13
  15. package/dist/declarations/dist/src/types/Border.d.ts +0 -7
  16. package/dist/declarations/dist/src/types/BulkDataDefinition.d.ts +0 -14
  17. package/dist/declarations/dist/src/types/BulkDataType.d.ts +0 -2
  18. package/dist/declarations/dist/src/types/BulkDataTypes.d.ts +0 -7
  19. package/dist/declarations/dist/src/types/Card.d.ts +0 -91
  20. package/dist/declarations/dist/src/types/CardFace.d.ts +0 -22
  21. package/dist/declarations/dist/src/types/CardIdentifier.d.ts +0 -10
  22. package/dist/declarations/dist/src/types/CardSymbol.d.ts +0 -13
  23. package/dist/declarations/dist/src/types/Color.d.ts +0 -9
  24. package/dist/declarations/dist/src/types/Format.d.ts +0 -15
  25. package/dist/declarations/dist/src/types/FrameEffect.d.ts +0 -17
  26. package/dist/declarations/dist/src/types/Game.d.ts +0 -5
  27. package/dist/declarations/dist/src/types/HomepageLink.d.ts +0 -9
  28. package/dist/declarations/dist/src/types/ImageUris.d.ts +0 -8
  29. package/dist/declarations/dist/src/types/Layout.d.ts +0 -22
  30. package/dist/declarations/dist/src/types/Legalties.d.ts +0 -5
  31. package/dist/declarations/dist/src/types/Legalty.d.ts +0 -6
  32. package/dist/declarations/dist/src/types/ManaCost.d.ts +0 -9
  33. package/dist/declarations/dist/src/types/PageQuery.d.ts +0 -5
  34. package/dist/declarations/dist/src/types/PageQueryValue.d.ts +0 -1
  35. package/dist/declarations/dist/src/types/Preview.d.ts +0 -5
  36. package/dist/declarations/dist/src/types/Prices.d.ts +0 -6
  37. package/dist/declarations/dist/src/types/PromoType.d.ts +0 -27
  38. package/dist/declarations/dist/src/types/PurchaseUris.d.ts +0 -6
  39. package/dist/declarations/dist/src/types/Query.d.ts +0 -4
  40. package/dist/declarations/dist/src/types/Rarity.d.ts +0 -6
  41. package/dist/declarations/dist/src/types/RelatedCard.d.ts +0 -9
  42. package/dist/declarations/dist/src/types/RelatedCardComponent.d.ts +0 -6
  43. package/dist/declarations/dist/src/types/RelatedUris.d.ts +0 -7
  44. package/dist/declarations/dist/src/types/ResultCatalog.d.ts +0 -2
  45. package/dist/declarations/dist/src/types/ResultData.d.ts +0 -4
  46. package/dist/declarations/dist/src/types/ResultList.d.ts +0 -7
  47. package/dist/declarations/dist/src/types/RetryStrategy.d.ts +0 -11
  48. package/dist/declarations/dist/src/types/Ruling.d.ts +0 -5
  49. package/dist/declarations/dist/src/types/SearchError.d.ts +0 -7
  50. package/dist/declarations/dist/src/types/SearchOptions.d.ts +0 -15
  51. package/dist/declarations/dist/src/types/Set.d.ts +0 -20
  52. package/dist/declarations/dist/src/types/SetType.d.ts +0 -22
  53. package/dist/declarations/dist/src/types/Sort.d.ts +0 -15
  54. package/dist/declarations/dist/src/types/SortDirection.d.ts +0 -5
  55. package/dist/declarations/dist/src/types/TOrArrayOfT.d.ts +0 -1
  56. package/dist/declarations/dist/src/types/UniqueStrategy.d.ts +0 -5
  57. package/dist/declarations/dist/src/types/index.d.ts +0 -42
  58. package/dist/scryfall-api.cjs.d.ts +0 -1
  59. package/dist/scryfall-api.cjs.dev.js +0 -645
  60. package/dist/scryfall-api.cjs.js +0 -7
  61. package/dist/scryfall-api.cjs.prod.js +0 -645
  62. package/dist/scryfall-api.esm.js +0 -631
  63. package/dist/scryfall-api.umd.min.js +0 -2
  64. package/dist/scryfall-api.umd.min.js.map +0 -1
@@ -1,91 +0,0 @@
1
- import { Border } from './Border';
2
- import { CardFace } from './CardFace';
3
- import { Color } from './Color';
4
- import { FrameEffect } from './FrameEffect';
5
- import { Game } from './Game';
6
- import { ImageUris } from './ImageUris';
7
- import { Layout } from './Layout';
8
- import { Legalities } from './Legalties';
9
- import { Preview } from './Preview';
10
- import { Prices } from './Prices';
11
- import { PromoType } from './PromoType';
12
- import { PurchaseUris } from './PurchaseUris';
13
- import { Rarity } from './Rarity';
14
- import { RelatedCard } from './RelatedCard';
15
- import { RelatedUris } from './RelatedUris';
16
- import { Set as ScryfallSet } from './Set';
17
- export interface Card {
18
- object: 'card';
19
- arena_id?: number;
20
- id: string;
21
- lang: string;
22
- mtgo_id?: number;
23
- mtgo_foil_id?: number;
24
- multiverse_ids?: number[];
25
- tcgplayer_id?: number;
26
- oracle_id: string;
27
- prints_search_uri: string;
28
- rulings_uri: string;
29
- scryfall_uri: string;
30
- uri: string;
31
- all_parts?: RelatedCard[];
32
- card_faces?: CardFace[];
33
- cmc: number;
34
- colors?: Color[];
35
- color_identity: Color[];
36
- color_indicator?: Color[];
37
- edhrec_rank?: number;
38
- foil: boolean;
39
- hand_modifier?: string;
40
- layout: keyof typeof Layout;
41
- legalities: Legalities;
42
- life_modifier?: string;
43
- loyalty?: string;
44
- mana_cost?: string;
45
- name: string;
46
- nonfoil: boolean;
47
- oracle_text?: string;
48
- oversized: boolean;
49
- power?: string;
50
- reserved: boolean;
51
- toughness?: string;
52
- type_line: string;
53
- artist?: string;
54
- artist_ids?: string[];
55
- booster: boolean;
56
- border_color: keyof typeof Border;
57
- card_back_id: string;
58
- collector_number: string;
59
- digital: boolean;
60
- flavor_text?: string;
61
- frame_effects?: (keyof typeof FrameEffect)[];
62
- frame: '1993' | '1997' | '2003' | '2015' | 'Future';
63
- full_art: boolean;
64
- games: (keyof typeof Game)[];
65
- highres_image: boolean;
66
- illustration_id?: string;
67
- image_uris?: ImageUris;
68
- prices: Prices;
69
- printed_name?: string;
70
- printed_text?: string;
71
- printed_type_line?: string;
72
- promo: boolean;
73
- promo_types?: (keyof typeof PromoType)[];
74
- purchase_uris: PurchaseUris;
75
- rarity: keyof typeof Rarity;
76
- related_uris: RelatedUris;
77
- released_at: string;
78
- reprint: boolean;
79
- scryfall_set_uri: string;
80
- set_name: string;
81
- set_search_uri: string;
82
- set_type: ScryfallSet['set_type'];
83
- set_uri: string;
84
- set: string;
85
- story_spotlight: boolean;
86
- textless: boolean;
87
- variation: boolean;
88
- variation_of?: string;
89
- watermark?: string;
90
- preview?: Preview;
91
- }
@@ -1,22 +0,0 @@
1
- import { Color } from './Color';
2
- import { ImageUris } from './ImageUris';
3
- export interface CardFace {
4
- object: 'card_face';
5
- artist?: string;
6
- color_indicator?: Color[];
7
- colors: Color[];
8
- flavor_text?: string;
9
- illustration_id?: string;
10
- image_uris?: ImageUris;
11
- loyalty?: string;
12
- mana_cost: string;
13
- name: string;
14
- oracle_text?: string;
15
- power?: string;
16
- printed_name?: string;
17
- printed_text?: string;
18
- printed_type_line?: string;
19
- toughness?: string;
20
- type_line: string;
21
- watermark?: string;
22
- }
@@ -1,10 +0,0 @@
1
- export interface CardIdentifier {
2
- id?: string;
3
- mtgo_id?: number;
4
- multiverse_id?: number;
5
- oracle_id?: string;
6
- illustration_id?: string;
7
- name?: string;
8
- set?: string;
9
- collector_number?: string;
10
- }
@@ -1,13 +0,0 @@
1
- import { Color } from './Color';
2
- export interface CardSymbol {
3
- symbol: string;
4
- loose_variant?: string;
5
- english: string;
6
- transposable: boolean;
7
- represents_mana: boolean;
8
- converted_mana_cost?: number;
9
- colors: Color[];
10
- appears_in_mana_costs: boolean;
11
- funny: boolean;
12
- gatherer_alternates?: string[];
13
- }
@@ -1,9 +0,0 @@
1
- declare enum Colors {
2
- W = 0,
3
- B = 1,
4
- R = 2,
5
- U = 3,
6
- G = 4
7
- }
8
- export declare type Color = keyof typeof Colors;
9
- export {};
@@ -1,15 +0,0 @@
1
- export declare enum Format {
2
- standard = 0,
3
- future = 1,
4
- historic = 2,
5
- pioneer = 3,
6
- modern = 4,
7
- legacy = 5,
8
- pauper = 6,
9
- vintage = 7,
10
- penny = 8,
11
- commander = 9,
12
- brawl = 10,
13
- duel = 11,
14
- oldschool = 12
15
- }
@@ -1,17 +0,0 @@
1
- export declare enum FrameEffect {
2
- legendary = 0,
3
- miracle = 1,
4
- nyxtouched = 2,
5
- draft = 3,
6
- devoid = 4,
7
- tombstone = 5,
8
- colorshifted = 6,
9
- inverted = 7,
10
- sunmoondfc = 8,
11
- compasslanddfc = 9,
12
- originpwdfc = 10,
13
- mooneldrazidfc = 11,
14
- moonreversemoondfc = 12,
15
- showcase = 13,
16
- extendedart = 14
17
- }
@@ -1,5 +0,0 @@
1
- export declare enum Game {
2
- paper = 0,
3
- arena = 1,
4
- mtgo = 2
5
- }
@@ -1,9 +0,0 @@
1
- export interface HomepageLink {
2
- id: number;
3
- created_at: string;
4
- updated_at: string;
5
- priority: number;
6
- text: string;
7
- uri: string;
8
- badge?: string;
9
- }
@@ -1,8 +0,0 @@
1
- export interface ImageUris {
2
- small: string;
3
- normal: string;
4
- large: string;
5
- png: string;
6
- art_crop: string;
7
- border_crop: string;
8
- }
@@ -1,22 +0,0 @@
1
- export declare enum Layout {
2
- normal = 0,
3
- split = 1,
4
- flip = 2,
5
- transform = 3,
6
- modal_dfc = 4,
7
- meld = 5,
8
- leveler = 6,
9
- 'class' = 7,
10
- saga = 8,
11
- adventure = 9,
12
- planar = 10,
13
- scheme = 11,
14
- vanguard = 12,
15
- token = 13,
16
- double_faced_token = 14,
17
- emblem = 15,
18
- augment = 16,
19
- host = 17,
20
- art_series = 18,
21
- reversible_card = 19
22
- }
@@ -1,5 +0,0 @@
1
- import { Format } from './Format';
2
- import { Legality } from './Legalty';
3
- export declare type Legalities = {
4
- [key in keyof typeof Format]: keyof typeof Legality;
5
- };
@@ -1,6 +0,0 @@
1
- export declare enum Legality {
2
- legal = 0,
3
- not_legal = 1,
4
- restricted = 2,
5
- banned = 3
6
- }
@@ -1,9 +0,0 @@
1
- import { Color } from './Color';
2
- export interface ManaCost {
3
- cost: string;
4
- cmc: number;
5
- colors: Color[];
6
- colorless: boolean;
7
- monocolored: boolean;
8
- multicolored: boolean;
9
- }
@@ -1,5 +0,0 @@
1
- import { QueryValue } from './PageQueryValue';
2
- export declare type PageQuery = {
3
- [key: string]: QueryValue;
4
- page: number;
5
- };
@@ -1 +0,0 @@
1
- export declare type QueryValue = string | number | boolean | undefined;
@@ -1,5 +0,0 @@
1
- export interface Preview {
2
- previewed_at?: string;
3
- source_uri?: string;
4
- source?: string;
5
- }
@@ -1,6 +0,0 @@
1
- export interface Prices {
2
- usd?: string;
3
- usd_foil?: string;
4
- eur?: string;
5
- tix?: string;
6
- }
@@ -1,27 +0,0 @@
1
- export declare enum PromoType {
2
- tourney = 0,
3
- prerelease = 1,
4
- datestamped = 2,
5
- planeswalkerdeck = 3,
6
- buyabox = 4,
7
- judgegift = 5,
8
- event = 6,
9
- convention = 7,
10
- starterdeck = 8,
11
- instore = 9,
12
- setpromo = 10,
13
- fnm = 11,
14
- openhouse = 12,
15
- league = 13,
16
- draftweekend = 14,
17
- gameday = 15,
18
- release = 16,
19
- intropack = 17,
20
- giftbox = 18,
21
- duels = 19,
22
- wizardsplaynetwork = 20,
23
- premiereshop = 21,
24
- playerrewards = 22,
25
- gateway = 23,
26
- arenaleague = 24
27
- }
@@ -1,6 +0,0 @@
1
- export interface PurchaseUris {
2
- tcgplayer?: string;
3
- cardmarket?: string;
4
- cardhoarder?: string;
5
- [key: string]: string | undefined;
6
- }
@@ -1,4 +0,0 @@
1
- import { QueryValue } from './PageQueryValue';
2
- export declare type Query = {
3
- [key: string]: QueryValue;
4
- };
@@ -1,6 +0,0 @@
1
- export declare enum Rarity {
2
- common = 0,
3
- uncommon = 1,
4
- rare = 2,
5
- mythic = 3
6
- }
@@ -1,9 +0,0 @@
1
- import { RelatedCardComponent } from './RelatedCardComponent';
2
- export interface RelatedCard {
3
- component: keyof typeof RelatedCardComponent;
4
- id: string;
5
- name: string;
6
- object: 'related_card';
7
- type_line: string;
8
- uri: string;
9
- }
@@ -1,6 +0,0 @@
1
- export declare enum RelatedCardComponent {
2
- token = 0,
3
- meld_part = 1,
4
- meld_result = 2,
5
- combo_piece = 3
6
- }
@@ -1,7 +0,0 @@
1
- export interface RelatedUris {
2
- gatherer?: string;
3
- tcgplayer_decks?: string;
4
- edhrec?: string;
5
- mtgtop8?: string;
6
- [key: string]: string | undefined;
7
- }
@@ -1,2 +0,0 @@
1
- import { ResultData } from './ResultData';
2
- export declare type ResultCatalog = ResultData<string>;
@@ -1,4 +0,0 @@
1
- export interface ResultData<T, NOT_FOUND = never> {
2
- data: T[];
3
- not_found?: NOT_FOUND[];
4
- }
@@ -1,7 +0,0 @@
1
- import { ResultData } from './ResultData';
2
- export interface ResultList<T, NOT_FOUND = never> extends ResultData<T, NOT_FOUND> {
3
- has_more: boolean;
4
- next_page: string;
5
- total_cards: string;
6
- warnings: string[];
7
- }
@@ -1,11 +0,0 @@
1
- import { SearchError } from './SearchError';
2
- export interface RetryStrategy {
3
- attempts: number;
4
- timeout?: number;
5
- /**
6
- * Whether even `not_found` and `bad_request` errors should be retried.
7
- * @deprecated Don't use this, this is for unit tests
8
- */
9
- forced?: boolean;
10
- canRetry?(error?: SearchError): boolean;
11
- }
@@ -1,5 +0,0 @@
1
- export interface Ruling {
2
- source: string;
3
- published_at: string;
4
- comment: string;
5
- }
@@ -1,7 +0,0 @@
1
- export interface SearchError {
2
- object: 'error';
3
- code: string;
4
- status: number;
5
- details: string;
6
- warnings?: string[];
7
- }
@@ -1,15 +0,0 @@
1
- import { Sort } from './Sort';
2
- import { SortDirection } from './SortDirection';
3
- import { UniqueStrategy } from './UniqueStrategy';
4
- export interface SearchOptions {
5
- unique?: keyof typeof UniqueStrategy;
6
- order?: keyof typeof Sort;
7
- dir?: keyof typeof SortDirection;
8
- include_extras?: boolean;
9
- include_multilingual?: boolean;
10
- include_variations?: boolean;
11
- /**
12
- * The page to start on. Defaults to `1`, for first page. A page is 175 cards.
13
- */
14
- page?: number;
15
- }
@@ -1,20 +0,0 @@
1
- import { SetType } from './SetType';
2
- export interface Set {
3
- id: string;
4
- code: string;
5
- mtgo_code?: string;
6
- tcgplayer_id?: number;
7
- name: string;
8
- set_type: keyof typeof SetType;
9
- released_at?: string;
10
- block_code?: string;
11
- block?: string;
12
- parent_set_code?: string;
13
- card_count: number;
14
- digital: boolean;
15
- foil_only: boolean;
16
- scryfall_uri: string;
17
- uri: string;
18
- icon_svg_uri: string;
19
- search_uri: string;
20
- }
@@ -1,22 +0,0 @@
1
- export declare enum SetType {
2
- core = 0,
3
- expansion = 1,
4
- masters = 2,
5
- masterpiece = 3,
6
- from_the_vault = 4,
7
- spellbook = 5,
8
- premium_deck = 6,
9
- duel_deck = 7,
10
- draft_innovation = 8,
11
- treasure_chest = 9,
12
- commander = 10,
13
- planechase = 11,
14
- archenemy = 12,
15
- vanguard = 13,
16
- funny = 14,
17
- starter = 15,
18
- box = 16,
19
- promo = 17,
20
- token = 18,
21
- memorabilia = 19
22
- }
@@ -1,15 +0,0 @@
1
- export declare enum Sort {
2
- name = 0,
3
- set = 1,
4
- released = 2,
5
- rarity = 3,
6
- color = 4,
7
- usd = 5,
8
- tix = 6,
9
- eur = 7,
10
- cmc = 8,
11
- power = 9,
12
- toughness = 10,
13
- edhrec = 11,
14
- artist = 12
15
- }
@@ -1,5 +0,0 @@
1
- export declare enum SortDirection {
2
- auto = 0,
3
- asc = 1,
4
- desc = 2
5
- }
@@ -1 +0,0 @@
1
- export declare type TOrArrayOfT<T> = T | T[];
@@ -1,5 +0,0 @@
1
- export declare enum UniqueStrategy {
2
- cards = 0,
3
- art = 1,
4
- prints = 2
5
- }
@@ -1,42 +0,0 @@
1
- export * from './Border';
2
- export * from './BulkDataDefinition';
3
- export * from './BulkDataType';
4
- export * from './BulkDataTypes';
5
- export * from './Card';
6
- export * from './CardFace';
7
- export * from './CardIdentifier';
8
- export * from './CardSymbol';
9
- export * from './Color';
10
- export * from './Format';
11
- export * from './FrameEffect';
12
- export * from './Game';
13
- export * from './HomepageLink';
14
- export * from './ImageUris';
15
- export * from './Layout';
16
- export * from './Legalties';
17
- export * from './Legalty';
18
- export * from './ManaCost';
19
- export * from './PageQuery';
20
- export * from './PageQueryValue';
21
- export * from './Preview';
22
- export * from './Prices';
23
- export * from './PromoType';
24
- export * from './PurchaseUris';
25
- export * from './Query';
26
- export * from './Rarity';
27
- export * from './RelatedCard';
28
- export * from './RelatedCardComponent';
29
- export * from './RelatedUris';
30
- export * from './ResultCatalog';
31
- export * from './ResultData';
32
- export * from './ResultList';
33
- export * from './RetryStrategy';
34
- export * from './Ruling';
35
- export * from './SearchError';
36
- export * from './SearchOptions';
37
- export * from './Set';
38
- export * from './SetType';
39
- export * from './Sort';
40
- export * from './SortDirection';
41
- export * from './TOrArrayOfT';
42
- export * from './UniqueStrategy';
@@ -1 +0,0 @@
1
- export * from "./declarations/dist/src/index";