@instruments/materialgraph 0.36.0 → 0.37.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/by-spec-types.d.ts +0 -2
- package/client.d.ts +2 -4
- package/client.js +2 -5
- package/find-sampled-together-types.d.ts +2 -2
- package/find-sampled-together-types.js +2 -2
- package/find-variants-by-color-types.d.ts +2 -2
- package/find-variants-by-vector-types.d.ts +2 -2
- package/get-variant-types.d.ts +2 -2
- package/get-variant-types.js +2 -2
- package/image-reference-types.d.ts +1 -1
- package/index.d.ts +0 -1
- package/list-enum-values-types.d.ts +2 -2
- package/list-variant-facets-types.d.ts +2 -2
- package/list-variants-types.d.ts +3 -3
- package/list-variants-types.js +3 -3
- package/operations.d.ts +1 -1
- package/operations.js +0 -1
- package/package.json +1 -1
- package/resolve-variant-types.d.ts +1 -1
- package/resolve-variant-types.js +1 -1
- package/response-schemas.generated.d.ts +1 -1
- package/response-schemas.generated.js +4 -6
- package/search-variants-types.d.ts +6 -17
- package/types.d.ts +1 -1
- package/webmcp.generated.js +4 -4
- package/citation-types.d.ts +0 -34
- package/citation-types.js +0 -1
package/by-spec-types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ValueResolution } from "./catalog-discovery-types.js";
|
|
2
|
-
import type { VerdictCitation } from "./citation-types.js";
|
|
3
2
|
/**
|
|
4
3
|
* The six states a verdict cell can report — and what each licenses you to say.
|
|
5
4
|
*
|
|
@@ -58,7 +57,6 @@ export type BySpecVerdictCell = {
|
|
|
58
57
|
* - `basis_unmet` — the value's source is weaker than the criterion demanded.
|
|
59
58
|
*/
|
|
60
59
|
trustGap: "below_confidence" | "basis_unmet" | null;
|
|
61
|
-
citation?: VerdictCitation;
|
|
62
60
|
};
|
|
63
61
|
/**
|
|
64
62
|
* A match's full report card: every cell, the rolled-up grade, weakest confidence.
|
package/client.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { ApplicabilityOptions, AssociatedOptions } from "./association-type
|
|
|
2
2
|
import type { BrandsOptions } from "./brand-types.js";
|
|
3
3
|
import { CatalogueClient } from "./catalogue-client.js";
|
|
4
4
|
import { CategoriesClient } from "./categories-client.js";
|
|
5
|
-
import type { ResolvedVerdictCitation } from "./citation-types.js";
|
|
6
5
|
import type { MaterialGraphClientOptions } from "./client-config.js";
|
|
7
6
|
import { ColorsClient } from "./colors-client.js";
|
|
8
7
|
import type { RateLimit } from "./errors.js";
|
|
@@ -184,7 +183,8 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
184
183
|
* to narrow or widen the same search; page with this method's own cursor,
|
|
185
184
|
* which `listVariants()` refuses. A phrase with several meanings is
|
|
186
185
|
* answered with one and listed in `choices`; send its `handle` with an
|
|
187
|
-
* alternative's `group` and `id` in `selections` to switch it
|
|
186
|
+
* alternative's `group` and `id` in `selections` to switch it, or its
|
|
187
|
+
* `text` in `leaveOut` to drop the condition. A query that
|
|
188
188
|
* applies nothing returns no items, never the whole catalogue; a preference
|
|
189
189
|
* alone still ranks it.
|
|
190
190
|
*/
|
|
@@ -265,6 +265,4 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
265
265
|
* `mg:source` scope, which a `source`, `ingest` or `admin` key carries.
|
|
266
266
|
*/
|
|
267
267
|
uploadSourceMaterial(input: UploadSourceMaterialInput, signal?: AbortSignal): Promise<SourceMaterialBatchReceipt>;
|
|
268
|
-
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
269
|
-
citation(citationId: string, signal?: AbortSignal): Promise<ResolvedVerdictCitation>;
|
|
270
268
|
}
|
package/client.js
CHANGED
|
@@ -262,7 +262,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
262
262
|
* to narrow or widen the same search; page with this method's own cursor,
|
|
263
263
|
* which `listVariants()` refuses. A phrase with several meanings is
|
|
264
264
|
* answered with one and listed in `choices`; send its `handle` with an
|
|
265
|
-
* alternative's `group` and `id` in `selections` to switch it
|
|
265
|
+
* alternative's `group` and `id` in `selections` to switch it, or its
|
|
266
|
+
* `text` in `leaveOut` to drop the condition. A query that
|
|
266
267
|
* applies nothing returns no items, never the whole catalogue; a preference
|
|
267
268
|
* alone still ranks it.
|
|
268
269
|
*/
|
|
@@ -378,8 +379,4 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
378
379
|
async uploadSourceMaterial(input, signal) {
|
|
379
380
|
return await uploadSourceMaterial(this.#transport, input, signal);
|
|
380
381
|
}
|
|
381
|
-
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
382
|
-
async citation(citationId, signal) {
|
|
383
|
-
return await this.#get("get_verdict_citation", undefined, signal, { citationId });
|
|
384
|
-
}
|
|
385
382
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module find-sampled-together-types
|
|
3
3
|
* @description Hand-maintained mirror of `find_sampled_together`'s (MG-2332) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
5
|
+
* `packages/sampling/src/schema.ts` (`findSampledTogetherInputSchema`,
|
|
6
6
|
* `findSampledTogetherResultSchema`). This SDK has no RUNTIME dependency on
|
|
7
|
-
* `@materialgraph/
|
|
7
|
+
* `@materialgraph/sampling` (it's a devDependency only, for the parity tests in
|
|
8
8
|
* `__tests__/`), so the shapes are copied here rather than imported.
|
|
9
9
|
* `contract-parity.test.ts` keeps this mirror honest against the server types,
|
|
10
10
|
* the project-type list included.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module find-sampled-together-types
|
|
3
3
|
* @description Hand-maintained mirror of `find_sampled_together`'s (MG-2332) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
5
|
+
* `packages/sampling/src/schema.ts` (`findSampledTogetherInputSchema`,
|
|
6
6
|
* `findSampledTogetherResultSchema`). This SDK has no RUNTIME dependency on
|
|
7
|
-
* `@materialgraph/
|
|
7
|
+
* `@materialgraph/sampling` (it's a devDependency only, for the parity tests in
|
|
8
8
|
* `__tests__/`), so the shapes are copied here rather than imported.
|
|
9
9
|
* `contract-parity.test.ts` keeps this mirror honest against the server types,
|
|
10
10
|
* the project-type list included.
|
|
@@ -3,11 +3,11 @@ import type { ImageReferenceInput } from "./image-reference-types.js";
|
|
|
3
3
|
* @module find-variants-by-color-types
|
|
4
4
|
* @description Hand-maintained mirror of `find_variants_by_color`'s
|
|
5
5
|
* (MG-2217/MG-2230/MG-2247/MG-2328) input and output wire shapes. The source
|
|
6
|
-
* of truth is `packages/
|
|
6
|
+
* of truth is `packages/search/src/find-variants-by-color.ts` —
|
|
7
7
|
* `rerank`'s `reference.candidates`/`reference.seed` still mirror
|
|
8
8
|
* `compare-color-similarity.ts`'s own seed shape, but its `matches[]` card
|
|
9
9
|
* is the same shape CONTAINS/PALETTE use, not a copy of that module's result.
|
|
10
|
-
* This SDK has no RUNTIME dependency on `@materialgraph/
|
|
10
|
+
* This SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
11
11
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes
|
|
12
12
|
* are copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
13
13
|
* mirror honest against the server types.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module find-variants-by-vector-types
|
|
3
3
|
* @description Hand-maintained mirror of `find_variants_by_vector`'s
|
|
4
4
|
* (MG-2231) input and output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* SDK has no runtime dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/vector-discovery/find-variants-by-vector.ts`; this
|
|
6
|
+
* SDK has no runtime dependency on `@materialgraph/search`, so the shapes
|
|
7
7
|
* are copied here and `contract-parity.test.ts` keeps them honest.
|
|
8
8
|
*/
|
|
9
9
|
import type { ImageReferenceInput } from "./image-reference-types.js";
|
package/get-variant-types.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module get-variant-types
|
|
3
3
|
* @description Hand-maintained mirror of `get_variant`'s (MG-2251) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* dependency on `@materialgraph/
|
|
5
|
+
* `packages/catalog/src/variants/get-variant.ts`, but this SDK has no RUNTIME
|
|
6
|
+
* dependency on `@materialgraph/catalog`, so the shapes are copied here and
|
|
7
7
|
* `__tests__/contract-parity.test.ts` keeps the mirror honest against the
|
|
8
8
|
* server types.
|
|
9
9
|
*/
|
package/get-variant-types.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module get-variant-types
|
|
3
3
|
* @description Hand-maintained mirror of `get_variant`'s (MG-2251) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* dependency on `@materialgraph/
|
|
5
|
+
* `packages/catalog/src/variants/get-variant.ts`, but this SDK has no RUNTIME
|
|
6
|
+
* dependency on `@materialgraph/catalog`, so the shapes are copied here and
|
|
7
7
|
* `__tests__/contract-parity.test.ts` keeps the mirror honest against the
|
|
8
8
|
* server types.
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module image-reference-types
|
|
3
3
|
* @description The one image-reference shape the vector-discovery lenses
|
|
4
|
-
* share (`@materialgraph/
|
|
4
|
+
* share (`@materialgraph/search/vector-discovery/image-reference`'s
|
|
5
5
|
* `imageReferenceInputSchema`): a catalogue asset, an upload, a public URL,
|
|
6
6
|
* or an existing variant's own image. Exactly one field is set per call; the
|
|
7
7
|
* server refuses more than one.
|
package/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export type { SdkOperation, SdkOperationId } from "./operations.js";
|
|
|
15
15
|
export type * from "./identifiers.js";
|
|
16
16
|
export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
|
|
17
17
|
export type * from "./run-types.js";
|
|
18
|
-
export type * from "./citation-types.js";
|
|
19
18
|
export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
|
|
20
19
|
export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphRequestMetadata, ProblemDetail, RateLimit, SanitizedErrorValue, SanitizedIssue, SimpleErrorBody, } from "./errors.js";
|
|
21
20
|
export type * from "./types.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module list-enum-values-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_enum_values`'s (MG-2225) input
|
|
4
4
|
* and output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* runtime dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/browse/list-enum-values.ts`; this SDK has no
|
|
6
|
+
* runtime dependency on `@materialgraph/search`, so the shapes are copied
|
|
7
7
|
* here and `contract-parity.test.ts` keeps them honest.
|
|
8
8
|
*/
|
|
9
9
|
import type { OpenEnum } from "./types.js";
|
|
@@ -3,9 +3,9 @@ import type { FilterGroups } from "./list-variants-types.js";
|
|
|
3
3
|
* @module list-variant-facets-types
|
|
4
4
|
* @description Hand-maintained mirror of `list_variant_facets`'s (MG-2294)
|
|
5
5
|
* input and output wire shapes. The source of truth is
|
|
6
|
-
* `packages/
|
|
6
|
+
* `packages/search/src/variants/list-variant-facets.ts` (the input) and
|
|
7
7
|
* `list-variant-facets-contract.ts` (the output); this SDK has no runtime
|
|
8
|
-
* dependency on `@materialgraph/
|
|
8
|
+
* dependency on `@materialgraph/search`, so the shapes are copied here and
|
|
9
9
|
* `contract-parity.test.ts` keeps them honest.
|
|
10
10
|
*/
|
|
11
11
|
import type { SearchCatalogueSubset } from "./search-catalogue-subset-types.js";
|
package/list-variants-types.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module list-variants-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_variants`'s (MG-2222) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* and `packages/
|
|
7
|
-
* but this SDK has no RUNTIME dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/variants/variant-conditions.ts` (the filter grammar)
|
|
6
|
+
* and `packages/search/src/variants/list-variants-contract.ts` (the output),
|
|
7
|
+
* but this SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
8
8
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes are
|
|
9
9
|
* copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
10
10
|
* mirror honest against the server types.
|
package/list-variants-types.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module list-variants-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_variants`'s (MG-2222) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* and `packages/
|
|
7
|
-
* but this SDK has no RUNTIME dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/variants/variant-conditions.ts` (the filter grammar)
|
|
6
|
+
* and `packages/search/src/variants/list-variants-contract.ts` (the output),
|
|
7
|
+
* but this SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
8
8
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes are
|
|
9
9
|
* copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
10
10
|
* mirror honest against the server types.
|
package/operations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.8.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [readonly ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"], readonly ["catalogPages", "GET", "/api/v1/catalogs/{catalogId}/pages", "list_catalog_pages"], readonly ["catalogPageRepresentation", "GET", "/api/v1/catalog-pages/{pageId}/representation", "get_catalog_page_representation"], readonly ["catalogReferences", "GET", "/api/v1/catalogs/{catalogId}/references", "list_catalog_product_references"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueCollections", "GET", "/api/v1/catalogues/collections", "list_catalogue_channel_collections"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_document_access"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["listVariantAssets", "GET", "/api/v1/variants/{variantId}/assets", "list_variant_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["associatedFinishes", "GET", "/api/v1/associated/finishes", "list_associated_finishes"], readonly ["associatedProducts", "GET", "/api/v1/associated/products", "list_associated_products"], readonly ["applicability", "GET", "/api/v1/applicability", "get_applicability"], readonly ["listVariants", "GET", "/api/v1/variants", "list_variants"], readonly ["listVariantFacets", "POST", "/api/v1/variants/facets", "list_variant_facets"], readonly ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"], readonly ["findVariantsByColor", "POST", "/api/v1/variants/by-color", "find_variants_by_color"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["findSampledTogether", "POST", "/api/v1/variants/sampled-together", "find_sampled_together"], readonly ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"], readonly ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"], readonly ["resolveColor", "GET", "/api/v1/search/colors/resolve", "resolve_color_name"], readonly ["listAttributes", "GET", "/api/v1/catalog/attributes", "catalog_list_attributes"], readonly ["listEnumValues", "GET", "/api/v1/catalog/enum-values", "catalog_list_enum_values"], readonly ["categories.list", "GET", "/api/v1/categories", "list_categories"], readonly ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["colors.profiles", "GET", "/api/v1/colors/profiles", "get_category_color_profiles"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["workflows.start", "POST", "/api/v1/workflows/{workflowId}/runs", "create_public_run"], readonly ["workflows.run", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}", "get_public_run"], readonly ["
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"], readonly ["catalogPages", "GET", "/api/v1/catalogs/{catalogId}/pages", "list_catalog_pages"], readonly ["catalogPageRepresentation", "GET", "/api/v1/catalog-pages/{pageId}/representation", "get_catalog_page_representation"], readonly ["catalogReferences", "GET", "/api/v1/catalogs/{catalogId}/references", "list_catalog_product_references"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueCollections", "GET", "/api/v1/catalogues/collections", "list_catalogue_channel_collections"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_document_access"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["listVariantAssets", "GET", "/api/v1/variants/{variantId}/assets", "list_variant_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["associatedFinishes", "GET", "/api/v1/associated/finishes", "list_associated_finishes"], readonly ["associatedProducts", "GET", "/api/v1/associated/products", "list_associated_products"], readonly ["applicability", "GET", "/api/v1/applicability", "get_applicability"], readonly ["listVariants", "GET", "/api/v1/variants", "list_variants"], readonly ["listVariantFacets", "POST", "/api/v1/variants/facets", "list_variant_facets"], readonly ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"], readonly ["findVariantsByColor", "POST", "/api/v1/variants/by-color", "find_variants_by_color"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["findSampledTogether", "POST", "/api/v1/variants/sampled-together", "find_sampled_together"], readonly ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"], readonly ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"], readonly ["resolveColor", "GET", "/api/v1/search/colors/resolve", "resolve_color_name"], readonly ["listAttributes", "GET", "/api/v1/catalog/attributes", "catalog_list_attributes"], readonly ["listEnumValues", "GET", "/api/v1/catalog/enum-values", "catalog_list_enum_values"], readonly ["categories.list", "GET", "/api/v1/categories", "list_categories"], readonly ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["colors.profiles", "GET", "/api/v1/colors/profiles", "get_category_color_profiles"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["workflows.start", "POST", "/api/v1/workflows/{workflowId}/runs", "create_public_run"], readonly ["workflows.run", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}", "get_public_run"], readonly ["workflows.streamRunEvents", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}/events", "list_public_run_events"]];
|
|
3
3
|
export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
|
|
4
4
|
export type SdkOperation = Readonly<{
|
|
5
5
|
clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
|
package/operations.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `resolve_variant` contract).
|
|
4
4
|
*
|
|
5
5
|
* These intentionally mirror the domain-owned Zod contract
|
|
6
|
-
* (`@materialgraph/
|
|
6
|
+
* (`@materialgraph/catalog/identify-contract`) rather than importing it: the
|
|
7
7
|
* published SDK must carry no workspace package dependency.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
package/resolve-variant-types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `resolve_variant` contract).
|
|
4
4
|
*
|
|
5
5
|
* These intentionally mirror the domain-owned Zod contract
|
|
6
|
-
* (`@materialgraph/
|
|
6
|
+
* (`@materialgraph/catalog/identify-contract`) rather than importing it: the
|
|
7
7
|
* published SDK must carry no workspace package dependency.
|
|
8
8
|
*/
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The API contract version the schemas were generated from. */
|
|
2
2
|
export declare const RESPONSE_SCHEMA_API_VERSION = "0.8.0";
|
|
3
3
|
/** Every SDK operation whose success response has a published JSON Schema. */
|
|
4
|
-
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "samplize_catalogue_products", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "list_schema_value_dictionaries", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "search_variants", "find_variants_by_color", "find_variants_by_vector", "find_sampled_together", "resolve_variant", "get_variant", "resolve_color_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "get_category_color_profiles", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run"
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "samplize_catalogue_products", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "list_schema_value_dictionaries", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "search_variants", "find_variants_by_color", "find_variants_by_vector", "find_sampled_together", "resolve_variant", "get_variant", "resolve_color_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "get_category_color_profiles", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run"];
|
|
5
5
|
export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;
|
|
@@ -40,7 +40,6 @@ export const RESPONSE_SCHEMA_OPERATION_IDS = [
|
|
|
40
40
|
"upload_source_material",
|
|
41
41
|
"create_public_run",
|
|
42
42
|
"get_public_run",
|
|
43
|
-
"get_verdict_citation",
|
|
44
43
|
];
|
|
45
44
|
export const RESPONSE_SCHEMA_CATALOGUE_JSON = [
|
|
46
45
|
"{\"definitions\":{\"ApplicabilityCollection\":{\"type\":\"object\",\"properties\":{\"direction\":{\"type\":\"string\",\"enum\":[\"forward\",\"reverse\"]},\"kind\":{\"type\":\"string\",\"const\":\"manufacturer_declared_applicability\"},\"requestedSubject\":{\"type\":\"object\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"product\"}},\"required\":[\"id\",\"kind\"]},{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"variant\"}},\"required\":[\"id\",\"kind\"]}]},\"sources\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"coverage\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"countKind\":{\"type\":\"string\",\"enum\":[\"exact\",\"partial\"]},\"declaredCount\":{\"anyOf\":[{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},{\"type\":\"null\"}]},\"sourceAuthority\":{\"type\":\"string\",\"minLength\":1},\"sourceLocator\":{\"type\":\"string\",\"minLength\":1},\"sourceRevision\":{\"type\":\"string\",\"minLength\":1},\"state\":{\"type\":\"string\",\"enum\":[\"available\",\"partial\",\"none_declared\",\"not_ingested\",\"source_not_applicable\",\"unavailable\"]}},\"required\":[\"countKind\",\"declaredCount\",\"sourceAuthority\",\"sourceLocator\",\"sourceRevision\",\"state\"]},{\"type\":\"null\"}]},\"factRevisions\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"facts\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"declaringBrandId\":{\"type\":\"string\",\"minLength\":1},\"evidenceScope\":{\"type\":\"string\",\"const\":\"manufacturer_declared\"},\"finish\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"variant\"}},\"required\":[\"id\",\"kind\"]},\"id\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":21},\"lifecycle\":{\"type\":\"string\",\"enum\":[\"active\",\"tombstoned\"]},\"relation\":{\"type\":\"string\",\"const\":\"applicable_finish\"},\"source\":{\"type\":\"object\",\"properties\":{\"authority\":{\"type\":\"string\",\"minLength\":1},\"locator\":{\"type\":\"string\",\"minLength\":1},\"revision\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"authority\",\"locator\",\"revision\"]},\"subject\":{\"type\":\"object\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"product\"}},\"required\":[\"id\",\"kind\"]},{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"variant\"}},\"required\":[\"id\",\"kind\"]}]}},\"required\":[\"declaringBrandId\",\"evidenceScope\",\"finish\",\"id\",\"lifecycle\",\"relation\",\"source\",\"subject\"]}},\"scope\":{\"type\":\"object\",\"properties\":{\"sourceAuthority\":{\"type\":\"string\",\"minLength\":1},\"sourceLocator\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"sourceAuthority\",\"sourceLocator\"]},\"unresolved\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"declaringBrandId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"type\":\"null\"}]},\"finishKind\":{\"type\":\"string\",\"enum\":[\"variant\",\"unknown\"]},\"finishLocator\":{\"type\":\"string\",\"minLength\":1},\"reason\":{\"type\":\"string\",\"enum\":[\"subject_unresolved\",\"finish_unresolved\",\"both_unresolved\",\"unsupported_subject_kind\"]},\"source\":{\"type\":\"object\",\"properties\":{\"authority\":{\"type\":\"string\",\"minLength\":1},\"locator\":{\"type\":\"string\",\"minLength\":1},\"revision\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"authority\",\"locator\",\"revision\"]},\"subjectKind\":{\"type\":\"string\",\"enum\":[\"product\",\"variant\",\"unknown\"]},\"subjectLocator\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"declaringBrandId\",\"finishKind\",\"finishLocator\",\"reason\",\"source\",\"subjectKind\",\"subjectLocator\"]}}},\"required\":[\"coverage\",\"factRevisions\",\"facts\",\"scope\",\"unresolved\"]}}},\"required\":[\"direction\",\"kind\",\"requestedSubject\",\"sources\"]},\"CatalogDocumentList\":{\"type\":\"object\",\"properties\":{\"catalogs\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"brand\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"name\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"id\",\"name\"]},\"edition\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"label\":{\"type\":\"string\",\"minLength\":1},\"title\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"id\",\"label\",\"title\"]},\"id\":{\"type\":\"string\",\"minLength\":1},\"kind\":{\"type\":\"string\",\"const\":\"document\"}",
|
|
@@ -74,9 +73,8 @@ export const RESPONSE_SCHEMA_CATALOGUE_JSON = [
|
|
|
74
73
|
":{\"type\":\"string\",\"const\":\"samplizeCatalogue\"},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"brand\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"slug\":{\"type\":\"string\"}},\"required\":[\"name\",\"slug\"]},\"code\":{\"type\":\"string\"},\"collectionMemberships\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"handle\":{\"type\":\"string\"},\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"algolia_shopify_products\"},\"sourceCollectionId\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"required\":[\"handle\",\"observedAt\",\"publisher\",\"source\",\"sourceCollectionId\",\"url\"]}},\"colorAnalysis\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{}},\"demand\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"algolia_shopify_products\"},\"sourceUrl\":{\"type\":\"string\"},\"field\":{\"type\":\"string\",\"const\":\"recently_ordered_count\"},\"defaultAttributeLevel\":{\"type\":\"string\",\"const\":\"shopify_variant\"},\"recentlyOrderedCount\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"sourceVariantId\":{\"type\":\"string\"},\"window\":{\"type\":\"null\"}},\"required\":[\"observedAt\",\"publisher\",\"source\",\"sourceUrl\",\"field\",\"defaultAttributeLevel\",\"recentlyOrderedCount\",\"sourceVariantId\",\"window\"]},{\"type\":\"null\"}]},\"hex\":{\"type\":\"string\",\"pattern\":\"^#[0-9A-F]{6}$\"},\"hexObservations\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"differsFromSelected\":{\"type\":\"boolean\"},\"hex\":{\"type\":\"string\",\"pattern\":\"^#[0-9A-F]{6}$\"},\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\"},\"source\":{\"type\":\"string\"},\"valueOrigin\":{\"type\":\"string\"},\"sourceUrl\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"differsFromSelected\",\"hex\",\"observedAt\",\"publisher\",\"source\",\"valueOrigin\",\"sourceUrl\"]}},\"hexSource\":{\"type\":\"object\",\"properties\":{\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"snowflake_product_tags\"},\"url\":{\"type\":\"string\"}},\"required\":[\"publisher\",\"source\",\"url\"]},\"lrv\":{\"anyOf\":[{\"type\":\"number\",\"minimum\":0,\"maximum\":100},{\"type\":\"null\"}]},\"lrvObservations\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"algolia_shopify_products\"},\"sourceUrl\":{\"type\":\"string\"},\"field\":{\"type\":\"string\"},\"value\":{\"type\":\"number\",\"minimum\":0,\"maximum\":100}},\"required\":[\"observedAt\",\"publisher\",\"source\",\"sourceUrl\",\"field\",\"value\"]}},\"lrvSource\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"algolia_shopify_products\"},\"sourceUrl\":{\"type\":\"string\"},\"field\":{\"type\":\"string\"},\"value\":{\"type\":\"number\",\"minimum\":0,\"maximum\":100}},\"required\":[\"observedAt\",\"publisher\",\"source\",\"sourceUrl\",\"field\",\"value\"]},{\"type\":\"null\"}]},\"name\":{\"type\":\"string\"},\"oklab\":{\"type\":\"object\",\"properties\":{\"L\":{\"type\":\"number\"},\"a\":{\"type\":\"number\"},\"b\":{\"type\":\"number\"}},\"required\":[\"L\",\"a\",\"b\"]},\"productId\":{\"type\":\"string\"},\"publishedHexes\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"differsFromSelected\":{\"type\":\"boolean\"},\"hex\":{\"type\":\"string\",\"pattern\":\"^#[0-9A-F]{6}$\"},\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\"},\"source\":{\"type\":\"string\"},\"valueOrigin\":{\"type\":\"string\"},\"sourceUrl\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"differsFromSelected\",\"hex\",\"observedAt\",\"publisher\",\"source\",\"valueOrigin\",\"sourceUrl\"]}},\"sizeVariants\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"demand\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"observedAt\":{\"type\":[\"string\",\"null\"]},\"publisher\":{\"type\":\"string\",\"const\":\"Samplize\"},\"source\":{\"type\":\"string\",\"const\":\"algolia_shopify_products\"},\"sourceUrl\":{\"type\":\"string\"},\"field\":{\"type\":\"string\",\"const\":\"recently_ordered_count\"},\"defaultAttributeLevel\":{\"type\":\"string\",\"const\":\"shopify_variant\"},\"recentlyOrderedCount\":{\"type\"",
|
|
75
74
|
":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"sourceVariantId\":{\"type\":\"string\"},\"window\":{\"type\":\"null\"}},\"required\":[\"observedAt\",\"publisher\",\"source\",\"sourceUrl\",\"field\",\"defaultAttributeLevel\",\"recentlyOrderedCount\",\"sourceVariantId\",\"window\"]},{\"type\":\"null\"}]},\"inventoryAvailable\":{\"type\":\"boolean\"},\"price\":{\"type\":[\"number\",\"null\"]},\"sku\":{\"type\":[\"string\",\"null\"]},\"sourceVariantId\":{\"type\":\"string\"},\"title\":{\"type\":[\"string\",\"null\"]}},\"required\":[\"demand\",\"inventoryAvailable\",\"price\",\"sku\",\"sourceVariantId\",\"title\"]}},\"sourceProductId\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"variantId\":{\"type\":\"string\"}},\"required\":[\"brand\",\"code\",\"collectionMemberships\",\"colorAnalysis\",\"demand\",\"hex\",\"hexObservations\",\"hexSource\",\"lrv\",\"lrvObservations\",\"lrvSource\",\"name\",\"oklab\",\"productId\",\"publishedHexes\",\"sizeVariants\",\"sourceProductId\",\"url\",\"variantId\"]}},\"nextCursor\":{\"type\":[\"string\",\"null\"]},\"schemaVersion\":{\"type\":\"number\",\"const\":2},\"source\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{}},\"sourceVersion\":{\"type\":\"string\"},\"total\":{\"type\":\"integer\",\"minimum\":-9007199254740991,\"maximum\":9007199254740991}},\"required\":[\"complete\",\"searchCatalogueSubset\",\"items\",\"nextCursor\",\"schemaVersion\",\"source\",\"sourceVersion\",\"total\"]},\"SchemaValueDictionariesResponse\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"valueDictionaries\"},\"schemaVersion\":{\"type\":\"string\"},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"authority\":{\"type\":\"object\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"taxonomy\"},\"system\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"kind\",\"system\"]},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"colorscope\"},\"system\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"kind\",\"system\"]},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"materialgraph\"},\"system\":{\"type\":\"string\",\"const\":\"@materialgraph/schema\"}},\"required\":[\"kind\",\"system\"]},{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"external-standard\"},\"system\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"kind\",\"system\"]}]},\"description\":{\"type\":\"string\"},\"id\":{\"type\":\"string\",\"minLength\":1,\"pattern\":\"^[a-z][a-z0-9_]*$\"},\"name\":{\"type\":\"string\"},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"minLength\":1},\"label\":{\"type\":\"string\"},\"aliases\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"broaderTermId\":{\"type\":\"string\",\"minLength\":1},\"definition\":{\"type\":\"string\",\"minLength\":1},\"externalMappings\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"mappingType\":{\"type\":\"string\",\"enum\":[\"direct\",\"transform\",\"derived\",\"classification\",\"semantic\"]},\"matchStrength\":{\"type\":\"string\",\"enum\":[\"exact\",\"close\",\"broad\",\"narrow\",\"related\"]},\"notes\":{\"type\":\"string\"},\"target\":{\"type\":\"string\",\"enum\":[\"schema_org\",\"ifc_pset\",\"bsdd\",\"iso_23387\",\"eclass\",\"gs1_gdm\",\"gdsn\",\"etim\",\"uniclass\"]},\"targetPath\":{\"type\":\"string\"}},\"required\":[\"mappingType\",\"target\",\"targetPath\"]}},\"metadata\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"type\":[\"string\",\"number\",\"boolean\",\"null\"]}},\"lifecycle\":{\"type\":\"object\",\"properties\":{\"deprecatedIn\":{\"type\":\"string\"},\"introducedIn\":{\"type\":\"string\"},\"status\":{\"type\":\"string\",\"enum\":[\"draft\",\"active\",\"deprecated\"]},\"supersededBy\":{\"type\":\"string\"}},\"required\":[\"introducedIn\",\"status\"]},\"semanticId\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"id\",\"label\",\"lifecycle\",\"semanticId\"]}},\"lifecycle\":{\"type\":\"object\",\"properties\":{\"deprecatedIn\":{\"type\":\"string\"},\"introducedIn\":{\"type\":\"string\"},\"status\":{\"type\":\"string\",\"enum\":[\"draft\",\"active\",\"deprecated\"]},\"supersededBy\":{\"type\":\"string\"}},\"required\":[\"introducedIn\",\"status\"]},\"semanticId\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"authority\",\"description\",\"id\",\"name\",\"terms\",\"lifecycle\",\"semanticId\"]}},\"totalCount\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"kind\",\"schemaVersion\",\"items\",\"totalCount\"]},\"SearchVariantsResponse\":{\"type\":\"object\",\"properties\":{\"exclu",
|
|
76
75
|
"dedBySearchCatalogueSubset\":{\"description\":\"Filtered variant ids outside the materials catalogue.\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"category\":{\"description\":\"The first original source category, or null when unknown.\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]},{\"type\":\"null\"}]},\"categories\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]},\"description\":\"All original source categories in source order.\"},\"productType\":{\"description\":\"The accepted primary specification type, or null for a color sample or unresolved subject.\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]},{\"type\":\"null\"}]},\"sampleSubject\":{\"type\":\"string\",\"enum\":[\"material\",\"paint_color_sample\",\"unknown\",\"conflict\"]},\"colorOptionValueId\":{\"type\":[\"string\",\"null\"]},\"code\":{\"description\":\"The brand's item code.\",\"type\":[\"string\",\"null\"]},\"image\":{\"description\":\"The primary product image, or null when there is none.\",\"anyOf\":[{\"type\":\"object\",\"properties\":{\"alt\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"required\":[\"alt\",\"url\"]},{\"type\":\"null\"}]},\"brand\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"],\"description\":\"The brand. `id` is the slug get_brand takes.\"},\"name\":{\"type\":\"string\",\"description\":\"The variant's own name.\"},\"product\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]},\"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\"}}},\"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\"]},\"specifications\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"$ref\":\"#/$defs/__schema0\"}}},\"variantCount\":{\"description\":\"Eligible variants of this product. Absent: none counted.\",\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991}},\"required\":[\"category\",\"categories\",\"productType\",\"sampleSubject\",\"colorOptionValueId\",\"code\",\"brand\",\"name\",\"product\",\"variantId\"]}},\"pageInfo\":{\"type\":\"object\",\"properties\":{\"endCursor\":{\"type\":[\"string\",\"null\"]},\"hasNextPage\":{\"type\":\"boolean\"}},\"required\":[\"endCursor\",\"hasNextPage\"]},\"preferenceMatchesRemain\":{\"description\":\"False: nothing from this page on meets any optionalFilter.\",\"type\":\"boolean\"},\"unavailableVariantIds\":{\"description\":\"Filtered ids in the catalogue 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\"]}},\"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\"]}},\"basis\":{\"type\":\"string\"},\"handle\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"selected\":{\"type\":\"object\",\"properties\":{\"group\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"},\"kind\":{\"t",
|
|
77
|
-
"ype\":\"string\"},\"label\":{\"type\":\"string\"}},\"required\":[\"group\",\"id\",\"kind\",\"label\"]},\"text\":{\"type\":\"string\"}},\"required\":[\"alternatives\",\"basis\",\"handle\",\"reason\",\"selected\",\"text\"]}},\"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\"]}},\"required\":[\"hex\",\"op\",\"range\"]},\"description\":\"The color regions that ran.\"},\"corrections\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"correction\":{\"type\":\"string\"},\"word\":{\"type\":\"string\"}},\"required\":[\"correction\",\"word\"]}},\"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\"]}},\"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\"]}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]}},\"required\":[\"field\",\"op\"]}},\"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\"]}}},\"description\":\"The filters that ran, the scope among them.\"},\"name\":{\"type\":\"string\",\"description\":\"The paint name looked up.\"},\"oneRowPer\":{\"type\":\"string\",\"enum\":[\"product\",\"variant\"],\"description\":\"A row per product, or per variant for a paint or color.\"},\"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\"]}},\"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\"]}},\"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\"]}},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"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\"]}}},\"description\":\"The preferences that ran.\"},\"outcome\":{\"type\":\"string\",\"enum\":[\"page\",\"no_match\",\"nothing_understood\",\"out_of_scope\",\"brand_not_in_catalogue\"],\"description\":\"How the search ended.\"},\"scope\":{\"type\":\"object\",\"properties\":{\"anyField\":{\"description\":\"One of values in any of fields (
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"ract_image_palette\":{\"$ref\":\"#/$defs/ExtractPaletteResponse\"},\"list_brands\":{\"$ref\":\"#/$defs/ListBrandsPage\"},\"upload_source_material\":{\"$ref\":\"#/$defs/SourceMaterialBatchReceipt\"},\"create_public_run\":{\"$ref\":\"#/$defs/CreatePublicRunResponse\"},\"get_public_run\":{\"$ref\":\"#/$defs/PublicRunResponse\"},\"get_verdict_citation\":{\"type\":\"object\",\"properties\":{\"citationId\":{\"type\":\"string\",\"minLength\":1},\"source\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"source_record\",\"source_material\",\"source_statement\",\"url\",\"asset\",\"download\",\"manual_note\",\"agent_output\"]},\"locator\":{\"type\":\"object\",\"properties\":{\"imageBox\":{\"type\":\"object\",\"properties\":{\"height\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"width\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"x\":{\"type\":\"number\"},\"y\":{\"type\":\"number\"}},\"required\":[\"height\",\"width\",\"x\",\"y\"]},\"page\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"selector\":{\"type\":\"string\",\"minLength\":1},\"xPath\":{\"type\":\"string\",\"minLength\":1}}},\"publicPath\":{\"type\":\"string\",\"format\":\"starts_with\",\"pattern\":\"^\\\\/api\\\\/assets\\\\/.*\"},\"ref\":{\"type\":\"string\",\"minLength\":1},\"sourceAssetId\":{\"type\":\"string\",\"minLength\":1},\"sourceDownloadId\":{\"type\":\"string\",\"minLength\":1},\"sourceStatementId\":{\"type\":\"string\",\"minLength\":1},\"sourceId\":{\"type\":\"string\",\"minLength\":1},\"title\":{\"type\":\"string\",\"minLength\":1},\"url\":{\"type\":\"string\",\"format\":\"uri\"}},\"required\":[\"kind\",\"ref\"]},\"sourceType\":{\"type\":\"string\",\"minLength\":1}},\"required\":[\"citationId\",\"source\",\"sourceType\"]}}}",
|
|
76
|
+
"ype\":\"string\"},\"label\":{\"type\":\"string\"}},\"required\":[\"group\",\"id\",\"kind\",\"label\"]},\"text\":{\"type\":\"string\"}},\"required\":[\"alternatives\",\"basis\",\"handle\",\"reason\",\"selected\",\"text\"]}},\"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\"]}},\"required\":[\"hex\",\"op\",\"range\"]},\"description\":\"The color regions that ran.\"},\"corrections\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"correction\":{\"type\":\"string\"},\"word\":{\"type\":\"string\"}},\"required\":[\"correction\",\"word\"]}},\"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\"]}},\"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\"]}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]}},\"required\":[\"field\",\"op\"]}},\"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\"]}}},\"description\":\"The filters that ran, the scope among them.\"},\"name\":{\"type\":\"string\",\"description\":\"The paint name looked up.\"},\"oneRowPer\":{\"type\":\"string\",\"enum\":[\"product\",\"variant\"],\"description\":\"A row per product, or per variant for a paint or color.\"},\"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\"]}},\"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\"]}},\"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\"]}},\"terms\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"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\"]}}},\"description\":\"The preferences that ran.\"},\"outcome\":{\"type\":\"string\",\"enum\":[\"page\",\"partial_match\",\"no_match\",\"nothing_understood\",\"out_of_scope\",\"brand_not_in_catalogue\"],\"description\":\"How the search ended.\"},\"scope\":{\"type\":\"object\",\"properties\":{\"anyField\":{\"description\":\"One of values in any of fields (ter",
|
|
77
|
+
"m 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\"]}},\"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\"]}},\"presence\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"op\":{\"type\":\"string\",\"enum\":[\"exists\",\"missing\"]}},\"required\":[\"field\",\"op\"]}},\"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\"]}}},\"description\":\"The fixed scope, repeated in filters.\"},\"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\"]},\"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\"]}},\"unresolved\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"items\",\"pageInfo\",\"oneRowPer\",\"outcome\",\"understood\"]},\"SourceMaterialBatchReceipt\":{\"type\":\"object\",\"properties\":{\"batchId\":{\"type\":\"string\",\"description\":\"The stored batch id (`smb_…`).\"},\"sources\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"sourceId\":{\"type\":\"string\",\"description\":\"The stored file id (`smf_…`).\"},\"role\":{\"type\":\"string\",\"enum\":[\"brief\",\"reference_image\",\"document\",\"document_image\",\"inspiration_image\",\"unclassified\"],\"description\":\"The pipeline-assigned role. `unclassified` is a legitimate terminal value when the file could not be placed; clients should tolerate new values.\"},\"filename\":{\"type\":\"string\"},\"mediaType\":{\"type\":\"string\"},\"sha256\":{\"type\":\"string\",\"description\":\"Lowercase hex SHA-256 of the stored bytes.\"},\"bytes\":{\"type\":\"integer\",\"minimum\":-9007199254740991,\"maximum\":9007199254740991},\"pages\":{\"description\":\"PDF page count; null for images.\",\"anyOf\":[{\"type\":\"integer\",\"minimum\":-9007199254740991,\"maximum\":9007199254740991},{\"type\":\"null\"}]}},\"required\":[\"sourceId\",\"role\",\"filename\",\"mediaType\",\"sha256\",\"bytes\",\"pages\"]}}},\"required\":[\"batchId\",\"sources\"]},\"VariantAssetPage\":{\"type\":\"object\",\"properties\":{\"documentCoverage\":{\"description\":\"Brand document list state. Absent when documents are filtered out.\",\"type\":\"string\",\"enum\":[\"available\",\"none_declared\",\"not_ingested\",\"unavailable_source\",\"dead_link\",\"failed_ingest\"]},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"appliesTo\":{\"description\":\"Only 'product': a product-wide document. Absent: this variant's own.\",\"type\":\"string\",\"const\":\"product\"},\"assetId\":{\"type\":\"string\",\"minLength\":1},\"availability\":{\"type\":\"string\",\"enum\":[\"available\",\"unknown\",\"unavailable\"],\"description\":\"available: MaterialGraph serves url. unknown: brand's link, unchecked.\"},\"byteSize\":{\"description\":\"Not on images; absent when unknown.\",\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"documentTypes\":{\"description\":\"Documents only; absent when unknown.\",\"minItems\":1,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"technical_data_sheet\",\"product_sheet\",\"technical_bulletin\",\"sustainability_report\",\"specification\",\"installation_guide\",\"care_maintenance_guide\",\"operation_manual\",\"warranty\",\"parts_list\",\"technical_drawing\",\"test_report\",\"certificate\",\"declaration_of_performance\",\"environmental_product_declaration\",\"health_product_",
|
|
78
|
+
"declaration\",\"ingredient_disclosure\",\"safety_data_sheet\",\"brochure\",\"catalogue\",\"color_finish_chart\",\"other\",\"unknown\"]}},\"height\":{\"description\":\"Images only; absent when unknown.\",\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"imageRole\":{\"description\":\"Images only; absent when unknown.\",\"type\":\"string\",\"enum\":[\"product\",\"swatch\",\"detail\",\"scene\",\"technical\",\"color_chart\",\"sample_collection\",\"other\",\"unknown\"]},\"kind\":{\"type\":\"string\",\"enum\":[\"image\",\"document\",\"cad\",\"bim\",\"model_3d\",\"texture\",\"archive\",\"other\",\"unknown\"]},\"name\":{\"description\":\"Not on images; absent when unknown.\",\"type\":\"string\"},\"presentation\":{\"description\":\"Images only; absent when unknown.\",\"type\":\"string\",\"enum\":[\"edge_to_edge\",\"packshot\",\"cutout_margin\",\"montage\",\"unknown\"]},\"url\":{\"description\":\"Absent when availability is unavailable.\",\"type\":\"string\"},\"width\":{\"description\":\"Images only; absent when unknown.\",\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991}},\"required\":[\"assetId\",\"availability\",\"kind\"]}},\"pageInfo\":{\"type\":\"object\",\"properties\":{\"nextCursor\":{\"type\":[\"string\",\"null\"]},\"returnedCount\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991},\"totalMatches\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":9007199254740991}},\"required\":[\"nextCursor\",\"returnedCount\",\"totalMatches\"]},\"primaryAssetId\":{\"description\":\"The variant's primary image. Absent when it has none.\",\"type\":\"string\",\"minLength\":1}},\"required\":[\"items\",\"pageInfo\"]},\"WhoamiResponse\":{\"type\":\"object\",\"properties\":{\"principal\":{\"type\":\"string\",\"description\":\"The resolved principal for the credential (e.g. `apikey:read`).\"},\"scopes\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"description\":\"The scopes granted to this credential (e.g. `mg:read`).\"}},\"required\":[\"principal\",\"scopes\"]},\"__schema0\":{\"anyOf\":[{\"type\":\"string\"},{\"type\":\"number\"},{\"type\":\"boolean\"},{\"type\":\"null\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/__schema0\"}},{\"type\":\"object\",\"propertyNames\":{\"type\":\"string\"},\"additionalProperties\":{\"$ref\":\"#/$defs/__schema0\"}}]}},\"operations\":{\"list_catalog_documents\":{\"$ref\":\"#/$defs/CatalogDocumentList\"},\"list_catalog_pages\":{\"$ref\":\"#/$defs/CatalogPageListResult\"},\"get_catalog_page_representation\":{\"$ref\":\"#/$defs/CataloguePageRepresentationReadResult\"},\"list_catalog_product_references\":{\"$ref\":\"#/$defs/CatalogProductReferenceReadResult\"},\"samplize_catalogue_products\":{\"$ref\":\"#/$defs/SamplizeCataloguePage\"},\"get_catalogue_references_batch\":{\"$ref\":\"#/$defs/CatalogueReferenceBatchResponse\"},\"list_catalogue_channel_collections\":{\"$ref\":\"#/$defs/CatalogueChannelCollectionsResponse\"},\"get_catalogue_document_access\":{\"$ref\":\"#/$defs/CatalogueDocumentAccessResult\"},\"list_material_blocks\":{\"$ref\":\"#/$defs/MaterialBlockProjection\"},\"list_variant_assets\":{\"$ref\":\"#/$defs/VariantAssetPage\"},\"list_material_documents\":{\"$ref\":\"#/$defs/ProductDocumentPage\"},\"list_schema_value_dictionaries\":{\"$ref\":\"#/$defs/SchemaValueDictionariesResponse\"},\"get_material_pairings\":{\"type\":\"object\",\"properties\":{\"seed\":{\"$ref\":\"#/$defs/MaterialTile\"},\"items\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/PairingItem\"}},\"cospecCount\":{\"type\":\"integer\",\"minimum\":-9007199254740991,\"maximum\":9007199254740991,\"description\":\"How many items came from real order evidence (the cospec arm).\"},\"skippedCandidates\":{\"description\":\"Candidates dropped at hydration for violating the material contract; present only when > 0. A malformed row costs itself, never the rail (MG-985).\",\"type\":\"integer\",\"minimum\":-9007199254740991,\"maximum\":9007199254740991},\"ordering\":{\"description\":\"Graph-owned ranking contract; present only when `order` was requested.\",\"$ref\":\"#/$defs/PairingOrdering\"},\"nextCursor\":{\"description\":\"Opaque continuation when another ordered page exists.\",\"type\":\"string\"}},\"required\":[\"seed\",\"items\",\"cospecCount\"]},\"list_associated_finishes\":{\"$ref\":\"#/$defs/DeclaredAssociations\"},\"list_associated_products\":{\"$ref\":\"#/$defs/DeclaredAssociations\"},\"get_applicability\":{\"$ref\":\"#/$defs/ApplicabilityCollection\"},\"list_variants\":{\"$ref\":\"#/$defs/ListVariantsResponse\"},\"list_variant_f",
|
|
79
|
+
"acets\":{\"$ref\":\"#/$defs/ListVariantFacetsResponse\"},\"search_variants\":{\"$ref\":\"#/$defs/SearchVariantsResponse\"},\"find_variants_by_color\":{\"$ref\":\"#/$defs/FindVariantsByColorResponse\"},\"find_variants_by_vector\":{\"$ref\":\"#/$defs/FindVariantsByVectorResponse\"},\"find_sampled_together\":{\"$ref\":\"#/$defs/FindSampledTogetherResponse\"},\"resolve_variant\":{\"$ref\":\"#/$defs/ResolveVariantResponse\"},\"get_variant\":{\"$ref\":\"#/$defs/GetVariantResponse\"},\"resolve_color_name\":{\"$ref\":\"#/$defs/ResolveColorResponse\"},\"catalog_list_attributes\":{\"$ref\":\"#/$defs/ListAttributesResponse\"},\"catalog_list_enum_values\":{\"$ref\":\"#/$defs/ListEnumValuesResponse\"},\"list_categories\":{\"$ref\":\"#/$defs/ListCategoriesResponse\"},\"get_category\":{\"$ref\":\"#/$defs/GetCategoryResponse\"},\"whoami\":{\"$ref\":\"#/$defs/WhoamiResponse\"},\"get_category_color_profiles\":{\"$ref\":\"#/$defs/CategoryColorProfilesResponse\"},\"extract_image_palette\":{\"$ref\":\"#/$defs/ExtractPaletteResponse\"},\"list_brands\":{\"$ref\":\"#/$defs/ListBrandsPage\"},\"upload_source_material\":{\"$ref\":\"#/$defs/SourceMaterialBatchReceipt\"},\"create_public_run\":{\"$ref\":\"#/$defs/CreatePublicRunResponse\"},\"get_public_run\":{\"$ref\":\"#/$defs/PublicRunResponse\"}}}",
|
|
82
80
|
].join("");
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import type { FindVariantsByVectorItem } from "./find-variants-by-vector-types.js";
|
|
2
1
|
/**
|
|
3
2
|
* @module search-variants-types
|
|
4
3
|
* @description Hand-maintained mirror of `search_variants`'s (MG-2223) input
|
|
5
4
|
* and output wire shapes. The source of truth is
|
|
6
|
-
* `packages/
|
|
5
|
+
* `packages/search/src/search-variants/search-variants.ts` and
|
|
7
6
|
* `compose-conditions.ts`; this SDK has no runtime dependency on
|
|
8
|
-
* `@materialgraph/
|
|
7
|
+
* `@materialgraph/search`, so the shapes are copied here and
|
|
9
8
|
* `contract-parity.test.ts` keeps them honest.
|
|
10
9
|
*/
|
|
11
10
|
import type { ColorRangeCondition, FilterGroups, ListVariantsInclude, ListVariantsOutput, OptionalFilterGroups } from "./list-variants-types.js";
|
|
12
11
|
import type { SearchCatalogueSubset } from "./search-catalogue-subset-types.js";
|
|
13
|
-
/** Found by meaning, because fewer than half the query's words were understood. Follows `items`; not filtered by its words. */
|
|
14
|
-
export type SearchVariantsMeaning = {
|
|
15
|
-
/** Why no meaning results came back. */
|
|
16
|
-
error?: "timed_out" | "unavailable";
|
|
17
|
-
items: FindVariantsByVectorItem[];
|
|
18
|
-
/** How many of the query's content words were understood. */
|
|
19
|
-
understoodWords: number;
|
|
20
|
-
/** How many content words the query has. */
|
|
21
|
-
words: number;
|
|
22
|
-
};
|
|
23
12
|
/** Switches one of a previous answer's `choices`: its `handle`, and the `group` and `id` of the alternative to read it as. */
|
|
24
13
|
export type SearchVariantsSelection = {
|
|
25
14
|
group: string;
|
|
@@ -33,6 +22,8 @@ export type SearchVariantsInput = {
|
|
|
33
22
|
cursor?: string;
|
|
34
23
|
/** Optional per-item fields, as `listVariants()` takes; `image` adds each row's image. */
|
|
35
24
|
include?: ListVariantsInclude[];
|
|
25
|
+
/** Up to eight `understood` texts whose conditions to drop; their words are then unresolved. A text that names no understood condition is refused. */
|
|
26
|
+
leaveOut?: string[];
|
|
36
27
|
/** 1–50; defaults to 10. */
|
|
37
28
|
limit?: number;
|
|
38
29
|
/** What to find, in plain words. 1–200 characters. */
|
|
@@ -83,8 +74,6 @@ export type SearchVariantsOutput = ListVariantsOutput & {
|
|
|
83
74
|
correction: string;
|
|
84
75
|
word: string;
|
|
85
76
|
}[];
|
|
86
|
-
/** Results found by meaning, present only when most words were not understood. */
|
|
87
|
-
meaning?: SearchVariantsMeaning;
|
|
88
77
|
/** The `listVariants()` filters that ran: send them, with `optionalFilters` and `name`, to `listVariants()` to narrow or widen this search. */
|
|
89
78
|
filters?: FilterGroups;
|
|
90
79
|
/** The paint name looked up, as `listVariants()` takes it. */
|
|
@@ -93,8 +82,8 @@ export type SearchVariantsOutput = ListVariantsOutput & {
|
|
|
93
82
|
oneRowPer: "product" | "variant";
|
|
94
83
|
/** The `listVariants()` preferences that ran. */
|
|
95
84
|
optionalFilters?: OptionalFilterGroups;
|
|
96
|
-
/** How the search ended. */
|
|
97
|
-
outcome: "page" | "no_match" | "nothing_understood" | "out_of_scope" | "brand_not_in_catalogue";
|
|
85
|
+
/** How the search ended. `partial_match`: no variant met every condition together, so those read from words (never a category, brand or number) rank instead of filtering; `understood` says which. */
|
|
86
|
+
outcome: "page" | "partial_match" | "no_match" | "nothing_understood" | "out_of_scope" | "brand_not_in_catalogue";
|
|
98
87
|
/** The fixed search scope, also present in `filters`. */
|
|
99
88
|
scope?: FilterGroups;
|
|
100
89
|
/** One entry per phrase the parser read, in the parser's order. */
|
package/types.d.ts
CHANGED
|
@@ -194,7 +194,7 @@ export type PairingsResponse = {
|
|
|
194
194
|
/**
|
|
195
195
|
* How a {@link AttributeListItem} matched the query. Declared here rather than
|
|
196
196
|
* imported: this package is published, so it may not reach across into
|
|
197
|
-
* `@materialgraph/
|
|
197
|
+
* `@materialgraph/search`, whose `listAttributesResultSchema` is the source
|
|
198
198
|
* of truth this wire type tracks. `method` is deliberately open - a server
|
|
199
199
|
* that grows a method must not break an older client.
|
|
200
200
|
*/
|
package/webmcp.generated.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const json = [
|
|
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 catalogue; 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\":20,\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"cursor\":{\"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.\"},\"selections\":{\"description\":\"Switch a choice:
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
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 catalogue; 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\":20,\"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.\"},\"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}},\"searchCatalogueSubset\":{\"description\":\"Only this corpus scope. Absent or all: every variant.\",\"type\":\"string\",\"enum\":[\"all\",\"samplizeCatalogue\",\"materialBankOrderable\",\"materialBankNaOrderable\",\"materialBankNaAndCatalogue\",\"materialBankEuOrderable\",\"designShopOrderable\"]},\"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\":{\"excludedBySearchCatalogueSubset\":{\"description\":\"Filtered variant ids outside the materials catalogue.\",\"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\"]},\"code\":{\"description\":\"The brand's item code.\",\"type\":[\"string\",\"null\"]},\"image\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"alt\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"required\":[\"alt\",\"url\"],\"additionalProperties\":false},{\"type\":\"null\"}],\"description\":\"The primary product image, or null when there is none.\"},\"brand\":{\"type\":\"object\",\"p",
|
|
3
|
+
"roperties\":{\"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 variant's own name.\"},\"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\",\"code\",\"brand\",\"name\",\"product\",\"variantId\"],\"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 catalogue 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\":\"string\"},\"label\":{\"type\":\"string\"}},\"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",
|
|
4
|
+
" 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\"],\"description\":\"A row per product, or per variant for a paint or color.\"},\"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\":{\"type\":\"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_catalogue\"],\"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\":{\"t",
|
|
5
|
+
"ype\":\"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.\"},\"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\"]},\"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/citation-types.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** Small handle carried by a verdict cell. Resolve it only when evidence is opened. */
|
|
2
|
-
export type VerdictCitation = {
|
|
3
|
-
citationId: string;
|
|
4
|
-
sourceType: string;
|
|
5
|
-
count: number;
|
|
6
|
-
};
|
|
7
|
-
export type ResolvedVerdictCitation = {
|
|
8
|
-
citationId: string;
|
|
9
|
-
sourceType: string;
|
|
10
|
-
source: {
|
|
11
|
-
kind: "source_record" | "source_material" | "source_statement" | "url" | "asset" | "download" | "manual_note" | "agent_output";
|
|
12
|
-
/** Canonical source/fact/asset/download id, a public source URL, or the claim-source handle when no public reference is available. */
|
|
13
|
-
ref: string;
|
|
14
|
-
title?: string;
|
|
15
|
-
url?: string;
|
|
16
|
-
/** Same-origin public asset proxy path when retained bytes are available. */
|
|
17
|
-
publicPath?: string;
|
|
18
|
-
sourceId?: string;
|
|
19
|
-
sourceStatementId?: string;
|
|
20
|
-
sourceAssetId?: string;
|
|
21
|
-
sourceDownloadId?: string;
|
|
22
|
-
locator?: {
|
|
23
|
-
page?: number;
|
|
24
|
-
selector?: string;
|
|
25
|
-
xPath?: string;
|
|
26
|
-
imageBox?: {
|
|
27
|
-
x: number;
|
|
28
|
-
y: number;
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
package/citation-types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|