@instruments/materialgraph 0.17.0 → 0.19.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 (63) hide show
  1. package/association-types.d.ts +90 -4
  2. package/associations-client.d.ts +3 -1
  3. package/associations-client.js +4 -0
  4. package/browse-types.d.ts +14 -3
  5. package/by-colour-types.d.ts +24 -6
  6. package/by-spec-types.d.ts +4 -0
  7. package/catalogue-client.d.ts +14 -2
  8. package/catalogue-client.js +23 -0
  9. package/catalogue-types.d.ts +278 -4
  10. package/citation-types.d.ts +34 -0
  11. package/citation-types.js +1 -0
  12. package/client-browse.d.ts +1 -0
  13. package/client-browse.js +1 -0
  14. package/client-vocabulary.d.ts +10 -0
  15. package/client-vocabulary.js +32 -0
  16. package/client.d.ts +28 -62
  17. package/client.js +51 -75
  18. package/composition-types.d.ts +6 -0
  19. package/corpus-scope-types.d.ts +6 -4
  20. package/errors.d.ts +1 -1
  21. package/errors.js +2 -0
  22. package/index.d.ts +6 -0
  23. package/json-value-types.d.ts +8 -0
  24. package/json-value-types.js +1 -0
  25. package/match-types.d.ts +3 -0
  26. package/material-asset-types.d.ts +71 -0
  27. package/material-resources-client.d.ts +18 -0
  28. package/material-resources-client.js +29 -0
  29. package/material-types.d.ts +59 -0
  30. package/operations.d.ts +1 -1
  31. package/operations.js +62 -0
  32. package/package.json +1 -1
  33. package/palette-search-types.d.ts +16 -2
  34. package/query-understanding-types.d.ts +5 -2
  35. package/render-assets-types.d.ts +65 -0
  36. package/render-assets-types.js +1 -0
  37. package/run-events.d.ts +13 -0
  38. package/samplize-catalogue-types.d.ts +92 -0
  39. package/samplize-catalogue-types.js +1 -0
  40. package/schedule-reference-types.d.ts +46 -0
  41. package/schedule-reference-types.js +1 -0
  42. package/schedule-references-client.d.ts +14 -0
  43. package/schedule-references-client.js +26 -0
  44. package/schedule-types.d.ts +34 -0
  45. package/search-collapse-types.d.ts +1 -1
  46. package/search-mood-types.d.ts +6 -0
  47. package/search-mood-types.js +1 -0
  48. package/search-refinement-types.d.ts +5 -0
  49. package/search-request-types.d.ts +29 -11
  50. package/search-response-receipt-types.d.ts +59 -3
  51. package/search-result-validation.js +14 -1
  52. package/search-window-types.d.ts +13 -5
  53. package/slot-pool-types.d.ts +2 -0
  54. package/spec-types.d.ts +6 -1
  55. package/specifications.d.ts +3 -1
  56. package/specifications.js +4 -0
  57. package/substitute-types.d.ts +75 -0
  58. package/substitute-types.js +1 -0
  59. package/suggest-types.d.ts +6 -0
  60. package/suggest-types.js +1 -1
  61. package/taxonomy-coverage-types.d.ts +34 -0
  62. package/taxonomy-coverage-types.js +1 -0
  63. package/types.d.ts +20 -21
