@instruments/materialgraph 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/association-types.d.ts +38 -27
  2. package/associations-client.d.ts +4 -4
  3. package/associations-client.js +3 -10
  4. package/attribution-types.d.ts +4 -4
  5. package/brand-types.d.ts +14 -6
  6. package/brands-client.d.ts +7 -38
  7. package/brands-client.js +10 -40
  8. package/by-colour-types.d.ts +58 -31
  9. package/by-spec-types.d.ts +6 -73
  10. package/by-spec-types.js +7 -5
  11. package/catalog-discovery-types.d.ts +11 -26
  12. package/catalogue-client.d.ts +16 -35
  13. package/catalogue-client.js +32 -67
  14. package/catalogue-types.d.ts +44 -4
  15. package/categories-client.d.ts +63 -0
  16. package/categories-client.js +48 -0
  17. package/category-types.d.ts +114 -0
  18. package/citation-types.d.ts +4 -4
  19. package/client-config.d.ts +4 -6
  20. package/client-config.js +2 -4
  21. package/client-source-material-comments.d.ts +4 -4
  22. package/client-source-material-comments.js +4 -38
  23. package/client-vocabulary.d.ts +7 -9
  24. package/client-vocabulary.js +22 -30
  25. package/client.d.ts +110 -244
  26. package/client.js +217 -387
  27. package/codes-client.d.ts +2 -2
  28. package/codes-client.js +8 -8
  29. package/codes-types.d.ts +55 -34
  30. package/colour-aggregate-types.d.ts +24 -24
  31. package/colours-client.d.ts +6 -11
  32. package/colours-client.js +11 -19
  33. package/coordinate-client.d.ts +2 -2
  34. package/coordinate-client.js +1 -13
  35. package/corpus-scope-types.d.ts +3 -3
  36. package/corpus-scope-types.js +1 -25
  37. package/demand-batch-types.d.ts +18 -18
  38. package/demand-types.d.ts +24 -24
  39. package/errors.d.ts +13 -13
  40. package/errors.js +54 -52
  41. package/http-transport.d.ts +13 -21
  42. package/http-transport.js +31 -28
  43. package/identify-types.d.ts +54 -44
  44. package/identify-types.js +5 -3
  45. package/index.d.ts +11 -27
  46. package/index.js +4 -6
  47. package/list-variant-facets-types.d.ts +60 -0
  48. package/list-variants-types.d.ts +142 -0
  49. package/list-variants-types.js +12 -0
  50. package/match-stream-types.d.ts +45 -32
  51. package/match-stream-types.js +2 -0
  52. package/match-stream.d.ts +2 -2
  53. package/match-stream.js +67 -49
  54. package/match-types.d.ts +32 -8
  55. package/material-asset-types.d.ts +89 -69
  56. package/material-block-types.d.ts +8 -6
  57. package/material-composition-client.d.ts +21 -0
  58. package/material-composition-client.js +13 -0
  59. package/material-composition-types.d.ts +403 -0
  60. package/material-query-plan-types.d.ts +61 -145
  61. package/material-resources-client.d.ts +12 -10
  62. package/material-resources-client.js +27 -22
  63. package/material-types.d.ts +16 -24
  64. package/ndjson.js +16 -8
  65. package/operations.d.ts +6 -6
  66. package/operations.js +29 -156
  67. package/package.json +5 -1
  68. package/palette-search-types.d.ts +87 -52
  69. package/query-understanding-types.d.ts +65 -40
  70. package/resolve-client.d.ts +8 -12
  71. package/resolve-client.js +9 -13
  72. package/resolve-colour-types.d.ts +8 -8
  73. package/resolve-types.d.ts +10 -10
  74. package/response-schemas.d.ts +20 -0
  75. package/response-schemas.generated.d.ts +5 -0
  76. package/response-schemas.generated.js +160 -0
  77. package/response-schemas.js +113 -0
  78. package/run-types.d.ts +64 -145
  79. package/runs.d.ts +9 -58
  80. package/runs.js +60 -149
  81. package/samplize-catalogue-types.d.ts +18 -18
  82. package/samplize-colorvec.d.ts +20 -20
  83. package/samplize-colorvec.js +66 -42
  84. package/schema-resource-types.d.ts +52 -39
  85. package/schema-resource-types.js +5 -5
  86. package/search-card-types.d.ts +26 -4
  87. package/search-index-plan-types.d.ts +70 -0
  88. package/search-refinement-types.d.ts +10 -40
  89. package/search-refinement-types.js +1 -0
  90. package/search-request-types.d.ts +121 -204
  91. package/search-response-receipt-types.d.ts +13 -253
  92. package/search-response-types.d.ts +2 -2
  93. package/search-result-validation.d.ts +3 -19
  94. package/search-result-validation.js +42 -183
  95. package/source-material-validation.d.ts +3 -3
  96. package/source-material-validation.js +35 -39
  97. package/spec-facet-types.d.ts +11 -16
  98. package/spec-types.d.ts +23 -16
  99. package/spec-types.js +8 -7
  100. package/specifications.d.ts +14 -72
  101. package/specifications.js +39 -89
  102. package/sse.d.ts +2 -2
  103. package/sse.js +32 -16
  104. package/substitute-types.d.ts +22 -22
  105. package/suggest-types.d.ts +11 -17
  106. package/suggest-types.js +3 -3
  107. package/taxonomy-coverage-types.d.ts +8 -8
  108. package/types.d.ts +202 -405
  109. package/validation.d.ts +26 -26
  110. package/validation.js +97 -92
  111. package/webmcp.d.ts +3 -3
  112. package/webmcp.generated.js +10 -93
  113. package/brand-most-sampled-types.d.ts +0 -33
  114. package/browse-types.d.ts +0 -236
  115. package/client-browse.d.ts +0 -78
  116. package/client-browse.js +0 -72
  117. package/client-exploration.d.ts +0 -9
  118. package/client-exploration.js +0 -7
  119. package/compare-types.d.ts +0 -89
  120. package/composition-client.d.ts +0 -33
  121. package/composition-client.js +0 -27
  122. package/composition-types.d.ts +0 -455
  123. package/composition-types.js +0 -10
  124. package/correction-types.d.ts +0 -88
  125. package/exploration-types.d.ts +0 -118
  126. package/exploration-types.js +0 -1
  127. package/fan-deck-types.d.ts +0 -42
  128. package/fan-deck-types.js +0 -9
  129. package/match-rejection-types.d.ts +0 -43
  130. package/match-rejection-types.js +0 -7
  131. package/palette-completion-types.d.ts +0 -115
  132. package/palette-completion-types.js +0 -1
  133. package/project-types.d.ts +0 -79
  134. package/project-types.js +0 -9
  135. package/projects.d.ts +0 -13
  136. package/projects.js +0 -46
  137. package/render-assets-types.d.ts +0 -65
  138. package/render-assets-types.js +0 -1
  139. package/run-events.d.ts +0 -106
  140. package/run-events.js +0 -32
  141. package/schedule-reference-types.d.ts +0 -46
  142. package/schedule-reference-types.js +0 -1
  143. package/schedule-references-client.d.ts +0 -14
  144. package/schedule-references-client.js +0 -26
  145. package/schedule-types.d.ts +0 -261
  146. package/schedule-types.js +0 -1
  147. package/search-collapse-types.d.ts +0 -69
  148. package/search-collapse-types.js +0 -1
  149. package/search-mood-types.d.ts +0 -6
  150. package/search-mood-types.js +0 -1
  151. package/search-window-types.d.ts +0 -25
  152. package/search-window-types.js +0 -1
  153. package/slot-pool-types.d.ts +0 -372
  154. package/slot-pool-types.js +0 -1
  155. /package/{brand-most-sampled-types.js → category-types.js} +0 -0
  156. /package/{browse-types.js → list-variant-facets-types.js} +0 -0
  157. /package/{compare-types.js → material-composition-types.js} +0 -0
  158. /package/{correction-types.js → search-index-plan-types.js} +0 -0
