@instruments/materialgraph 0.32.0 → 0.35.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.
Files changed (88) hide show
  1. package/association-types.d.ts +11 -11
  2. package/associations-client.d.ts +7 -7
  3. package/associations-client.js +5 -5
  4. package/brand-types.d.ts +37 -41
  5. package/brand-types.js +3 -5
  6. package/brands-client.d.ts +22 -9
  7. package/brands-client.js +20 -6
  8. package/by-spec-types.d.ts +2 -3
  9. package/catalog-discovery-types.d.ts +3 -3
  10. package/catalogue-client.d.ts +2 -50
  11. package/catalogue-client.js +2 -10
  12. package/catalogue-types.d.ts +1 -1
  13. package/categories-client.d.ts +3 -5
  14. package/categories-client.js +1 -1
  15. package/category-types.d.ts +17 -30
  16. package/citation-types.d.ts +2 -2
  17. package/client-vocabulary.d.ts +2 -2
  18. package/client-vocabulary.js +4 -1
  19. package/client.d.ts +75 -102
  20. package/client.js +83 -100
  21. package/color-profiles-types.d.ts +70 -0
  22. package/colors-client.d.ts +76 -0
  23. package/colors-client.js +52 -0
  24. package/find-companions-types.d.ts +8 -8
  25. package/{find-variants-by-colour-types.d.ts → find-variants-by-color-types.d.ts} +70 -64
  26. package/find-variants-by-vector-types.d.ts +4 -1
  27. package/get-variant-types.d.ts +14 -2
  28. package/http-transport.d.ts +1 -1
  29. package/http-transport.js +1 -2
  30. package/identifiers.d.ts +2 -2
  31. package/identifiers.js +1 -1
  32. package/index.d.ts +5 -13
  33. package/index.js +1 -3
  34. package/list-variant-facets-types.d.ts +4 -4
  35. package/list-variants-types.d.ts +108 -19
  36. package/material-asset-types.d.ts +3 -3
  37. package/material-block-types.d.ts +9 -9
  38. package/material-types.d.ts +10 -8
  39. package/operations.d.ts +2 -2
  40. package/operations.js +14 -24
  41. package/package.json +2 -2
  42. package/{resolve-colour-types.d.ts → resolve-color-types.d.ts} +18 -18
  43. package/response-schemas.generated.d.ts +2 -2
  44. package/response-schemas.generated.js +40 -68
  45. package/response-schemas.js +1 -1
  46. package/samplize-catalogue-types.d.ts +4 -4
  47. package/samplize-colorvec.js +6 -6
  48. package/{corpus-scope-types.d.ts → search-catalogue-subset-types.d.ts} +3 -3
  49. package/search-variants-types.d.ts +91 -0
  50. package/types.d.ts +31 -283
  51. package/webmcp.generated.js +4 -9
  52. package/attribution-types.d.ts +0 -51
  53. package/attribution-types.js +0 -13
  54. package/by-colour-types.d.ts +0 -320
  55. package/colour-region-types.d.ts +0 -18
  56. package/colours-client.d.ts +0 -70
  57. package/colours-client.js +0 -38
  58. package/material-query-plan-types.d.ts +0 -70
  59. package/palette-search-types.d.ts +0 -171
  60. package/palette-search-types.js +0 -1
  61. package/query-understanding-types.d.ts +0 -254
  62. package/query-understanding-types.js +0 -1
  63. package/resolve-colour-types.js +0 -1
  64. package/search-card-types.d.ts +0 -86
  65. package/search-card-types.js +0 -1
  66. package/search-index-plan-types.d.ts +0 -74
  67. package/search-index-plan-types.js +0 -1
  68. package/search-refinement-types.d.ts +0 -103
  69. package/search-refinement-types.js +0 -2
  70. package/search-request-types.d.ts +0 -170
  71. package/search-request-types.js +0 -1
  72. package/search-response-receipt-types.d.ts +0 -24
  73. package/search-response-receipt-types.js +0 -1
  74. package/search-response-types.d.ts +0 -11
  75. package/search-response-types.js +0 -1
  76. package/search-result-validation.d.ts +0 -9
  77. package/search-result-validation.js +0 -83
  78. package/spec-types.d.ts +0 -109
  79. package/spec-types.js +0 -54
  80. package/specifications.d.ts +0 -34
  81. package/specifications.js +0 -56
  82. package/validation.d.ts +0 -43
  83. package/validation.js +0 -117
  84. /package/{by-colour-types.js → color-profiles-types.js} +0 -0
  85. /package/{colour-region-types.js → find-variants-by-color-types.js} +0 -0
  86. /package/{corpus-scope-types.js → resolve-color-types.js} +0 -0
  87. /package/{find-variants-by-colour-types.js → search-catalogue-subset-types.js} +0 -0
  88. /package/{material-query-plan-types.js → search-variants-types.js} +0 -0