@@ -2,12 +2,32 @@
2
2
  export interface CatalogueReference {
3
3
  anchor: {
4
4
  coordinateSpace: "normalized_0_1000";
5
+ /** Page carrying the printed code; defaults to page.documentPage. Do not draw it on another page. */
6
+ documentPage?: number;
5
7
  height: number;
6
8
  kind: "printed_code";
7
9
  width: number;
8
10
  x: number;
9
11
  y: number;
10
12
  };
13
+ productRegion?: {
14
+ coordinateSpace: "normalized_0_1000";
15
+ height: number;
16
+ kind: "product_region";
17
+ review: {
18
+ approvedBy: string;
19
+ confidence: {
20
+ evidenceBasis: "human_visual_review" | "model_assisted_visual_review";
21
+ level: "reviewed";
22
+ };
23
+ method: "human" | "model_assisted";
24
+ model?: string;
25
+ reviewedAt: string;
26
+ };
27
+ width: number;
28
+ x: number;
29
+ y: number;
30
+ };
11
31
  variantId: string;
12
32
  brand: {
13
33
  id: string;
@@ -35,7 +55,7 @@ export interface CatalogueReference {
35
55
  brandItemCode: string;
36
56
  };
37
57
  status: "verified";
38
- isPrimary: true;
58
+ isPrimary: boolean;
39
59
  }
40
60
  export type CatalogueReferenceResult = {
41
61
  variantId: string;
@@ -43,7 +63,16 @@ export type CatalogueReferenceResult = {
43
63
  reference: CatalogueReference;
44
64
  } | {
45
65
  variantId: string;
46
- status: "no_verified_reference" | "unresolved_variant" | "unavailable" | "upstream_failure";
66
+ status: "no_verified_reference";
67
+ } | {
68
+ variantId: string;
69
+ status: "unresolved_variant";
70
+ } | {
71
+ variantId: string;
72
+ status: "unavailable";
73
+ } | {
74
+ variantId: string;
75
+ status: "upstream_failure";
47
76
  };
48
77
  export interface CatalogueReferenceBatchResponse {
49
78
  results: CatalogueReferenceResult[];
@@ -56,6 +85,50 @@ export interface CatalogueReferenceBatchResponse {
56
85
  upstreamFailure: number;
57
86
  };
58
87
  }
88
+ /** Bounds for the flat catalogue-channel collection shelf. */
89
+ export interface CatalogueCollectionsOptions {
90
+ limit?: number;
91
+ offset?: number;
92
+ sampleLimit?: number;
93
+ }
94
+ /** One representative product image carried by a catalogue collection. */
95
+ export interface CatalogueCollectionSampleProduct {
96
+ assetId: string;
97
+ imageUrl: string;
98
+ sourceImageUrl: string;
99
+ productId: string;
100
+ productName: string;
101
+ variantId: string;
102
+ variantName: string | null;
103
+ }
104
+ /** A product collection whose variants have governed catalogue membership. */
105
+ export interface CatalogueChannelCollection {
106
+ id: string;
107
+ slug: string;
108
+ name: string;
109
+ homepageUrl: string | null;
110
+ productCount: number;
111
+ variantCount: number;
112
+ sampleProducts: CatalogueCollectionSampleProduct[];
113
+ }
114
+ /** The flat, paginated catalogue-channel collection read model. */
115
+ export interface CatalogueChannelCollectionsResponse {
116
+ collections: CatalogueChannelCollection[];
117
+ channel: {
118
+ token: "catalogue";
119
+ basis: "governed_variant_membership";
120
+ };
121
+ counts: {
122
+ basis: "exact_current_channel_membership";
123
+ };
124
+ pagination: {
125
+ count: number;
126
+ total: number;
127
+ limit: number;
128
+ offset: number;
129
+ hasMore: boolean;
130
+ };
131
+ }
59
132
  export interface CatalogueDocumentAccess {
60
133
  documentId: string;
61
134
  contentType: "application/pdf";
@@ -69,9 +142,19 @@ export type CatalogueDocumentAccessResult = {
69
142
  access: CatalogueDocumentAccess;
70
143
  } | {
71
144
  documentId: string;
72
- status: "unresolved_document" | "unavailable" | "forbidden" | "upstream_failure";
145
+ status: "unresolved_document";
146
+ } | {
147
+ documentId: string;
148
+ status: "unavailable";
149
+ } | {
150
+ documentId: string;
151
+ status: "forbidden";
152
+ } | {
153
+ documentId: string;
154
+ status: "upstream_failure";
73
155
  };
74
156
  export interface CatalogDocument {
157
+ availability: "available";
75
158
  brand: {
76
159
  id: string;
77
160
  name: string;
@@ -82,21 +165,212 @@ export interface CatalogDocument {
82
165
  mediaType: "application/pdf";
83
166
  pageCount: number;
84
167
  };
168
+ edition: CatalogEdition;
85
169
  id: string;
86
170
  kind: "document";
87
171
  productStatus: "partial" | "not_processed";
172
+ receipt: CatalogAvailableReceipt;
88
173
  title: string;
89
174
  }
175
+ export interface CatalogEdition {
176
+ id: string;
177
+ label: string;
178
+ title: string;
179
+ }
180
+ export interface CatalogAvailableReceipt {
181
+ extraction: {
182
+ references: number;
183
+ status: "partial" | "not_processed";
184
+ };
185
+ failures: CatalogFailureReceipt[];
186
+ pages: {
187
+ documentPositionBase: 1;
188
+ pageCount: number;
189
+ };
190
+ render: {
191
+ failedPages: Array<{
192
+ documentPage: number;
193
+ reason: string;
194
+ }>;
195
+ renderedPages: number;
196
+ status: "complete" | "partial" | "not_recorded";
197
+ };
198
+ source: {
199
+ checksum: {
200
+ algorithm: "sha256";
201
+ value: string;
202
+ };
203
+ sourceBasis: "brand_supplied";
204
+ retainedUrl: string;
205
+ status: "retained";
206
+ };
207
+ }
208
+ export interface CatalogFailureReceipt {
209
+ count: number;
210
+ reason: string;
211
+ stage: "source" | "render" | "extraction";
212
+ }
213
+ export interface UnavailableCatalogDocument {
214
+ availability: "source_unavailable";
215
+ brand: {
216
+ id: string;
217
+ name: string;
218
+ };
219
+ document: null;
220
+ edition: CatalogEdition;
221
+ id: string;
222
+ kind: "document";
223
+ productStatus: "not_processed";
224
+ receipt: {
225
+ extraction: {
226
+ references: 0;
227
+ status: "blocked_source_unavailable";
228
+ };
229
+ failures: CatalogFailureReceipt[];
230
+ pages: {
231
+ documentPositionBase: 1;
232
+ pageCount: null;
233
+ };
234
+ render: {
235
+ failedPages: never[];
236
+ renderedPages: 0;
237
+ status: "blocked_source_unavailable";
238
+ };
239
+ source: {
240
+ reason: "retained_source_not_found";
241
+ status: "unavailable";
242
+ };
243
+ };
244
+ title: string;
245
+ }
246
+ export type CatalogPublication = CatalogDocument | UnavailableCatalogDocument;
90
247
  export interface CatalogDocumentList {
91
- catalogs: CatalogDocument[];
248
+ catalogs: CatalogPublication[];
92
249
  source: "verified-source-material-registry";
93
250
  }
94
251
  export interface CatalogProductReferenceList {
95
252
  catalog: CatalogDocument;
96
253
  coverage: {
254
+ documentPages: {
255
+ total: number;
256
+ withVerifiedReferences: number;
257
+ };
97
258
  pagesWithReferences: number;
259
+ precision: {
260
+ reason: "labelled_denominator_not_recorded";
261
+ status: "not_measured";
262
+ };
263
+ productCoverage: {
264
+ reason: "source_product_denominator_not_recorded";
265
+ status: "not_measured";
266
+ };
98
267
  references: number;
268
+ unmatched: {
269
+ reasons: "unmatched_source_products_not_recorded"[];
270
+ status: "not_measured";
271
+ };
99
272
  };
100
273
  references: CatalogueReference[];
101
274
  source: "verified-source-material-registry";
275
+ status: "available";
102
276
  }
277
+ export interface CatalogProductReferenceUnavailable {
278
+ catalog: UnavailableCatalogDocument;
279
+ reason: "retained_source_not_found";
280
+ status: "source_unavailable";
281
+ }
282
+ export type CatalogProductReferenceReadResult = CatalogProductReferenceList | CatalogProductReferenceUnavailable;
283
+ export interface CataloguePageRequiredArtifact {
284
+ mediaType: "image/webp";
285
+ version: "catalogue-page-webp-v1";
286
+ }
287
+ export interface CataloguePageAvailableArtifact extends Omit<CataloguePageRequiredArtifact, "version"> {
288
+ bucket: "materialgraph";
289
+ key: string;
290
+ url: string;
291
+ }
292
+ export type CataloguePage = {
293
+ catalogId: string;
294
+ documentId: string;
295
+ editionId: string;
296
+ id: string;
297
+ original: {
298
+ documentId: string;
299
+ documentPage: number;
300
+ };
301
+ page: {
302
+ documentPage: number;
303
+ printedPageLabel?: string;
304
+ };
305
+ representation: {
306
+ artifact: CataloguePageAvailableArtifact;
307
+ status: "available";
308
+ };
309
+ } | {
310
+ catalogId: string;
311
+ documentId: string;
312
+ editionId: string;
313
+ id: string;
314
+ original: {
315
+ documentId: string;
316
+ documentPage: number;
317
+ };
318
+ page: {
319
+ documentPage: number;
320
+ printedPageLabel?: string;
321
+ };
322
+ representation: {
323
+ requiredArtifact: CataloguePageRequiredArtifact;
324
+ reason: "retained_representation_not_found";
325
+ status: "unavailable";
326
+ };
327
+ };
328
+ type CataloguePageAvailable = Extract<CataloguePage, {
329
+ representation: {
330
+ status: "available";
331
+ };
332
+ }>;
333
+ type CataloguePageUnavailable = Extract<CataloguePage, {
334
+ representation: {
335
+ status: "unavailable";
336
+ };
337
+ }>;
338
+ export type CatalogPageListResult = {
339
+ catalog: CatalogDocument;
340
+ pages: CataloguePage[];
341
+ pagination: {
342
+ count: number;
343
+ hasMore: boolean;
344
+ limit: number;
345
+ offset: number;
346
+ total: number;
347
+ };
348
+ representationCoverage: {
349
+ available: number;
350
+ failuresByReason: Array<{
351
+ count: number;
352
+ reason: "retained_representation_not_found";
353
+ }>;
354
+ total: number;
355
+ unavailable: number;
356
+ };
357
+ status: "available";
358
+ } | {
359
+ catalog: UnavailableCatalogDocument;
360
+ reason: "retained_source_not_found";
361
+ status: "source_unavailable";
362
+ };
363
+ export type CataloguePageRepresentationReadResult = {
364
+ artifact: CataloguePageAvailableArtifact;
365
+ page: CataloguePageAvailable;
366
+ status: "available";
367
+ } | {
368
+ requiredArtifact: CataloguePageRequiredArtifact;
369
+ page: CataloguePageUnavailable;
370
+ reason: "retained_representation_not_found";
371
+ status: "unavailable";
372
+ } | {
373
+ pageId: string;
374
+ status: "unresolved_page";
375
+ };
376
+ export {};
@@ -0,0 +1,34 @@
1
+ /** Small handle carried by a verdict cell. Resolve it only when evidence is opened. */
2
+ export interface VerdictCitation {
3
+ citationId: string;
4
+ sourceType: string;
5
+ count: number;
6
+ }
7
+ export interface ResolvedVerdictCitation {
8
+ citationId: string;
9
+ sourceType: string;
10
+ source: {
11
+ kind: "source_record" | "source_material" | "source_fact" | "url" | "asset" | "download" | "manual_note" | "agent_output";
12
+ /** Canonical source/fact/asset/download id, a public source URL, or the claim-source handle when no public reference is available. */
13
+ ref: string;
14
+ title?: string;
15
+ url?: string;
16
+ /** Same-origin public asset proxy path when retained bytes are available. */
17
+ publicPath?: string;
18
+ sourceId?: string;
19
+ sourceFactId?: string;
20
+ sourceAssetId?: string;
21
+ sourceDownloadId?: string;
22
+ locator?: {
23
+ page?: number;
24
+ selector?: string;
25
+ xPath?: string;
26
+ imageBox?: {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ };
32
+ };
33
+ };
34
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -52,6 +52,7 @@ export declare function browseQuery(params: BrowseParams): {
52
52
  count: BrowseParams["count"];
53
53
  types: BrowseParams["types"];
54
54
  brands: BrowseParams["brands"];
55
+ role: BrowseParams["role"];
55
56
  filters: string[] | undefined;
56
57
  facetCounts: string | undefined;
57
58
  corpusScope: BrowseParams["corpusScope"];
package/client-browse.js CHANGED
@@ -28,6 +28,7 @@ export function browseQuery(params) {
28
28
  count: params.count,
29
29
  types: params.types,
30
30
  brands: params.brands,
31
+ role: params.role,
31
32
  filters: params.filters?.map((entry) => JSON.stringify(entry)),
32
33
  facetCounts: params.facetCounts?.join(","),
33
34
  corpusScope: params.corpusScope,
@@ -0,0 +1,10 @@
1
+ import { HttpTransport } from "./http-transport.js";
2
+ import type { ColourFacetsResponse, ResolveAttributeOptions, ResolveAttributeResponse, ResolveAttributeValueOptions, ResolveAttributeValueResponse, ResolveColourResponse, SuggestColourResponse, SuggestOptions, SuggestResponse } from "./types.js";
3
+ export declare function colourFacets(transport: HttpTransport, signal?: AbortSignal): Promise<ColourFacetsResponse>;
4
+ export declare function resolveColour(transport: HttpTransport, name: string, signal?: AbortSignal): Promise<ResolveColourResponse>;
5
+ export declare function suggestColour(transport: HttpTransport, q: string, options?: {
6
+ limit?: number;
7
+ }, signal?: AbortSignal): Promise<SuggestColourResponse>;
8
+ export declare function suggest(transport: HttpTransport, q: string, options?: SuggestOptions, signal?: AbortSignal): Promise<SuggestResponse>;
9
+ export declare function resolveAttribute(transport: HttpTransport, q: string, options?: ResolveAttributeOptions, signal?: AbortSignal): Promise<ResolveAttributeResponse>;
10
+ export declare function resolveAttributeValue(transport: HttpTransport, attributeId: string, query: string, options?: ResolveAttributeValueOptions, signal?: AbortSignal): Promise<ResolveAttributeValueResponse>;
@@ -0,0 +1,32 @@
1
+ import { HttpTransport } from "./http-transport.js";
2
+ import { resolveOperation } from "./operations.js";
3
+ import { suggestQuery } from "./suggest-types.js";
4
+ export function colourFacets(transport, signal) {
5
+ return transport.requestJson(resolveOperation("get_colour_facets"), { signal });
6
+ }
7
+ export function resolveColour(transport, name, signal) {
8
+ return transport.requestJson(resolveOperation("resolve_colour_name"), { query: { name }, signal });
9
+ }
10
+ export function suggestColour(transport, q, options, signal) {
11
+ return transport.requestJson(resolveOperation("suggest_colour_names"), { query: { q, limit: options?.limit }, signal });
12
+ }
13
+ export function suggest(transport, q, options, signal) {
14
+ return transport.requestJson(resolveOperation("search_suggest"), { query: suggestQuery(q, options), signal });
15
+ }
16
+ export function resolveAttribute(transport, q, options, signal) {
17
+ return transport.requestJson(resolveOperation("catalog_resolve_attribute"), {
18
+ query: {
19
+ q,
20
+ limit: options?.limit,
21
+ facetableOnly: options?.facetableOnly,
22
+ },
23
+ signal,
24
+ });
25
+ }
26
+ export function resolveAttributeValue(transport, attributeId, query, options, signal) {
27
+ return transport.requestJson(resolveOperation("catalog_resolve_value"), {
28
+ query: { q: query, limit: options?.limit },
29
+ pathParams: { attributeId },
30
+ signal,
31
+ });
32
+ }
package/client.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { CatalogueClient } from "./catalogue-client.js";
2
2
  import type { MaterialGraphClientOptions } from "./client-config.js";
3
3
  import { type RateLimit } from "./errors.js";
4
+ import { ScheduleReferencesClient } from "./schedule-references-client.js";
4
5
  export * from "./client-config.js";
5
6
  import { type BrowseNamespace } from "./client-browse.js";
6
7
  import { type ExplorationNamespace } from "./client-exploration.js";
@@ -8,9 +9,10 @@ export type { BrowseNamespace } from "./client-browse.js";
8
9
  export type { ExplorationNamespace } from "./client-exploration.js";
9
10
  import { type SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
10
11
  export type { SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
11
- import type { AssociatedOptions } from "./association-types.js";
12
+ import type { ApplicabilityOptions, AssociatedOptions } from "./association-types.js";
12
13
  import type { BrandsOptions } from "./brand-types.js";
13
14
  import type { ByColourParams, ByColourResponse } from "./by-colour-types.js";
15
+ import type { ResolvedVerdictCitation } from "./citation-types.js";
14
16
  import { CodesClient } from "./codes-client.js";
15
17
  import type { CodeAdvisoryInput, CodeAdvisoryResponse } from "./codes-types.js";
16
18
  import { ColoursClient } from "./colours-client.js";
@@ -18,8 +20,7 @@ import type { VarySchemesRequest, VarySchemesResponse } from "./composition-type
18
20
  import type { BatchId, ProjectId, RunId, VariantId } from "./identifiers.js";
19
21
  import type { MatchStreamEvent } from "./match-stream-types.js";
20
22
  import type { MatchInput, MatchResponse } from "./match-types.js";
21
- import type { MaterialAssetProjection } from "./material-asset-types.js";
22
- import type { MaterialBlockProjection } from "./material-block-types.js";
23
+ import type { MaterialDocumentPageOptions } from "./material-asset-types.js";
23
24
  import type { MaterialQueryPlan } from "./material-query-plan-types.js";
24
25
  import type { AppendProjectEventRequest, CreateProjectRequest, ProjectEventReceipt, ProjectListResponse, ProjectState } from "./project-types.js";
25
26
  import { resolvePhrasesRequest as resolvePhrases } from "./resolve-client.js";
@@ -27,6 +28,8 @@ import type { CapabilityManifestResponse, CreatePublicRunRequest, CreatePublicRu
27
28
  import type { FinishScheduleResponse, GetRunScheduleOptions } from "./schedule-types.js";
28
29
  import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
29
30
  import type { SlotPoolsRequest, SlotPoolsResponse } from "./slot-pool-types.js";
31
+ import type { FindSubstitutesOptions, FindSubstitutesResponse } from "./substitute-types.js";
32
+ import type { ProductTypeCoverageOptions, ProductTypeStatusCoverage } from "./taxonomy-coverage-types.js";
30
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, ResolveColourResponse, SearchGetParams, SearchInput, SearchResponse, SiblingsResponse, SpecFacetsDistributionResponse, SpecFacetsListResponse, SuggestColourResponse, SuggestOptions, SuggestResponse, TaxonomyResponse, VocabularySearchOptions, WhoamiResponse } from "./types.js";
31
34
  /**
32
35
  * The MaterialGraph client — every lens on the graph, on one object.
@@ -65,6 +68,7 @@ import type { ApplicableSpecsResponse, BrandOptions, BySpecOptions, BySpecRespon
65
68
  */
66
69
  export declare class MaterialGraphClient extends CatalogueClient {
67
70
  #private;
71
+ readonly scheduleReferences: ScheduleReferencesClient;
68
72
  readonly baseUrl: string;
69
73
  /**
70
74
  * THE QUESTION: "show me everything in this category / this brand, in a plain
@@ -217,20 +221,10 @@ export declare class MaterialGraphClient extends CatalogueClient {
217
221
  * goes with this one, and `search({ similarTo })` for one that LOOKS like it.
218
222
  */
219
223
  siblings(variantId: VariantId, signal?: AbortSignal): Promise<SiblingsResponse>;
220
- /**
221
- * THE QUESTION: "what do we actually KNOW about this material, and what have we
222
- * simply not checked?" The only read that distinguishes a determined absence
223
- * from an unasked question — every field carries a `status`, so this is the one
224
- * surface entitled to back a negative ("no fire rating").
225
- * {@link MaterialGraphClient.material} cannot: there an absence is merely unknown.
226
- */
227
- materialBlocks(variantId: VariantId, signal?: AbortSignal): Promise<MaterialBlockProjection>;
228
- /**
229
- * THE QUESTION: "what images and documents may I SHOW for this material?" — the
230
- * redistribution-safe set (GET `/api/v1/materials/{variantId}/assets`), not
231
- * every file on record.
232
- */
233
- materialAssets(variantId: VariantId, signal?: AbortSignal): Promise<MaterialAssetProjection>;
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>;
227
+ materialDocuments(variantId: VariantId, options?: MaterialDocumentPageOptions, signal?: AbortSignal): Promise<import("./material-asset-types.js").MaterialDocumentPage>;
234
228
  /**
235
229
  * THE QUESTION: "what does the schema DEFINE?" — the governed static registry.
236
230
  *
@@ -250,14 +244,17 @@ export declare class MaterialGraphClient extends CatalogueClient {
250
244
  *
251
245
  * READ `item.source` BEFORE PHRASING: the rail mixes three tiers of evidence —
252
246
  * `cospec` (real orders), `considered` (board activity), `colour` (palette
253
- * look-alike). Only `cospec` supports "specified together". `cospecCount` tells
247
+ * look-alike). Only `cospec` supports "sampled together". `cospecCount` tells
254
248
  * you how much of the rail is real order evidence.
255
249
  */
256
250
  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>;
257
253
  /** "What finishes does the manufacturer declare for THIS product?" — {@link declaredFinishes}. */
258
254
  associatedFinishes(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
259
255
  /** "What products does the manufacturer declare THIS finish for?" — {@link declaredProducts}. */
260
256
  associatedProducts(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
257
+ applicability(options: ApplicabilityOptions, signal?: AbortSignal): Promise<import("./association-types.js").ApplicabilityResponse>;
261
258
  /**
262
259
  * THE QUESTION: "hydrate these ids I already hold" (POST
263
260
  * `/api/v1/materials/batch`, ≤ 100 ids) — never a discovery call. Throws
@@ -288,58 +285,19 @@ export declare class MaterialGraphClient extends CatalogueClient {
288
285
  view?: "tile";
289
286
  idKind?: MaterialsBatchGetOptions["idKind"];
290
287
  }, signal?: AbortSignal): Promise<MaterialsBatchTileResponse>;
291
- /**
292
- * THE QUESTION: "what colour WORDS may I use?" — family, mood and undertone
293
- * with live counts. Vocabulary, not values: instead use `colours.profiles()`
294
- * for a category's palette, {@link MaterialGraphClient.byColour} to search by a
295
- * colour, {@link MaterialGraphClient.resolveColour} to turn a NAME into a hex.
296
- */
288
+ /** Vocabulary families and counts; use `colours.profiles()` for a material palette. */
297
289
  colourFacets(signal?: AbortSignal): Promise<ColourFacetsResponse>;
298
- /**
299
- * THE QUESTION: "what hex is 'Hague Blue'?" — the step before
300
- * {@link MaterialGraphClient.byColour} when you hold a name rather than a hex.
301
- * A `null` match means unrecognised, not "no such colour".
302
- */
290
+ /** Resolve a colour name to its canonical hex when recognised. */
303
291
  resolveColour(name: string, signal?: AbortSignal): Promise<ResolveColourResponse>;
304
292
  /** Ranked colour-name typeahead (GET `/api/v1/search/colours/suggest`). */
305
293
  suggestColour(q: string, options?: {
306
294
  limit?: number;
307
295
  }, signal?: AbortSignal): Promise<SuggestColourResponse>;
308
- /**
309
- * THE QUESTION: "what is the user starting to type?" It ranks NAMES, not
310
- * materials — instead use {@link MaterialGraphClient.search} once they commit,
311
- * {@link MaterialGraphClient.suggestColour} for colour names, and
312
- * {@link MaterialGraphClient.searchVocabulary} for attribute/value tokens.
313
- *
314
- * Entity typeahead across products, brands and categories
315
- * (GET `/api/v1/search/suggest`). Built for per-keystroke use: one indexed
316
- * lookup, no embedding call and no model. Every suggestion carries the
317
- * `refId` it resolves to — a product id, a brand slug, or a product-type key
318
- * — so selecting one should navigate to that entity rather than re-running
319
- * `label` as a search.
320
- *
321
- * @example
322
- * const { suggestions } = await client.suggest("carr", { kind: "product" });
323
- */
296
+ /** Entity typeahead. Navigate using the selected `refId`; use `search()` for materials. */
324
297
  suggest(q: string, options?: SuggestOptions, signal?: AbortSignal): Promise<SuggestResponse>;
325
- /**
326
- * THE QUESTION: "the user said 'fire rating' — which canonical attribute is
327
- * that?" Free text in, canonical `attributeId`s out; pair with
328
- * {@link MaterialGraphClient.resolveAttributeValue} for the VALUE, then spend
329
- * the pair on {@link MaterialGraphClient.bySpec} or `search({ filters })`.
330
- * Instead use {@link MaterialGraphClient.specificationFacets} to browse rather
331
- * than resolve.
332
- */
298
+ /** Resolve free text to a canonical attribute id. */
333
299
  resolveAttribute(q: string, options?: ResolveAttributeOptions, signal?: AbortSignal): Promise<ResolveAttributeResponse>;
334
- /**
335
- * THE QUESTION: "the user said 'class A' — what canonical term is that, under
336
- * THIS attribute?" The value half of the pair
337
- * {@link MaterialGraphClient.resolveAttribute} starts. Read
338
- * `resolution.recommendedAction`, not just `best`: `ambiguous` means ask.
339
- *
340
- * @param attributeId Canonical vocabulary, not an opaque id — discover it, do
341
- * not invent it.
342
- */
300
+ /** Resolve a value under a canonical attribute id; inspect `recommendedAction` for ambiguity. */
343
301
  resolveAttributeValue(attributeId: string, query: string, options?: ResolveAttributeValueOptions, signal?: AbortSignal): Promise<ResolveAttributeValueResponse>;
344
302
  /** "Is this phrase an attribute or a value?" — see {@link searchVocabularyRequest}. */
345
303
  searchVocabulary(query: string, options?: VocabularySearchOptions, signal?: AbortSignal): Promise<import("./catalog-discovery-types.js").VocabularySearchResponse>;
@@ -375,6 +333,12 @@ export declare class MaterialGraphClient extends CatalogueClient {
375
333
  * {@link MaterialGraphClient.applicableSpecs}). Discover, never hand-write.
376
334
  */
377
335
  taxonomy(signal?: AbortSignal): Promise<TaxonomyResponse>;
336
+ /**
337
+ * Exact current primary-type status counts by retained source category path.
338
+ * `comparisonThreshold` is a reporting cutoff only: it never promotes a
339
+ * proposal into an accepted category.
340
+ */
341
+ productTypeCoverage(options?: ProductTypeCoverageOptions, signal?: AbortSignal): Promise<ProductTypeStatusCoverage>;
378
342
  /**
379
343
  * THE QUESTION: "what is this key allowed to do?" Check `scopes` before
380
344
  * offering a capability: the write surfaces need `mg:ingest` / `mg:compose`,
@@ -546,6 +510,8 @@ export declare class MaterialGraphClient extends CatalogueClient {
546
510
  * `GET /api/v1/runs/{runId}/schedule.xlsx` with the same bearer key.
547
511
  */
548
512
  runSchedule(runId: RunId, options?: GetRunScheduleOptions): Promise<FinishScheduleResponse>;
513
+ /** Follow a verdict cell's citation handle to its canonical claim source. */
514
+ citation(citationId: string, signal?: AbortSignal): Promise<ResolvedVerdictCitation>;
549
515
  /**
550
516
  * Resume a suspended Run (POST `/api/v1/runs/{runId}/resume`).
551
517
  *