one-piece-card-game-json 0.1.6 → 0.1.7

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 (3) hide show
  1. package/index.d.ts +30 -19
  2. package/index.js +8 -10
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,25 +1,36 @@
1
- declare module 'one-piece-card-game-json-all' {
2
- const all: any;
3
- export default all;
1
+ export interface Card {
2
+ card_name: string;
3
+ card_number: string;
4
+ rarity: string;
5
+ is_alternate_art: boolean;
6
+ card_type: string;
7
+ image_url: string;
8
+ life: string;
9
+ cost: string;
10
+ attributes: string[];
11
+ power: string;
12
+ counter: string;
13
+ colors: string[];
14
+ types: string[];
15
+ effects: string;
16
+ card_effects: string[];
17
+ card_sets: string;
18
+ image_name: string;
4
19
  }
5
20
 
6
- declare module 'one-piece-card-game-json-en' {
7
- const en: any;
8
- export default en;
9
- }
10
-
11
- declare module 'one-piece-card-game-json-jp' {
12
- const jp: any;
13
- export default jp;
21
+ export interface Filters {
22
+ colors: string[];
23
+ rarities: string[];
24
+ types: string[];
25
+ sets: string[];
26
+ categories: string[];
14
27
  }
15
28
 
16
29
  declare module 'one-piece-card-game-json' {
17
- const all: any;
18
- const en: {
19
- cards: any;
20
- filters: any;
30
+ export const all: Card[];
31
+ export const jp: Card[];
32
+ export const en: {
33
+ cards: Card[];
34
+ filters: Filters;
21
35
  };
22
- const jp: any;
23
-
24
- export { all, en, jp };
25
- }
36
+ }
package/index.js CHANGED
@@ -1,13 +1,11 @@
1
- const all = require('one-piece-card-game-json-all');
2
- const enCards = require('./en/cards.json');
3
- const enFilters = require('./en/filters.json');
4
- const jp = require('one-piece-card-game-json-jp');
5
-
6
1
  module.exports = {
7
- all,
2
+ all: require('./en/cards.json'),
8
3
  en: {
9
- cards: enCards,
10
- filters: enFilters
4
+ cards: require('./en/cards.json'),
5
+ filters: require('./en/filters.json')
11
6
  },
12
- jp
13
- };
7
+ jp: {
8
+ cards: require('./jp/cards.json'),
9
+ filters: require('./jp/filters.json')
10
+ }
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one-piece-card-game-json",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "One Piece Card Game JSON data",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",