@instruments/materialgraph 2.2.0 → 3.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/client.d.ts +14 -2
- package/client.js +18 -3
- package/find-variants-by-vector-types.d.ts +2 -0
- package/get-variant-types.d.ts +2 -2
- package/index.d.ts +1 -2
- package/operation-responses.d.ts +0 -7
- package/operations.generated.d.ts +1 -1
- package/operations.generated.js +0 -31
- package/package.json +1 -1
- package/resolve-variant-types.d.ts +5 -3
- package/response-schemas.generated.d.ts +1 -1
- package/response-schemas.generated.js +28 -42
- package/search-variants-types.d.ts +12 -0
- package/webmcp.generated.js +3 -3
- package/catalog-client.d.ts +0 -43
- package/catalog-client.js +0 -51
- package/catalog-types.d.ts +0 -373
- package/catalog-types.js +0 -1
|
@@ -54,6 +54,16 @@ export type SearchVariantsReading = {
|
|
|
54
54
|
id: string;
|
|
55
55
|
kind: string;
|
|
56
56
|
label: string;
|
|
57
|
+
/** Variants in search scope that hold this reading. */
|
|
58
|
+
variants?: number;
|
|
59
|
+
};
|
|
60
|
+
/** On an empty page: a change to the next call that returns variants. */
|
|
61
|
+
export type SearchVariantsSuggestion = {
|
|
62
|
+
/** The `leaveOut` entries to send. */
|
|
63
|
+
leaveOut?: string[];
|
|
64
|
+
note: string;
|
|
65
|
+
/** Variants the search returns with this change. */
|
|
66
|
+
variants: number;
|
|
57
67
|
};
|
|
58
68
|
/** A phrase with more than one meaning: the reading used, and the others a caller may switch to by `handle`. */
|
|
59
69
|
export type SearchVariantsChoice = {
|
|
@@ -88,6 +98,8 @@ export type SearchVariantsOutput = ListVariantsOutput & {
|
|
|
88
98
|
scope?: FilterGroups;
|
|
89
99
|
/** One entry per phrase the parser read, in the parser's order. */
|
|
90
100
|
understood: SearchVariantsUnderstood[];
|
|
101
|
+
/** On an empty page: changes to the next call that return variants, most first. */
|
|
102
|
+
suggestions?: SearchVariantsSuggestion[];
|
|
91
103
|
/** Words nothing in the vocabulary could read. */
|
|
92
104
|
unresolved?: string[];
|
|
93
105
|
};
|
package/webmcp.generated.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const json = [
|
|
2
2
|
"[{\"annotations\":{\"readOnlyHint\":true,\"untrustedContentHint\":true},\"description\":\"Reads `query` into filters, runs them through `list_variants` and answers with what was understood beside a page of variants. `understood` says what each phrase became: a hard `filter`, a ranking `preference`, or `not_applied` when nothing could serve it. `filters`, `optionalFilters` and `name` are exactly what ran, so the three can be sent to `list_variants` to narrow or widen the same search. A phrase with more than one meaning is answered with one and listed in `choices`: send its `handle` with an alternative's `group` and `id` in `selections` to switch it. `unresolved` lists words nothing in the vocabulary could read. A query that applies nothing returns no items, never the whole catalog; a preference alone still ranks it. `cursor` is the previous page's `pageInfo.endCursor`, tied to the vocabulary version the query was read against; it pages this operation only, not `list_variants`. Requires the `mg:read` bearer scope.\",\"inputSchema\":{\"$ref\":\"#/$defs/schema0\",\"$defs\":{\"schema0\":{\"type\":\"object\",\"properties\":{\"attributes\":{\"description\":\"Attribute/block ids to add; id fields always return.\",\"maxItems\":50,\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"cursor\":{\"type\":\"string\"},\"leaveOut\":{\"maxItems\":8,\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"limit\":{\"description\":\"5-10 for examples.\",\"type\":\"integer\",\"minimum\":1,\"maximum\":50},\"query\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":200,\"description\":\"What to find, in plain words.\"},\"searchCatalogSubset\":{\"description\":\"Only this corpus scope.\",\"type\":\"string\",\"enum\":[\"all\",\"samplizeOrderable\",\"materialBankOrderable\",\"materialBankNaOrderable\",\"materialBankNaAndCatalog\",\"materialBankEuOrderable\",\"designShopOrderable\"]},\"selections\":{\"description\":\"Switch a choice: handle, alternative group and id.\",\"maxItems\":8,\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"handle\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"}},\"required\":[\"group\",\"handle\",\"id\"],\"additionalProperties\":false}},\"include\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"image\",\"url\"]}}},\"required\":[\"query\"],\"additionalProperties\":false}}},\"method\":\"POST\",\"name\":\"search\",\"operationId\":\"search_variants\",\"outputSchema\":{\"$ref\":\"#/$defs/schema0\",\"$defs\":{\"schema1\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"number\"},{\"type\":\"boolean\"},{\"type\":\"null\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/schema1\"}},{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"$ref\":\"#/$defs/schema1\"}}]},\"schema0\":{\"type\":\"object\",\"properties\":{\"excludedBySearchCatalogSubset\":{\"description\":\"Filtered variant ids outside the materials catalog.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"category\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false},{\"type\":\"null\"}],\"description\":\"The first original source category, or null when unknown.\"},\"categories\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false},\"description\":\"All original source categories in source order.\"},\"productType\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false},{\"type\":\"null\"}],\"description\":\"The accepted primary specification type, or null for a color sample or unresolved subject.\"},\"sampleSubject\":{\"type\":\"string\",\"enum\":[\"material\",\"paint_color_sample\",\"unknown\",\"conflict\"]},\"colorOptionValueId\":{\"type\":[\"string\",\"null\"]},\"hasDeclaredColor\":{\"type\":\"boolean\",\"description\":\"True for a paint color card, paint line, primer or coating: the card is the brand's declared hex, never a photo.\"},\"code\":{\"description\":\"The brand's item code.\",\"type\":[\"string\",\"null\"]},\"hex\":{\"description\":\"The settled card color hex, or null when unknown. Paint cards show this color and never a photo.\",\"type\":[\"string\",\"null",
|
|
3
|
-
"\"]},\"image\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"alt\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"required\":[\"alt\",\"url\"],\"additionalProperties\":false},{\"type\":\"null\"}],\"description\":\"The settled material card image. Always null for paint color samples and paint/coating product types.\"},\"brand\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false,\"description\":\"The brand. `id` is the slug get_brand takes.\"},\"name\":{\"type\":\"string\",\"description\":\"The unambiguous variant name, including its source label when needed.\"},\"variantLabel\":{\"description\":\"The source variant label, trimmed; null when unknown or for a paint color sample, whose own name identifies its color. Separate from surface finish, color family and derived color names.\",\"type\":[\"string\",\"null\"]},\"product\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false},\"url\":{\"description\":\"The brand's page for it, or null when none is known.\",\"type\":[\"string\",\"null\"]},\"variantId\":{\"type\":\"string\"},\"materialBankId\":{\"description\":\"The variant's Material Bank SKU. Absent: none recorded.\",\"type\":\"string\"},\"notApplicable\":{\"type\":\"object\",\"properties\":{\"attributes\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"blocks\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false,\"description\":\"Requested blocks or attributes this product type does not carry.\"},\"preference\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"array\",\"items\":{\"type\":\"number\"}},\"score\":{\"type\":\"number\"}},\"required\":[\"matched\",\"score\"],\"additionalProperties\":false},\"specifications\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"$ref\":\"#/$defs/schema1\"}}},\"variantCount\":{\"description\":\"Eligible variants of this product. Absent: none counted.\",\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991}},\"required\":[\"category\",\"categories\",\"productType\",\"sampleSubject\",\"colorOptionValueId\",\"hasDeclaredColor\",\"code\",\"brand\",\"name\",\"variantLabel\",\"product\",\"variantId\"],\"additionalProperties\":false}},\"nameWords\":{\"description\":\"Empty name lookup: each word, and whether a name in scope starts it. Unmatched words were left out unless all or none matched.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"boolean\"},\"word\":{\"type\":\"string\"}},\"required\":[\"matched\",\"word\"],\"additionalProperties\":false}},\"pageInfo\":{\"type\":\"object\",\"properties\":{\"endCursor\":{\"type\":[\"string\",\"null\"]},\"hasNextPage\":{\"type\":\"boolean\"}},\"required\":[\"endCursor\",\"hasNextPage\"],\"additionalProperties\":false},\"preferenceMatchesRemain\":{\"description\":\"False: nothing from this page on meets any optionalFilter.\",\"type\":\"boolean\"},\"unavailableVariantIds\":{\"description\":\"Filtered ids in the catalog this list can't show, e.g. retired.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"unresolvedVariantIds\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"unstated\":{\"description\":\"Filtered attributes no variant in scope states at all.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"words\":{\"description\":\"Each word asked for, and whether any variant in scope names it.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"boolean\"},\"word\":{\"type\":\"string\"}},\"required\":[\"matched\",\"word\"],\"additionalProperties\":false}},\"choices\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"alternatives\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"},\"kind\":{\"type\":\"string\"},\"label\":{\"type\":\"string\"}},\"required\":[\"group\",\"id\",\"kind\",\"label\"],\"additionalProperties\":false}},\"basis\":{\"type\":\"string\"},\"handle\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"selected\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"},\"kind\":{\"type\":\"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"\"]},\"image\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"alt\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"required\":[\"alt\",\"url\"],\"additionalProperties\":false},{\"type\":\"null\"}],\"description\":\"The settled material card image. Always null for paint color samples and paint/coating product types.\"},\"brand\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false,\"description\":\"The brand. `id` is the slug get_brand takes.\"},\"name\":{\"type\":\"string\",\"description\":\"The unambiguous variant name, including its source label when needed.\"},\"variantLabel\":{\"description\":\"The source variant label, trimmed; null when unknown or for a paint color sample, whose own name identifies its color. Separate from surface finish, color family and derived color names.\",\"type\":[\"string\",\"null\"]},\"product\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"additionalProperties\":false},\"url\":{\"description\":\"The brand's page for it, or null when none is known.\",\"type\":[\"string\",\"null\"]},\"variantId\":{\"type\":\"string\"},\"materialBankId\":{\"description\":\"The variant's Material Bank SKU. Absent: none recorded.\",\"type\":\"string\"},\"notApplicable\":{\"type\":\"object\",\"properties\":{\"attributes\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"blocks\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false,\"description\":\"Requested blocks or attributes this product type does not carry.\"},\"preference\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"array\",\"items\":{\"type\":\"number\"}},\"score\":{\"type\":\"number\"}},\"required\":[\"matched\",\"score\"],\"additionalProperties\":false},\"specifications\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"$ref\":\"#/$defs/schema1\"}}},\"variantCount\":{\"description\":\"Eligible variants of this product. Absent: none counted.\",\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991}},\"required\":[\"category\",\"categories\",\"productType\",\"sampleSubject\",\"colorOptionValueId\",\"hasDeclaredColor\",\"code\",\"brand\",\"name\",\"variantLabel\",\"product\",\"variantId\"],\"additionalProperties\":false}},\"nameWords\":{\"description\":\"Empty name lookup: each word, and whether a name in scope starts it. Unmatched words were left out unless all or none matched.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"boolean\"},\"word\":{\"type\":\"string\"}},\"required\":[\"matched\",\"word\"],\"additionalProperties\":false}},\"pageInfo\":{\"type\":\"object\",\"properties\":{\"endCursor\":{\"type\":[\"string\",\"null\"]},\"hasNextPage\":{\"type\":\"boolean\"}},\"required\":[\"endCursor\",\"hasNextPage\"],\"additionalProperties\":false},\"preferenceMatchesRemain\":{\"description\":\"False: nothing from this page on meets any optionalFilter.\",\"type\":\"boolean\"},\"unavailableVariantIds\":{\"description\":\"Filtered ids in the catalog this list can't show, e.g. retired.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"unresolvedVariantIds\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"unstated\":{\"description\":\"Filtered attributes no variant in scope states at all.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"words\":{\"description\":\"Each word asked for, and whether any variant in scope names it.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"matched\":{\"type\":\"boolean\"},\"word\":{\"type\":\"string\"}},\"required\":[\"matched\",\"word\"],\"additionalProperties\":false}},\"choices\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"alternatives\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"},\"kind\":{\"type\":\"string\"},\"label\":{\"type\":\"string\"},\"variants\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991,\"description\":\"Variants in search scope that hold this reading.\"}},\"required\":[\"group\",\"id\",\"kind\",\"label\"],\"additionalProperties\":false}},\"basis\":{\"type\":\"string\"},\"handle\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"selected\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"},\"kind\":{\"type\":\"stri",
|
|
4
|
+
"ng\"},\"label\":{\"type\":\"string\"},\"variants\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991,\"description\":\"Variants in search scope that hold this reading.\"}},\"required\":[\"group\",\"id\",\"kind\",\"label\"],\"additionalProperties\":false},\"text\":{\"type\":\"string\"}},\"required\":[\"alternatives\",\"basis\",\"handle\",\"reason\",\"selected\",\"text\"],\"additionalProperties\":false}},\"colors\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"hex\":{\"type\":\"string\",\"pattern\":\"^#[\\\\da-f]{6}$\",\"description\":\"The color's own point in the region; it orders matches.\"},\"intent\":{\"type\":\"string\",\"enum\":[\"required\",\"preferred\"]},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"not_in\"]},\"range\":{\"type\":\"object\",\"properties\":{\"chroma\":{\"type\":\"array\",\"prefixItems\":[{\"type\":\"number\"},{\"type\":\"number\"}],\"items\":false,\"minItems\":2,\"maxItems\":2},\"hue\":{\"anyOf\":[{\"type\":\"array\",\"prefixItems\":[{\"type\":\"number\"},{\"type\":\"number\"}],\"items\":false,\"minItems\":2,\"maxItems\":2},{\"type\":\"null\"}]},\"lightness\":{\"type\":\"array\",\"prefixItems\":[{\"type\":\"number\"},{\"type\":\"number\"}],\"items\":false,\"minItems\":2,\"maxItems\":2}},\"required\":[\"chroma\",\"hue\",\"lightness\"],\"additionalProperties\":false}},\"required\":[\"hex\",\"op\",\"range\"],\"additionalProperties\":false},\"description\":\"The color regions that ran.\"},\"corrections\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"correction\":{\"type\":\"string\"},\"word\":{\"type\":\"string\"}},\"required\":[\"correction\",\"word\"],\"additionalProperties\":false}},\"filters\":{\"type\":\"object\",\"properties\":{\"anyField\":{\"description\":\"One of values in any of fields (term attributes).\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"fields\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"unstated\":{\"type\":\"string\",\"const\":\"pass\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"fields\",\"op\",\"values\"],\"additionalProperties\":false}},\"numbers\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"eq\",\"gt\",\"gte\",\"lt\",\"lte\"]},\"value\":{\"type\":\"number\"}},\"required\":[\"field\",\"op\",\"value\"],\"additionalProperties\":false}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]}},\"required\":[\"field\",\"op\"],\"additionalProperties\":false}},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"all\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"unstated\":{\"type\":\"string\",\"const\":\"pass\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"field\",\"op\",\"values\"],\"additionalProperties\":false}}},\"additionalProperties\":false,\"description\":\"The filters that ran, the scope among them.\"},\"name\":{\"type\":\"string\",\"description\":\"The paint name looked up.\"},\"oneRowPer\":{\"type\":\"string\",\"enum\":[\"product\",\"variant\",\"paint_variant_or_product\"],\"description\":\"A row per product, per variant, or per exact paint variant followed by other products.\"},\"optionalFilters\":{\"type\":\"object\",\"properties\":{\"anyField\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"fields\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"weight\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":10}},\"required\":[\"fields\",\"op\",\"values\",\"weight\"],\"additionalProperties\":false}},\"numbers\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"eq\",\"gt\",\"gte\",\"lt\",\"lte\"]},\"value\":{\"type\":\"number\"},\"weight\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":10}},\"required\":[\"field\",\"op\",\"value\",\"weight\"],\"additionalProperties\":false}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]},\"weight\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":10}},\"required\":[\"field\",\"op\",\"weight\"],\"additionalProperties\":false}},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"typ",
|
|
5
|
+
"e\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"all\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"weight\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":10}},\"required\":[\"field\",\"op\",\"values\",\"weight\"],\"additionalProperties\":false}}},\"additionalProperties\":false,\"description\":\"The preferences that ran.\"},\"outcome\":{\"type\":\"string\",\"enum\":[\"page\",\"partial_match\",\"no_match\",\"nothing_understood\",\"out_of_scope\",\"brand_not_in_catalog\"],\"description\":\"How the search ended.\"},\"scope\":{\"type\":\"object\",\"properties\":{\"anyField\":{\"description\":\"One of values in any of fields (term attributes).\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"fields\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"unstated\":{\"type\":\"string\",\"const\":\"pass\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"fields\",\"op\",\"values\"],\"additionalProperties\":false}},\"numbers\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"eq\",\"gt\",\"gte\",\"lt\",\"lte\"]},\"value\":{\"type\":\"number\"}},\"required\":[\"field\",\"op\",\"value\"],\"additionalProperties\":false}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]}},\"required\":[\"field\",\"op\"],\"additionalProperties\":false}},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"in\",\"all\",\"not_in\"]},\"orText\":{\"type\":\"string\"},\"unstated\":{\"type\":\"string\",\"const\":\"pass\"},\"values\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"field\",\"op\",\"values\"],\"additionalProperties\":false}}},\"additionalProperties\":false,\"description\":\"The fixed scope, repeated in filters.\"},\"suggestions\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"leaveOut\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"note\":{\"type\":\"string\"},\"variants\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991,\"description\":\"Variants the search returns with this change.\"}},\"required\":[\"note\",\"variants\"],\"additionalProperties\":false},\"description\":\"On an empty page: changes to the next call that return variants, most first.\"},\"understood\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"applied\":{\"type\":\"string\",\"enum\":[\"filter\",\"preference\",\"not_applied\"],\"description\":\"filter narrows; preference only ranks; not_applied did neither.\"},\"id\":{\"type\":\"string\",\"description\":\"The parser's condition id.\"},\"kind\":{\"type\":\"string\",\"enum\":[\"category\",\"brand\",\"term\",\"number\",\"color\",\"paint\",\"name\",\"scope\"]},\"label\":{\"type\":\"string\",\"description\":\"What the words were read as.\"},\"note\":{\"type\":\"string\"},\"text\":{\"type\":\"string\",\"description\":\"The query words it came from.\"}},\"required\":[\"applied\",\"id\",\"kind\",\"label\",\"text\"],\"additionalProperties\":false}},\"unresolved\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"items\",\"pageInfo\",\"oneRowPer\",\"outcome\",\"understood\"],\"additionalProperties\":false}}},\"path\":\"/api/v1/variants/search\",\"requiredHeaders\":[],\"requiresVisibleConfirmation\":false}]",
|
|
6
6
|
].join("");
|
|
7
7
|
export const WEBMCP_TOOLS = JSON.parse(json);
|
package/catalog-client.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { CatalogDocumentList, CatalogPageListResult, CatalogProductReferenceReadResult, CatalogDocumentAccessResult, CatalogPageRepresentationReadResult, CatalogReferenceBatchResponse } from "./catalog-types.js";
|
|
2
|
-
import type { HttpTransport } from "./http-transport.js";
|
|
3
|
-
import type { VariantId } from "./identifiers.js";
|
|
4
|
-
import type { ResolveVariantInput, ResolveVariantOutput } from "./resolve-variant-types.js";
|
|
5
|
-
/** Catalog publication operations inherited by the public SDK client. */
|
|
6
|
-
export declare class CatalogClient {
|
|
7
|
-
#private;
|
|
8
|
-
protected constructor(transport: HttpTransport);
|
|
9
|
-
/**
|
|
10
|
-
* THE QUESTION: "what does this brand page or code resolve to in the
|
|
11
|
-
* graph?" Give `input.url` alone, or `input.code` with `input.brandId` (from
|
|
12
|
-
* {@link CatalogClient.brands} - inherited by {@link MaterialGraphClient})
|
|
13
|
-
* when there is no page to read.
|
|
14
|
-
*
|
|
15
|
-
* Exact and scoreless: a sibling colorway, a similar image or a brand match
|
|
16
|
-
* alone never identifies a variant. Read `outcome` - `identified` names
|
|
17
|
-
* an exact stored variant, `placed` an exact brand with no variant match,
|
|
18
|
-
* `ambiguous` carries bounded `candidates`, and `unresolved` states why,
|
|
19
|
-
* never a guess. The submitted URL is never persisted.
|
|
20
|
-
*/
|
|
21
|
-
resolveVariant(input: ResolveVariantInput, signal?: AbortSignal): Promise<ResolveVariantOutput>;
|
|
22
|
-
/**
|
|
23
|
-
* Read exact, verified brand-publication page relationships for variants.
|
|
24
|
-
* Missing evidence stays explicit; this operation never guesses a page from
|
|
25
|
-
* a generic PDF.
|
|
26
|
-
*/
|
|
27
|
-
catalogReferencesForVariants(input: {
|
|
28
|
-
variantIds: VariantId[];
|
|
29
|
-
}, signal?: AbortSignal): Promise<CatalogReferenceBatchResponse>;
|
|
30
|
-
/** List immutable catalog documents retained from verified source material. */
|
|
31
|
-
catalogs(signal?: AbortSignal): Promise<CatalogDocumentList>;
|
|
32
|
-
/** List stable one-based page identities and their representation status. */
|
|
33
|
-
catalogPages(catalogId: string, options?: {
|
|
34
|
-
limit?: number;
|
|
35
|
-
offset?: number;
|
|
36
|
-
}, signal?: AbortSignal): Promise<CatalogPageListResult>;
|
|
37
|
-
/** Read a retained page representation or its exact missing-artifact receipt. */
|
|
38
|
-
catalogPageRepresentation(pageId: string, signal?: AbortSignal): Promise<CatalogPageRepresentationReadResult>;
|
|
39
|
-
/** Read every verified product/page reference for one retained catalog. */
|
|
40
|
-
catalogReferences(catalogId: string, signal?: AbortSignal): Promise<CatalogProductReferenceReadResult>;
|
|
41
|
-
/** Resolve browser-safe access to one immutable catalog document. */
|
|
42
|
-
catalogDocumentAccess(documentId: string, signal?: AbortSignal): Promise<CatalogDocumentAccessResult>;
|
|
43
|
-
}
|
package/catalog-client.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { resolveOperation } from "./operations.js";
|
|
2
|
-
/** Catalog publication operations inherited by the public SDK client. */
|
|
3
|
-
export class CatalogClient {
|
|
4
|
-
#transport;
|
|
5
|
-
constructor(transport) {
|
|
6
|
-
this.#transport = transport;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* THE QUESTION: "what does this brand page or code resolve to in the
|
|
10
|
-
* graph?" Give `input.url` alone, or `input.code` with `input.brandId` (from
|
|
11
|
-
* {@link CatalogClient.brands} - inherited by {@link MaterialGraphClient})
|
|
12
|
-
* when there is no page to read.
|
|
13
|
-
*
|
|
14
|
-
* Exact and scoreless: a sibling colorway, a similar image or a brand match
|
|
15
|
-
* alone never identifies a variant. Read `outcome` - `identified` names
|
|
16
|
-
* an exact stored variant, `placed` an exact brand with no variant match,
|
|
17
|
-
* `ambiguous` carries bounded `candidates`, and `unresolved` states why,
|
|
18
|
-
* never a guess. The submitted URL is never persisted.
|
|
19
|
-
*/
|
|
20
|
-
async resolveVariant(input, signal) {
|
|
21
|
-
return await this.#transport.requestJson(resolveOperation("resolve_variant"), { body: input, signal });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Read exact, verified brand-publication page relationships for variants.
|
|
25
|
-
* Missing evidence stays explicit; this operation never guesses a page from
|
|
26
|
-
* a generic PDF.
|
|
27
|
-
*/
|
|
28
|
-
async catalogReferencesForVariants(input, signal) {
|
|
29
|
-
return await this.#transport.requestJson(resolveOperation("get_catalog_references_batch"), { body: input, signal });
|
|
30
|
-
}
|
|
31
|
-
/** List immutable catalog documents retained from verified source material. */
|
|
32
|
-
async catalogs(signal) {
|
|
33
|
-
return await this.#transport.requestJson(resolveOperation("list_catalog_documents"), { signal });
|
|
34
|
-
}
|
|
35
|
-
/** List stable one-based page identities and their representation status. */
|
|
36
|
-
async catalogPages(catalogId, options = {}, signal) {
|
|
37
|
-
return await this.#transport.requestJson(resolveOperation("list_catalog_pages"), { pathParams: { catalogId }, query: options, signal });
|
|
38
|
-
}
|
|
39
|
-
/** Read a retained page representation or its exact missing-artifact receipt. */
|
|
40
|
-
async catalogPageRepresentation(pageId, signal) {
|
|
41
|
-
return await this.#transport.requestJson(resolveOperation("get_catalog_page_representation"), { pathParams: { pageId }, signal });
|
|
42
|
-
}
|
|
43
|
-
/** Read every verified product/page reference for one retained catalog. */
|
|
44
|
-
async catalogReferences(catalogId, signal) {
|
|
45
|
-
return await this.#transport.requestJson(resolveOperation("list_catalog_product_references"), { pathParams: { catalogId }, signal });
|
|
46
|
-
}
|
|
47
|
-
/** Resolve browser-safe access to one immutable catalog document. */
|
|
48
|
-
async catalogDocumentAccess(documentId, signal) {
|
|
49
|
-
return await this.#transport.requestJson(resolveOperation("get_catalog_document_access"), { pathParams: { documentId }, signal });
|
|
50
|
-
}
|
|
51
|
-
}
|
package/catalog-types.d.ts
DELETED
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
/** A verified product location in a specific immutable brand publication. */
|
|
2
|
-
export type CatalogReference = {
|
|
3
|
-
anchor: {
|
|
4
|
-
coordinateSpace: "normalized_0_1000";
|
|
5
|
-
/** Page carrying the printed code; defaults to page.documentPage. Do not draw it on another page. */
|
|
6
|
-
documentPage?: number;
|
|
7
|
-
height: number;
|
|
8
|
-
kind: "printed_code";
|
|
9
|
-
width: number;
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
};
|
|
13
|
-
productRegion?: {
|
|
14
|
-
coordinateSpace: "normalized_0_1000";
|
|
15
|
-
height: number;
|
|
16
|
-
kind: "product_region";
|
|
17
|
-
review: {
|
|
18
|
-
approvedBy: string;
|
|
19
|
-
confidence: {
|
|
20
|
-
evidenceBasis: "human_visual_review" | "model_assisted_visual_review";
|
|
21
|
-
level: "reviewed";
|
|
22
|
-
};
|
|
23
|
-
method: "human" | "model_assisted";
|
|
24
|
-
model?: string;
|
|
25
|
-
reviewedAt: string;
|
|
26
|
-
};
|
|
27
|
-
width: number;
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
};
|
|
31
|
-
variantId: string;
|
|
32
|
-
brand: {
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
};
|
|
36
|
-
catalog: {
|
|
37
|
-
id: string;
|
|
38
|
-
title: string;
|
|
39
|
-
};
|
|
40
|
-
edition: {
|
|
41
|
-
id: string;
|
|
42
|
-
label: string;
|
|
43
|
-
title?: string;
|
|
44
|
-
};
|
|
45
|
-
document: {
|
|
46
|
-
id: string;
|
|
47
|
-
mediaType: "application/pdf";
|
|
48
|
-
};
|
|
49
|
-
page: {
|
|
50
|
-
documentPage: number;
|
|
51
|
-
printedPageLabel?: string;
|
|
52
|
-
pageCount?: number;
|
|
53
|
-
};
|
|
54
|
-
source: {
|
|
55
|
-
brandItemCode: string;
|
|
56
|
-
};
|
|
57
|
-
status: "verified";
|
|
58
|
-
isPrimary: boolean;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Why a known variant has no verified reference. None of these says the
|
|
62
|
-
* product is missing from the printed book; nobody records how many of a
|
|
63
|
-
* brand's products a publication contains.
|
|
64
|
-
*/
|
|
65
|
-
export type CatalogReferenceAbsenceReason =
|
|
66
|
-
/**
|
|
67
|
-
* The registry retains no publication for the variant's brand. It says
|
|
68
|
-
* nothing about whether the brand publishes one.
|
|
69
|
-
*/
|
|
70
|
-
"no_publication_on_record"
|
|
71
|
-
/** The edition is known but its document is not retained. */
|
|
72
|
-
| "publication_source_unavailable"
|
|
73
|
-
/** The document is retained but no page has been reviewed. */
|
|
74
|
-
| "publication_not_reviewed"
|
|
75
|
-
/** Pages were reviewed and this product is not among the references yet. */
|
|
76
|
-
| "product_not_yet_referenced";
|
|
77
|
-
/** The brand publication a `no_verified_reference` result was judged against. */
|
|
78
|
-
export type CatalogReferencePublication = {
|
|
79
|
-
brand: {
|
|
80
|
-
id: string;
|
|
81
|
-
name: string;
|
|
82
|
-
};
|
|
83
|
-
catalog: {
|
|
84
|
-
id: string;
|
|
85
|
-
title: string;
|
|
86
|
-
};
|
|
87
|
-
/** Null when the edition's document is not retained. */
|
|
88
|
-
documentId: string | null;
|
|
89
|
-
edition: {
|
|
90
|
-
id: string;
|
|
91
|
-
label: string;
|
|
92
|
-
title?: string;
|
|
93
|
-
};
|
|
94
|
-
/** Reviewed references the publication holds; present only when its pages were reviewed. */
|
|
95
|
-
referencedProductCount?: number;
|
|
96
|
-
};
|
|
97
|
-
export type CatalogReferenceResult = {
|
|
98
|
-
variantId: string;
|
|
99
|
-
status: "verified";
|
|
100
|
-
reference: CatalogReference;
|
|
101
|
-
} | {
|
|
102
|
-
variantId: string;
|
|
103
|
-
status: "no_verified_reference";
|
|
104
|
-
reason: CatalogReferenceAbsenceReason;
|
|
105
|
-
/** Absent only when `reason` is `no_publication_on_record`. */
|
|
106
|
-
publication?: CatalogReferencePublication;
|
|
107
|
-
} | {
|
|
108
|
-
variantId: string;
|
|
109
|
-
status: "unresolved_variant";
|
|
110
|
-
} | {
|
|
111
|
-
variantId: string;
|
|
112
|
-
status: "unavailable";
|
|
113
|
-
} | {
|
|
114
|
-
variantId: string;
|
|
115
|
-
status: "upstream_failure";
|
|
116
|
-
};
|
|
117
|
-
export type CatalogReferenceBatchResponse = {
|
|
118
|
-
results: CatalogReferenceResult[];
|
|
119
|
-
coverage: {
|
|
120
|
-
requested: number;
|
|
121
|
-
verified: number;
|
|
122
|
-
noVerifiedReference: number;
|
|
123
|
-
unresolvedVariant: number;
|
|
124
|
-
unavailable: number;
|
|
125
|
-
upstreamFailure: number;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
export type CatalogDocumentAccess = {
|
|
129
|
-
documentId: string;
|
|
130
|
-
contentType: "application/pdf";
|
|
131
|
-
readerUrl: string;
|
|
132
|
-
originalUrl: string;
|
|
133
|
-
byteRanges: "supported" | "unknown";
|
|
134
|
-
};
|
|
135
|
-
export type CatalogDocumentAccessResult = {
|
|
136
|
-
documentId: string;
|
|
137
|
-
status: "available";
|
|
138
|
-
access: CatalogDocumentAccess;
|
|
139
|
-
} | {
|
|
140
|
-
documentId: string;
|
|
141
|
-
status: "unresolved_document";
|
|
142
|
-
} | {
|
|
143
|
-
documentId: string;
|
|
144
|
-
status: "unavailable";
|
|
145
|
-
} | {
|
|
146
|
-
documentId: string;
|
|
147
|
-
status: "forbidden";
|
|
148
|
-
} | {
|
|
149
|
-
documentId: string;
|
|
150
|
-
status: "upstream_failure";
|
|
151
|
-
};
|
|
152
|
-
export type CatalogDocument = {
|
|
153
|
-
availability: "available";
|
|
154
|
-
brand: {
|
|
155
|
-
id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
};
|
|
158
|
-
document: {
|
|
159
|
-
contentScope: "full_document" | "cover_only";
|
|
160
|
-
id: string;
|
|
161
|
-
mediaType: "application/pdf";
|
|
162
|
-
pageCount: number;
|
|
163
|
-
};
|
|
164
|
-
edition: CatalogEdition;
|
|
165
|
-
id: string;
|
|
166
|
-
kind: "document";
|
|
167
|
-
productStatus: "partial" | "not_processed";
|
|
168
|
-
receipt: CatalogAvailableReceipt;
|
|
169
|
-
title: string;
|
|
170
|
-
};
|
|
171
|
-
export type CatalogEdition = {
|
|
172
|
-
id: string;
|
|
173
|
-
label: string;
|
|
174
|
-
title: string;
|
|
175
|
-
};
|
|
176
|
-
export type CatalogAvailableReceipt = {
|
|
177
|
-
extraction: {
|
|
178
|
-
references: number;
|
|
179
|
-
status: "partial" | "not_processed";
|
|
180
|
-
};
|
|
181
|
-
failures: CatalogFailureReceipt[];
|
|
182
|
-
pages: {
|
|
183
|
-
documentPositionBase: 1;
|
|
184
|
-
pageCount: number;
|
|
185
|
-
};
|
|
186
|
-
render: {
|
|
187
|
-
failedPages: {
|
|
188
|
-
documentPage: number;
|
|
189
|
-
reason: string;
|
|
190
|
-
}[];
|
|
191
|
-
renderedPages: number;
|
|
192
|
-
status: "complete" | "partial" | "not_recorded";
|
|
193
|
-
};
|
|
194
|
-
source: {
|
|
195
|
-
checksum: {
|
|
196
|
-
algorithm: "sha256";
|
|
197
|
-
value: string;
|
|
198
|
-
};
|
|
199
|
-
valueSource: "brand_supplied";
|
|
200
|
-
retainedUrl: string;
|
|
201
|
-
status: "retained";
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
export type CatalogFailureReceipt = {
|
|
205
|
-
count: number;
|
|
206
|
-
reason: string;
|
|
207
|
-
stage: "source" | "render" | "extraction";
|
|
208
|
-
};
|
|
209
|
-
export type UnavailableCatalogDocument = {
|
|
210
|
-
availability: "source_unavailable";
|
|
211
|
-
brand: {
|
|
212
|
-
id: string;
|
|
213
|
-
name: string;
|
|
214
|
-
};
|
|
215
|
-
document: null;
|
|
216
|
-
edition: CatalogEdition;
|
|
217
|
-
id: string;
|
|
218
|
-
kind: "document";
|
|
219
|
-
productStatus: "not_processed";
|
|
220
|
-
receipt: {
|
|
221
|
-
extraction: {
|
|
222
|
-
references: 0;
|
|
223
|
-
status: "blocked_source_unavailable";
|
|
224
|
-
};
|
|
225
|
-
failures: CatalogFailureReceipt[];
|
|
226
|
-
pages: {
|
|
227
|
-
documentPositionBase: 1;
|
|
228
|
-
pageCount: null;
|
|
229
|
-
};
|
|
230
|
-
render: {
|
|
231
|
-
failedPages: never[];
|
|
232
|
-
renderedPages: 0;
|
|
233
|
-
status: "blocked_source_unavailable";
|
|
234
|
-
};
|
|
235
|
-
source: {
|
|
236
|
-
reason: "retained_source_not_found";
|
|
237
|
-
status: "unavailable";
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
title: string;
|
|
241
|
-
};
|
|
242
|
-
export type CatalogPublication = CatalogDocument | UnavailableCatalogDocument;
|
|
243
|
-
export type CatalogDocumentList = {
|
|
244
|
-
catalogs: CatalogPublication[];
|
|
245
|
-
source: "verified-source-material-registry";
|
|
246
|
-
};
|
|
247
|
-
export type CatalogProductReferenceList = {
|
|
248
|
-
catalog: CatalogDocument;
|
|
249
|
-
coverage: {
|
|
250
|
-
documentPages: {
|
|
251
|
-
total: number;
|
|
252
|
-
withVerifiedReferences: number;
|
|
253
|
-
};
|
|
254
|
-
pagesWithReferences: number;
|
|
255
|
-
precision: {
|
|
256
|
-
reason: "labeled_denominator_not_recorded";
|
|
257
|
-
status: "not_measured";
|
|
258
|
-
};
|
|
259
|
-
productCoverage: {
|
|
260
|
-
reason: "source_product_denominator_not_recorded";
|
|
261
|
-
status: "not_measured";
|
|
262
|
-
};
|
|
263
|
-
references: number;
|
|
264
|
-
unmatched: {
|
|
265
|
-
reasons: "unmatched_source_products_not_recorded"[];
|
|
266
|
-
status: "not_measured";
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
references: CatalogReference[];
|
|
270
|
-
source: "verified-source-material-registry";
|
|
271
|
-
status: "available";
|
|
272
|
-
};
|
|
273
|
-
export type CatalogProductReferenceUnavailable = {
|
|
274
|
-
catalog: UnavailableCatalogDocument;
|
|
275
|
-
reason: "retained_source_not_found";
|
|
276
|
-
status: "source_unavailable";
|
|
277
|
-
};
|
|
278
|
-
export type CatalogProductReferenceReadResult = CatalogProductReferenceList | CatalogProductReferenceUnavailable;
|
|
279
|
-
export type CatalogPageRequiredArtifact = {
|
|
280
|
-
mediaType: "image/webp";
|
|
281
|
-
version: "catalog-page-webp-v1";
|
|
282
|
-
};
|
|
283
|
-
export type CatalogPageAvailableArtifact = {
|
|
284
|
-
bucket: "materialgraph";
|
|
285
|
-
key: string;
|
|
286
|
-
url: string;
|
|
287
|
-
mediaType: CatalogPageRequiredArtifact["mediaType"];
|
|
288
|
-
};
|
|
289
|
-
export type CatalogPage = {
|
|
290
|
-
catalogId: string;
|
|
291
|
-
documentId: string;
|
|
292
|
-
editionId: string;
|
|
293
|
-
id: string;
|
|
294
|
-
original: {
|
|
295
|
-
documentId: string;
|
|
296
|
-
documentPage: number;
|
|
297
|
-
};
|
|
298
|
-
page: {
|
|
299
|
-
documentPage: number;
|
|
300
|
-
printedPageLabel?: string;
|
|
301
|
-
};
|
|
302
|
-
representation: {
|
|
303
|
-
artifact: CatalogPageAvailableArtifact;
|
|
304
|
-
status: "available";
|
|
305
|
-
};
|
|
306
|
-
} | {
|
|
307
|
-
catalogId: string;
|
|
308
|
-
documentId: string;
|
|
309
|
-
editionId: string;
|
|
310
|
-
id: string;
|
|
311
|
-
original: {
|
|
312
|
-
documentId: string;
|
|
313
|
-
documentPage: number;
|
|
314
|
-
};
|
|
315
|
-
page: {
|
|
316
|
-
documentPage: number;
|
|
317
|
-
printedPageLabel?: string;
|
|
318
|
-
};
|
|
319
|
-
representation: {
|
|
320
|
-
requiredArtifact: CatalogPageRequiredArtifact;
|
|
321
|
-
reason: "retained_representation_not_found";
|
|
322
|
-
status: "unavailable";
|
|
323
|
-
};
|
|
324
|
-
};
|
|
325
|
-
type CatalogPageAvailable = Extract<CatalogPage, {
|
|
326
|
-
representation: {
|
|
327
|
-
status: "available";
|
|
328
|
-
};
|
|
329
|
-
}>;
|
|
330
|
-
type CatalogPageUnavailable = Extract<CatalogPage, {
|
|
331
|
-
representation: {
|
|
332
|
-
status: "unavailable";
|
|
333
|
-
};
|
|
334
|
-
}>;
|
|
335
|
-
export type CatalogPageListResult = {
|
|
336
|
-
catalog: CatalogDocument;
|
|
337
|
-
pages: CatalogPage[];
|
|
338
|
-
pagination: {
|
|
339
|
-
count: number;
|
|
340
|
-
hasMore: boolean;
|
|
341
|
-
limit: number;
|
|
342
|
-
offset: number;
|
|
343
|
-
total: number;
|
|
344
|
-
};
|
|
345
|
-
representationCoverage: {
|
|
346
|
-
available: number;
|
|
347
|
-
failuresByReason: {
|
|
348
|
-
count: number;
|
|
349
|
-
reason: "retained_representation_not_found";
|
|
350
|
-
}[];
|
|
351
|
-
total: number;
|
|
352
|
-
unavailable: number;
|
|
353
|
-
};
|
|
354
|
-
status: "available";
|
|
355
|
-
} | {
|
|
356
|
-
catalog: UnavailableCatalogDocument;
|
|
357
|
-
reason: "retained_source_not_found";
|
|
358
|
-
status: "source_unavailable";
|
|
359
|
-
};
|
|
360
|
-
export type CatalogPageRepresentationReadResult = {
|
|
361
|
-
artifact: CatalogPageAvailableArtifact;
|
|
362
|
-
page: CatalogPageAvailable;
|
|
363
|
-
status: "available";
|
|
364
|
-
} | {
|
|
365
|
-
requiredArtifact: CatalogPageRequiredArtifact;
|
|
366
|
-
page: CatalogPageUnavailable;
|
|
367
|
-
reason: "retained_representation_not_found";
|
|
368
|
-
status: "unavailable";
|
|
369
|
-
} | {
|
|
370
|
-
pageId: string;
|
|
371
|
-
status: "unresolved_page";
|
|
372
|
-
};
|
|
373
|
-
export {};
|
package/catalog-types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|