@instruments/materialgraph 0.25.0 → 0.27.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/association-types.d.ts +38 -27
- package/associations-client.d.ts +4 -4
- package/associations-client.js +3 -10
- package/attribution-types.d.ts +4 -4
- package/brand-types.d.ts +14 -6
- package/brands-client.d.ts +7 -38
- package/brands-client.js +10 -40
- package/by-colour-types.d.ts +58 -31
- package/by-spec-types.d.ts +6 -73
- package/by-spec-types.js +7 -5
- package/catalog-discovery-types.d.ts +11 -26
- package/catalogue-client.d.ts +16 -35
- package/catalogue-client.js +32 -67
- package/catalogue-types.d.ts +44 -4
- package/categories-client.d.ts +63 -0
- package/categories-client.js +48 -0
- package/category-types.d.ts +114 -0
- package/citation-types.d.ts +4 -4
- package/client-config.d.ts +4 -6
- package/client-config.js +2 -4
- package/client-source-material-comments.d.ts +4 -4
- package/client-source-material-comments.js +4 -38
- package/client-vocabulary.d.ts +7 -9
- package/client-vocabulary.js +22 -30
- package/client.d.ts +110 -244
- package/client.js +217 -387
- package/codes-client.d.ts +2 -2
- package/codes-client.js +8 -8
- package/codes-types.d.ts +55 -34
- package/colour-aggregate-types.d.ts +24 -24
- package/colours-client.d.ts +6 -11
- package/colours-client.js +11 -19
- package/coordinate-client.d.ts +2 -2
- package/coordinate-client.js +1 -13
- package/corpus-scope-types.d.ts +3 -3
- package/corpus-scope-types.js +1 -25
- package/demand-batch-types.d.ts +18 -18
- package/demand-types.d.ts +24 -24
- package/errors.d.ts +13 -13
- package/errors.js +54 -52
- package/http-transport.d.ts +13 -21
- package/http-transport.js +31 -28
- package/identify-types.d.ts +54 -44
- package/identify-types.js +5 -3
- package/index.d.ts +11 -27
- package/index.js +4 -6
- package/list-variant-facets-types.d.ts +60 -0
- package/list-variants-types.d.ts +142 -0
- package/list-variants-types.js +12 -0
- package/match-stream-types.d.ts +45 -32
- package/match-stream-types.js +2 -0
- package/match-stream.d.ts +2 -2
- package/match-stream.js +67 -49
- package/match-types.d.ts +32 -8
- package/material-asset-types.d.ts +89 -69
- package/material-block-types.d.ts +8 -6
- package/material-composition-client.d.ts +21 -0
- package/material-composition-client.js +13 -0
- package/material-composition-types.d.ts +403 -0
- package/material-query-plan-types.d.ts +61 -145
- package/material-resources-client.d.ts +12 -10
- package/material-resources-client.js +27 -22
- package/material-types.d.ts +16 -24
- package/ndjson.js +16 -8
- package/operations.d.ts +6 -6
- package/operations.js +29 -156
- package/package.json +5 -1
- package/palette-search-types.d.ts +87 -52
- package/query-understanding-types.d.ts +65 -40
- package/resolve-client.d.ts +8 -12
- package/resolve-client.js +9 -13
- package/resolve-colour-types.d.ts +8 -8
- package/resolve-types.d.ts +10 -10
- package/response-schemas.d.ts +20 -0
- package/response-schemas.generated.d.ts +5 -0
- package/response-schemas.generated.js +160 -0
- package/response-schemas.js +113 -0
- package/run-types.d.ts +64 -145
- package/runs.d.ts +9 -58
- package/runs.js +60 -149
- package/samplize-catalogue-types.d.ts +18 -18
- package/samplize-colorvec.d.ts +20 -20
- package/samplize-colorvec.js +66 -42
- package/schema-resource-types.d.ts +52 -39
- package/schema-resource-types.js +5 -5
- package/search-card-types.d.ts +26 -4
- package/search-index-plan-types.d.ts +70 -0
- package/search-refinement-types.d.ts +10 -40
- package/search-refinement-types.js +1 -0
- package/search-request-types.d.ts +121 -204
- package/search-response-receipt-types.d.ts +13 -253
- package/search-response-types.d.ts +2 -2
- package/search-result-validation.d.ts +3 -19
- package/search-result-validation.js +42 -183
- package/source-material-validation.d.ts +3 -3
- package/source-material-validation.js +35 -39
- package/spec-facet-types.d.ts +11 -16
- package/spec-types.d.ts +23 -16
- package/spec-types.js +8 -7
- package/specifications.d.ts +14 -72
- package/specifications.js +39 -89
- package/sse.d.ts +2 -2
- package/sse.js +32 -16
- package/substitute-types.d.ts +22 -22
- package/suggest-types.d.ts +11 -17
- package/suggest-types.js +3 -3
- package/taxonomy-coverage-types.d.ts +8 -8
- package/types.d.ts +202 -405
- package/validation.d.ts +26 -26
- package/validation.js +97 -92
- package/webmcp.d.ts +3 -3
- package/webmcp.generated.js +10 -93
- package/brand-most-sampled-types.d.ts +0 -33
- package/browse-types.d.ts +0 -236
- package/client-browse.d.ts +0 -78
- package/client-browse.js +0 -72
- package/client-exploration.d.ts +0 -9
- package/client-exploration.js +0 -7
- package/compare-types.d.ts +0 -89
- package/composition-client.d.ts +0 -33
- package/composition-client.js +0 -27
- package/composition-types.d.ts +0 -455
- package/composition-types.js +0 -10
- package/correction-types.d.ts +0 -88
- package/exploration-types.d.ts +0 -118
- package/exploration-types.js +0 -1
- package/fan-deck-types.d.ts +0 -42
- package/fan-deck-types.js +0 -9
- package/match-rejection-types.d.ts +0 -43
- package/match-rejection-types.js +0 -7
- package/palette-completion-types.d.ts +0 -115
- package/palette-completion-types.js +0 -1
- package/project-types.d.ts +0 -79
- package/project-types.js +0 -9
- package/projects.d.ts +0 -13
- package/projects.js +0 -46
- package/render-assets-types.d.ts +0 -65
- package/render-assets-types.js +0 -1
- package/run-events.d.ts +0 -106
- package/run-events.js +0 -32
- package/schedule-reference-types.d.ts +0 -46
- package/schedule-reference-types.js +0 -1
- package/schedule-references-client.d.ts +0 -14
- package/schedule-references-client.js +0 -26
- package/schedule-types.d.ts +0 -261
- package/schedule-types.js +0 -1
- package/search-collapse-types.d.ts +0 -69
- package/search-collapse-types.js +0 -1
- package/search-mood-types.d.ts +0 -6
- package/search-mood-types.js +0 -1
- package/search-window-types.d.ts +0 -25
- package/search-window-types.js +0 -1
- package/slot-pool-types.d.ts +0 -372
- package/slot-pool-types.js +0 -1
- /package/{brand-most-sampled-types.js → category-types.js} +0 -0
- /package/{browse-types.js → list-variant-facets-types.js} +0 -0
- /package/{compare-types.js → material-composition-types.js} +0 -0
- /package/{correction-types.js → search-index-plan-types.js} +0 -0
package/resolve-types.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type ResolutionKind = "brand" | "paint_identity" | "colour" | "category"
|
|
|
51
51
|
*/
|
|
52
52
|
export type ResolutionRung = "exact" | "alias" | "lexical";
|
|
53
53
|
/** One thing a phrase turned out to mean. */
|
|
54
|
-
export
|
|
54
|
+
export type ResolvedMeaning = {
|
|
55
55
|
kind: ResolutionKind;
|
|
56
56
|
/**
|
|
57
57
|
* The canonical token. OPAQUE — hand it back verbatim, never parse, tidy or
|
|
@@ -91,9 +91,9 @@ export interface ResolvedMeaning {
|
|
|
91
91
|
* nothing rather than a figure measured a different way.
|
|
92
92
|
*/
|
|
93
93
|
coverage?: MeaningCoverage;
|
|
94
|
-
}
|
|
94
|
+
};
|
|
95
95
|
/** How much of the catalogue stands behind one reading. */
|
|
96
|
-
export
|
|
96
|
+
export type MeaningCoverage = {
|
|
97
97
|
/**
|
|
98
98
|
* How many variants carry this reading, CORPUS-WIDE and across every brand —
|
|
99
99
|
* never scoped to the `category` you sent, even when you sent one. `0` is a
|
|
@@ -121,9 +121,9 @@ export interface MeaningCoverage {
|
|
|
121
121
|
* category holds SOME value for the attribute, not that it holds this one.
|
|
122
122
|
*/
|
|
123
123
|
inCategory?: boolean;
|
|
124
|
-
}
|
|
124
|
+
};
|
|
125
125
|
/** What one phrase resolved to — including, explicitly, nothing. */
|
|
126
|
-
export
|
|
126
|
+
export type PhraseResolution = {
|
|
127
127
|
/** The phrase exactly as you sent it, so you can rejoin the batch by value. */
|
|
128
128
|
phrase: string;
|
|
129
129
|
/**
|
|
@@ -147,9 +147,9 @@ export interface PhraseResolution {
|
|
|
147
147
|
* material world.
|
|
148
148
|
*/
|
|
149
149
|
unresolved: boolean;
|
|
150
|
-
}
|
|
150
|
+
};
|
|
151
151
|
/** Optional scoping for a resolve call. */
|
|
152
|
-
export
|
|
152
|
+
export type ResolvePhrasesOptions = {
|
|
153
153
|
/**
|
|
154
154
|
* The product category you are grounding these words FOR — a slot, not a
|
|
155
155
|
* filter. It adds {@link MeaningCoverage.inCategory} to every `attribute` and
|
|
@@ -157,7 +157,7 @@ export interface ResolvePhrasesOptions {
|
|
|
157
157
|
*/
|
|
158
158
|
category?: string;
|
|
159
159
|
signal?: AbortSignal;
|
|
160
|
-
}
|
|
160
|
+
};
|
|
161
161
|
/**
|
|
162
162
|
* What `mg.resolve()` accepts as its second argument. A bare `AbortSignal` is
|
|
163
163
|
* still accepted, exactly as before {@link ResolvePhrasesOptions} existed, so no
|
|
@@ -165,7 +165,7 @@ export interface ResolvePhrasesOptions {
|
|
|
165
165
|
*/
|
|
166
166
|
export type ResolvePhrasesScope = AbortSignal | ResolvePhrasesOptions;
|
|
167
167
|
/** The resolve response: one entry per phrase, in the order you sent them. */
|
|
168
|
-
export
|
|
168
|
+
export type ResolveResponse = {
|
|
169
169
|
/** One per phrase, in request order — never reordered, never deduplicated. */
|
|
170
170
|
resolutions: PhraseResolution[];
|
|
171
|
-
}
|
|
171
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RESPONSE_SCHEMA_OPERATION_IDS } from "./response-schemas.generated.js";
|
|
2
|
+
export { RESPONSE_SCHEMA_API_VERSION, RESPONSE_SCHEMA_OPERATION_IDS, } from "./response-schemas.generated.js";
|
|
3
|
+
/** Every operation {@link responseSchema} answers for. */
|
|
4
|
+
export type ResponseSchemaOperationId = (typeof RESPONSE_SCHEMA_OPERATION_IDS)[number];
|
|
5
|
+
/** A JSON Schema document or subschema, as plain JSON. */
|
|
6
|
+
export type JsonSchema = {
|
|
7
|
+
[keyword: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
/** A self-contained schema: every `$ref` resolves inside its own `$defs`. */
|
|
10
|
+
export type ResponseJsonSchema = JsonSchema & {
|
|
11
|
+
$schema: typeof JSON_SCHEMA_DIALECT;
|
|
12
|
+
$defs?: Record<string, JsonSchema>;
|
|
13
|
+
};
|
|
14
|
+
declare const JSON_SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
15
|
+
/**
|
|
16
|
+
* The success-response schema for one operation, self-contained and carrying
|
|
17
|
+
* only the definitions it reaches. Each call returns a fresh copy, so a caller
|
|
18
|
+
* that annotates or mutates it cannot change what the next caller gets.
|
|
19
|
+
*/
|
|
20
|
+
export declare const responseSchema: (operationId: ResponseSchemaOperationId) => ResponseJsonSchema;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The API contract version the schemas were generated from. */
|
|
2
|
+
export declare const RESPONSE_SCHEMA_API_VERSION = "0.7.0";
|
|
3
|
+
/** Every SDK operation whose success response has a published JSON Schema. */
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["samplize_colorvec_cache", "samplize_catalogue_search", "list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "search_materials_post", "retrieval.identify", "match_material", "search_suggest", "get_colour_stats", "coordinate_materials", "plan_material_query", "samplize_catalogue_products", "search_materials_get", "search_by_colour", "get_material", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "get_composition_report", "list_schema_blocks", "list_schema_attributes", "list_schema_verticals", "list_schema_product_types", "list_schema_units", "list_schema_value_dictionaries", "list_schema_source_requirements", "list_schema_product_type_templates", "list_schema_mappings", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "get_category_colour_profiles", "resolve_colour_name", "suggest_colour_names", "catalog_list_attributes", "catalog_vocabulary_search", "resolve_phrases", "list_categories", "get_category", "get_product_type_status_coverage", "whoami", "get_material_demand", "search_by_palette", "extract_image_palette", "search_by_gradient", "list_spec_facets", "list_brands", "upload_source_material", "get_source_material_batch", "list_source_material_comments", "post_source_material_comment", "create_public_run", "get_public_run", "get_verdict_citation", "get_demand_batch", "resolveCodeAdvisory", "list_code_context", "list_code_requirements"];
|
|
5
|
+
export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;
|