opticedge-types 1.0.0
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/.eslintignore +2 -0
- package/.eslintrc.js +18 -0
- package/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/dist/constants/payment.d.ts +2 -0
- package/dist/constants/payment.js +7 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +7 -0
- package/dist/enums/card.d.ts +14 -0
- package/dist/enums/card.js +19 -0
- package/dist/enums/user.d.ts +6 -0
- package/dist/enums/user.js +10 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +25 -0
- package/dist/types/card.d.ts +67 -0
- package/dist/types/card.js +2 -0
- package/dist/types/notify.d.ts +4 -0
- package/dist/types/notify.js +2 -0
- package/dist/types/payment.d.ts +1 -0
- package/dist/types/payment.js +2 -0
- package/dist/types/pokemontcg.d.ts +158 -0
- package/dist/types/pokemontcg.js +2 -0
- package/dist/types/pricecharting.d.ts +40 -0
- package/dist/types/pricecharting.js +2 -0
- package/dist/types/user.d.ts +32 -0
- package/dist/types/user.js +2 -0
- package/package.json +27 -0
- package/src/constants/payment.ts +6 -0
- package/src/enums/card.ts +15 -0
- package/src/enums/user.ts +6 -0
- package/src/index.ts +9 -0
- package/src/types/card.ts +68 -0
- package/src/types/notify.ts +4 -0
- package/src/types/payment.ts +1 -0
- package/src/types/pokemontcg.ts +162 -0
- package/src/types/pricecharting.ts +42 -0
- package/src/types/user.ts +33 -0
- package/tsconfig.json +17 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
parserOptions: {
|
|
5
|
+
ecmaVersion: 2020, // modern JS features
|
|
6
|
+
sourceType: 'module'
|
|
7
|
+
},
|
|
8
|
+
env: {
|
|
9
|
+
node: true,
|
|
10
|
+
es2020: true
|
|
11
|
+
},
|
|
12
|
+
plugins: ['@typescript-eslint'],
|
|
13
|
+
extends: [
|
|
14
|
+
'eslint:recommended',
|
|
15
|
+
'plugin:@typescript-eslint/recommended',
|
|
16
|
+
'plugin:prettier/recommended'
|
|
17
|
+
]
|
|
18
|
+
}
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardGradingType = exports.CardApprovalStatus = void 0;
|
|
4
|
+
var CardApprovalStatus;
|
|
5
|
+
(function (CardApprovalStatus) {
|
|
6
|
+
CardApprovalStatus[CardApprovalStatus["Rescan"] = -2] = "Rescan";
|
|
7
|
+
CardApprovalStatus[CardApprovalStatus["Pending"] = -1] = "Pending";
|
|
8
|
+
CardApprovalStatus[CardApprovalStatus["Failed"] = 0] = "Failed";
|
|
9
|
+
CardApprovalStatus[CardApprovalStatus["Approved"] = 1] = "Approved";
|
|
10
|
+
CardApprovalStatus[CardApprovalStatus["Approving"] = 999] = "Approving";
|
|
11
|
+
})(CardApprovalStatus || (exports.CardApprovalStatus = CardApprovalStatus = {}));
|
|
12
|
+
var CardGradingType;
|
|
13
|
+
(function (CardGradingType) {
|
|
14
|
+
CardGradingType[CardGradingType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
15
|
+
CardGradingType[CardGradingType["COLLECTION"] = 1] = "COLLECTION";
|
|
16
|
+
CardGradingType[CardGradingType["ADDED"] = 2] = "ADDED";
|
|
17
|
+
CardGradingType[CardGradingType["SOLD"] = 3] = "SOLD";
|
|
18
|
+
CardGradingType[CardGradingType["CARD_CENTERING"] = 6] = "CARD_CENTERING";
|
|
19
|
+
})(CardGradingType || (exports.CardGradingType = CardGradingType = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserCollectorType = void 0;
|
|
4
|
+
var UserCollectorType;
|
|
5
|
+
(function (UserCollectorType) {
|
|
6
|
+
UserCollectorType[UserCollectorType["Non-member"] = -1] = "Non-member";
|
|
7
|
+
UserCollectorType[UserCollectorType["Elite"] = 0] = "Elite";
|
|
8
|
+
UserCollectorType[UserCollectorType["Rookie"] = 1] = "Rookie";
|
|
9
|
+
UserCollectorType[UserCollectorType["Free"] = 2] = "Free";
|
|
10
|
+
})(UserCollectorType || (exports.UserCollectorType = UserCollectorType = {}));
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './constants/payment';
|
|
2
|
+
export * from './enums/card';
|
|
3
|
+
export * from './enums/user';
|
|
4
|
+
export * from './types/card';
|
|
5
|
+
export * from './types/notify';
|
|
6
|
+
export * from './types/payment';
|
|
7
|
+
export * from './types/pokemontcg';
|
|
8
|
+
export * from './types/pricecharting';
|
|
9
|
+
export * from './types/user';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants/payment"), exports);
|
|
18
|
+
__exportStar(require("./enums/card"), exports);
|
|
19
|
+
__exportStar(require("./enums/user"), exports);
|
|
20
|
+
__exportStar(require("./types/card"), exports);
|
|
21
|
+
__exportStar(require("./types/notify"), exports);
|
|
22
|
+
__exportStar(require("./types/payment"), exports);
|
|
23
|
+
__exportStar(require("./types/pokemontcg"), exports);
|
|
24
|
+
__exportStar(require("./types/pricecharting"), exports);
|
|
25
|
+
__exportStar(require("./types/user"), exports);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CardApprovalStatus, CardGradingType } from '../enums/card';
|
|
2
|
+
type MarketReport = {
|
|
3
|
+
data: string;
|
|
4
|
+
title: string;
|
|
5
|
+
price: {
|
|
6
|
+
currency: string;
|
|
7
|
+
range: {
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
};
|
|
11
|
+
max: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type Card = {
|
|
15
|
+
_createdAt: number;
|
|
16
|
+
_updatedAt: number;
|
|
17
|
+
amountToReinvest: number;
|
|
18
|
+
approved?: CardApprovalStatus;
|
|
19
|
+
appraisalReport?: string;
|
|
20
|
+
assetID: string;
|
|
21
|
+
backImage: string;
|
|
22
|
+
backImageUncropped: string;
|
|
23
|
+
card_structure: number;
|
|
24
|
+
countryLanguage?: string;
|
|
25
|
+
cardType: string;
|
|
26
|
+
category: string;
|
|
27
|
+
centering_grading: number;
|
|
28
|
+
corner_grading: number;
|
|
29
|
+
edge_grading: number;
|
|
30
|
+
frontImage: string;
|
|
31
|
+
frontImageUncropped: string;
|
|
32
|
+
gifUrl?: string;
|
|
33
|
+
gradeDate: number;
|
|
34
|
+
grading: number;
|
|
35
|
+
grading_confidence: number;
|
|
36
|
+
grading_environment: number;
|
|
37
|
+
hp: number;
|
|
38
|
+
identifier: string;
|
|
39
|
+
isPulledFromPack: boolean;
|
|
40
|
+
isRead: boolean;
|
|
41
|
+
isSetCostOfCard: boolean;
|
|
42
|
+
isSold: boolean;
|
|
43
|
+
latitude: number;
|
|
44
|
+
longitude: number;
|
|
45
|
+
moneyEarn: number;
|
|
46
|
+
marketLink?: string;
|
|
47
|
+
marketReport?: MarketReport;
|
|
48
|
+
name: string;
|
|
49
|
+
note: string;
|
|
50
|
+
number: string;
|
|
51
|
+
priceHigh: number;
|
|
52
|
+
priceLow: number;
|
|
53
|
+
priceMarket: number;
|
|
54
|
+
priceValue: number;
|
|
55
|
+
releaseDate?: number;
|
|
56
|
+
resultInvisible: boolean;
|
|
57
|
+
saleNote: string;
|
|
58
|
+
series: string;
|
|
59
|
+
setName?: string;
|
|
60
|
+
surface_grading: number;
|
|
61
|
+
tcgLargeImageUrl: string;
|
|
62
|
+
tcgSmallImageUrl: string;
|
|
63
|
+
type: number;
|
|
64
|
+
typeOfGrading: CardGradingType;
|
|
65
|
+
userId: string;
|
|
66
|
+
};
|
|
67
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PaymentEnvironment = 'SANDBOX' | 'PRODUCTION';
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { PriceChartingPrice } from './pricecharting';
|
|
2
|
+
export type TCGPlayerPrices = {
|
|
3
|
+
low: number;
|
|
4
|
+
mid: number;
|
|
5
|
+
high: number;
|
|
6
|
+
market: number;
|
|
7
|
+
directLow: number;
|
|
8
|
+
};
|
|
9
|
+
export type CardMarketPrices = {
|
|
10
|
+
averageSellPrice: number;
|
|
11
|
+
lowPrice: number;
|
|
12
|
+
trendPrice: number;
|
|
13
|
+
germanProLow: number;
|
|
14
|
+
suggestedPrice: number;
|
|
15
|
+
reverseHoloSell: number;
|
|
16
|
+
reverseHoloLow: number;
|
|
17
|
+
reverseHoloTrend: number;
|
|
18
|
+
lowPriceExPlus: number;
|
|
19
|
+
avg1: number;
|
|
20
|
+
avg7: number;
|
|
21
|
+
avg30: number;
|
|
22
|
+
reverseHoloAvg1: number;
|
|
23
|
+
reverseHoloAvg7: number;
|
|
24
|
+
reverseHoloAvg30: number;
|
|
25
|
+
};
|
|
26
|
+
export type PokemonTCGCard = {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
supertype: string;
|
|
30
|
+
subtypes: string[];
|
|
31
|
+
level: string;
|
|
32
|
+
hp: string;
|
|
33
|
+
evolvesFrom: string;
|
|
34
|
+
evolvesTo: string[];
|
|
35
|
+
rules: string[];
|
|
36
|
+
ancientTrait: {
|
|
37
|
+
name: string;
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
abilities: [
|
|
41
|
+
{
|
|
42
|
+
name: string;
|
|
43
|
+
text: string;
|
|
44
|
+
type: string;
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
attacks: [
|
|
48
|
+
{
|
|
49
|
+
cost: string[];
|
|
50
|
+
name: string;
|
|
51
|
+
text: string;
|
|
52
|
+
damage: string;
|
|
53
|
+
convertedEnergyCost: number;
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
weaknesses: [
|
|
57
|
+
{
|
|
58
|
+
type: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
resistances: [
|
|
63
|
+
{
|
|
64
|
+
type: string;
|
|
65
|
+
value: string;
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
retreatCost: string[];
|
|
69
|
+
convertedRetreatCost: number;
|
|
70
|
+
set: {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
series: string;
|
|
74
|
+
printedTotal: number;
|
|
75
|
+
total: number;
|
|
76
|
+
legalities: {
|
|
77
|
+
unlimited: string;
|
|
78
|
+
standard: string;
|
|
79
|
+
expanded: string;
|
|
80
|
+
};
|
|
81
|
+
ptcgoCode: string;
|
|
82
|
+
releaseDate: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
images: {
|
|
85
|
+
symbol: string;
|
|
86
|
+
logo: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
number: string;
|
|
90
|
+
artist: string;
|
|
91
|
+
rarity: string;
|
|
92
|
+
flavorText: string;
|
|
93
|
+
nationalPokedexNumbers: number[];
|
|
94
|
+
legalities: [
|
|
95
|
+
{
|
|
96
|
+
standard: string;
|
|
97
|
+
expanded: string;
|
|
98
|
+
unlimited: string;
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
regulationMark: string;
|
|
102
|
+
images: {
|
|
103
|
+
small: string;
|
|
104
|
+
large: string;
|
|
105
|
+
};
|
|
106
|
+
tcgplayer: {
|
|
107
|
+
url: string;
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
prices: {
|
|
110
|
+
normal?: TCGPlayerPrices;
|
|
111
|
+
holofoil?: TCGPlayerPrices;
|
|
112
|
+
reverseHolofoil?: TCGPlayerPrices;
|
|
113
|
+
'1stEditionHolofoil'?: TCGPlayerPrices;
|
|
114
|
+
'1stEditionNormal'?: TCGPlayerPrices;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
cardmarket: {
|
|
118
|
+
url: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
prices: CardMarketPrices;
|
|
121
|
+
};
|
|
122
|
+
pricecharting?: {
|
|
123
|
+
id: number;
|
|
124
|
+
prices: PriceChartingPrice;
|
|
125
|
+
updatedAt: string;
|
|
126
|
+
deleted?: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export type PokemonCard = {
|
|
130
|
+
_id: string;
|
|
131
|
+
card_id: string;
|
|
132
|
+
card_data: {
|
|
133
|
+
name: string;
|
|
134
|
+
number: string;
|
|
135
|
+
setName: string;
|
|
136
|
+
setSeries: string;
|
|
137
|
+
};
|
|
138
|
+
card: PokemonTCGCard;
|
|
139
|
+
pricehistory: [
|
|
140
|
+
{
|
|
141
|
+
date: string;
|
|
142
|
+
tcgplayer: {
|
|
143
|
+
normal: TCGPlayerPrices | null;
|
|
144
|
+
holofoil: TCGPlayerPrices | null;
|
|
145
|
+
reverseHolofoil: TCGPlayerPrices | null;
|
|
146
|
+
firstEditionHolofoil: TCGPlayerPrices | null;
|
|
147
|
+
firstEditionNormal: TCGPlayerPrices | null;
|
|
148
|
+
};
|
|
149
|
+
cardmarket: CardMarketPrices;
|
|
150
|
+
}
|
|
151
|
+
];
|
|
152
|
+
pricecharting_id: number;
|
|
153
|
+
pricecharting_data: {
|
|
154
|
+
consoleName: string;
|
|
155
|
+
productName: string;
|
|
156
|
+
releaseDate: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type PriceChartingPrice = {
|
|
2
|
+
loose: number | null;
|
|
3
|
+
cib: number | null;
|
|
4
|
+
new: number | null;
|
|
5
|
+
graded: number | null;
|
|
6
|
+
boxOnly: number | null;
|
|
7
|
+
manualOnly: number | null;
|
|
8
|
+
bgs10: number | null;
|
|
9
|
+
condition17: number | null;
|
|
10
|
+
condition18: number | null;
|
|
11
|
+
gamestop: number | null;
|
|
12
|
+
gamestopTrade: number | null;
|
|
13
|
+
retailLooseBuy: number | null;
|
|
14
|
+
retailLooseSell: number | null;
|
|
15
|
+
retailCibBuy: number | null;
|
|
16
|
+
retailCibSell: number | null;
|
|
17
|
+
retailNewBuy: number | null;
|
|
18
|
+
retailNewSell: number | null;
|
|
19
|
+
};
|
|
20
|
+
export type PriceChartingPriceEntry = {
|
|
21
|
+
date: string;
|
|
22
|
+
price: PriceChartingPrice;
|
|
23
|
+
};
|
|
24
|
+
export type PriceChartingCard = {
|
|
25
|
+
id: number;
|
|
26
|
+
consoleName: string;
|
|
27
|
+
productName: string;
|
|
28
|
+
upc: string;
|
|
29
|
+
genre: string;
|
|
30
|
+
tcgId: string;
|
|
31
|
+
asin: string;
|
|
32
|
+
epid: string;
|
|
33
|
+
releaseDate: string;
|
|
34
|
+
price: PriceChartingPrice;
|
|
35
|
+
priceHistory: PriceChartingPriceEntry[];
|
|
36
|
+
salesVolume: number | null;
|
|
37
|
+
salesVolumeHistory: (number | null)[];
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
deleted?: boolean;
|
|
40
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UserCollectorType } from '../enums/user';
|
|
2
|
+
export type User = {
|
|
3
|
+
cards: {
|
|
4
|
+
count: number;
|
|
5
|
+
};
|
|
6
|
+
collections: {
|
|
7
|
+
count: number;
|
|
8
|
+
};
|
|
9
|
+
email: string;
|
|
10
|
+
fcmTokens: Record<string, boolean>;
|
|
11
|
+
firstName: string;
|
|
12
|
+
fundAmount: number;
|
|
13
|
+
fundalert: number;
|
|
14
|
+
id: string;
|
|
15
|
+
insights: {
|
|
16
|
+
count: number;
|
|
17
|
+
};
|
|
18
|
+
isAppleUser: boolean;
|
|
19
|
+
isFacebookUser: boolean;
|
|
20
|
+
lastCardIndex: number;
|
|
21
|
+
lastGradingTime: number;
|
|
22
|
+
lastName: string;
|
|
23
|
+
soldCards: {
|
|
24
|
+
count: number;
|
|
25
|
+
};
|
|
26
|
+
thumbnail: string | undefined;
|
|
27
|
+
_collectorType: UserCollectorType;
|
|
28
|
+
_createdAt: number;
|
|
29
|
+
_currency: string;
|
|
30
|
+
_id: string;
|
|
31
|
+
_updatedAt: number;
|
|
32
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opticedge-types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Common type for opticedge",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"lint": "eslint . --ext .ts --fix",
|
|
10
|
+
"format": "prettier --write .",
|
|
11
|
+
"fix": "npm run lint && npm run format",
|
|
12
|
+
"prepare": "npm run build"
|
|
13
|
+
},
|
|
14
|
+
"author": "Evans Musonda",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^22.15.23",
|
|
18
|
+
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
19
|
+
"@typescript-eslint/parser": "^8.33.0",
|
|
20
|
+
"eslint": "^8.57.1",
|
|
21
|
+
"eslint-config-prettier": "^10.1.5",
|
|
22
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
23
|
+
"prettier": "^3.5.3",
|
|
24
|
+
"ts-jest": "^29.3.4",
|
|
25
|
+
"typescript": "^5.8.3"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './constants/payment'
|
|
2
|
+
export * from './enums/card'
|
|
3
|
+
export * from './enums/user'
|
|
4
|
+
export * from './types/card'
|
|
5
|
+
export * from './types/notify'
|
|
6
|
+
export * from './types/payment'
|
|
7
|
+
export * from './types/pokemontcg'
|
|
8
|
+
export * from './types/pricecharting'
|
|
9
|
+
export * from './types/user'
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CardApprovalStatus, CardGradingType } from '../enums/card'
|
|
2
|
+
|
|
3
|
+
type MarketReport = {
|
|
4
|
+
data: string
|
|
5
|
+
title: string
|
|
6
|
+
price: {
|
|
7
|
+
currency: string
|
|
8
|
+
range: {
|
|
9
|
+
min: number
|
|
10
|
+
max: number
|
|
11
|
+
}
|
|
12
|
+
max: number
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Card = {
|
|
17
|
+
_createdAt: number
|
|
18
|
+
_updatedAt: number
|
|
19
|
+
amountToReinvest: number
|
|
20
|
+
approved?: CardApprovalStatus
|
|
21
|
+
appraisalReport?: string
|
|
22
|
+
assetID: string
|
|
23
|
+
backImage: string
|
|
24
|
+
backImageUncropped: string
|
|
25
|
+
card_structure: number
|
|
26
|
+
countryLanguage?: string
|
|
27
|
+
cardType: string
|
|
28
|
+
category: string
|
|
29
|
+
centering_grading: number
|
|
30
|
+
corner_grading: number
|
|
31
|
+
edge_grading: number
|
|
32
|
+
frontImage: string
|
|
33
|
+
frontImageUncropped: string
|
|
34
|
+
gifUrl?: string
|
|
35
|
+
gradeDate: number
|
|
36
|
+
grading: number
|
|
37
|
+
grading_confidence: number
|
|
38
|
+
grading_environment: number
|
|
39
|
+
hp: number
|
|
40
|
+
identifier: string
|
|
41
|
+
isPulledFromPack: boolean
|
|
42
|
+
isRead: boolean
|
|
43
|
+
isSetCostOfCard: boolean
|
|
44
|
+
isSold: boolean
|
|
45
|
+
latitude: number
|
|
46
|
+
longitude: number
|
|
47
|
+
moneyEarn: number
|
|
48
|
+
marketLink?: string
|
|
49
|
+
marketReport?: MarketReport
|
|
50
|
+
name: string
|
|
51
|
+
note: string
|
|
52
|
+
number: string
|
|
53
|
+
priceHigh: number
|
|
54
|
+
priceLow: number
|
|
55
|
+
priceMarket: number
|
|
56
|
+
priceValue: number
|
|
57
|
+
releaseDate?: number
|
|
58
|
+
resultInvisible: boolean
|
|
59
|
+
saleNote: string
|
|
60
|
+
series: string
|
|
61
|
+
setName?: string
|
|
62
|
+
surface_grading: number
|
|
63
|
+
tcgLargeImageUrl: string
|
|
64
|
+
tcgSmallImageUrl: string
|
|
65
|
+
type: number
|
|
66
|
+
typeOfGrading: CardGradingType
|
|
67
|
+
userId: string
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PaymentEnvironment = 'SANDBOX' | 'PRODUCTION'
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { PriceChartingPrice } from './pricecharting'
|
|
2
|
+
|
|
3
|
+
export type TCGPlayerPrices = {
|
|
4
|
+
low: number
|
|
5
|
+
mid: number
|
|
6
|
+
high: number
|
|
7
|
+
market: number
|
|
8
|
+
directLow: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type CardMarketPrices = {
|
|
12
|
+
averageSellPrice: number
|
|
13
|
+
lowPrice: number
|
|
14
|
+
trendPrice: number
|
|
15
|
+
germanProLow: number
|
|
16
|
+
suggestedPrice: number
|
|
17
|
+
reverseHoloSell: number
|
|
18
|
+
reverseHoloLow: number
|
|
19
|
+
reverseHoloTrend: number
|
|
20
|
+
lowPriceExPlus: number
|
|
21
|
+
avg1: number
|
|
22
|
+
avg7: number
|
|
23
|
+
avg30: number
|
|
24
|
+
reverseHoloAvg1: number
|
|
25
|
+
reverseHoloAvg7: number
|
|
26
|
+
reverseHoloAvg30: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type PokemonTCGCard = {
|
|
30
|
+
id: string
|
|
31
|
+
name: string
|
|
32
|
+
supertype: string
|
|
33
|
+
subtypes: string[]
|
|
34
|
+
level: string
|
|
35
|
+
hp: string
|
|
36
|
+
evolvesFrom: string
|
|
37
|
+
evolvesTo: string[]
|
|
38
|
+
rules: string[]
|
|
39
|
+
ancientTrait: {
|
|
40
|
+
name: string
|
|
41
|
+
text: string
|
|
42
|
+
}
|
|
43
|
+
abilities: [
|
|
44
|
+
{
|
|
45
|
+
name: string
|
|
46
|
+
text: string
|
|
47
|
+
type: string
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
attacks: [
|
|
51
|
+
{
|
|
52
|
+
cost: string[]
|
|
53
|
+
name: string
|
|
54
|
+
text: string
|
|
55
|
+
damage: string
|
|
56
|
+
convertedEnergyCost: number
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
weaknesses: [
|
|
60
|
+
{
|
|
61
|
+
type: string
|
|
62
|
+
value: string
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
resistances: [
|
|
66
|
+
{
|
|
67
|
+
type: string
|
|
68
|
+
value: string
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
retreatCost: string[]
|
|
72
|
+
convertedRetreatCost: number
|
|
73
|
+
set: {
|
|
74
|
+
id: string
|
|
75
|
+
name: string
|
|
76
|
+
series: string
|
|
77
|
+
printedTotal: number
|
|
78
|
+
total: number
|
|
79
|
+
legalities: {
|
|
80
|
+
unlimited: string
|
|
81
|
+
standard: string
|
|
82
|
+
expanded: string
|
|
83
|
+
}
|
|
84
|
+
ptcgoCode: string
|
|
85
|
+
releaseDate: string
|
|
86
|
+
updatedAt: string
|
|
87
|
+
images: {
|
|
88
|
+
symbol: string
|
|
89
|
+
logo: string
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
number: string
|
|
93
|
+
artist: string
|
|
94
|
+
rarity: string
|
|
95
|
+
flavorText: string
|
|
96
|
+
nationalPokedexNumbers: number[]
|
|
97
|
+
legalities: [
|
|
98
|
+
{
|
|
99
|
+
standard: string
|
|
100
|
+
expanded: string
|
|
101
|
+
unlimited: string
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
regulationMark: string
|
|
105
|
+
images: {
|
|
106
|
+
small: string
|
|
107
|
+
large: string
|
|
108
|
+
}
|
|
109
|
+
tcgplayer: {
|
|
110
|
+
url: string
|
|
111
|
+
updatedAt: string
|
|
112
|
+
prices: {
|
|
113
|
+
normal?: TCGPlayerPrices
|
|
114
|
+
holofoil?: TCGPlayerPrices
|
|
115
|
+
reverseHolofoil?: TCGPlayerPrices
|
|
116
|
+
'1stEditionHolofoil'?: TCGPlayerPrices
|
|
117
|
+
'1stEditionNormal'?: TCGPlayerPrices
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
cardmarket: {
|
|
121
|
+
url: string
|
|
122
|
+
updatedAt: string
|
|
123
|
+
prices: CardMarketPrices
|
|
124
|
+
}
|
|
125
|
+
pricecharting?: {
|
|
126
|
+
id: number
|
|
127
|
+
prices: PriceChartingPrice
|
|
128
|
+
updatedAt: string
|
|
129
|
+
deleted?: boolean
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type PokemonCard = {
|
|
134
|
+
_id: string
|
|
135
|
+
card_id: string
|
|
136
|
+
card_data: {
|
|
137
|
+
name: string
|
|
138
|
+
number: string
|
|
139
|
+
setName: string
|
|
140
|
+
setSeries: string
|
|
141
|
+
}
|
|
142
|
+
card: PokemonTCGCard
|
|
143
|
+
pricehistory: [
|
|
144
|
+
{
|
|
145
|
+
date: string
|
|
146
|
+
tcgplayer: {
|
|
147
|
+
normal: TCGPlayerPrices | null
|
|
148
|
+
holofoil: TCGPlayerPrices | null
|
|
149
|
+
reverseHolofoil: TCGPlayerPrices | null
|
|
150
|
+
firstEditionHolofoil: TCGPlayerPrices | null
|
|
151
|
+
firstEditionNormal: TCGPlayerPrices | null
|
|
152
|
+
}
|
|
153
|
+
cardmarket: CardMarketPrices
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
pricecharting_id: number
|
|
157
|
+
pricecharting_data: {
|
|
158
|
+
consoleName: string
|
|
159
|
+
productName: string
|
|
160
|
+
releaseDate: string
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type PriceChartingPrice = {
|
|
2
|
+
loose: number | null
|
|
3
|
+
cib: number | null
|
|
4
|
+
new: number | null
|
|
5
|
+
graded: number | null
|
|
6
|
+
boxOnly: number | null
|
|
7
|
+
manualOnly: number | null
|
|
8
|
+
bgs10: number | null
|
|
9
|
+
condition17: number | null
|
|
10
|
+
condition18: number | null
|
|
11
|
+
gamestop: number | null
|
|
12
|
+
gamestopTrade: number | null
|
|
13
|
+
retailLooseBuy: number | null
|
|
14
|
+
retailLooseSell: number | null
|
|
15
|
+
retailCibBuy: number | null
|
|
16
|
+
retailCibSell: number | null
|
|
17
|
+
retailNewBuy: number | null
|
|
18
|
+
retailNewSell: number | null
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type PriceChartingPriceEntry = {
|
|
22
|
+
date: string
|
|
23
|
+
price: PriceChartingPrice
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type PriceChartingCard = {
|
|
27
|
+
id: number
|
|
28
|
+
consoleName: string
|
|
29
|
+
productName: string
|
|
30
|
+
upc: string
|
|
31
|
+
genre: string
|
|
32
|
+
tcgId: string
|
|
33
|
+
asin: string
|
|
34
|
+
epid: string
|
|
35
|
+
releaseDate: string
|
|
36
|
+
price: PriceChartingPrice
|
|
37
|
+
priceHistory: PriceChartingPriceEntry[]
|
|
38
|
+
salesVolume: number | null
|
|
39
|
+
salesVolumeHistory: (number | null)[]
|
|
40
|
+
updatedAt: string
|
|
41
|
+
deleted?: boolean
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { UserCollectorType } from '../enums/user'
|
|
2
|
+
|
|
3
|
+
export type User = {
|
|
4
|
+
cards: {
|
|
5
|
+
count: number
|
|
6
|
+
}
|
|
7
|
+
collections: {
|
|
8
|
+
count: number
|
|
9
|
+
}
|
|
10
|
+
email: string
|
|
11
|
+
fcmTokens: Record<string, boolean>
|
|
12
|
+
firstName: string
|
|
13
|
+
fundAmount: number
|
|
14
|
+
fundalert: number
|
|
15
|
+
id: string
|
|
16
|
+
insights: {
|
|
17
|
+
count: number
|
|
18
|
+
}
|
|
19
|
+
isAppleUser: boolean
|
|
20
|
+
isFacebookUser: boolean
|
|
21
|
+
lastCardIndex: number
|
|
22
|
+
lastGradingTime: number
|
|
23
|
+
lastName: string
|
|
24
|
+
soldCards: {
|
|
25
|
+
count: number
|
|
26
|
+
}
|
|
27
|
+
thumbnail: string | undefined
|
|
28
|
+
_collectorType: UserCollectorType
|
|
29
|
+
_createdAt: number
|
|
30
|
+
_currency: string
|
|
31
|
+
_id: string
|
|
32
|
+
_updatedAt: number
|
|
33
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"types": ["node"]
|
|
14
|
+
},
|
|
15
|
+
"include": ["src"],
|
|
16
|
+
"exclude": ["node_modules", "dist"]
|
|
17
|
+
}
|