package/client.d.ts CHANGED
@@ -1,36 +1,31 @@
1
- import { CatalogueClient } from "./catalogue-client.js";
2
- import type { MaterialGraphClientOptions } from "./client-config.js";
3
- import { type RateLimit } from "./errors.js";
4
- import { ScheduleReferencesClient } from "./schedule-references-client.js";
5
- export * from "./client-config.js";
6
- import { type BrowseNamespace } from "./client-browse.js";
7
- import { type ExplorationNamespace } from "./client-exploration.js";
8
- export type { BrowseNamespace } from "./client-browse.js";
9
- export type { ExplorationNamespace } from "./client-exploration.js";
10
- import { type SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
11
- export type { SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
12
1
  import type { ApplicabilityOptions, AssociatedOptions } from "./association-types.js";
13
2
  import type { BrandsOptions } from "./brand-types.js";
14
3
  import type { ByColourParams, ByColourResponse } from "./by-colour-types.js";
4
+ import { CatalogueClient } from "./catalogue-client.js";
5
+ import { CategoriesClient } from "./categories-client.js";
15
6
  import type { ResolvedVerdictCitation } from "./citation-types.js";
7
+ import type { MaterialGraphClientOptions } from "./client-config.js";
8
+ import type { SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
16
9
  import { CodesClient } from "./codes-client.js";
17
10
  import type { CodeAdvisoryInput, CodeAdvisoryResponse } from "./codes-types.js";
18
11
  import { ColoursClient } from "./colours-client.js";
19
- import type { VarySchemesRequest, VarySchemesResponse } from "./composition-types.js";
20
- import type { BatchId, ProjectId, RunId, VariantId } from "./identifiers.js";
12
+ import type { RateLimit } from "./errors.js";
13
+ import type { BatchId, RunId, VariantId } from "./identifiers.js";
14
+ import type { ListVariantFacetsInput, ListVariantFacetsOutput } from "./list-variant-facets-types.js";
15
+ import type { ListVariantsInput, ListVariantsOutput } from "./list-variants-types.js";
21
16
  import type { MatchStreamEvent } from "./match-stream-types.js";
22
- import type { MatchInput, MatchResponse } from "./match-types.js";
23
- import type { MaterialDocumentPageOptions } from "./material-asset-types.js";
17
+ import type { MatchAnswer, MatchInput } from "./match-types.js";
18
+ import type { ListVariantAssetsOptions, MaterialDocumentPageOptions, VariantAssetPage } from "./material-asset-types.js";
19
+ import type { CompositionCorpusSummary } from "./material-composition-types.js";
24
20
  import type { MaterialQueryPlan } from "./material-query-plan-types.js";
25
- import type { AppendProjectEventRequest, CreateProjectRequest, ProjectEventReceipt, ProjectListResponse, ProjectState } from "./project-types.js";
26
21
  import { resolvePhrasesRequest as resolvePhrases } from "./resolve-client.js";
27
- import type { CapabilityManifestResponse, CreatePublicRunRequest, CreatePublicRunResponse, DrainRunEventsOptions, ListRunsOptions, PublicRunListResponse, PublicRunResponse, ResumeRunOptions, RunEvent, SourceMaterialBatchDetail, SourceMaterialBatchReceipt, StreamRunEventsOptions, UploadSourceMaterialInput } from "./run-types.js";
28
- import type { FinishScheduleResponse, GetRunScheduleOptions } from "./schedule-types.js";
22
+ import type { CreatePublicRunRequest, CreatePublicRunResponse, DrainRunEventsOptions, PublicRunResponse, RunEvent, SourceMaterialBatchDetail, SourceMaterialBatchReceipt, StreamRunEventsOptions, UploadSourceMaterialInput } from "./run-types.js";
29
23
  import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
30
- import type { SlotPoolsRequest, SlotPoolsResponse } from "./slot-pool-types.js";
31
- import type { FindSubstitutesOptions, FindSubstitutesResponse } from "./substitute-types.js";
24
+ import type { CardProjectionRequest, SearchCardResponse } from "./search-card-types.js";
32
25
  import type { ProductTypeCoverageOptions, ProductTypeStatusCoverage } from "./taxonomy-coverage-types.js";
33
- import type { ApplicableSpecsResponse, BrandOptions, BySpecOptions, BySpecResponse, ColourFacetsResponse, CoordinateInput, CoordinateResponse, DemandBatchInput, DemandBatchResponse, DemandParams, DemandResponse, ExtractPaletteInput, ExtractPaletteResponse, GlossaryTermResponse, MaterialResponse, MaterialsBatchDetailResponse, MaterialsBatchGetOptions, MaterialsBatchOptions, MaterialsBatchTileResponse, PairingsOptions, PairingsResponse, ResolveAttributeOptions, ResolveAttributeResponse, ResolveAttributeValueOptions, ResolveAttributeValueResponse, ResolveColourOptions, ResolveColourResponse, SearchGetParams, SearchInput, SearchResponse, SiblingsResponse, SpecFacetsDistributionResponse, SpecFacetsListResponse, SuggestColourResponse, SuggestOptions, SuggestResponse, TaxonomyResponse, VocabularySearchOptions, WhoamiResponse } from "./types.js";
26
+ import type { CoordinateInput, CoordinateResponse, DemandBatchInput, DemandBatchResponse, DemandParams, DemandResponse, ExtractPaletteInput, ExtractPaletteResponse, ListAttributesOptions, ListAttributesResult, MaterialResponse, PairingsOptions, PairingsResponse, ResolveColourOptions, ResolveColourResponse, SearchGetParams, SearchInput, SearchResponse, SpecFacetsListResponse, SuggestColourResponse, SuggestOptions, SuggestResponse, VocabularySearchOptions, WhoamiResponse } from "./types.js";
27
+ export * from "./client-config.js";
28
+ export type { SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
34
29
  /**
35
30
  * The MaterialGraph client — every lens on the graph, on one object.
36
31
  *
@@ -41,13 +36,13 @@ import type { ApplicableSpecsResponse, BrandOptions, BySpecOptions, BySpecRespon
41
36
  * | --- | --- |
42
37
  * | "find me something like this / matching these words" | {@link MaterialGraphClient.search} |
43
38
  * | "what's IN this photo?" | {@link MaterialGraphClient.match} / {@link MaterialGraphClient.matchStream} |
44
- * | "which materials, from anyone, meet this hard spec?" | {@link MaterialGraphClient.bySpec} |
39
+ * | "which materials, from anyone, meet this hard spec?" | {@link MaterialGraphClient.listVariants} |
45
40
  * | "what's near this colour / this palette / this gradient?" | {@link MaterialGraphClient.byColour}, `colours.palette()`, `colours.gradient()` |
46
- * | "what goes with THIS material?" | {@link MaterialGraphClient.pairings}, {@link MaterialGraphClient.siblings}, {@link MaterialGraphClient.coordinate} |
41
+ * | "what goes with THIS material?" | {@link MaterialGraphClient.pairings}, {@link MaterialGraphClient.listVariants} (same product, other colourways), {@link MaterialGraphClient.coordinate} |
47
42
  * | "what does the manufacturer say is AVAILABLE on this?" | {@link MaterialGraphClient.associatedFinishes}, {@link MaterialGraphClient.associatedProducts} |
48
43
  * | "how much is this specified?" | {@link MaterialGraphClient.demand}, {@link MaterialGraphClient.demandBatch} |
49
44
  * | "is this allowed in an A-2 corridor?" | `codes.*` |
50
- * | "what can I even ask for?" | {@link MaterialGraphClient.specificationFacets}, {@link MaterialGraphClient.attributeValues}, {@link MaterialGraphClient.taxonomy}, {@link MaterialGraphClient.colourFacets}, {@link MaterialGraphClient.glossary} |
45
+ * | "what can I even ask for?" | {@link MaterialGraphClient.specificationFacets}, `categories.list()` |
51
46
  * | "I have words — what do they mean in YOUR vocabulary?" | {@link MaterialGraphClient.resolve} |
52
47
  * | "do the whole job for me, async" | {@link MaterialGraphClient.createRun} + `mg:compose` |
53
48
  *
@@ -68,33 +63,28 @@ import type { ApplicableSpecsResponse, BrandOptions, BySpecOptions, BySpecRespon
68
63
  */
69
64
  export declare class MaterialGraphClient extends CatalogueClient {
70
65
  #private;
71
- readonly scheduleReferences: ScheduleReferencesClient;
72
66
  readonly baseUrl: string;
73
67
  /**
74
- * THE QUESTION: "show me everything in this category / this brand, in a plain
75
- * order." No query, no relevance, no ranking. `browse(params)` is one page;
76
- * `browse.pages(params)` walks them all.
77
- *
78
- * `sort` is optional (`name` A→Z by default, `recent` for newest first, plus
79
- * the five colour ramps), `types`/`brands`/`corpusScope` narrow it, and
80
- * `count: true` returns the total so a listing can say how many things it is
81
- * listing without walking every page. `results.length` remains a PAGE.
68
+ * THE QUESTION: "what kinds of thing exist, and what are their keys?"
69
+ * `categories.list()` pages the tree (roots, one node's children, or a
70
+ * name/meaning search), and `categories.get(id)` reads one node in full:
71
+ * its place, the names that find it, and the canonical taxonomy concepts it
72
+ * relates to. The source of every category id the other lenses accept
73
+ * (`search({ category })`, `listVariants({ filters })`, `colours.profiles()`).
82
74
  *
83
- * Instead use {@link MaterialGraphClient.byColour} for materials NEAR a colour,
84
- * {@link MaterialGraphClient.search} when there is anything to rank against,
85
- * and `colours.profiles()` for a category's palette rather than its members.
86
- *
87
- * @example A category listing that can state its own size
88
- * const page = await client.browse({ types: "tile_surfaces", count: true });
75
+ * A category id is a TREE KEY, never a canonical `product_category` value:
76
+ * the two look alike and are not interchangeable. Discover ids here, never
77
+ * hand-write them. Replaces the retired `taxonomy()` (MG-2226), with no
78
+ * shim.
89
79
  */
90
- readonly browse: BrowseNamespace;
80
+ readonly categories: CategoriesClient;
91
81
  /**
92
82
  * THE QUESTION: "is this material allowed HERE?" — a jurisdiction + occupancy +
93
83
  * finish location, not a property of the material alone. `codes.context()`
94
84
  * discovers the vocabulary, `codes.requirements()` states a space,
95
85
  * `codes.advisory()` badges candidates.
96
86
  *
97
- * Instead use {@link MaterialGraphClient.bySpec} to find materials by a
87
+ * Instead use {@link MaterialGraphClient.listVariants} to find materials by a
98
88
  * classification you already know you need; codes is what tells you WHICH one
99
89
  * the space demands. ADVISORY ONLY: model code as adopted, never a
100
90
  * determination for an authority having jurisdiction.
@@ -104,15 +94,14 @@ export declare class MaterialGraphClient extends CatalogueClient {
104
94
  * THE QUESTION: "what colours exist here?" (`profiles`, `stats`) and "what
105
95
  * matches this whole SET of colours?" (`palette`, `gradient`).
106
96
  *
107
- * Instead use {@link MaterialGraphClient.byColour} for ONE colour,
108
- * {@link MaterialGraphClient.browse} to walk by a colour scalar, and
109
- * {@link MaterialGraphClient.colourFacets} for the colour VOCABULARY rather
110
- * than values. Colour throughout is derived from product imagery — visual
111
- * likeness, never a declared colour specification.
97
+ * Instead use {@link MaterialGraphClient.byColour} for ONE colour and
98
+ * {@link MaterialGraphClient.listVariants} to page through a colour's family.
99
+ * Colour is usually derived from product imagery, which is visual likeness,
100
+ * not a colour specification. A maker's declared colour, such as a paint's
101
+ * published hex, wins where MaterialGraph holds one, and each value's
102
+ * source basis says which.
112
103
  */
113
104
  readonly colours: ColoursClient;
114
- /** Discover honest graph questions, then traverse one explicit operator. */
115
- readonly exploration: ExplorationNamespace;
116
105
  /**
117
106
  * THE QUESTION: "what did people say about this uploaded file, and record what
118
107
  * they said." Names on these remarks are REPORTED, never verified — see
@@ -122,29 +111,36 @@ export declare class MaterialGraphClient extends CatalogueClient {
122
111
  constructor(options: MaterialGraphClientOptions);
123
112
  get lastRateLimit(): RateLimit | null;
124
113
  /**
125
- * THE QUESTION: "find me materials like this" — a RANKED answer over words, a
126
- * seed image, colours and a mood, optionally gated by hard specs.
114
+ * THE QUESTION: "find me materials like this": one search over the words, or
115
+ * a seed or query image, optionally gated by a category, hard attribute
116
+ * filters and a corpus scope (ADR 0031).
127
117
  *
128
- * Instead use {@link MaterialGraphClient.bySpec} when the spec IS the question
118
+ * Instead use {@link MaterialGraphClient.listVariants} when the spec IS the question
129
119
  * (ranking would be noise), {@link MaterialGraphClient.byColour} /
130
120
  * `colours.palette()` for visual colour intent (`text` matches WORDS — "sage
131
121
  * green" finds materials that SAY sage, not ones that look it),
132
122
  * {@link MaterialGraphClient.match} for a photo, {@link MaterialGraphClient.pairings}
133
123
  * for what goes WITH something, {@link MaterialGraphClient.suggest} for typeahead.
134
124
  *
135
- * The full POST search primitive. `input.filters` layers typed hard
136
- * specification gates onto ranked colour/visual/lexical/seed search. Build
137
- * them with `certificationProgramme`, `specTerm`, or `hasSpec`.
125
+ * The full POST search primitive. `input.filters` are hard token sets on
126
+ * the search index, run in the same query; they change no ordering. Build
127
+ * them with `certificationProgramme`, `specTerm`, or `hasSpec`. Weights,
128
+ * mood, colours, sort and preferences are gone, and the server refuses them
129
+ * by name.
138
130
  */
131
+ search(input: SearchInput & CardProjectionRequest, signal?: AbortSignal): Promise<SearchCardResponse>;
139
132
  search(input: SearchInput, signal?: AbortSignal): Promise<SearchResponse>;
140
133
  /** Whole materials ask → inspectable meanings and complete safe search requests. */
141
134
  planQuery(query: string, signal?: AbortSignal): Promise<MaterialQueryPlan>;
142
135
  /**
143
136
  * The same question as {@link MaterialGraphClient.search}; the difference is
144
- * transport — a cacheable, link-shareable GET for queries that must survive in
145
- * a URL. `filters`, `preferences`, `verdicts`, image bytes and `weights` have
146
- * no query-string form, so anything using those must go through `search`.
137
+ * transport: a cacheable, link-shareable GET for queries that must survive in
138
+ * a URL. `category`, `filters` and image bytes have no query-string form, so
139
+ * anything using those must go through `search`.
147
140
  */
141
+ searchGet(params: SearchGetParams & {
142
+ view: "card";
143
+ }, signal?: AbortSignal): Promise<SearchCardResponse>;
148
144
  searchGet(params: SearchGetParams, signal?: AbortSignal): Promise<SearchResponse>;
149
145
  /**
150
146
  * THE QUESTION: "what materials are in this PHOTO?" — Material Match classifies
@@ -159,7 +155,7 @@ export declare class MaterialGraphClient extends CatalogueClient {
159
155
  * `droppedBelowFloor` before reporting an empty result: "nothing was good
160
156
  * enough" and "nothing was found" are different answers.
161
157
  */
162
- match(input: MatchInput, signal?: AbortSignal): Promise<MatchResponse>;
158
+ match(input: MatchInput, signal?: AbortSignal): Promise<MatchAnswer>;
163
159
  /**
164
160
  * Material Match as a PROGRESSIVE stream — the same POST
165
161
  * `/api/v1/search/match` endpoint negotiated with `Accept:
@@ -191,7 +187,7 @@ export declare class MaterialGraphClient extends CatalogueClient {
191
187
  * Instead use `colours.palette()` for N colours at stated proportions (a
192
188
  * different ranking, not a wrapper), `colours.gradient()` for a transition,
193
189
  * {@link MaterialGraphClient.resolveColour} first if you hold a NAME,
194
- * {@link MaterialGraphClient.browse} to walk by lightness/vividness, and
190
+ * {@link MaterialGraphClient.listVariants} to page through a category or a brand, and
195
191
  * {@link MaterialGraphClient.search} when colour is one signal among many.
196
192
  * Report matches as visual likeness, never a stated colour specification.
197
193
  * `family` gates to ONE colorscope family (a gated page can be short); `brand` gates to named brands — one brand's nearest colour to another's.
@@ -202,35 +198,33 @@ export declare class MaterialGraphClient extends CatalogueClient {
202
198
  * `/api/v1/materials/{variantId}`).
203
199
  *
204
200
  * The hinge of the API: every relationship lens
205
- * ({@link MaterialGraphClient.siblings}, {@link MaterialGraphClient.pairings},
201
+ * ({@link MaterialGraphClient.listVariants}, {@link MaterialGraphClient.pairings},
206
202
  * {@link MaterialGraphClient.demand}, `codes.advisory()`) hangs off a
207
- * `variantId`. Instead use {@link MaterialGraphClient.materials} for many ids,
208
- * {@link MaterialGraphClient.materialBlocks} to tell "no value" from "not
209
- * checked", {@link MaterialGraphClient.search} when you have no id yet.
203
+ * `variantId`. Instead use {@link MaterialGraphClient.listVariants} for many
204
+ * ids, or for the other colourways of the same product (MG-2222 retired
205
+ * this route's `?include=siblings`; ask `listVariants` with a `product in`
206
+ * filter instead), {@link MaterialGraphClient.materialBlocks} to tell "no
207
+ * value" from "not checked", {@link MaterialGraphClient.search} when you
208
+ * have no id yet.
210
209
  *
211
210
  * @param variantId Opaque — pass back exactly what you were given.
212
211
  */
213
- material(variantId: VariantId, options?: {
214
- includeSiblings?: boolean;
215
- }, signal?: AbortSignal): Promise<MaterialResponse>;
212
+ material(variantId: VariantId, signal?: AbortSignal): Promise<MaterialResponse>;
213
+ materialBlocks(variantId: VariantId, signal?: AbortSignal): Promise<import("./material-block-types.js").MaterialBlockProjection>;
216
214
  /**
217
- * THE QUESTION: "what other colourways and finishes does this product come in?"
218
- * — the SAME product, different variants.
215
+ * THE QUESTION: "which product types can composition be answered for yet?"
219
216
  *
220
- * Instead use {@link MaterialGraphClient.pairings} for a DIFFERENT product that
221
- * goes with this one, and `search({ similarTo })` for one that LOOKS like it.
217
+ * Coverage per product type, in Live SKUs as well as tuples. Read the SKU
218
+ * figure: one tuple can carry a hundred thousand SKUs or one.
222
219
  */
223
- siblings(variantId: VariantId, signal?: AbortSignal): Promise<SiblingsResponse>;
224
- materialBlocks(variantId: VariantId, signal?: AbortSignal): Promise<import("./material-block-types.js").MaterialBlockProjection>;
225
- materialAssets(variantId: VariantId, signal?: AbortSignal): Promise<import("./material-asset-types.js").MaterialAssetProjection>;
226
- materialRenderAssets(variantId: VariantId, signal?: AbortSignal): Promise<import("./render-assets-types.js").MaterialRenderAssets>;
220
+ compositionReport(signal?: AbortSignal): Promise<CompositionCorpusSummary>;
221
+ listVariantAssets(variantId: VariantId, options?: ListVariantAssetsOptions, signal?: AbortSignal): Promise<VariantAssetPage>;
227
222
  materialDocuments(variantId: VariantId, options?: MaterialDocumentPageOptions, signal?: AbortSignal): Promise<import("./material-asset-types.js").MaterialDocumentPage>;
228
223
  /**
229
224
  * THE QUESTION: "what does the schema DEFINE?" — the governed static registry.
230
225
  *
231
226
  * Definitions, not data: use {@link MaterialGraphClient.specificationFacets} for
232
- * what the corpus actually holds and {@link MaterialGraphClient.glossary} to
233
- * explain one term.
227
+ * what the corpus actually holds.
234
228
  */
235
229
  schema<K extends SchemaResource>(resource: K, signal?: AbortSignal): Promise<SchemaResourceResponse<K>>;
236
230
  /**
@@ -238,9 +232,9 @@ export declare class MaterialGraphClient extends CatalogueClient {
238
232
  * off one resolved material (GET `/api/v1/materials/{variantId}/pairings`).
239
233
  *
240
234
  * Instead use {@link MaterialGraphClient.coordinate} for a whole palette of
241
- * picks, {@link MaterialGraphClient.siblings} for the same product in another
242
- * colour, and `search({ similarTo })` for a LIKE-THIS substitute — similar and
243
- * complementary are opposite questions.
235
+ * picks, {@link MaterialGraphClient.listVariants} for the same product in
236
+ * another colour, and `search({ similarTo })` for a LIKE-THIS substitute —
237
+ * similar and complementary are opposite questions.
244
238
  *
245
239
  * READ `item.source` BEFORE PHRASING: the rail mixes three tiers of evidence —
246
240
  * `cospec` (real orders), `considered` (board activity), `colour` (palette
@@ -248,45 +242,37 @@ export declare class MaterialGraphClient extends CatalogueClient {
248
242
  * you how much of the rail is real order evidence.
249
243
  */
250
244
  pairings(variantId: VariantId, options?: PairingsOptions, signal?: AbortSignal): Promise<PairingsResponse>;
251
- /** Find bounded, exact-spec substitutes for one opaque variant id. */
252
- findSubstitutes(variantId: VariantId, options?: FindSubstitutesOptions, signal?: AbortSignal): Promise<FindSubstitutesResponse>;
253
245
  /** "What finishes does the manufacturer declare for THIS product?" — {@link declaredFinishes}. */
254
246
  associatedFinishes(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
255
247
  /** "What products does the manufacturer declare THIS finish for?" — {@link declaredProducts}. */
256
248
  associatedProducts(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
257
249
  applicability(options: ApplicabilityOptions, signal?: AbortSignal): Promise<import("./association-types.js").ApplicabilityResponse>;
258
250
  /**
259
- * THE QUESTION: "hydrate these ids I already hold" (POST
260
- * `/api/v1/materials/batch`, ≤ 100 ids) — never a discovery call. Throws
261
- * client-side above {@link MAX_BATCH_IDS}. The response is NOT positional:
262
- * match on `variantId` and read `missingIds` rather than comparing lengths.
263
- * {@link MaterialGraphClient.materialsCached} is the CDN-friendly GET form.
251
+ * THE QUESTION: "eligible variants matching these hard filters, ranked and
252
+ * cursor-paged" (GET `/api/v1/variants`, MG-2222) — the one read behind
253
+ * `list_variants`, hydrating ids you already hold (`{terms: [{field:
254
+ * "variant", op: "in", values: [...]}]}`, up to 100), the other colourways
255
+ * of a product (`{terms: [{field: "product", op: "in", values:
256
+ * [productId]}, {field: "variant", op: "not_in", values: [variantId]}]}` —
257
+ * `filters` is kind-grouped, `{terms, numbers, presence}`, every condition
258
+ * across all three ANDed), or a category/maker listing. An explicit
259
+ * `variant in` id that does not resolve to an eligible variant is
260
+ * reported in `unresolvedVariantIds`, never silently dropped from the
261
+ * page.
264
262
  *
265
- * @param ids Opaque tokens, passed back verbatim.
263
+ * `filters`/`optionalFilters`/`orderBy` are sent as URL-encoded JSON;
264
+ * `attributes`/`include` as comma-separated lists — the server validates,
265
+ * this method does not duplicate that check.
266
266
  */
267
- materials(ids: VariantId[], options: {
268
- view: "detail";
269
- idKind?: MaterialsBatchOptions["idKind"];
270
- }, signal?: AbortSignal): Promise<MaterialsBatchDetailResponse>;
271
- materials(ids: VariantId[], options?: {
272
- view?: "tile";
273
- idKind?: MaterialsBatchOptions["idKind"];
274
- }, signal?: AbortSignal): Promise<MaterialsBatchTileResponse>;
267
+ listVariants(input: ListVariantsInput, signal?: AbortSignal): Promise<ListVariantsOutput>;
275
268
  /**
276
- * Cacheable GET form of the batch read (GET `/api/v1/materials/batch`,
277
- * `Cache-Control: public, max-age=300`). Same response as {@link materials};
278
- * prefer this for repeatable, cache-friendly id sets. Also ≤ 100 ids.
269
+ * THE QUESTION: "which values do the variants matching these filters carry,
270
+ * and how many of each" (POST `/api/v1/variants/facets`, MG-2294) — the
271
+ * options and counts a filter UI shows beside a {@link
272
+ * MaterialGraphClient.listVariants} page. `filters` is the same tree
273
+ * `listVariants()` takes; the server validates both.
279
274
  */
280
- materialsCached(ids: VariantId[], options: {
281
- view: "detail";
282
- idKind?: MaterialsBatchGetOptions["idKind"];
283
- }, signal?: AbortSignal): Promise<MaterialsBatchDetailResponse>;
284
- materialsCached(ids: VariantId[], options?: {
285
- view?: "tile";
286
- idKind?: MaterialsBatchGetOptions["idKind"];
287
- }, signal?: AbortSignal): Promise<MaterialsBatchTileResponse>;
288
- /** Vocabulary families and counts; use `colours.profiles()` for a material palette. */
289
- colourFacets(signal?: AbortSignal): Promise<ColourFacetsResponse>;
275
+ listVariantFacets(input: ListVariantFacetsInput, signal?: AbortSignal): Promise<ListVariantFacetsOutput>;
290
276
  /** Resolve a colour name to its hex, and the named paint's catalogue variant. */
291
277
  resolveColour(name: string, signal?: AbortSignal, options?: ResolveColourOptions): Promise<ResolveColourResponse>;
292
278
  /** Ranked colour-name typeahead (GET `/api/v1/search/colours/suggest`). */
@@ -295,44 +281,20 @@ export declare class MaterialGraphClient extends CatalogueClient {
295
281
  }, signal?: AbortSignal): Promise<SuggestColourResponse>;
296
282
  /** Entity typeahead. Navigate using the selected `refId`; use `search()` for materials. */
297
283
  suggest(q: string, options?: SuggestOptions, signal?: AbortSignal): Promise<SuggestResponse>;
298
- /** Resolve free text to a canonical attribute id. */
299
- resolveAttribute(q: string, options?: ResolveAttributeOptions, signal?: AbortSignal): Promise<ResolveAttributeResponse>;
300
- /** Resolve a value under a canonical attribute id; inspect `recommendedAction` for ambiguity. */
301
- resolveAttributeValue(attributeId: string, query: string, options?: ResolveAttributeValueOptions, signal?: AbortSignal): Promise<ResolveAttributeValueResponse>;
284
+ /**
285
+ * THE QUESTION: "which attribute means this phrase?" or "what could a
286
+ * <category> be specified by?" (GET `/api/v1/catalog/attributes`). One page of
287
+ * attribute definitions, browsed or found by id, name, misspelling or
288
+ * meaning, scoped by `categoryIds`, `blockIds` and `filterableOnly`. Pass an
289
+ * item's `id` with one of its `filterOps` to
290
+ * {@link MaterialGraphClient.listVariants}; follow `pageInfo.endCursor` for
291
+ * the next page.
292
+ */
293
+ listAttributes(options?: ListAttributesOptions, signal?: AbortSignal): Promise<ListAttributesResult>;
302
294
  /** "Is this phrase an attribute or a value?" — see {@link searchVocabularyRequest}. */
303
295
  searchVocabulary(query: string, options?: VocabularySearchOptions, signal?: AbortSignal): Promise<import("./catalog-discovery-types.js").VocabularySearchResponse>;
304
296
  /** "I have words — what do they mean, and what stands behind them?" — see {@link resolvePhrases}. */
305
297
  resolve(phrases: string[], scope?: Parameters<typeof resolvePhrases>[2]): Promise<import("./resolve-types.js").ResolveResponse>;
306
- /**
307
- * THE QUESTION: "which materials, from ANYONE, are ASTM E84 Class A AND
308
- * GREENGUARD-certified?" — hard specifications, no ranking, every brand at
309
- * once whatever each called the value in source. The value-anchored,
310
- * spec-only primitive (GET `/api/v1/search/specifications`).
311
- *
312
- * Instead use `search({ filters })` when the spec merely GATES a ranked
313
- * question, `codes.advisory()` when the real question is what a space demands,
314
- * and {@link specificationFacets} first if you do not know the canonical
315
- * tokens. Guessing one no longer returns a silently empty answer: an
316
- * unresolvable criterion means the query NEVER RAN and the response says so —
317
- * read {@link BySpecResponse.unresolvedCriteria} before treating an empty
318
- * `matches` as "nothing qualifies". A PAGE, NOT A CORPUS, unusually so:
319
- * `totalMatches` is the returned sample's size under `limit`, not a corpus
320
- * count. Each `spec` is an `attribute:value` criterion built with
321
- * `specCriterion` / `certificationProgrammeCriterion`; a variant must satisfy
322
- * ALL of them, and each match carries per-criterion trust (`confidence` +
323
- * `sourceBasis`). NUMBER-valued specs take BOUNDS, not values — pass
324
- * `options.ranges` built with `specRangeCriterion("light_reflectance_value",
325
- * { min: 60 })`; bounds are inclusive, at least one is required, and a
326
- * non-numeric stored value is excluded rather than read as zero.
327
- */
328
- bySpec(spec: string | string[], options?: BySpecOptions, signal?: AbortSignal): Promise<BySpecResponse>;
329
- /**
330
- * THE QUESTION: "what kinds of thing exist, and what are their canonical keys?"
331
- * The source of every `categoryKey` / product-type id the other lenses accept
332
- * (`search({ category })`, `colours.profiles()`,
333
- * {@link MaterialGraphClient.applicableSpecs}). Discover, never hand-write.
334
- */
335
- taxonomy(signal?: AbortSignal): Promise<TaxonomyResponse>;
336
298
  /**
337
299
  * Exact current primary-type status counts by retained source category path.
338
300
  * `comparisonThreshold` is a reporting cutoff only: it never promotes a
@@ -406,9 +368,8 @@ export declare class MaterialGraphClient extends CatalogueClient {
406
368
  /**
407
369
  * THE QUESTION: "what can I even filter on, and what values does the corpus
408
370
  * actually hold?" The start of every spec-driven workflow. Instead use
409
- * {@link MaterialGraphClient.attributeValues} for ONE attribute's distribution,
410
- * {@link MaterialGraphClient.applicableSpecs} for what a product type COULD
411
- * carry, {@link MaterialGraphClient.schema} for the definition.
371
+ * {@link MaterialGraphClient.listAttributes} with `categoryIds` for what a
372
+ * product type COULD carry, {@link MaterialGraphClient.schema} for the definition.
412
373
  *
413
374
  * Discover the live specification vocabulary (GET
414
375
  * `/api/v1/catalog/specifications/facets`) — the facetable spec attributes that
@@ -417,41 +378,14 @@ export declare class MaterialGraphClient extends CatalogueClient {
417
378
  * exists: LEED, GREENGUARD, ASTM E84 Class A, FloorScore, EPDs all surface here
418
379
  * with counts. Includes the virtual `certification_programme` facet (its values
419
380
  * are programme names). Learn an `attribute:value` here, then reuse it as a
420
- * {@link bySpec} criterion or a {@link search} `filters` entry. NOTE: continuous
381
+ * {@link MaterialGraphClient.listVariants} filter leaf or a {@link search}
382
+ * `filters` entry. NOTE: continuous
421
383
  * numeric specs (e.g. `slip_resistance_dcof`, a 0–1 DCOF range) are NOT
422
384
  * token-facetable and do not appear here — read those per-attribute.
423
385
  */
424
386
  specificationFacets(signal?: AbortSignal): Promise<SpecFacetsListResponse>;
425
- /**
426
- * List the live value distribution for ONE canonical attribute (GET
427
- * `/api/v1/catalog/attributes/{attributeId}/values`), ordered by cross-brand
428
- * reach with variant + brand counts. The drill-in companion to
429
- * {@link specificationFacets} — e.g. every certification programme on record,
430
- * or every fire classification and how many variants carry each.
431
- */
432
- attributeValues(attributeId: string, signal?: AbortSignal): Promise<SpecFacetsDistributionResponse>;
433
- /**
434
- * THE QUESTION: "what specs COULD a material of this type carry?" — the
435
- * template, not the data. Use it to know which absences are meaningful; instead
436
- * use {@link MaterialGraphClient.specificationFacets} for what the corpus holds
437
- * and {@link MaterialGraphClient.materialBlocks} for one material.
438
- *
439
- * @param key A canonical taxonomy key from {@link MaterialGraphClient.taxonomy}.
440
- */
441
- applicableSpecs(key: string, signal?: AbortSignal): Promise<ApplicableSpecsResponse>;
442
- /**
443
- * THE QUESTION: "what does 'DCOF' MEAN?" — one term explained, for a human.
444
- * Explanation, not retrieval: instead use
445
- * {@link MaterialGraphClient.searchVocabulary} to FIND a token and
446
- * {@link MaterialGraphClient.attributeValues} for the values it takes.
447
- */
448
- glossary(term: string, signal?: AbortSignal): Promise<GlossaryTermResponse>;
449
387
  /** "Whose catalogs are in here, and how big is each?" — {@link listBrands}. */
450
388
  brands(options?: BrandsOptions, signal?: AbortSignal): Promise<import("./brand-types.js").BrandCatalogListPage>;
451
- /** "Who is this brand, and what do they claim?" — {@link brandProfile}. */
452
- brand(brandSlug: string, options?: BrandOptions, signal?: AbortSignal): Promise<import("./types.js").BrandProfileResponse>;
453
- /** "This maker's whole range, the way a fan deck reads" — {@link brandColourDeck}. */
454
- brandColourDeck(brandSlug: string, signal?: AbortSignal): Promise<import("./fan-deck-types.js").BrandFanDeck>;
455
389
  /**
456
390
  * Upload one atomic source-material batch (POST `/api/v1/source-material`,
457
391
  * multipart). Pass a heterogeneous pile via `{ files }` (any mix of PDF,
@@ -468,96 +402,28 @@ export declare class MaterialGraphClient extends CatalogueClient {
468
402
  * exist. Requires the `mg:compose` scope.
469
403
  */
470
404
  sourceMaterialBatch(batchId: BatchId, signal?: AbortSignal): Promise<SourceMaterialBatchDetail>;
471
- /**
472
- * THE QUESTION: "what can the hosted agentic surface be asked to DO?" Start
473
- * here before {@link MaterialGraphClient.createRun}: each capability carries its
474
- * live input/output schemas, scopes and side-effect class, so nothing about a
475
- * Run need be hardcoded.
476
- */
477
- capabilities(signal?: AbortSignal): Promise<CapabilityManifestResponse>;
478
405
  /**
479
406
  * THE QUESTION: "do a whole job for me" — the ASYNC lens. Everything else here
480
407
  * answers in one round trip; a Run may suspend for human input and finish
481
408
  * minutes later. Follow with {@link MaterialGraphClient.streamRunEvents} (live)
482
- * or {@link MaterialGraphClient.run} (poll); resume via
483
- * {@link MaterialGraphClient.resumeRun}; pick the capability from
484
- * {@link MaterialGraphClient.capabilities}. Pass `idempotencyKey` so a retry
409
+ * or {@link MaterialGraphClient.run} (poll). Pass `idempotencyKey` so a retry
485
410
  * replays rather than duplicates.
486
411
  */
487
412
  createRun(body: CreatePublicRunRequest, signal?: AbortSignal): Promise<CreatePublicRunResponse>;
488
413
  /**
489
414
  * THE QUESTION: "where has this Run got to?" — the caller-owned, redacted
490
415
  * ledger record. Polling; prefer {@link MaterialGraphClient.streamRunEvents}
491
- * when a human is waiting. `suspended` is not a failure — it means the Run is
492
- * asking you something (see {@link MaterialGraphClient.resumeRun}).
416
+ * when a human is waiting.
493
417
  */
494
418
  run(runId: RunId, signal?: AbortSignal): Promise<PublicRunResponse>;
495
- /**
496
- * THE QUESTION: "which Runs are mine?" — your own Runs, newest first, paged
497
- * (GET `/api/v1/runs`). This is how a client that lost a Run id finds its work
498
- * again: `{ status: "suspended" }` returns the Runs still waiting on an
499
- * answer, whose ids you can then feed to {@link MaterialGraphClient.resumeRun}.
500
- *
501
- * Only your own Runs are ever returned. Page by following `nextCursor` until
502
- * it is ABSENT — a full page is not the signal to stop.
503
- */
504
- listRuns(options?: ListRunsOptions): Promise<PublicRunListResponse>;
505
- /**
506
- * Export a completed compose Run's scheme as a finish schedule — one row per
507
- * slot, every attribute value carrying its source and verification state
508
- * (GET `/api/v1/runs/{runId}/schedule`). Unknown values are explicit
509
- * `missing` cells, never blanks. The `.xlsx` form is a direct-URL download:
510
- * `GET /api/v1/runs/{runId}/schedule.xlsx` with the same bearer key.
511
- */
512
- runSchedule(runId: RunId, options?: GetRunScheduleOptions): Promise<FinishScheduleResponse>;
513
419
  /** Follow a verdict cell's citation handle to its canonical claim source. */
514
420
  citation(citationId: string, signal?: AbortSignal): Promise<ResolvedVerdictCitation>;
515
- /**
516
- * Resume a suspended Run (POST `/api/v1/runs/{runId}/resume`).
517
- *
518
- * The third argument accepts either an `AbortSignal` (the published form) or
519
- * {@link ResumeRunOptions}, whose `stepId` guards against resuming a step the
520
- * run has already moved past — the API answers 409 on a mismatch (MG-608).
521
- */
522
- resumeRun(runId: RunId, resumeData: unknown, signalOrOptions?: AbortSignal | ResumeRunOptions): Promise<PublicRunResponse>;
523
- /**
524
- * THE QUESTION: "stop this Run." Requests DURABLE cancellation — the Run
525
- * acknowledges and unwinds; the call returning does not mean it has stopped.
526
- * Poll {@link MaterialGraphClient.run} for the terminal state.
527
- */
528
- cancelRun(runId: RunId, signal?: AbortSignal): Promise<PublicRunResponse>;
529
- /** Option B from a composed Run, along one axis. See {@link varySchemeCall}. */
530
- varyScheme(body: VarySchemesRequest, signal?: AbortSignal): Promise<VarySchemesResponse>;
531
- /** Ranked candidate pools for up to 24 slots. See {@link slotPoolsCall}. */
532
- slotPools(body: SlotPoolsRequest, signal?: AbortSignal): Promise<SlotPoolsResponse>;
533
421
  /**
534
422
  * Stream ordered Run events as an async iterator (GET
535
423
  * `/api/v1/runs/{runId}/events`, SSE). Iterates until the stream ends or the
536
424
  * signal aborts; pass `after` to resume from the last observed sequence.
537
425
  */
538
426
  streamRunEvents(runId: RunId, options?: StreamRunEventsOptions): AsyncGenerator<RunEvent>;
539
- /**
540
- * Create a persistent project owned by the caller (POST `/api/v1/projects`).
541
- * Returns the freshly assembled state (an empty event log). Requires the
542
- * `mg:ingest` scope.
543
- */
544
- createProject(body?: CreateProjectRequest, signal?: AbortSignal): Promise<ProjectState>;
545
- /**
546
- * THE QUESTION: "what has happened on this project?" — the append-only event log
547
- * FOLDED into a read model, plus the raw `events`. Read the folded collections;
548
- * the log is there for audit.
549
- */
550
- getProject(projectId: ProjectId, signal?: AbortSignal): Promise<ProjectState>;
551
- /**
552
- * Append one event to a project's append-only process trail (POST
553
- * `/api/v1/projects/{projectId}/events`). Requires the `mg:ingest` scope.
554
- */
555
- appendProjectEvent(projectId: ProjectId, body: AppendProjectEventRequest, signal?: AbortSignal): Promise<ProjectEventReceipt>;
556
- /**
557
- * THE QUESTION: "what Boxes do I have?" Scoped to the authenticated principal —
558
- * another key's projects are invisible, not forbidden.
559
- */
560
- listProjects(signal?: AbortSignal): Promise<ProjectListResponse>;
561
427
  /**
562
428
  * Collect Run events until a terminal event, the deadline, or the stream ends
563
429
  * — the bounded events-log pattern (a single pass over {@link streamRunEvents}).