@@ -17,11 +17,11 @@ import type { OpenEnum } from "./types.js";
17
17
  */
18
18
  export type VariantAssetAvailability = OpenEnum<"available" | "unknown" | "unavailable">;
19
19
  /** What an image primarily shows. */
20
- export type VariantImageRole = OpenEnum<"product" | "swatch" | "detail" | "scene" | "technical" | "colour_chart" | "sample_collection" | "other" | "unknown">;
20
+ export type VariantImageRole = OpenEnum<"product" | "swatch" | "detail" | "scene" | "technical" | "color_chart" | "sample_collection" | "other" | "unknown">;
21
21
  /** How an image must be framed, a different question from what it shows. */
22
22
  export type VariantImagePresentation = OpenEnum<"edge_to_edge" | "packshot" | "cutout_margin" | "montage" | "unknown">;
23
23
  /** What a document is for; a document can carry more than one purpose. */
24
- export type VariantDocumentType = OpenEnum<"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_declaration" | "ingredient_disclosure" | "safety_data_sheet" | "brochure" | "catalogue" | "colour_finish_chart" | "other" | "unknown">;
24
+ export type VariantDocumentType = OpenEnum<"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_declaration" | "ingredient_disclosure" | "safety_data_sheet" | "brochure" | "catalogue" | "color_finish_chart" | "other" | "unknown">;
25
25
  /** Every asset kind the registry knows. */
26
26
  export type VariantAssetKind = OpenEnum<"image" | "document" | "cad" | "bim" | "model_3d" | "texture" | "archive" | "other" | "unknown">;
27
27
  /**
@@ -97,7 +97,7 @@ export type MaterialDocumentProjectionItem = {
97
97
  variantAttribution: string[];
98
98
  /** True only for a Product declaration or this exact requested Variant. */
99
99
  appliesToRequestedVariant: boolean;
