slab-mcp 0.2.1 → 0.3.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/README.md +140 -107
- package/dist/client.d.ts +34 -13
- package/dist/client.js +99 -59
- package/dist/config.d.ts +4 -2
- package/dist/config.js +27 -2
- package/dist/context.d.ts +8 -12
- package/dist/context.js +7 -29
- package/dist/errors.js +6 -2
- package/dist/format.d.ts +2 -0
- package/dist/format.js +7 -1
- package/dist/prompts/index.js +31 -6
- package/dist/resources/index.d.ts +2 -1
- package/dist/resources/index.js +4 -3
- package/dist/tools/args.d.ts +18 -0
- package/dist/tools/args.js +26 -0
- package/dist/tools/catalog.d.ts +21 -6
- package/dist/tools/catalog.js +88 -47
- package/dist/tools/chases.d.ts +28 -0
- package/dist/tools/chases.js +72 -0
- package/dist/tools/collection.d.ts +26 -18
- package/dist/tools/collection.js +113 -82
- package/dist/tools/community.d.ts +16 -3
- package/dist/tools/community.js +110 -50
- package/dist/tools/filters.d.ts +6 -0
- package/dist/tools/filters.js +6 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/lines.d.ts +20 -0
- package/dist/tools/lines.js +31 -0
- package/dist/tools/meta.js +5 -4
- package/dist/tools/pricing.d.ts +21 -16
- package/dist/tools/pricing.js +167 -63
- package/dist/tools/writes.d.ts +43 -47
- package/dist/tools/writes.js +65 -29
- package/dist/types.d.ts +48 -77
- package/dist/types.js +6 -6
- package/package.json +14 -5
- package/dist/client.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/format.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/prompts/index.js.map +0 -1
- package/dist/resources/index.js.map +0 -1
- package/dist/tools/catalog.js.map +0 -1
- package/dist/tools/collection.js.map +0 -1
- package/dist/tools/community.js.map +0 -1
- package/dist/tools/filters.js.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/meta.js.map +0 -1
- package/dist/tools/pricing.js.map +0 -1
- package/dist/tools/types.js.map +0 -1
- package/dist/tools/writes.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/version.js.map +0 -1
package/dist/tools/catalog.js
CHANGED
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
/** Catalog tools: finding cards
|
|
1
|
+
/** Catalog tools: finding cards and products, and what a product holds and costs. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { api } from '../client.js';
|
|
4
|
+
import { count, facetLines, join, money, pageHeader, plural, text } from '../format.js';
|
|
5
|
+
import { optionalIsoDate, uuid } from './args.js';
|
|
4
6
|
import { DEFAULT_LIMIT, cardFilterShape, paginationShape } from './filters.js';
|
|
7
|
+
import { cardLine, fmv, players, run } from './lines.js';
|
|
5
8
|
import { READ_ONLY, defineTool } from './types.js';
|
|
6
|
-
/** One card on one line. UUID first — it is the only field the model must carry forward. */
|
|
7
|
-
export function cardLine(card) {
|
|
8
|
-
const players = (card.subjects ?? []).map((s) => join(' / ', s.name, s.team)).filter(Boolean).join(' + ');
|
|
9
|
-
const attrs = (card.attributes ?? []).map((a) => a.name).filter(Boolean).join(', ');
|
|
10
|
-
const fmv = card.market?.fair_market_value;
|
|
11
|
-
return join(' | ', card.uuid, join(' ', card.season ?? card.year, card.brand, card.set_name), card.subset, `#${card.card_number ?? '?'}`, players || undefined, card.finish ?? 'base', card.print_run ? `/${card.print_run}` : undefined, attrs || undefined, fmv !== null && fmv !== undefined
|
|
12
|
-
? `FMV ${money(fmv)}${card.market?.grade_key ? ` (${card.market.grade_key})` : ''}`
|
|
13
|
-
: undefined, card.owned_quantity ? `owned x${card.owned_quantity}` : undefined);
|
|
14
|
-
}
|
|
15
9
|
export const searchCards = defineTool({
|
|
16
10
|
name: 'search_cards',
|
|
17
11
|
title: 'Search the card catalog',
|
|
18
|
-
description:
|
|
19
|
-
'the `uuid
|
|
20
|
-
'
|
|
21
|
-
'A parallel is its own card
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
'
|
|
26
|
-
'
|
|
12
|
+
description: "Search slab's catalog of hockey cards, down to the exact parallel. This is the entry point for nearly " +
|
|
13
|
+
'everything else: the `card:` uuid on each result is what get_card_pricing, get_rainbow, ' +
|
|
14
|
+
'get_grading_desk and add_copy take, so search first and carry the uuid forward.\n\n' +
|
|
15
|
+
'A parallel is its own card (the same slot in a different finish), so one player in one set can be ' +
|
|
16
|
+
'dozens of rows. Set `collapse_parallels` to get one row per slot instead, then get_rainbow for a ' +
|
|
17
|
+
"slot's printings; or narrow with `finish`, `base_only` or `numbered_max`.\n\n" +
|
|
18
|
+
"Set `include_market` to attach each card's headline fair market value (slower; leave it off when you " +
|
|
19
|
+
'are only identifying a card). Set `facets` for counts per dimension instead of guessing what to filter ' +
|
|
20
|
+
'on next. `owned` filters to what the user has (true) or is missing (false).',
|
|
27
21
|
inputSchema: z.object({
|
|
28
22
|
...cardFilterShape,
|
|
29
23
|
...paginationShape,
|
|
24
|
+
collapse_parallels: z.boolean().optional().describe('One row per card slot (a base card and all its parallels) instead of one per printing.'),
|
|
30
25
|
include_market: z.boolean().optional().describe('Attach fair market value to each card. Off by default; slower.'),
|
|
31
|
-
owned: z.boolean().optional().describe(
|
|
26
|
+
owned: z.boolean().optional().describe("true = only cards the user owns a copy of, false = only ones they don't."),
|
|
32
27
|
facets: z
|
|
33
28
|
.array(z.string())
|
|
34
29
|
.optional()
|
|
35
|
-
.describe('
|
|
36
|
-
sort: z.string().optional().describe('Sort key
|
|
30
|
+
.describe('Per-value counts for these dimensions alongside the results. The accepted dimensions are `facet_dimensions` in get_vocab.'),
|
|
31
|
+
sort: z.string().optional().describe('Sort key, "-" prefix for descending (e.g. "-release"). The grammar is `card_sort_keys` in get_vocab.'),
|
|
37
32
|
}),
|
|
38
33
|
annotations: READ_ONLY,
|
|
39
34
|
mutates: false,
|
|
40
35
|
async handler(input, ctx) {
|
|
41
|
-
const { limit = DEFAULT_LIMIT, offset = 0, ...rest } = input;
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
const { limit = DEFAULT_LIMIT, offset = 0, owned, ...rest } = input;
|
|
37
|
+
// `owned` needs to know whose collection; "me" is the key's own collector.
|
|
38
|
+
const collector = owned === undefined ? undefined : ctx.collector();
|
|
39
|
+
const result = await ctx.client.request('POST', api `/cards/search`, {
|
|
40
|
+
body: { ...rest, owned, collector, limit, offset },
|
|
41
|
+
read: true,
|
|
44
42
|
});
|
|
45
43
|
const items = result.items ?? [];
|
|
46
44
|
return text(pageHeader('cards', result.total, items.length, offset), '', ...items.map(cardLine), ...facetLines(result.facets));
|
|
@@ -49,15 +47,16 @@ export const searchCards = defineTool({
|
|
|
49
47
|
export const searchSets = defineTool({
|
|
50
48
|
name: 'search_sets',
|
|
51
49
|
title: 'Search card products (sets)',
|
|
52
|
-
description: 'Find a release
|
|
53
|
-
'
|
|
54
|
-
'and
|
|
55
|
-
|
|
56
|
-
'card search to one
|
|
50
|
+
description: 'Find a release, a product like "2025-26 Upper Deck Series 1". Each result has its `set:` uuid (for ' +
|
|
51
|
+
'get_set_detail, the `release` filter, and log_break) and slug (for the `set_slug` filter on ' +
|
|
52
|
+
'search_cards), its release date, how many printings it has and how many are priced, the sales slab ' +
|
|
53
|
+
"saw of its cards in the last 90 days, and its latest hobby box price.\n\n" +
|
|
54
|
+
'Reach for this when the user names a product rather than a player, or to scope a card search to one ' +
|
|
55
|
+
'release. Newest releases come first.',
|
|
57
56
|
inputSchema: z.object({
|
|
58
57
|
q: z.string().optional().describe('Set name, substring match (e.g. "sp authentic").'),
|
|
59
58
|
brand: z.array(z.string()).optional().describe('Brand name(s), any-of.'),
|
|
60
|
-
year: z.number().int().optional().describe('Season-start year
|
|
59
|
+
year: z.number().int().optional().describe('Season-start year: 2025 means 2025-26.'),
|
|
61
60
|
sport: z.string().optional().describe('Sport name.'),
|
|
62
61
|
...paginationShape,
|
|
63
62
|
}),
|
|
@@ -65,38 +64,80 @@ export const searchSets = defineTool({
|
|
|
65
64
|
mutates: false,
|
|
66
65
|
async handler(input, ctx) {
|
|
67
66
|
const { limit = DEFAULT_LIMIT, offset = 0, ...rest } = input;
|
|
68
|
-
const result = await ctx.client.request('POST',
|
|
67
|
+
const result = await ctx.client.request('POST', api `/sets/search`, {
|
|
69
68
|
body: { ...rest, limit, offset },
|
|
69
|
+
read: true,
|
|
70
70
|
});
|
|
71
71
|
const items = result.items ?? [];
|
|
72
|
-
return text(pageHeader('sets', result.total, items.length, offset), '', ...items.map((set) => join(' | ', set.uuid
|
|
72
|
+
return text(pageHeader('sets', result.total, items.length, offset), '', ...items.map((set) => join(' | ', `set:${set.uuid}`, set.name ?? set.slug, set.slug, set.release_date ? `released ${set.release_date}` : undefined, set.card_count != null ? plural(set.card_count, 'printing') : undefined, set.priced_count != null ? `${count(set.priced_count)} priced` : undefined, set.sales_90d != null ? `${plural(set.sales_90d, 'sale')} seen in 90d` : undefined, set.box_price ? `hobby box ${money(set.box_price)}` : undefined)));
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
|
+
function sealedLine(product) {
|
|
76
|
+
const config = join(' · ', product.cards_per_pack ? `${product.cards_per_pack}/pack` : undefined, product.packs_per_box ? `${product.packs_per_box} packs/box` : undefined, product.boxes_per_case ? `${product.boxes_per_case} boxes/case` : undefined);
|
|
77
|
+
return join(' | ', `sealed:${product.uuid}`, product.format, product.price_median != null
|
|
78
|
+
? `${money(product.price_median)}${product.sample_size != null ? ` (${plural(product.sample_size, 'sale')}${product.low_confidence ? ', thin' : ''}${product.stale ? ', stale' : ''})` : ''}`
|
|
79
|
+
: 'no price yet', product.as_of_date ? `as of ${product.as_of_date}` : undefined, product.msrp != null ? `MSRP ${money(product.msrp)}` : undefined, config || undefined);
|
|
80
|
+
}
|
|
75
81
|
export const getSetDetail = defineTool({
|
|
76
82
|
name: 'get_set_detail',
|
|
77
83
|
title: 'Sealed prices and top cards for a set',
|
|
78
|
-
description: '
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'`
|
|
84
|
+
description: 'One product at a glance: its sealed formats (hobby box, case, blaster...) with what each sells for ' +
|
|
85
|
+
'and the configuration, and its most valuable single cards.\n\n' +
|
|
86
|
+
'These are the two numbers behind "is this box worth opening": what the sealed product costs, against ' +
|
|
87
|
+
'what the best cards in it are worth. It is NOT an expected value: the top cards are not weighted by ' +
|
|
88
|
+
'pull odds, so never present a top card\'s value as what a box returns.\n\n' +
|
|
89
|
+
'Pass `sealed_history` with a format (e.g. "hobby_box") to add that product\'s recent sales and its ' +
|
|
90
|
+
'price series. A sealed price is a trailing-90-day median of real sales, like a card\'s: call ' +
|
|
91
|
+
'explain_metrics before explaining it. `set_uuid` comes from search_sets.',
|
|
84
92
|
inputSchema: z.object({
|
|
85
|
-
set_uuid:
|
|
93
|
+
set_uuid: uuid('Set UUID, from search_sets.'),
|
|
86
94
|
top_cards: z.number().int().min(1).max(50).optional().describe('How many top cards to return. Default 10.'),
|
|
95
|
+
sealed_history: z.string().optional().describe('A sealed format to add recent sales and the price series for, e.g. "hobby_box". `sealed_formats` in get_vocab lists them.'),
|
|
96
|
+
history_start: optionalIsoDate('Start of the sealed price series (YYYY-MM-DD). Default: the API\'s.'),
|
|
87
97
|
}),
|
|
88
98
|
annotations: READ_ONLY,
|
|
89
99
|
mutates: false,
|
|
90
100
|
async handler(input, ctx) {
|
|
91
101
|
const limit = input.top_cards ?? 10;
|
|
92
102
|
const [sealed, top] = await Promise.all([
|
|
93
|
-
ctx.client.request('GET', `/sets/${input.set_uuid}/sealed`),
|
|
94
|
-
ctx.client.request('GET', `/sets/${input.set_uuid}/top-cards`, {
|
|
95
|
-
query: { limit },
|
|
96
|
-
}),
|
|
103
|
+
ctx.client.request('GET', api `/sets/${input.set_uuid}/sealed`),
|
|
104
|
+
ctx.client.request('GET', api `/sets/${input.set_uuid}/top-cards`, { query: { limit } }),
|
|
97
105
|
]);
|
|
98
|
-
const
|
|
99
|
-
|
|
106
|
+
const lines = [
|
|
107
|
+
`${top.set_name ?? 'Set'}${top.season ? ` (${top.season})` : ''}`,
|
|
108
|
+
'',
|
|
109
|
+
'Sealed products (trailing-90-day median of sales):',
|
|
110
|
+
...(sealed.length ? sealed.map((p) => ` ${sealedLine(p)}`) : [' (no sealed products recorded for this set)']),
|
|
111
|
+
'',
|
|
112
|
+
`Top ${limit} cards by fair market value (${count(top.total_priced)} of its printings are priced):`,
|
|
113
|
+
...((top.cards ?? []).map((card) => ' ' +
|
|
114
|
+
join(' | ', `card:${card.card_uuid}`, card.subset, `#${card.card_number}`, players(card.subjects), card.finish ?? 'base', run(card.print_run), fmv(card.market)))),
|
|
115
|
+
];
|
|
116
|
+
if (input.sealed_history) {
|
|
117
|
+
const product = sealed.find((p) => p.format === input.sealed_history);
|
|
118
|
+
if (!product) {
|
|
119
|
+
lines.push('', `No "${input.sealed_history}" product for this set. It has: ${sealed.map((p) => p.format).join(', ') || 'none'}.`);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
const [market, history] = await Promise.all([
|
|
123
|
+
ctx.client.request('GET', api `/sealed/${product.uuid}/market`, { query: { comps_limit: 10 } }),
|
|
124
|
+
ctx.client.request('GET', api `/sealed/${product.uuid}/price-history`, {
|
|
125
|
+
query: { start: input.history_start, interval: 'weekly' },
|
|
126
|
+
}),
|
|
127
|
+
]);
|
|
128
|
+
const comps = market.comps ?? [];
|
|
129
|
+
lines.push('', `${product.format}: recent sales (${comps.length} of ${market.total_comps ?? comps.length}):`);
|
|
130
|
+
lines.push(...comps.map((c) => ' ' + join(' | ', c.sold_date, money(c.sale_price), c.sale_type)));
|
|
131
|
+
if (market.plan_limit != null)
|
|
132
|
+
lines.push(` (your plan shows ${market.plan_limit} sales)`);
|
|
133
|
+
const points = history.points ?? [];
|
|
134
|
+
lines.push('', `${product.format}: weekly price series (${points.length} points; an appraisal, not a ticker):`);
|
|
135
|
+
lines.push(...points.map((p) => ` ${p.date} ${money(p.price_median)}${p.sample_size != null ? ` (${plural(p.sample_size, 'sale')})` : ''}`));
|
|
136
|
+
if (history.plan_history_start)
|
|
137
|
+
lines.push(` (your plan's history starts ${history.plan_history_start})`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return text(...lines);
|
|
100
141
|
},
|
|
101
142
|
});
|
|
102
143
|
export const catalogTools = [searchCards, searchSets, getSetDetail];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chases: checklists people build and follow (slab's custom sets), from a player's rookie cards to
|
|
3
|
+
* every Calder winner. The user's completion comes with each one.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const searchChases: import("./types.js").ToolModule<z.ZodObject<{
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
q: z.ZodOptional<z.ZodString>;
|
|
10
|
+
card_uuid: z.ZodOptional<z.ZodGUID>;
|
|
11
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
export declare const getChase: import("./types.js").ToolModule<z.ZodObject<{
|
|
14
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
chase_uuid: z.ZodGUID;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
export declare const chaseTools: (import("./types.js").ToolModule<z.ZodObject<{
|
|
19
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
q: z.ZodOptional<z.ZodString>;
|
|
22
|
+
card_uuid: z.ZodOptional<z.ZodGUID>;
|
|
23
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>> | import("./types.js").ToolModule<z.ZodObject<{
|
|
25
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
chase_uuid: z.ZodGUID;
|
|
28
|
+
}, z.core.$strip>>)[];
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chases: checklists people build and follow (slab's custom sets), from a player's rookie cards to
|
|
3
|
+
* every Calder winner. The user's completion comes with each one.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { api } from '../client.js';
|
|
7
|
+
import { join, pageHeader, plural, text } from '../format.js';
|
|
8
|
+
import { uuid, optionalUuid } from './args.js';
|
|
9
|
+
import { paginationShape } from './filters.js';
|
|
10
|
+
import { players, run } from './lines.js';
|
|
11
|
+
import { READ_ONLY, defineTool } from './types.js';
|
|
12
|
+
function chaseLine(set) {
|
|
13
|
+
return join(' | ', `chase:${set.uuid}`, set.name, set.creator_name ? `by ${set.creator_name}` : undefined, set.set_type, set.card_count != null ? plural(set.card_count, 'card') : undefined, set.subscriber_count != null ? `${plural(set.subscriber_count, 'follower')}` : undefined, set.is_subscribed ? 'you follow it' : undefined);
|
|
14
|
+
}
|
|
15
|
+
export const searchChases = defineTool({
|
|
16
|
+
name: 'search_chases',
|
|
17
|
+
title: 'Find chases (checklists collectors follow)',
|
|
18
|
+
description: 'Chases are checklists collectors build and follow on slab: a player\'s rookie cards, a team\'s numbered ' +
|
|
19
|
+
'parallels, every Calder Trophy winner, a set\'s Young Guns. Search them by name, or by a card they ' +
|
|
20
|
+
'contain, or leave everything empty for the most followed.\n\n' +
|
|
21
|
+
'Each `chase:` uuid goes to get_chase, which lists its cards and how many the user owns.',
|
|
22
|
+
inputSchema: z.object({
|
|
23
|
+
q: z.string().optional().describe('Words in the chase\'s name.'),
|
|
24
|
+
card_uuid: optionalUuid('Only chases containing this card, from search_cards.'),
|
|
25
|
+
sort: z.string().optional().describe('subscribers (default), name, or newest; "-" prefix to reverse.'),
|
|
26
|
+
...paginationShape,
|
|
27
|
+
}),
|
|
28
|
+
annotations: READ_ONLY,
|
|
29
|
+
mutates: false,
|
|
30
|
+
async handler(input, ctx) {
|
|
31
|
+
const { limit = 15, offset = 0, ...rest } = input;
|
|
32
|
+
const result = await ctx.client.request('POST', api `/custom-sets/search`, {
|
|
33
|
+
body: { ...rest, sort: rest.sort ?? '-subscribers', collector_uuid: ctx.collector(), limit, offset },
|
|
34
|
+
read: true,
|
|
35
|
+
});
|
|
36
|
+
const items = result.items ?? [];
|
|
37
|
+
return text(pageHeader('chases', result.total, items.length, offset), '', ...items.map(chaseLine));
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const getChase = defineTool({
|
|
41
|
+
name: 'get_chase',
|
|
42
|
+
title: "A chase's cards and the user's progress",
|
|
43
|
+
description: "One chase: what it is, its cards in order, and which the user owns, with their completion. A slot can " +
|
|
44
|
+
'be one exact printing or "any card of this player" (a rule the user fills with any matching card), ' +
|
|
45
|
+
'which the line says.\n\n' +
|
|
46
|
+
'`chase_uuid` comes from search_chases. Page through a long chase with limit and offset. `card:` uuids ' +
|
|
47
|
+
'go to get_card_pricing and add_target.',
|
|
48
|
+
inputSchema: z.object({
|
|
49
|
+
chase_uuid: uuid('Chase UUID, from search_chases.'),
|
|
50
|
+
...paginationShape,
|
|
51
|
+
}),
|
|
52
|
+
annotations: READ_ONLY,
|
|
53
|
+
mutates: false,
|
|
54
|
+
async handler(input, ctx) {
|
|
55
|
+
const limit = input.limit ?? 50;
|
|
56
|
+
const offset = input.offset ?? 0;
|
|
57
|
+
const chase = await ctx.client.request('GET', api `/custom-sets/${input.chase_uuid}`, {
|
|
58
|
+
query: { collector_uuid: ctx.collector(), limit, offset },
|
|
59
|
+
});
|
|
60
|
+
const cards = chase.cards ?? [];
|
|
61
|
+
const done = chase.completion;
|
|
62
|
+
return text(chaseLine(chase), chase.description ?? undefined, done ? `You own ${done.owned_cards} of ${done.total_cards} (${done.completion_pct}%).` : undefined, '', pageHeader('slots', chase.card_count ?? undefined, cards.length, offset), ...cards.map((entry) => {
|
|
63
|
+
const card = entry.card;
|
|
64
|
+
return (' ' +
|
|
65
|
+
join(' | ', entry.owned ? 'OWNED' : 'missing', card ? `card:${card.uuid}` : undefined, card
|
|
66
|
+
? join(' · ', players(card.subjects), card.set_name, join(' ', card.subset, `#${card.card_number}`), card.finish ?? 'base', run(card.print_run))
|
|
67
|
+
: `any card of ${join(', ', entry.subject ?? undefined, entry.subject_team ?? undefined, entry.subject_year ? `${entry.subject_year}` : undefined, entry.subject_attribute ?? undefined)}`, card && entry.match_mode !== 'exact' ? entry.match_mode.replace(/_/g, ' ') : undefined));
|
|
68
|
+
}));
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
export const chaseTools = [searchChases, getChase];
|
|
72
|
+
//# sourceMappingURL=chases.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/** Read tools for the user's own collection. */
|
|
1
|
+
/** Read tools for the user's own collection: their copies, totals, sets, and want list. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const searchCollection: import("./types.js").ToolModule<z.ZodObject<{
|
|
4
4
|
status: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
5
|
graded: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
grading_company: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
favorite: z.ZodOptional<z.ZodBoolean>;
|
|
7
8
|
acquisition_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
9
|
acquired_after: z.ZodOptional<z.ZodString>;
|
|
9
10
|
acquired_before: z.ZodOptional<z.ZodString>;
|
|
@@ -15,8 +16,10 @@ export declare const searchCollection: import("./types.js").ToolModule<z.ZodObje
|
|
|
15
16
|
q: z.ZodOptional<z.ZodString>;
|
|
16
17
|
subject: z.ZodOptional<z.ZodString>;
|
|
17
18
|
subject_exact: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
subject_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
20
|
card_number: z.ZodOptional<z.ZodString>;
|
|
19
21
|
set_slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
release: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
23
|
brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
24
|
subset: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
25
|
year: z.ZodOptional<z.ZodNumber>;
|
|
@@ -24,6 +27,10 @@ export declare const searchCollection: import("./types.js").ToolModule<z.ZodObje
|
|
|
24
27
|
year_max: z.ZodOptional<z.ZodNumber>;
|
|
25
28
|
team: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
29
|
league: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
sport: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
honor: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
honor_year_min: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
honor_year_max: z.ZodOptional<z.ZodNumber>;
|
|
27
34
|
attribute: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
35
|
attribute_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
36
|
attribute_not: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -37,29 +44,23 @@ export declare const searchCollection: import("./types.js").ToolModule<z.ZodObje
|
|
|
37
44
|
numbered_max: z.ZodOptional<z.ZodNumber>;
|
|
38
45
|
is_numbered: z.ZodOptional<z.ZodBoolean>;
|
|
39
46
|
is_1of1: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
collector_uuid: z.ZodOptional<z.
|
|
47
|
+
collector_uuid: z.ZodOptional<z.ZodGUID>;
|
|
41
48
|
}, z.core.$strip>>;
|
|
42
49
|
export declare const getDashboard: import("./types.js").ToolModule<z.ZodObject<{
|
|
43
|
-
collector_uuid: z.ZodOptional<z.
|
|
50
|
+
collector_uuid: z.ZodOptional<z.ZodGUID>;
|
|
44
51
|
include_history: z.ZodOptional<z.ZodBoolean>;
|
|
45
52
|
}, z.core.$strip>>;
|
|
46
|
-
export declare const
|
|
47
|
-
|
|
48
|
-
graded: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
-
grading_company: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
-
acquisition_type: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
-
acquired_after: z.ZodOptional<z.ZodString>;
|
|
52
|
-
acquired_before: z.ZodOptional<z.ZodString>;
|
|
53
|
-
storage_location: z.ZodOptional<z.ZodString>;
|
|
54
|
-
facets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
-
sort: z.ZodOptional<z.ZodString>;
|
|
53
|
+
export declare const getCollectionSets: import("./types.js").ToolModule<z.ZodObject<{
|
|
54
|
+
group_sort: z.ZodOptional<z.ZodString>;
|
|
56
55
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
57
56
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
58
57
|
q: z.ZodOptional<z.ZodString>;
|
|
59
58
|
subject: z.ZodOptional<z.ZodString>;
|
|
60
59
|
subject_exact: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
subject_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
61
|
card_number: z.ZodOptional<z.ZodString>;
|
|
62
62
|
set_slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
release: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
64
|
brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
65
|
subset: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
66
|
year: z.ZodOptional<z.ZodNumber>;
|
|
@@ -67,6 +68,10 @@ export declare const collectionTools: (import("./types.js").ToolModule<z.ZodObje
|
|
|
67
68
|
year_max: z.ZodOptional<z.ZodNumber>;
|
|
68
69
|
team: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
70
|
league: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
|
+
sport: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
honor: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
honor_year_min: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
honor_year_max: z.ZodOptional<z.ZodNumber>;
|
|
70
75
|
attribute: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
76
|
attribute_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
77
|
attribute_not: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -80,8 +85,11 @@ export declare const collectionTools: (import("./types.js").ToolModule<z.ZodObje
|
|
|
80
85
|
numbered_max: z.ZodOptional<z.ZodNumber>;
|
|
81
86
|
is_numbered: z.ZodOptional<z.ZodBoolean>;
|
|
82
87
|
is_1of1: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
-
collector_uuid: z.ZodOptional<z.
|
|
84
|
-
}, z.core.$strip
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, z.core.$strip
|
|
88
|
+
collector_uuid: z.ZodOptional<z.ZodGUID>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
export declare const getTargets: import("./types.js").ToolModule<z.ZodObject<{
|
|
91
|
+
collector_uuid: z.ZodOptional<z.ZodGUID>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
export declare const collectionTools: import("./types.js").ToolModule<z.ZodObject<{
|
|
94
|
+
collector_uuid: z.ZodOptional<z.ZodGUID>;
|
|
95
|
+
}, z.core.$strip>>[];
|