Skip to content

Commit

Permalink
chore: release
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioMH8 committed Jan 28, 2025
1 parent e6e2428 commit 09d4ac5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 22 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# scryfall-api

## 4.0.2

### Patch Changes

- Export Card types

## 4.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scryfall-api",
"version": "4.0.1",
"version": "4.0.2",
"description": "A Javascript library for https://scryfall.com/docs/api written in Typescript.",
"keywords": [
"magic",
Expand Down
12 changes: 2 additions & 10 deletions src/api/card/card-gameplay.types.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import type { Nullable } from '../../types';
import type { Color } from '../symbology';
import type { ImageUris } from './card-image-uris.types';

type CardComponent = 'combo_piece' | 'meld_part' | 'meld_result' | 'token';

type Legality = 'banned' | 'legal' | 'not_legal' | 'restricted';

interface ImageUris {
art_crop: string;
border_crop: string;
large: string;
normal: string;
png: string;
small: string;
}

interface CardFace {
artist?: Nullable<string>;
artist_id?: Nullable<string>;
Expand Down Expand Up @@ -99,4 +91,4 @@ interface GameplayCard {
type_line: string;
}

export type { CardComponent, CardFace, GameplayCard, ImageUris, Legalities, Legality, RelatedCard };
export type { CardComponent, CardFace, GameplayCard, Legalities, Legality, RelatedCard };
8 changes: 8 additions & 0 deletions src/api/card/card-image-uris.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface ImageUris {
art_crop: string;
border_crop: string;
large: string;
normal: string;
png: string;
small: string;
}
13 changes: 3 additions & 10 deletions src/api/card/card-print.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Nullable } from '../../types';
import type { SetType } from '../set';
import type { ImageUris } from './card-image-uris.types';

type BorderColor = 'black' | 'borderless' | 'gold' | 'silver' | 'white';

Expand Down Expand Up @@ -36,15 +37,6 @@ type Game = 'arena' | 'mtgo' | 'paper';

type ImageStatus = 'highres_scan' | 'lowres' | 'missing' | 'placeholder';

interface ImageUris {
art_crop: string;
border_crop: string;
large: string;
normal: string;
png: string;
small: string;
}

interface Preview {
previewed_at: Date;
source: string;
Expand Down Expand Up @@ -165,7 +157,6 @@ export type {
FrameEffect,
Game,
ImageStatus,
ImageUris,
Preview,
Prices,
PromoType,
Expand All @@ -174,3 +165,5 @@ export type {
RelatedUris,
SecurityStamp,
};

export { type ImageUris } from './card-image-uris.types';
23 changes: 22 additions & 1 deletion src/api/card/card.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,25 @@ import type { CardCore } from './card-core.types';
import type { GameplayCard } from './card-gameplay.types';
import type { CardPrint } from './card-print.types';

export type Card = CardCore & CardPrint & GameplayCard;
type Card = CardCore & CardPrint & GameplayCard;

export type { Card };

export type { CardLanguage, CardLayout } from './card-core.types';
export type { CardComponent, CardFace, Legalities, Legality, RelatedCard } from './card-gameplay.types';
export type { ImageUris } from './card-image-uris.types';
export type {
BorderColor,
Finish,
Frame,
FrameEffect,
Game,
ImageStatus,
Preview,
Prices,
PromoType,
PurchaseUris,
Rarity,
RelatedUris,
SecurityStamp,
} from './card-print.types';

0 comments on commit 09d4ac5

Please sign in to comment.