100
- /** Every exact source-grain declaration collapsed into this URL identity. */
100
+ /** Every exact source-default attribute level declaration collapsed into this URL identity. */
101
101
  declarations: {
102
102
  scope: MaterialDocumentScope;
103
103
  source: MaterialDocumentSource;
@@ -7,7 +7,7 @@
7
7
  * "nobody has looked". This projection is the one read that says WHICH, per
8
8
  * field, in {@link MaterialCoverageStatus}. When a caller needs to render a
9
9
  * negative ("this material carries no fire rating") rather than an unknown, this
10
- * is the only surface entitled to back it: a `verified` field with a `false` /
10
+ * is the only surface entitled to back it: a `complete` field with a `false` /
11
11
  * `0` / `[]` value. Never derive a negative from a value's absence elsewhere.
12
12
  */
13
13
  import type { VariantId } from "./identifiers.js";
@@ -15,7 +15,7 @@ import type { OpenEnum } from "./types.js";
15
15
  /**
16
16
  * Coverage status, shared by blocks and fields.
17
17
  *
18
- * `verified` — determined. For a field a value is known, INCLUDING `false`, `0`
18
+ * `complete` — determined. For a field a value is known, INCLUDING `false`, `0`
19
19
  * and `[]`, which are answers meaning "we looked and there is none". For a
20
20
  * block, every field is determined.
21
21
  * `partial` — determined for some fields but not all.
@@ -24,29 +24,29 @@ import type { OpenEnum } from "./types.js";
24
24
  * `not_applicable` — cannot apply to this product type. Never work, never a gap.
25
25
  *
26
26
  * BREAKING in this release: blocks previously reported `populated`/`pending`
27
- * while fields reported `verified`/`missing` — two spellings of one concept
27
+ * while fields reported `complete`/`missing` — two spellings of one concept
28
28
  * that disagreed with each other on the same variant. Map `populated ->
29
- * verified` and `pending -> missing`. Both types are retained as aliases so
29
+ * complete` and `pending -> missing`. Both types are retained as aliases so
30
30
  * existing code keeps compiling; they now describe the same set.
31
31
  *
32
32
  * The authoritative list is served at runtime by
33
33
  * `get-schema { kind: "coverageStatuses" }`.
34
34
  */
35
- export type MaterialCoverageStatus = OpenEnum<"verified" | "partial" | "missing" | "not_applicable">;
35
+ export type MaterialCoverageStatus = OpenEnum<"complete" | "partial" | "missing" | "not_applicable">;
36
36
  export type MaterialBlockStatus = MaterialCoverageStatus;
37
37
  export type MaterialBlockFieldStatus = MaterialCoverageStatus;
38
38
  /**
39
39
  * A field's value. `null` is AMBIGUOUS on its own — pair it with `status`:
40
- * `verified` + `null` is a determined absence, `missing` + `null` is unread.
40
+ * `complete` + `null` is a determined absence, `missing` + `null` is unread.
41
41
  */
42
42
  export type MaterialBlockFieldValue = string | number | boolean | unknown[] | Record<string, unknown> | null;
43
43
  /**
44
44
  * One field of a block. READ `status` BEFORE `value` — a `false` under
45
- * `status: "verified"` is a real negative you may publish; the same `false`
45
+ * `status: "complete"` is a real negative you may publish; the same `false`
46
46
  * under `missing` is a placeholder for an unanswered question.
47
47
  */
48
48
  export type MaterialBlockProjectionField = {
49
- /** Canonical vocabulary, not an opaque id — the same token `bySpec` accepts. */
49
+ /** Canonical vocabulary, not an opaque id - the same token `listVariants` filters accept. */
50
50
  attributeId: string;
51
51
  label: string;
52
52
  value: MaterialBlockFieldValue;
@@ -55,7 +55,7 @@ export type MaterialBlockProjectionField = {
55
55
  unit?: string;
56
56
  status: MaterialBlockFieldStatus;
57
57
  /** Provenance supplied by the graph when a source-backed claim supports this field. */
58
- sourceBasis?: string;
58
+ valueOrigin?: string;
59
59
  /** Claim confidence supplied by the graph; absence means no confidence was emitted. */
60
60
  confidence?: number;
61
61
  };
@@ -17,14 +17,14 @@ import type { VariantId } from "./identifiers.js";
17
17
  * there is none" apart from "nobody has looked" — that is the only projection
18
18
  * that says which.
19
19
  */
20
- import type { ImageSource, MaterialColour, OpenEnum } from "./types.js";
20
+ import type { ImageSource, MaterialColor, OpenEnum } from "./types.js";
21
21
  /**
22
22
  * Whether a material can still be bought.
23
23
  *
24
24
  * - `available` — listed in the catalog of record.
25
25
  * - `discontinued` — WITHDRAWN from that catalog. This is the source's own
26
- * listing state, not a reviewed manufacturer-discontinuation claim; do not
27
- * present it as the manufacturer having discontinued the product.
26
+ * listing state, not a reviewed brand-discontinuation claim; do not
27
+ * present it as the brand having discontinued the product.
28
28
  * - `superseded` — a reviewed product relationship names a successor and the
29
29
  * material is no longer listed.
30
30
  * - `unknown` — never checked. A real answer, not an error.
@@ -45,16 +45,18 @@ export type MaterialTile = {
45
45
  imageUrl: string | null;
46
46
  imageSource: ImageSource | null;
47
47
  category: string | null;
48
- colour: MaterialColour;
48
+ /** All accepted source category ids in source order; empty when unknown. */
49
+ categories: string[];
50
+ color: MaterialColor;
49
51
  availability: MaterialAvailability;
50
52
  /**
51
- * The accepted Colour Name attribute — the colourway's true name where
53
+ * The accepted Color Name attribute — the colorway's true name where
52
54
  * `variantName` collapsed to the product's (MG-940: 83.7% of visible
53
- * colourway families name every variant after the product, e.g. all 10 CF
54
- * Stinson "Drift" colourways share `variantName: "Drift"`). Absent means
55
+ * colorway families name every variant after the product, e.g. all 10 CF
56
+ * Stinson "Drift" colorways share `variantName: "Drift"`). Absent means
55
57
  * the attribute is absent — never render a missing key as "unnamed".
56
58
  */
57
- colourName?: string;
59
+ colorName?: string;
58
60
  };
59
61
  /** A retained product-type proposal. It is review evidence, never a category. */
60
62
  type ProposedProductType = {
package/operations.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export declare const MATERIALGRAPH_API_VERSION = "0.7.0";
2
- declare const OPERATION_DEFINITIONS: readonly [readonly ["samplizeColorVecCache", "GET", "/api/v1/catalogues/samplize/colorvec", "samplize_colorvec_cache"], readonly ["samplizeCatalogueSearch", "POST", "/api/v1/catalogues/samplize/search", "samplize_catalogue_search"], 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 ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], 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 ["findVariantsByColour", "POST", "/api/v1/variants/by-colour", "find_variants_by_colour"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["findCompanions", "POST", "/api/v1/variants/companions", "find_companions"], readonly ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"], readonly ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_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 ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], 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 ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], readonly ["workflows.streamRunEvents", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}/events", "list_public_run_events"]];
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 ["findCompanions", "POST", "/api/v1/variants/companions", "find_companions"], 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 ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], 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
@@ -1,18 +1,6 @@
1
1
  import { MaterialGraphError } from "./errors.js";
