@instruments/materialgraph 0.18.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.
- package/association-types.d.ts +29 -4
- package/browse-types.d.ts +14 -3
- package/by-colour-types.d.ts +24 -6
- package/by-spec-types.d.ts +4 -0
- package/catalogue-client.d.ts +3 -0
- package/catalogue-client.js +4 -0
- package/catalogue-types.d.ts +3 -1
- package/citation-types.d.ts +34 -0
- package/citation-types.js +1 -0
- package/client-browse.d.ts +1 -0
- package/client-browse.js +1 -0
- package/client-vocabulary.d.ts +10 -0
- package/client-vocabulary.js +32 -0
- package/client.d.ts +22 -45
- package/client.js +40 -55
- package/composition-types.d.ts +6 -0
- package/corpus-scope-types.d.ts +1 -1
- package/errors.d.ts +1 -1
- package/errors.js +2 -0
- package/index.d.ts +6 -0
- package/json-value-types.d.ts +8 -0
- package/json-value-types.js +1 -0
- package/match-types.d.ts +3 -0
- package/material-resources-client.d.ts +3 -0
- package/material-resources-client.js +4 -0
- package/material-types.d.ts +24 -0
- package/operations.d.ts +1 -1
- package/operations.js +37 -0
- package/package.json +1 -1
- package/palette-search-types.d.ts +16 -2
- package/render-assets-types.d.ts +65 -0
- package/render-assets-types.js +1 -0
- package/run-events.d.ts +13 -0
- package/samplize-catalogue-types.d.ts +92 -0
- package/samplize-catalogue-types.js +1 -0
- package/schedule-reference-types.d.ts +46 -0
- package/schedule-reference-types.js +1 -0
- package/schedule-references-client.d.ts +14 -0
- package/schedule-references-client.js +26 -0
- package/schedule-types.d.ts +34 -0
- package/search-mood-types.d.ts +6 -0
- package/search-mood-types.js +1 -0
- package/search-refinement-types.d.ts +5 -0
- package/search-request-types.d.ts +5 -0
- package/search-response-receipt-types.d.ts +8 -0
- package/search-result-validation.js +10 -0
- package/slot-pool-types.d.ts +2 -0
- package/spec-types.d.ts +6 -1
- package/specifications.d.ts +3 -1
- package/specifications.js +4 -0
- package/substitute-types.d.ts +75 -0
- package/substitute-types.js +1 -0
- package/taxonomy-coverage-types.d.ts +34 -0
- package/taxonomy-coverage-types.js +1 -0
- package/types.d.ts +15 -18
package/client.js
CHANGED
|
@@ -5,6 +5,7 @@ import { HttpTransport } from "./http-transport.js";
|
|
|
5
5
|
// Aliased to `operation` — the local name every call site here already used.
|
|
6
6
|
import { resolveOperation as operation, } from "./operations.js";
|
|
7
7
|
import { cancelRun, capabilities as capabilitiesRun, createRun, drainRunEvents, getRun, getRunSchedule, getSourceMaterialBatch as getSourceMaterialBatchCall, listRuns, resumeRun, streamRunEvents, uploadSourceMaterial, } from "./runs.js";
|
|
8
|
+
import { ScheduleReferencesClient } from "./schedule-references-client.js";
|
|
8
9
|
// Re-exported whole so `index.ts` and every existing importer keep their path.
|
|
9
10
|
export * from "./client-config.js";
|
|
10
11
|
import { browseQuery, createBrowseNamespace, } from "./client-browse.js";
|
|
@@ -12,16 +13,16 @@ import { createExplorationNamespace, } from "./client-exploration.js";
|
|
|
12
13
|
import { createSourceMaterialCommentsNamespace, } from "./client-source-material-comments.js";
|
|
13
14
|
import * as assoc from "./associations-client.js";
|
|
14
15
|
import { brandColourDeck, brandProfile, listBrands } from "./brands-client.js";
|
|
16
|
+
import { colourFacets as colourFacetsCall, resolveAttribute as resolveAttributeCall, resolveAttributeValue as resolveAttributeValueCall, resolveColour as resolveColourCall, suggest as suggestCall, suggestColour as suggestColourCall, } from "./client-vocabulary.js";
|
|
15
17
|
import { CodesClient } from "./codes-client.js";
|
|
16
18
|
import { ColoursClient } from "./colours-client.js";
|
|
17
19
|
import { slotPools as slotPoolsCall, varyScheme as varySchemeCall, } from "./composition-client.js";
|
|
18
20
|
import { coordinate as coordinateCall } from "./coordinate-client.js";
|
|
19
21
|
import { matchStream as matchStreamCall } from "./match-stream.js";
|
|
20
|
-
import { materialAssets as materialAssetsCall, materialBlocks as materialBlocksCall, materialDocuments as materialDocumentsCall, } from "./material-resources-client.js";
|
|
22
|
+
import { materialAssets as materialAssetsCall, materialRenderAssets as materialRenderAssetsCall, materialBlocks as materialBlocksCall, materialDocuments as materialDocumentsCall, } from "./material-resources-client.js";
|
|
21
23
|
import { appendProjectEvent as appendProjectEventCall, createProject as createProjectCall, getProject as getProjectCall, listProjects as listProjectsCall, } from "./projects.js";
|
|
22
24
|
import { resolvePhrasesRequest as resolvePhrases, searchVocabularyRequest, } from "./resolve-client.js";
|
|
23
25
|
import { SCHEMA_RESOURCE_OPERATION_IDS } from "./schema-resource-types.js";
|
|
24
|
-
import { suggestQuery } from "./suggest-types.js";
|
|
25
26
|
/**
|
|
26
27
|
* The MaterialGraph client — every lens on the graph, on one object.
|
|
27
28
|
*
|
|
@@ -58,6 +59,7 @@ import { suggestQuery } from "./suggest-types.js";
|
|
|
58
59
|
* `./identifiers.ts`), absent is not false, and a page is not a corpus.
|
|
59
60
|
*/
|
|
60
61
|
export class MaterialGraphClient extends CatalogueClient {
|
|
62
|
+
scheduleReferences;
|
|
61
63
|
baseUrl;
|
|
62
64
|
/**
|
|
63
65
|
* THE QUESTION: "show me everything in this category / this brand, in a plain
|
|
@@ -121,6 +123,7 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
121
123
|
super(transport);
|
|
122
124
|
this.#transport = transport;
|
|
123
125
|
this.baseUrl = transport.baseUrl;
|
|
126
|
+
this.scheduleReferences = new ScheduleReferencesClient(transport);
|
|
124
127
|
this.browse = createBrowseNamespace((params, signal) => this.#get("search_browse_by_colour", browseQuery(params), signal));
|
|
125
128
|
this.codes = new CodesClient({
|
|
126
129
|
get: (operationId, query, signal) => this.#get(operationId, query, signal),
|
|
@@ -143,10 +146,11 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
143
146
|
pathParams,
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
|
-
#post(operationId, body, signal) {
|
|
149
|
+
#post(operationId, body, signal, pathParams) {
|
|
147
150
|
return this.#transport.requestJson(operation(operationId), {
|
|
148
151
|
body,
|
|
149
152
|
signal,
|
|
153
|
+
pathParams,
|
|
150
154
|
});
|
|
151
155
|
}
|
|
152
156
|
/**
|
|
@@ -245,6 +249,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
245
249
|
category: params.category,
|
|
246
250
|
brand: params.brand,
|
|
247
251
|
family: params.family,
|
|
252
|
+
order: params.order,
|
|
253
|
+
maxColourDistance: params.maxColourDistance,
|
|
248
254
|
corpusScope: params.corpusScope,
|
|
249
255
|
limit: params.limit,
|
|
250
256
|
}, signal);
|
|
@@ -282,6 +288,9 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
282
288
|
materialAssets(variantId, signal) {
|
|
283
289
|
return materialAssetsCall(this.#transport, variantId, signal);
|
|
284
290
|
}
|
|
291
|
+
materialRenderAssets(variantId, signal) {
|
|
292
|
+
return materialRenderAssetsCall(this.#transport, variantId, signal);
|
|
293
|
+
}
|
|
285
294
|
materialDocuments(variantId, options, signal) {
|
|
286
295
|
return materialDocumentsCall(this.#transport, variantId, options, signal);
|
|
287
296
|
}
|
|
@@ -306,7 +315,7 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
306
315
|
*
|
|
307
316
|
* READ `item.source` BEFORE PHRASING: the rail mixes three tiers of evidence —
|
|
308
317
|
* `cospec` (real orders), `considered` (board activity), `colour` (palette
|
|
309
|
-
* look-alike). Only `cospec` supports "
|
|
318
|
+
* look-alike). Only `cospec` supports "sampled together". `cospecCount` tells
|
|
310
319
|
* you how much of the rail is real order evidence.
|
|
311
320
|
*/
|
|
312
321
|
pairings(variantId, options, signal) {
|
|
@@ -314,6 +323,10 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
314
323
|
variantId,
|
|
315
324
|
});
|
|
316
325
|
}
|
|
326
|
+
/** Find bounded, exact-spec substitutes for one opaque variant id. */
|
|
327
|
+
findSubstitutes(variantId, options = {}, signal) {
|
|
328
|
+
return this.#post("find_material_substitutes", options, signal, { variantId });
|
|
329
|
+
}
|
|
317
330
|
/** "What finishes does the manufacturer declare for THIS product?" — {@link declaredFinishes}. */
|
|
318
331
|
associatedFinishes(variantId, options, signal) {
|
|
319
332
|
return assoc.declaredFinishes(this.#transport, variantId, options, signal);
|
|
@@ -345,70 +358,30 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
345
358
|
idKind: options?.idKind ?? "variantId",
|
|
346
359
|
}, signal);
|
|
347
360
|
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* THE QUESTION: "what colour WORDS may I use?" — family, mood and undertone
|
|
351
|
-
* with live counts. Vocabulary, not values: instead use `colours.profiles()`
|
|
352
|
-
* for a category's palette, {@link MaterialGraphClient.byColour} to search by a
|
|
353
|
-
* colour, {@link MaterialGraphClient.resolveColour} to turn a NAME into a hex.
|
|
354
|
-
*/
|
|
361
|
+
/** Vocabulary families and counts; use `colours.profiles()` for a material palette. */
|
|
355
362
|
colourFacets(signal) {
|
|
356
|
-
return this.#
|
|
363
|
+
return colourFacetsCall(this.#transport, signal);
|
|
357
364
|
}
|
|
358
|
-
/**
|
|
359
|
-
* THE QUESTION: "what hex is 'Hague Blue'?" — the step before
|
|
360
|
-
* {@link MaterialGraphClient.byColour} when you hold a name rather than a hex.
|
|
361
|
-
* A `null` match means unrecognised, not "no such colour".
|
|
362
|
-
*/
|
|
365
|
+
/** Resolve a colour name to its canonical hex when recognised. */
|
|
363
366
|
resolveColour(name, signal) {
|
|
364
|
-
return this.#
|
|
367
|
+
return resolveColourCall(this.#transport, name, signal);
|
|
365
368
|
}
|
|
366
369
|
/** Ranked colour-name typeahead (GET `/api/v1/search/colours/suggest`). */
|
|
367
370
|
suggestColour(q, options, signal) {
|
|
368
|
-
return this.#
|
|
371
|
+
return suggestColourCall(this.#transport, q, options, signal);
|
|
369
372
|
}
|
|
370
|
-
/**
|
|
371
|
-
* THE QUESTION: "what is the user starting to type?" It ranks NAMES, not
|
|
372
|
-
* materials — instead use {@link MaterialGraphClient.search} once they commit,
|
|
373
|
-
* {@link MaterialGraphClient.suggestColour} for colour names, and
|
|
374
|
-
* {@link MaterialGraphClient.searchVocabulary} for attribute/value tokens.
|
|
375
|
-
*
|
|
376
|
-
* Entity typeahead across products, brands and categories
|
|
377
|
-
* (GET `/api/v1/search/suggest`). Built for per-keystroke use: one indexed
|
|
378
|
-
* lookup, no embedding call and no model. Every suggestion carries the
|
|
379
|
-
* `refId` it resolves to — a product id, a brand slug, or a product-type key
|
|
380
|
-
* — so selecting one should navigate to that entity rather than re-running
|
|
381
|
-
* `label` as a search.
|
|
382
|
-
*
|
|
383
|
-
* @example
|
|
384
|
-
* const { suggestions } = await client.suggest("carr", { kind: "product" });
|
|
385
|
-
*/
|
|
373
|
+
/** Entity typeahead. Navigate using the selected `refId`; use `search()` for materials. */
|
|
386
374
|
suggest(q, options, signal) {
|
|
387
|
-
return this.#
|
|
375
|
+
return suggestCall(this.#transport, q, options, signal);
|
|
388
376
|
}
|
|
389
377
|
// ── Catalog ──────────────────────────────────────────────────────────────────
|
|
390
|
-
/**
|
|
391
|
-
* THE QUESTION: "the user said 'fire rating' — which canonical attribute is
|
|
392
|
-
* that?" Free text in, canonical `attributeId`s out; pair with
|
|
393
|
-
* {@link MaterialGraphClient.resolveAttributeValue} for the VALUE, then spend
|
|
394
|
-
* the pair on {@link MaterialGraphClient.bySpec} or `search({ filters })`.
|
|
395
|
-
* Instead use {@link MaterialGraphClient.specificationFacets} to browse rather
|
|
396
|
-
* than resolve.
|
|
397
|
-
*/
|
|
378
|
+
/** Resolve free text to a canonical attribute id. */
|
|
398
379
|
resolveAttribute(q, options, signal) {
|
|
399
|
-
return this.#
|
|
380
|
+
return resolveAttributeCall(this.#transport, q, options, signal);
|
|
400
381
|
}
|
|
401
|
-
/**
|
|
402
|
-
* THE QUESTION: "the user said 'class A' — what canonical term is that, under
|
|
403
|
-
* THIS attribute?" The value half of the pair
|
|
404
|
-
* {@link MaterialGraphClient.resolveAttribute} starts. Read
|
|
405
|
-
* `resolution.recommendedAction`, not just `best`: `ambiguous` means ask.
|
|
406
|
-
*
|
|
407
|
-
* @param attributeId Canonical vocabulary, not an opaque id — discover it, do
|
|
408
|
-
* not invent it.
|
|
409
|
-
*/
|
|
382
|
+
/** Resolve a value under a canonical attribute id; inspect `recommendedAction` for ambiguity. */
|
|
410
383
|
resolveAttributeValue(attributeId, query, options, signal) {
|
|
411
|
-
return this.#
|
|
384
|
+
return resolveAttributeValueCall(this.#transport, attributeId, query, options, signal);
|
|
412
385
|
}
|
|
413
386
|
/** "Is this phrase an attribute or a value?" — see {@link searchVocabularyRequest}. */
|
|
414
387
|
searchVocabulary(query, options, signal) {
|
|
@@ -457,6 +430,14 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
457
430
|
taxonomy(signal) {
|
|
458
431
|
return this.#get("get_category_taxonomy", undefined, signal);
|
|
459
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Exact current primary-type status counts by retained source category path.
|
|
435
|
+
* `comparisonThreshold` is a reporting cutoff only: it never promotes a
|
|
436
|
+
* proposal into an accepted category.
|
|
437
|
+
*/
|
|
438
|
+
productTypeCoverage(options, signal) {
|
|
439
|
+
return this.#get("get_product_type_status_coverage", options, signal);
|
|
440
|
+
}
|
|
460
441
|
/**
|
|
461
442
|
* THE QUESTION: "what is this key allowed to do?" Check `scopes` before
|
|
462
443
|
* offering a capability: the write surfaces need `mg:ingest` / `mg:compose`,
|
|
@@ -676,6 +657,10 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
676
657
|
runSchedule(runId, options) {
|
|
677
658
|
return getRunSchedule(this.#transport, runId, options);
|
|
678
659
|
}
|
|
660
|
+
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
661
|
+
citation(citationId, signal) {
|
|
662
|
+
return this.#get("get_verdict_citation", undefined, signal, { citationId });
|
|
663
|
+
}
|
|
679
664
|
/**
|
|
680
665
|
* Resume a suspended Run (POST `/api/v1/runs/{runId}/resume`).
|
|
681
666
|
*
|
package/composition-types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* TOLERANT-PARSING CONTRACT: response enums are widened with {@link OpenEnum}
|
|
13
13
|
* so a new server value still type-checks; objects are read structurally.
|
|
14
14
|
*/
|
|
15
|
+
import type { VerdictCitation } from "./citation-types.js";
|
|
15
16
|
import type { RunId, SchemeId, SlotId, VariantId } from "./identifiers.js";
|
|
16
17
|
import type { OpenEnum } from "./types.js";
|
|
17
18
|
/**
|
|
@@ -158,6 +159,7 @@ export interface CompositionMatch {
|
|
|
158
159
|
value?: string | null;
|
|
159
160
|
/** Why an `unverified` cell missed the trust bar (MG-627), else null. */
|
|
160
161
|
trustGap?: "below_confidence" | "basis_unmet" | "proposed" | null;
|
|
162
|
+
citation?: VerdictCitation;
|
|
161
163
|
}
|
|
162
164
|
/** One slot's chosen material plus the reason it was picked. */
|
|
163
165
|
export interface CompositionPick {
|
|
@@ -303,6 +305,10 @@ export interface ReviewProgrammeSuspendPayload {
|
|
|
303
305
|
element?: SlotElement;
|
|
304
306
|
category?: string;
|
|
305
307
|
categorySource?: SlotCategorySource;
|
|
308
|
+
/** Criteria grounding exhausted its one bounded retry; absent otherwise. */
|
|
309
|
+
groundingFailure?: {
|
|
310
|
+
reason: "criteria-resolution-failed";
|
|
311
|
+
};
|
|
306
312
|
provenance: ProgrammeProvenance;
|
|
307
313
|
}>;
|
|
308
314
|
/**
|
package/corpus-scope-types.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ import { type OpenEnum } from "./types.js";
|
|
|
43
43
|
* that were never in the Material Bank feed; if you mean orderable, use one of
|
|
44
44
|
* the channel-backed scopes above.
|
|
45
45
|
*/
|
|
46
|
-
export type CorpusScope = OpenEnum<"all" | "designShopOrderable" | "materialBankEuOrderable" | "materialBankNaAndCatalogue" | "materialBankNaOrderable" | "materialBankOrderable">;
|
|
46
|
+
export type CorpusScope = OpenEnum<"samplizeCatalogue" | "all" | "designShopOrderable" | "materialBankEuOrderable" | "materialBankNaAndCatalogue" | "materialBankNaOrderable" | "materialBankOrderable">;
|
|
47
47
|
/**
|
|
48
48
|
* The corpus a response AND its counts were drawn from. Present only when a
|
|
49
49
|
* narrowing scope applied — absence means the whole graph. Read it alongside
|
package/errors.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ interface TransportErrorInput extends MaterialGraphRequestMetadata {
|
|
|
89
89
|
* member to a problem response means adding it here too, and
|
|
90
90
|
* `problem-extension-parity.test.ts` fails when the two disagree.
|
|
91
91
|
*/
|
|
92
|
-
export declare const MATERIALGRAPH_PROBLEM_EXTENSIONS: readonly ["content_length", "did_you_mean", "empty_brands", "limit_bytes", "missing_env", "orderable_attributes", "populated_alternatives", "unknown_attributes", "unknown_brands", "unknown_fields", "unorderable_attribute", "valid_group_keys", "valid_type_keys"];
|
|
92
|
+
export declare const MATERIALGRAPH_PROBLEM_EXTENSIONS: readonly ["ambiguous_brands", "brand_candidates", "content_length", "did_you_mean", "empty_brands", "limit_bytes", "missing_env", "orderable_attributes", "populated_alternatives", "unknown_attributes", "unknown_brands", "unknown_fields", "unorderable_attribute", "valid_group_keys", "valid_type_keys"];
|
|
93
93
|
/** The one error class thrown by all SDK transport and HTTP failures. */
|
|
94
94
|
export declare class MaterialGraphError extends Error {
|
|
95
95
|
readonly kind: MaterialGraphErrorKind;
|
package/errors.js
CHANGED
|
@@ -23,6 +23,8 @@ const RETRIABLE_STATUS = new Set([502, 503, 504]);
|
|
|
23
23
|
* `problem-extension-parity.test.ts` fails when the two disagree.
|
|
24
24
|
*/
|
|
25
25
|
export const MATERIALGRAPH_PROBLEM_EXTENSIONS = [
|
|
26
|
+
"ambiguous_brands",
|
|
27
|
+
"brand_candidates",
|
|
26
28
|
"content_length",
|
|
27
29
|
"did_you_mean",
|
|
28
30
|
"empty_brands",
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type * from "./exploration-types.js";
|
|
|
7
7
|
export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
|
|
8
8
|
export type * from "./run-types.js";
|
|
9
9
|
export type * from "./schedule-types.js";
|
|
10
|
+
export type * from "./citation-types.js";
|
|
10
11
|
export { VARY_AXES } from "./composition-types.js";
|
|
11
12
|
export type * from "./composition-types.js";
|
|
12
13
|
export type * from "./slot-pool-types.js";
|
|
@@ -36,10 +37,15 @@ export type * from "./association-types.js";
|
|
|
36
37
|
export type * from "./brand-types.js";
|
|
37
38
|
export type * from "./fan-deck-types.js";
|
|
38
39
|
export type * from "./material-asset-types.js";
|
|
40
|
+
export type * from "./render-assets-types.js";
|
|
39
41
|
export type * from "./material-block-types.js";
|
|
40
42
|
export type * from "./schema-resource-types.js";
|
|
43
|
+
export type * from "./taxonomy-coverage-types.js";
|
|
44
|
+
export type * from "./schedule-reference-types.js";
|
|
45
|
+
export type * from "./substitute-types.js";
|
|
41
46
|
export type * from "./search-refinement-types.js";
|
|
42
47
|
export type * from "./search-window-types.js";
|
|
43
48
|
export { CERTIFICATION_PROGRAMME_ATTRIBUTE_ID } from "./spec-types.js";
|
|
44
49
|
export type * from "./spec-types.js";
|
|
45
50
|
export { certificationProgramme, certificationProgrammeCriterion, hasSpec, specCriterion, specRangeCriterion, specTerm, } from "./specifications.js";
|
|
51
|
+
export type { SamplizePublicationSource, SamplizeLrvObservation, SamplizeDemand, SamplizeCollectionMembership, SamplizeCatalogueOptions, SamplizeCataloguePage, SamplizeCatalogueProduct, SamplizeHexObservation, } from "./samplize-catalogue-types.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A JSON value, recursively — exactly what survives a `jsonb` round-trip
|
|
3
|
+
* unchanged. Used where a payload's SHAPE belongs to its producer but its values
|
|
4
|
+
* must still be JSON: `Date`, `bigint`, `undefined`, and functions are not.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/match-types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CorpusScope } from "./corpus-scope-types.js";
|
|
1
2
|
/**
|
|
2
3
|
* @module sdk/match-types
|
|
3
4
|
* @description The buffered Material Match request and response, hand-mirrored
|
|
@@ -92,6 +93,8 @@ export interface MatchInput {
|
|
|
92
93
|
*/
|
|
93
94
|
includeBelowFloor?: boolean;
|
|
94
95
|
requestedType?: OpenEnum<"swatch" | "installation" | "flatplan">;
|
|
96
|
+
/** Corpus to retrieve candidates from, applied inside retrieval. */
|
|
97
|
+
corpusScope?: CorpusScope;
|
|
95
98
|
/** Hard spec gates forwarded verbatim to the inner search — term match or presence, each with an optional trust bar. */
|
|
96
99
|
filters?: SearchFilter[];
|
|
97
100
|
/** Soft criteria (rank-never-exclude). A miss demotes within the page but never removes a hit. */
|
|
@@ -3,10 +3,13 @@ import { HttpTransport } from "./http-transport.js";
|
|
|
3
3
|
import type { VariantId } from "./identifiers.js";
|
|
4
4
|
import type { MaterialAssetProjection, MaterialDocumentPage, MaterialDocumentPageOptions } from "./material-asset-types.js";
|
|
5
5
|
import type { MaterialBlockProjection } from "./material-block-types.js";
|
|
6
|
+
import type { MaterialRenderAssets } from "./render-assets-types.js";
|
|
6
7
|
/** Read known and explicitly unobserved canonical material fields. */
|
|
7
8
|
export declare function materialBlocks(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialBlockProjection>;
|
|
8
9
|
/** Read only redistribution-safe images and downloads for a material. */
|
|
9
10
|
export declare function materialAssets(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialAssetProjection>;
|
|
11
|
+
/** Read the accepted render-ready appearance projection, or an explicit unavailable reason. */
|
|
12
|
+
export declare function materialRenderAssets(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialRenderAssets>;
|
|
10
13
|
/**
|
|
11
14
|
* Read the owning Product's URL-deduplicated document page. Variant declarations
|
|
12
15
|
* retain exact attribution; consumers inspect `appliesToRequestedVariant`
|
|
@@ -9,6 +9,10 @@ export function materialBlocks(transport, variantId, signal) {
|
|
|
9
9
|
export function materialAssets(transport, variantId, signal) {
|
|
10
10
|
return transport.requestJson(resolveOperation("list_material_assets"), { signal, pathParams: { variantId } });
|
|
11
11
|
}
|
|
12
|
+
/** Read the accepted render-ready appearance projection, or an explicit unavailable reason. */
|
|
13
|
+
export function materialRenderAssets(transport, variantId, signal) {
|
|
14
|
+
return transport.requestJson(resolveOperation("get_material_render_assets"), { signal, pathParams: { variantId } });
|
|
15
|
+
}
|
|
12
16
|
/**
|
|
13
17
|
* Read the owning Product's URL-deduplicated document page. Variant declarations
|
|
14
18
|
* retain exact attribution; consumers inspect `appliesToRequestedVariant`
|
package/material-types.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export interface MaterialSuccessor {
|
|
|
57
57
|
* successor record — read the detail projection for that.
|
|
58
58
|
*/
|
|
59
59
|
export interface MaterialTile {
|
|
60
|
+
/** Accepted sampleability fact. Absent means unknown, never false. */
|
|
61
|
+
sampleable?: boolean;
|
|
60
62
|
/** Opaque — round-trip verbatim into every other material read. */
|
|
61
63
|
variantId: VariantId;
|
|
62
64
|
brand: string;
|
|
@@ -87,6 +89,27 @@ export interface MaterialTile {
|
|
|
87
89
|
export interface MaterialFacet {
|
|
88
90
|
attributeId: string;
|
|
89
91
|
term: string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this value identifies the variant or specifies its performance /
|
|
94
|
+
* composition. Present on current responses; optional for captured older
|
|
95
|
+
* payloads. Only `specification` facets are valid inputs to `bySpec`.
|
|
96
|
+
*/
|
|
97
|
+
role?: "identity" | "specification";
|
|
98
|
+
}
|
|
99
|
+
/** A retained product-type proposal. It is review evidence, never a category. */
|
|
100
|
+
export interface ProposedProductType {
|
|
101
|
+
id: string;
|
|
102
|
+
displayName: string;
|
|
103
|
+
confidence: number | null;
|
|
104
|
+
/** Canonical source URL when the proposal retained one; null when it did not. */
|
|
105
|
+
sourceUrl: string | null;
|
|
106
|
+
isPrimary: boolean;
|
|
107
|
+
scope: "variant" | "product";
|
|
108
|
+
}
|
|
109
|
+
/** Accepted display categories remain separate from this review-state receipt. */
|
|
110
|
+
export interface ProductTypeReceipt {
|
|
111
|
+
state: "accepted" | "proposed" | "unknown";
|
|
112
|
+
proposedProductTypes: ProposedProductType[];
|
|
90
113
|
}
|
|
91
114
|
/**
|
|
92
115
|
* One dimensional configuration of a material. Numeric fields are millimetres
|
|
@@ -132,6 +155,7 @@ export interface MaterialDetail extends MaterialTile {
|
|
|
132
155
|
sourceStatus?: "provisional";
|
|
133
156
|
installationImageUrl: string | null;
|
|
134
157
|
displayCategory: string | null;
|
|
158
|
+
productTypeReceipt: ProductTypeReceipt;
|
|
135
159
|
categoryPath: string[];
|
|
136
160
|
/** Durable state of image-colour extraction and its variant projection. */
|
|
137
161
|
colourEvidence: {
|
package/operations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.7.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 ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], 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 ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], 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 ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["runSchedule", "GET", "/api/v1/runs/{runId}/schedule", "get_run_finish_schedule"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["createProject", "POST", "/api/v1/projects", "create_box_project"], readonly ["listProjects", "GET", "/api/v1/projects", "list_box_projects"], readonly ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"], readonly ["appendProjectEvent", "POST", "/api/v1/projects/{projectId}/events", "append_box_project_event"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["scheduleReferences.list", "GET", "/api/v1/schedules/{scheduleId}/references", "list_schedule_reference_feedback"], readonly ["scheduleReferences.put", "PUT", "/api/v1/schedules/{scheduleId}/references/{referenceId}", "put_schedule_reference_feedback"], 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 ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], 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 ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["materialRenderAssets", "GET", "/api/v1/materials/{variantId}/render-assets", "get_material_render_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["findSubstitutes", "POST", "/api/v1/materials/{variantId}/substitutes", "find_material_substitutes"], 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 ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["productTypeCoverage", "GET", "/api/v1/taxonomy/coverage", "get_product_type_status_coverage"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["runSchedule", "GET", "/api/v1/runs/{runId}/schedule", "get_run_finish_schedule"], readonly ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["createProject", "POST", "/api/v1/projects", "create_box_project"], readonly ["listProjects", "GET", "/api/v1/projects", "list_box_projects"], readonly ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"], readonly ["appendProjectEvent", "POST", "/api/v1/projects/{projectId}/events", "append_box_project_event"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
|
|
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,6 +1,18 @@
|
|
|
1
1
|
import { MaterialGraphError } from "./errors.js";
|
|
2
2
|
export const MATERIALGRAPH_API_VERSION = "0.7.0";
|
|
3
3
|
const OPERATION_DEFINITIONS = [
|
|
4
|
+
[
|
|
5
|
+
"scheduleReferences.list",
|
|
6
|
+
"GET",
|
|
7
|
+
"/api/v1/schedules/{scheduleId}/references",
|
|
8
|
+
"list_schedule_reference_feedback",
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
"scheduleReferences.put",
|
|
12
|
+
"PUT",
|
|
13
|
+
"/api/v1/schedules/{scheduleId}/references/{referenceId}",
|
|
14
|
+
"put_schedule_reference_feedback",
|
|
15
|
+
],
|
|
4
16
|
["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"],
|
|
5
17
|
[
|
|
6
18
|
"catalogPages",
|
|
@@ -22,6 +34,12 @@ const OPERATION_DEFINITIONS = [
|
|
|
22
34
|
],
|
|
23
35
|
["search", "POST", "/api/v1/search", "search_materials_post"],
|
|
24
36
|
["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"],
|
|
37
|
+
[
|
|
38
|
+
"samplizeCatalogue",
|
|
39
|
+
"GET",
|
|
40
|
+
"/api/v1/catalogues/samplize/products",
|
|
41
|
+
"samplize_catalogue_products",
|
|
42
|
+
],
|
|
25
43
|
["searchGet", "GET", "/api/v1/search", "search_materials_get"],
|
|
26
44
|
["match", "POST", "/api/v1/search/match", "match_material"],
|
|
27
45
|
["byColour", "GET", "/api/v1/search/colours", "search_by_colour"],
|
|
@@ -62,6 +80,12 @@ const OPERATION_DEFINITIONS = [
|
|
|
62
80
|
"/api/v1/materials/{variantId}/assets",
|
|
63
81
|
"list_material_assets",
|
|
64
82
|
],
|
|
83
|
+
[
|
|
84
|
+
"materialRenderAssets",
|
|
85
|
+
"GET",
|
|
86
|
+
"/api/v1/materials/{variantId}/render-assets",
|
|
87
|
+
"get_material_render_assets",
|
|
88
|
+
],
|
|
65
89
|
[
|
|
66
90
|
"materialDocuments",
|
|
67
91
|
"GET",
|
|
@@ -115,6 +139,12 @@ const OPERATION_DEFINITIONS = [
|
|
|
115
139
|
"/api/v1/materials/{variantId}/pairings",
|
|
116
140
|
"get_material_pairings",
|
|
117
141
|
],
|
|
142
|
+
[
|
|
143
|
+
"findSubstitutes",
|
|
144
|
+
"POST",
|
|
145
|
+
"/api/v1/materials/{variantId}/substitutes",
|
|
146
|
+
"find_material_substitutes",
|
|
147
|
+
],
|
|
118
148
|
[
|
|
119
149
|
"associatedFinishes",
|
|
120
150
|
"GET",
|
|
@@ -178,6 +208,12 @@ const OPERATION_DEFINITIONS = [
|
|
|
178
208
|
["resolve", "POST", "/api/v1/resolve", "resolve_phrases"],
|
|
179
209
|
["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"],
|
|
180
210
|
["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"],
|
|
211
|
+
[
|
|
212
|
+
"productTypeCoverage",
|
|
213
|
+
"GET",
|
|
214
|
+
"/api/v1/taxonomy/coverage",
|
|
215
|
+
"get_product_type_status_coverage",
|
|
216
|
+
],
|
|
181
217
|
["whoami", "GET", "/api/v1/whoami", "whoami"],
|
|
182
218
|
["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"],
|
|
183
219
|
["demand", "GET", "/api/v1/demand", "get_material_demand"],
|
|
@@ -255,6 +291,7 @@ const OPERATION_DEFINITIONS = [
|
|
|
255
291
|
"/api/v1/runs/{runId}/schedule",
|
|
256
292
|
"get_run_finish_schedule",
|
|
257
293
|
],
|
|
294
|
+
["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"],
|
|
258
295
|
[
|
|
259
296
|
"streamRunEvents",
|
|
260
297
|
"GET",
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CorpusScope, CorpusScopeReceipt } from "./corpus-scope-types.js";
|
|
1
2
|
/**
|
|
2
3
|
* Wire types for MULTI-COLOUR search — `POST /api/v1/search/palettes` and
|
|
3
4
|
* `POST /api/v1/search/gradients`.
|
|
@@ -34,6 +35,7 @@ export interface GradientStop {
|
|
|
34
35
|
oklab?: OklabTriple;
|
|
35
36
|
}
|
|
36
37
|
export interface SearchPaletteInput {
|
|
38
|
+
corpusScope?: CorpusScope;
|
|
37
39
|
/** The palette to match, 1–8 colours. */
|
|
38
40
|
colours: PaletteQueryColour[];
|
|
39
41
|
/**
|
|
@@ -46,14 +48,15 @@ export interface SearchPaletteInput {
|
|
|
46
48
|
limit?: number;
|
|
47
49
|
}
|
|
48
50
|
export interface SearchGradientInput {
|
|
51
|
+
corpusScope?: CorpusScope;
|
|
49
52
|
/** The ordered colour transition, 2–6 stops. */
|
|
50
53
|
stops: GradientStop[];
|
|
51
54
|
/** Results to return; defaults to 24, capped at 48. */
|
|
52
55
|
limit?: number;
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
|
-
* One swatch
|
|
56
|
-
*
|
|
58
|
+
* One swatch used for scoring. Samplize paint uses its selected published hex;
|
|
59
|
+
* other materials use colorscope palettes extracted from imagery. `name` is null when no human
|
|
57
60
|
* name was resolved — unnamed, not colourless.
|
|
58
61
|
*/
|
|
59
62
|
export interface CandidateSwatch {
|
|
@@ -140,14 +143,24 @@ export interface HueGateReceipt {
|
|
|
140
143
|
* materials match this palette" is not a claim you can make from it.
|
|
141
144
|
*/
|
|
142
145
|
export interface SearchPaletteResponse {
|
|
146
|
+
corpusScope?: CorpusScopeReceipt;
|
|
143
147
|
/** The query as interpreted — check it before trusting a surprising order. */
|
|
144
148
|
query: {
|
|
149
|
+
/** Colours that actually ran after minor stated shares were omitted. */
|
|
145
150
|
colours: Array<{
|
|
146
151
|
hex: string;
|
|
147
152
|
proportion?: number;
|
|
148
153
|
weight?: number;
|
|
149
154
|
}>;
|
|
155
|
+
/** Colours not searched because their stated share was below 5%. */
|
|
156
|
+
droppedColours: Array<{
|
|
157
|
+
hex: string;
|
|
158
|
+
proportion?: number;
|
|
159
|
+
weight?: number;
|
|
160
|
+
}>;
|
|
150
161
|
logic: PaletteLogic;
|
|
162
|
+
/** `no_effective_colours` means no material query ran. */
|
|
163
|
+
outcome: OpenEnum<"matches" | "no_effective_colours">;
|
|
151
164
|
};
|
|
152
165
|
/** The hue-family admission gate this page was scored under. */
|
|
153
166
|
hueGate: HueGateReceipt;
|
|
@@ -157,6 +170,7 @@ export interface SearchPaletteResponse {
|
|
|
157
170
|
}
|
|
158
171
|
/** A PAGE, NOT A CORPUS — see {@link SearchPaletteResponse}. */
|
|
159
172
|
export interface SearchGradientResponse {
|
|
173
|
+
corpusScope?: CorpusScopeReceipt;
|
|
160
174
|
query: {
|
|
161
175
|
stops: string[];
|
|
162
176
|
/** The sampled path points the search actually ran against. */
|