@instruments/materialgraph 0.33.0 → 0.36.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 (92) 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 +1 -1
  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 +62 -105
  20. package/client.js +68 -106
  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-sampled-together-types.d.ts +70 -0
  25. package/{find-companions-types.js → find-sampled-together-types.js} +4 -4
  26. package/{find-variants-by-colour-types.d.ts → find-variants-by-color-types.d.ts} +70 -64
  27. package/find-variants-by-vector-types.d.ts +4 -1
  28. package/get-variant-types.d.ts +14 -2
  29. package/http-transport.d.ts +1 -1
  30. package/http-transport.js +1 -2
  31. package/identifiers.d.ts +2 -2
  32. package/identifiers.js +1 -1
  33. package/index.d.ts +5 -14
  34. package/index.js +1 -3
  35. package/list-variant-facets-types.d.ts +4 -4
  36. package/list-variants-types.d.ts +71 -21
  37. package/material-asset-types.d.ts +3 -3
  38. package/material-block-types.d.ts +9 -9
  39. package/material-types.d.ts +10 -8
  40. package/operations.d.ts +2 -2
  41. package/operations.js +19 -25
  42. package/package.json +2 -2
  43. package/{resolve-colour-types.d.ts → resolve-color-types.d.ts} +18 -18
  44. package/response-schemas.generated.d.ts +2 -2
  45. package/response-schemas.generated.js +41 -71
  46. package/response-schemas.js +1 -1
  47. package/samplize-catalogue-types.d.ts +4 -4
  48. package/samplize-colorvec.js +6 -6
  49. package/{corpus-scope-types.d.ts → search-catalogue-subset-types.d.ts} +3 -3
  50. package/search-variants-types.d.ts +33 -2
  51. package/types.d.ts +32 -284
  52. package/webmcp.generated.js +4 -9
  53. package/attribution-types.d.ts +0 -51
  54. package/attribution-types.js +0 -13
  55. package/by-colour-types.d.ts +0 -320
  56. package/colour-region-types.d.ts +0 -18
  57. package/colours-client.d.ts +0 -70
  58. package/colours-client.js +0 -38
  59. package/find-companions-types.d.ts +0 -70
  60. package/material-query-plan-types.d.ts +0 -70
  61. package/material-query-plan-types.js +0 -1
  62. package/ndjson.d.ts +0 -46
  63. package/ndjson.js +0 -111
  64. package/palette-search-types.d.ts +0 -171
  65. package/palette-search-types.js +0 -1
  66. package/query-understanding-types.d.ts +0 -254
  67. package/query-understanding-types.js +0 -1
  68. package/resolve-colour-types.js +0 -1
  69. package/search-card-types.d.ts +0 -86
  70. package/search-card-types.js +0 -1
  71. package/search-index-plan-types.d.ts +0 -74
  72. package/search-index-plan-types.js +0 -1
  73. package/search-refinement-types.d.ts +0 -103
  74. package/search-refinement-types.js +0 -2
  75. package/search-request-types.d.ts +0 -170
  76. package/search-request-types.js +0 -1
  77. package/search-response-receipt-types.d.ts +0 -24
  78. package/search-response-receipt-types.js +0 -1
  79. package/search-response-types.d.ts +0 -11
  80. package/search-response-types.js +0 -1
  81. package/search-result-validation.d.ts +0 -9
  82. package/search-result-validation.js +0 -83
  83. package/spec-types.d.ts +0 -109
  84. package/spec-types.js +0 -54
  85. package/specifications.d.ts +0 -34
  86. package/specifications.js +0 -56
  87. package/validation.d.ts +0 -43
  88. package/validation.js +0 -117
  89. /package/{by-colour-types.js → color-profiles-types.js} +0 -0
  90. /package/{colour-region-types.js → find-variants-by-color-types.js} +0 -0
  91. /package/{corpus-scope-types.js → resolve-color-types.js} +0 -0
  92. /package/{find-variants-by-colour-types.js → search-catalogue-subset-types.js} +0 -0
@@ -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 ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"], 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 ["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 ["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",
@@ -112,10 +96,10 @@ const OPERATION_DEFINITIONS = [
112
96
  ],
113
97
  ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"],
114
98
  [
115
- "findVariantsByColour",
99
+ "findVariantsByColor",
116
100
  "POST",
117
- "/api/v1/variants/by-colour",
118
- "find_variants_by_colour",
101
+ "/api/v1/variants/by-color",
102
+ "find_variants_by_color",
119
103
  ],
120
104
  [
121
105
  "findVariantsByVector",
@@ -123,14 +107,19 @@ const OPERATION_DEFINITIONS = [
123
107
  "/api/v1/variants/by-vector",
124
108
  "find_variants_by_vector",
125
109
  ],
126
- ["findCompanions", "POST", "/api/v1/variants/companions", "find_companions"],
110
+ [
111
+ "findSampledTogether",
112
+ "POST",
113
+ "/api/v1/variants/sampled-together",
114
+ "find_sampled_together",
115
+ ],
127
116
  ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"],
128
117
  ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"],
129
118
  [
130
- "resolveColour",
119
+ "resolveColor",
131
120
  "GET",
132
- "/api/v1/search/colours/resolve",
133
- "resolve_colour_name",
121
+ "/api/v1/search/colors/resolve",
122
+ "resolve_color_name",
134
123
  ],
135
124
  [
136
125
  "listAttributes",
@@ -147,7 +136,12 @@ const OPERATION_DEFINITIONS = [
147
136
  ["categories.list", "GET", "/api/v1/categories", "list_categories"],
148
137
  ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"],
149
138
  ["whoami", "GET", "/api/v1/whoami", "whoami"],
150
- ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"],
139
+ [
140
+ "colors.profiles",
141
+ "GET",
142
+ "/api/v1/colors/profiles",
143
+ "get_category_color_profiles",
144
+ ],
151
145
  [
152
146
  "extractPalette",
153
147
  "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.33.0",
3
+ "version": "0.36.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", "search_variants", "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_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", "get_verdict_citation"];
5
5
  export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;