2
- export const MATERIALGRAPH_API_VERSION = "0.7.0";
2
+ export const MATERIALGRAPH_API_VERSION = "0.8.0";
3
3
  const OPERATION_DEFINITIONS = [
4
- [
5
- "samplizeColorVecCache",
6
- "GET",
7
- "/api/v1/catalogues/samplize/colorvec",
8
- "samplize_colorvec_cache",
9
- ],
10
- [
11
- "samplizeCatalogueSearch",
12
- "POST",
13
- "/api/v1/catalogues/samplize/search",
14
- "samplize_catalogue_search",
15
- ],
16
4
  ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"],
17
5
  [
18
6
  "catalogPages",
@@ -32,16 +20,12 @@ const OPERATION_DEFINITIONS = [
32
20
  "/api/v1/catalogs/{catalogId}/references",
33
21
  "list_catalog_product_references",
34
22
  ],
35
- ["search", "POST", "/api/v1/search", "search_materials_post"],
36
- ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"],
37
23
  [
38
24
  "samplizeCatalogue",
39
25
  "GET",
40
26
  "/api/v1/catalogues/samplize/products",
41
27
  "samplize_catalogue_products",
42
28
  ],
43
- ["searchGet", "GET", "/api/v1/search", "search_materials_get"],
44
- ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"],
45
29
  [
46
30
  "catalogueReferences",
47
31
  "POST",
@@ -110,11 +94,12 @@ const OPERATION_DEFINITIONS = [
110
94
  "/api/v1/variants/facets",
111
95
  "list_variant_facets",
112
96
  ],
97
+ ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"],
113
98
  [
114
- "findVariantsByColour",
99
+ "findVariantsByColor",
115
100
  "POST",
116
- "/api/v1/variants/by-colour",
117
- "find_variants_by_colour",
101
+ "/api/v1/variants/by-color",
102
+ "find_variants_by_color",
118
103
  ],
119
104
  [
120
105
  "findVariantsByVector",
@@ -126,10 +111,10 @@ const OPERATION_DEFINITIONS = [
126
111
  ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"],
127
112
  ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"],
128
113
  [
129
- "resolveColour",
114
+ "resolveColor",
130
115
  "GET",
131
- "/api/v1/search/colours/resolve",
132
- "resolve_colour_name",
116
+ "/api/v1/search/colors/resolve",
117
+ "resolve_color_name",
133
118
  ],
134
119
  [
135
120
  "listAttributes",
@@ -146,7 +131,12 @@ const OPERATION_DEFINITIONS = [
146
131
  ["categories.list", "GET", "/api/v1/categories", "list_categories"],
147
132
  ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"],
148
133
  ["whoami", "GET", "/api/v1/whoami", "whoami"],
149
- ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"],
134
+ [
135
+ "colors.profiles",
136
+ "GET",
137
+ "/api/v1/colors/profiles",
138
+ "get_category_color_profiles",
139
+ ],
150
140
  [
151
141
  "extractPalette",
152
142
  "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.32.0",
3
+ "version": "0.35.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -21,7 +21,7 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@instruments/colorscope": "9.0.1"
24
+ "@instruments/colorscope": "^10.2.0"
25
25
  },
26
26
  "license": "Proprietary",
27
27
  "engines": {
@@ -1,22 +1,22 @@
1
1
  import type { MatchTarget } from "@instruments/colorscope/match";
2
2
  /**
3
- * Colour-name resolution (GET `/api/v1/search/colours/resolve`): the resolved
4
- * colour, and whether the named paint is a variant in the catalogue.
3
+ * Color-name resolution (GET `/api/v1/search/colors/resolve`): the resolved
4
+ * color, and whether the named paint is a variant in the catalogue.
5
5
  */
6
6
  import type { ColorResolution } from "@instruments/colorscope/naming";
7
- import type { CorpusScope } from "./corpus-scope-types.js";
8
7
  import type { VariantId } from "./identifiers.js";
8
+ import type { SearchCatalogueSubset } from "./search-catalogue-subset-types.js";
9
9
  import type { OpenEnum } from "./types.js";
10
- /** Options for `resolveColour`. */
11
- export type ResolveColourOptions = {
10
+ /** Options for `resolveColor`. */
11
+ export type ResolveColorOptions = {
12
12
  /**
13
13
  * Sets `inScope` on each catalogue variant the lookup reports. It never
14
14
  * narrows the lookup. Absent leaves every `inScope` null.
15
15
  */
16
- corpusScope?: CorpusScope;
16
+ searchCatalogueSubset?: SearchCatalogueSubset;
17
17
  };
18
18
  /** One catalogue variant carrying the named paint. */
19
- export type ResolveColourCatalogueVariant = {
19
+ export type ResolveColorCatalogueVariant = {
20
20
  variantId: VariantId;
21
21
  /** The brand exactly as stored, suspect or not. */
22
22
  brand: {
@@ -28,32 +28,32 @@ export type ResolveColourCatalogueVariant = {
28
28
  inScope: boolean | null;
29
29
  /**
30
30
  * True when the stored brand is Samplize, a sampling channel, and the listing
31
- * is not Samplize's own: the colour is another brand's, so `brand` is not who
31
+ * is not Samplize's own: the color is another brand's, so `brand` is not who
32
32
  * made it. The variant is still the right one for the name.
33
33
  */
34
34
  parentageSuspect: boolean;
35
35
  };
36
36
  /**
37
37
  * Whether the named paint is a variant in the catalogue. Exact, global, and
38
- * never narrowed by `corpusScope`, and run only for a `brand` library hit.
38
+ * never narrowed by `searchCatalogueSubset`, and run only for a `brand` library hit.
39
39
  * `not-in-catalogue` means the catalogue was searched and nothing carries the
40
40
  * paint; `not-looked-up` means there was no one brand's paint to search for.
41
41
  */
42
- export type ResolveColourVariant = ({
42
+ export type ResolveColorVariant = ({
43
43
  status: "matched";
44
- } & ResolveColourCatalogueVariant) | {
44
+ } & ResolveColorCatalogueVariant) | {
45
45
  status: "ambiguous";
46
- candidates: ResolveColourCatalogueVariant[];
46
+ candidates: ResolveColorCatalogueVariant[];
47
47
  } | {
48
48
  status: "not-in-catalogue";
49
49
  } | {
50
50
  status: "not-looked-up";
51
- reason: OpenEnum<"reference-colour" | "descriptive-colour" | "no-paint-identity" | "generic-colour" | "several-paints">;
51
+ reason: OpenEnum<"reference-color" | "descriptive-color" | "no-paint-identity" | "generic-color" | "several-paints">;
52
52
  };
53
- export type ResolveColourResponse = {
53
+ export type ResolveColorResponse = {
54
54
  /** Examples within the governed range. They do not replace its representative or bounds. */
55
55
  rangeSamples?: string[];
56
- /** Explicit manufacturer choices for an ambiguous paint name. Never selected automatically. */
56
+ /** Explicit brand choices for an ambiguous paint name. Never selected automatically. */
57
57
  alternatives?: {
58
58
  query: string;
59
59
  name: string;
@@ -69,15 +69,15 @@ export type ResolveColourResponse = {
69
69
  hex: string;
70
70
  name: string;
71
71
  code?: string;
72
- /** The ColorScope library the colour resolved in. Not necessarily a brand. */
72
+ /** The ColorScope library the color resolved in. Not necessarily a brand. */
73
73
  libraryId?: string;
74
74
  /**
75
- * The library's own type: `brand` is a brand's paint, `reference` a colour
75
+ * The library's own type: `brand` is a brand's paint, `reference` a color
76
76
  * standard (RAL, Pantone, HKS), `core` ColorScope's descriptive vocabulary.
77
77
  * Present exactly when `libraryId` is. Only a `brand` hit is looked up.
78
78
  */
79
79
  libraryType?: OpenEnum<"brand" | "reference" | "core" | "consumer">;
80
80
  /** The catalogue lookup for the name. Absent from servers that predate it. */
81
- variant?: ResolveColourVariant;
81
+ variant?: ResolveColorVariant;
82
82
  } | null;
83
83
  };
@@ -1,5 +1,5 @@
1
1
  /** The API contract version the schemas were generated from. */
2
- export declare const RESPONSE_SCHEMA_API_VERSION = "0.7.0";
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 ["samplize_colorvec_cache", "samplize_catalogue_search", "list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "search_materials_post", "plan_material_query", "samplize_catalogue_products", "search_materials_get", "search_by_colour", "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", "find_variants_by_colour", "find_variants_by_vector", "find_companions", "resolve_variant", "get_variant", "resolve_colour_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "search_by_palette", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run", "get_verdict_citation"];
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_companions", "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", "get_verdict_citation"];
5
5
  export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;