@instruments/materialgraph 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/association-types.d.ts +11 -11
- package/associations-client.d.ts +7 -7
- package/associations-client.js +5 -5
- package/brand-types.d.ts +37 -41
- package/brand-types.js +3 -5
- package/brands-client.d.ts +22 -9
- package/brands-client.js +20 -6
- package/by-spec-types.d.ts +1 -1
- package/catalog-discovery-types.d.ts +3 -3
- package/catalogue-client.d.ts +2 -50
- package/catalogue-client.js +2 -10
- package/catalogue-types.d.ts +1 -1
- package/categories-client.d.ts +3 -5
- package/categories-client.js +1 -1
- package/category-types.d.ts +17 -30
- package/citation-types.d.ts +2 -2
- package/client-vocabulary.d.ts +2 -2
- package/client-vocabulary.js +4 -1
- package/client.d.ts +57 -100
- package/client.js +63 -101
- package/color-profiles-types.d.ts +70 -0
- package/colors-client.d.ts +76 -0
- package/colors-client.js +52 -0
- package/find-companions-types.d.ts +8 -8
- package/{find-variants-by-colour-types.d.ts → find-variants-by-color-types.d.ts} +70 -64
- package/find-variants-by-vector-types.d.ts +4 -1
- package/get-variant-types.d.ts +14 -2
- package/http-transport.d.ts +1 -1
- package/http-transport.js +1 -2
- package/identifiers.d.ts +2 -2
- package/identifiers.js +1 -1
- package/index.d.ts +4 -13
- package/index.js +1 -3
- package/list-variant-facets-types.d.ts +4 -4
- package/list-variants-types.d.ts +71 -21
- package/material-asset-types.d.ts +3 -3
- package/material-block-types.d.ts +9 -9
- package/material-types.d.ts +10 -8
- package/operations.d.ts +2 -2
- package/operations.js +13 -24
- package/package.json +2 -2
- package/{resolve-colour-types.d.ts → resolve-color-types.d.ts} +18 -18
- package/response-schemas.generated.d.ts +2 -2
- package/response-schemas.generated.js +39 -70
- package/response-schemas.js +1 -1
- package/samplize-catalogue-types.d.ts +4 -4
- package/samplize-colorvec.js +6 -6
- package/{corpus-scope-types.d.ts → search-catalogue-subset-types.d.ts} +3 -3
- package/search-variants-types.d.ts +20 -2
- package/types.d.ts +31 -283
- package/webmcp.generated.js +4 -9
- package/attribution-types.d.ts +0 -51
- package/attribution-types.js +0 -13
- package/by-colour-types.d.ts +0 -320
- package/colour-region-types.d.ts +0 -18
- package/colours-client.d.ts +0 -70
- package/colours-client.js +0 -38
- package/material-query-plan-types.d.ts +0 -70
- package/material-query-plan-types.js +0 -1
- package/palette-search-types.d.ts +0 -171
- package/palette-search-types.js +0 -1
- package/query-understanding-types.d.ts +0 -254
- package/query-understanding-types.js +0 -1
- package/resolve-colour-types.js +0 -1
- package/search-card-types.d.ts +0 -86
- package/search-card-types.js +0 -1
- package/search-index-plan-types.d.ts +0 -74
- package/search-index-plan-types.js +0 -1
- package/search-refinement-types.d.ts +0 -103
- package/search-refinement-types.js +0 -2
- package/search-request-types.d.ts +0 -170
- package/search-request-types.js +0 -1
- package/search-response-receipt-types.d.ts +0 -24
- package/search-response-receipt-types.js +0 -1
- package/search-response-types.d.ts +0 -11
- package/search-response-types.js +0 -1
- package/search-result-validation.d.ts +0 -9
- package/search-result-validation.js +0 -83
- package/spec-types.d.ts +0 -109
- package/spec-types.js +0 -54
- package/specifications.d.ts +0 -34
- package/specifications.js +0 -56
- package/validation.d.ts +0 -43
- package/validation.js +0 -117
- /package/{by-colour-types.js → color-profiles-types.js} +0 -0
- /package/{colour-region-types.js → find-variants-by-color-types.js} +0 -0
- /package/{corpus-scope-types.js → resolve-color-types.js} +0 -0
- /package/{find-variants-by-colour-types.js → search-catalogue-subset-types.js} +0 -0
package/client-vocabulary.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HttpTransport } from "./http-transport.js";
|
|
2
2
|
import type { ListEnumValuesOptions, ListEnumValuesResult } from "./list-enum-values-types.js";
|
|
3
|
-
import type { ListAttributesOptions, ListAttributesResult,
|
|
4
|
-
export declare const
|
|
3
|
+
import type { ListAttributesOptions, ListAttributesResult, ResolveColorOptions, ResolveColorResponse } from "./types.js";
|
|
4
|
+
export declare const resolveColor: (transport: HttpTransport, name: string, signal?: AbortSignal, options?: ResolveColorOptions) => Promise<ResolveColorResponse>;
|
|
5
5
|
export declare const listAttributes: (transport: HttpTransport, options?: ListAttributesOptions, signal?: AbortSignal) => Promise<ListAttributesResult>;
|
|
6
6
|
export declare const listEnumValues: (transport: HttpTransport, options?: ListEnumValuesOptions, signal?: AbortSignal) => Promise<ListEnumValuesResult>;
|
package/client-vocabulary.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { resolveOperation } from "./operations.js";
|
|
2
|
-
export const
|
|
2
|
+
export const resolveColor = async (transport, name, signal, options) => await transport.requestJson(resolveOperation("resolve_color_name"), {
|
|
3
|
+
query: { searchCatalogueSubset: options?.searchCatalogueSubset, name },
|
|
4
|
+
signal,
|
|
5
|
+
});
|
|
3
6
|
/**
|
|
4
7
|
* A comma list, or nothing at all for an empty one. `[].join(",")` is `""`, and
|
|
5
8
|
* an absent parameter is the one honest spelling of "no restriction".
|
package/client.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { ApplicabilityOptions, AssociatedOptions } from "./association-types.js";
|
|
2
2
|
import type { BrandsOptions } from "./brand-types.js";
|
|
3
|
-
import type { ByColourParams, ByColourResponse } from "./by-colour-types.js";
|
|
4
3
|
import { CatalogueClient } from "./catalogue-client.js";
|
|
5
4
|
import { CategoriesClient } from "./categories-client.js";
|
|
6
5
|
import type { ResolvedVerdictCitation } from "./citation-types.js";
|
|
7
6
|
import type { MaterialGraphClientOptions } from "./client-config.js";
|
|
8
|
-
import {
|
|
7
|
+
import { ColorsClient } from "./colors-client.js";
|
|
9
8
|
import type { RateLimit } from "./errors.js";
|
|
10
9
|
import type { FindCompanionsInput, FindCompanionsOutput } from "./find-companions-types.js";
|
|
11
|
-
import type {
|
|
10
|
+
import type { FindVariantsByColorInput, FindVariantsByColorOutput } from "./find-variants-by-color-types.js";
|
|
12
11
|
import type { FindVariantsByVectorInput, FindVariantsByVectorOutput } from "./find-variants-by-vector-types.js";
|
|
13
12
|
import type { GetVariantOptions, GetVariantOutput } from "./get-variant-types.js";
|
|
14
13
|
import type { VariantId } from "./identifiers.js";
|
|
@@ -16,12 +15,10 @@ import type { ListEnumValuesOptions, ListEnumValuesResult } from "./list-enum-va
|
|
|
16
15
|
import type { ListVariantFacetsInput, ListVariantFacetsOutput } from "./list-variant-facets-types.js";
|
|
17
16
|
import type { ListVariantsInput, ListVariantsOutput } from "./list-variants-types.js";
|
|
18
17
|
import type { ListVariantAssetsOptions, MaterialDocumentPageOptions, VariantAssetPage } from "./material-asset-types.js";
|
|
19
|
-
import type { MaterialQueryPlan } from "./material-query-plan-types.js";
|
|
20
18
|
import type { SourceMaterialBatchReceipt, UploadSourceMaterialInput } from "./run-types.js";
|
|
21
19
|
import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
|
|
22
|
-
import type { CardProjectionRequest, SearchCardResponse } from "./search-card-types.js";
|
|
23
20
|
import type { SearchVariantsInput, SearchVariantsOutput } from "./search-variants-types.js";
|
|
24
|
-
import type { ExtractPaletteInput, ExtractPaletteResponse, ListAttributesOptions, ListAttributesResult, PairingsOptions, PairingsResponse,
|
|
21
|
+
import type { ExtractPaletteInput, ExtractPaletteResponse, ListAttributesOptions, ListAttributesResult, PairingsOptions, PairingsResponse, ResolveColorOptions, ResolveColorResponse, WhoamiResponse } from "./types.js";
|
|
25
22
|
import { WorkflowsClient } from "./workflows-client.js";
|
|
26
23
|
export * from "./client-config.js";
|
|
27
24
|
/**
|
|
@@ -32,25 +29,27 @@ export * from "./client-config.js";
|
|
|
32
29
|
*
|
|
33
30
|
* | The question | The lens |
|
|
34
31
|
* | --- | --- |
|
|
35
|
-
* | "find me something
|
|
32
|
+
* | "find me something matching these words" | {@link MaterialGraphClient.searchVariants} |
|
|
33
|
+
* | "find me something that looks or feels like this" | {@link MaterialGraphClient.findVariantsByVector} |
|
|
36
34
|
* | "tell me about THIS variant" | {@link MaterialGraphClient.getVariant} |
|
|
37
35
|
* | "which materials, from anyone, meet this hard spec?" | {@link MaterialGraphClient.listVariants} |
|
|
38
|
-
* | "what's near
|
|
39
|
-
* | "what
|
|
40
|
-
* | "what
|
|
36
|
+
* | "what's near a color, or a palette of colors?" | {@link MaterialGraphClient.findVariantsByColor} (`mode: "palette"`) |
|
|
37
|
+
* | "what colors does this category come in?" | `colors.profiles()` |
|
|
38
|
+
* | "what goes with THIS material?" | {@link MaterialGraphClient.pairings}, {@link MaterialGraphClient.listVariants} (same product, other colorways) |
|
|
39
|
+
* | "what does the brand say is AVAILABLE on this?" | {@link MaterialGraphClient.associatedFinishes}, {@link MaterialGraphClient.associatedProducts} |
|
|
41
40
|
* | "what can I even ask for?" | {@link MaterialGraphClient.listVariantFacets}, `categories.list()` |
|
|
42
41
|
* | "what is this word called here?" | {@link MaterialGraphClient.listAttributes} |
|
|
43
42
|
* | "do the whole job for me, async" | `workflows.start()` + `mg:compose` |
|
|
44
43
|
*
|
|
45
44
|
* Three structural rules that fall out of that table:
|
|
46
|
-
* - **
|
|
47
|
-
* WORDS. A
|
|
48
|
-
* materials that look it. Route visual intent to the
|
|
45
|
+
* - **Color is a separate lens.** {@link MaterialGraphClient.searchVariants}
|
|
46
|
+
* matches WORDS. A color word in `query` finds materials whose text mentions
|
|
47
|
+
* it, not materials that look it. Route visual intent to the color lenses.
|
|
49
48
|
* - **Relationships hang off a material, not off a query.** You cannot ask "what
|
|
50
49
|
* pairs with beige oak"; you resolve a material first, then ask what pairs
|
|
51
50
|
* with THAT `variantId`.
|
|
52
51
|
* - **Declared is not inferred.** `associatedFinishes()` /
|
|
53
|
-
* `associatedProducts()` return compatibility the
|
|
52
|
+
* `associatedProducts()` return compatibility the BRAND stated;
|
|
54
53
|
* `pairings()` returns companionship the graph INFERRED. The response shapes
|
|
55
54
|
* share no field, on purpose — render them as separate sections and never
|
|
56
55
|
* concatenate them.
|
|
@@ -63,10 +62,10 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
63
62
|
/**
|
|
64
63
|
* THE QUESTION: "what kinds of thing exist, and what are their keys?"
|
|
65
64
|
* `categories.list()` pages the tree (roots, one node's children, or a
|
|
66
|
-
* name
|
|
65
|
+
* name search), and `categories.get(id)` reads one node in full:
|
|
67
66
|
* its place, the names that find it, and the canonical taxonomy concepts it
|
|
68
67
|
* relates to. The source of every category id the other lenses accept
|
|
69
|
-
* (`
|
|
68
|
+
* (`listVariants({ filters })`, `findVariantsByColor({ categoryIds })`).
|
|
70
69
|
*
|
|
71
70
|
* A category id is a TREE KEY, never a canonical `product_category` value:
|
|
72
71
|
* the two look alike and are not interchangeable. Discover ids here, never
|
|
@@ -75,17 +74,19 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
75
74
|
*/
|
|
76
75
|
readonly categories: CategoriesClient;
|
|
77
76
|
/**
|
|
78
|
-
* THE QUESTION: "what
|
|
79
|
-
* of
|
|
77
|
+
* THE QUESTION: "what colors does this category come in?" (`profiles`).
|
|
78
|
+
* `profiles` is an aggregate over a category, not a list of materials, and
|
|
79
|
+
* carries a `basis` naming the snapshot it read.
|
|
80
80
|
*
|
|
81
|
-
* Instead use {@link MaterialGraphClient.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
81
|
+
* Instead use {@link MaterialGraphClient.findVariantsByColor} (`mode:
|
|
82
|
+
* "palette"`) for the materials near one or several colors and
|
|
83
|
+
* {@link MaterialGraphClient.listVariants} to page through a color's family.
|
|
84
|
+
* Color is usually derived from product imagery, which is visual likeness,
|
|
85
|
+
* not a color specification. A brand's declared color, such as a paint's
|
|
85
86
|
* published hex, wins where MaterialGraph holds one, and each value's
|
|
86
|
-
*
|
|
87
|
+
* value origin says which.
|
|
87
88
|
*/
|
|
88
|
-
readonly
|
|
89
|
+
readonly colors: ColorsClient;
|
|
89
90
|
/**
|
|
90
91
|
* THE QUESTION: "do a whole job for me" — the ASYNC lens. `start()` begins a
|
|
91
92
|
* Run of one registered workflow, `run()` polls it, `streamRunEvents()` and
|
|
@@ -96,51 +97,6 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
96
97
|
readonly workflows: WorkflowsClient;
|
|
97
98
|
constructor(options: MaterialGraphClientOptions);
|
|
98
99
|
get lastRateLimit(): RateLimit | null;
|
|
99
|
-
/**
|
|
100
|
-
* THE QUESTION: "find me materials like this": one search over the words, or
|
|
101
|
-
* a seed or query image, optionally gated by a category, hard attribute
|
|
102
|
-
* filters and a corpus scope (ADR 0031).
|
|
103
|
-
*
|
|
104
|
-
* Instead use {@link MaterialGraphClient.listVariants} when the spec IS the question
|
|
105
|
-
* (ranking would be noise), {@link MaterialGraphClient.byColour} /
|
|
106
|
-
* `colours.palette()` for visual colour intent (`text` matches WORDS — "sage
|
|
107
|
-
* green" finds materials that SAY sage, not ones that look it),
|
|
108
|
-
* {@link MaterialGraphClient.pairings}
|
|
109
|
-
* for what goes WITH something, {@link MaterialGraphClient.suggest} for typeahead.
|
|
110
|
-
*
|
|
111
|
-
* The full POST search primitive. `input.filters` are hard token sets on
|
|
112
|
-
* the search index, run in the same query; they change no ordering. Build
|
|
113
|
-
* them with `certificationProgramme`, `specTerm`, or `hasSpec`. Weights,
|
|
114
|
-
* mood, colours, sort and preferences are gone, and the server refuses them
|
|
115
|
-
* by name.
|
|
116
|
-
*/
|
|
117
|
-
search(input: SearchInput & CardProjectionRequest, signal?: AbortSignal): Promise<SearchCardResponse>;
|
|
118
|
-
search(input: SearchInput, signal?: AbortSignal): Promise<SearchResponse>;
|
|
119
|
-
/** Whole materials ask → inspectable meanings and complete safe search requests. */
|
|
120
|
-
planQuery(query: string, signal?: AbortSignal): Promise<MaterialQueryPlan>;
|
|
121
|
-
/**
|
|
122
|
-
* The same question as {@link MaterialGraphClient.search}; the difference is
|
|
123
|
-
* transport: a cacheable, link-shareable GET for queries that must survive in
|
|
124
|
-
* a URL. `category`, `filters` and image bytes have no query-string form, so
|
|
125
|
-
* anything using those must go through `search`.
|
|
126
|
-
*/
|
|
127
|
-
searchGet(params: SearchGetParams & {
|
|
128
|
-
view: "card";
|
|
129
|
-
}, signal?: AbortSignal): Promise<SearchCardResponse>;
|
|
130
|
-
searchGet(params: SearchGetParams, signal?: AbortSignal): Promise<SearchResponse>;
|
|
131
|
-
/**
|
|
132
|
-
* THE QUESTION: "what materials are near THIS colour?" — one colour (or a small
|
|
133
|
-
* palette), ranked by OKLab closeness to colour extracted from product imagery.
|
|
134
|
-
*
|
|
135
|
-
* Instead use `colours.palette()` for N colours at stated proportions (a
|
|
136
|
-
* different ranking, not a wrapper),
|
|
137
|
-
* {@link MaterialGraphClient.resolveColour} first if you hold a NAME,
|
|
138
|
-
* {@link MaterialGraphClient.listVariants} to page through a category or a brand, and
|
|
139
|
-
* {@link MaterialGraphClient.search} when colour is one signal among many.
|
|
140
|
-
* Report matches as visual likeness, never a stated colour specification.
|
|
141
|
-
* `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.
|
|
142
|
-
*/
|
|
143
|
-
byColour(params: ByColourParams, signal?: AbortSignal): Promise<ByColourResponse>;
|
|
144
100
|
/**
|
|
145
101
|
* THE QUESTION: "tell me about THIS variant" (GET
|
|
146
102
|
* `/api/v1/variants/{variantId}`, `get_variant`).
|
|
@@ -151,10 +107,10 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
151
107
|
* product, brand, category, image and page. Name `attributes` and `blocks`
|
|
152
108
|
* to add their values under `specifications`; a null value is unknown, never
|
|
153
109
|
* false or zero. Instead use {@link MaterialGraphClient.listVariants} for many
|
|
154
|
-
* ids, or for the other
|
|
110
|
+
* ids, or for the other colorways of the same product (ask `listVariants`
|
|
155
111
|
* with a `product in` filter),
|
|
156
112
|
* {@link MaterialGraphClient.materialBlocks} to tell "no value" from "not
|
|
157
|
-
* checked", {@link MaterialGraphClient.
|
|
113
|
+
* checked", {@link MaterialGraphClient.searchVariants} when you have no id yet.
|
|
158
114
|
*
|
|
159
115
|
* @param variantId Opaque — pass back exactly what you were given.
|
|
160
116
|
*/
|
|
@@ -174,35 +130,37 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
174
130
|
* off one resolved material (GET `/api/v1/materials/{variantId}/pairings`).
|
|
175
131
|
*
|
|
176
132
|
* Instead use {@link MaterialGraphClient.listVariants} for the same product in
|
|
177
|
-
* another
|
|
133
|
+
* another color, and {@link MaterialGraphClient.findVariantsByVector} for a LIKE-THIS substitute —
|
|
178
134
|
* similar and complementary are opposite questions.
|
|
179
135
|
*
|
|
180
136
|
* READ `item.source` BEFORE PHRASING: the rail mixes three tiers of evidence —
|
|
181
|
-
* `cospec` (real orders), `considered` (board activity), `
|
|
137
|
+
* `cospec` (real orders), `considered` (board activity), `color` (palette
|
|
182
138
|
* look-alike). Only `cospec` supports "sampled together". `cospecCount` tells
|
|
183
139
|
* you how much of the rail is real order evidence.
|
|
184
140
|
*/
|
|
185
141
|
pairings(variantId: VariantId, options?: PairingsOptions, signal?: AbortSignal): Promise<PairingsResponse>;
|
|
186
|
-
/** "What finishes does the
|
|
142
|
+
/** "What finishes does the brand declare for THIS product?" - {@link declaredFinishes}. */
|
|
187
143
|
associatedFinishes(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
|
|
188
|
-
/** "What products does the
|
|
144
|
+
/** "What products does the brand declare THIS finish for?" - {@link declaredProducts}. */
|
|
189
145
|
associatedProducts(variantId: VariantId, options?: AssociatedOptions, signal?: AbortSignal): Promise<import("./association-types.js").DeclaredAssociationsResponse>;
|
|
190
146
|
applicability(options: ApplicabilityOptions, signal?: AbortSignal): Promise<import("./association-types.js").ApplicabilityResponse>;
|
|
191
147
|
/**
|
|
192
148
|
* THE QUESTION: "eligible variants matching these hard filters, ranked and
|
|
193
149
|
* cursor-paged" (GET `/api/v1/variants`, MG-2222) — the one read behind
|
|
194
150
|
* `list_variants`, hydrating ids you already hold (`{terms: [{field:
|
|
195
|
-
* "variant", op: "in", values: [...]}]}`, up to 100), the other
|
|
151
|
+
* "variant", op: "in", values: [...]}]}`, up to 100), the other colorways
|
|
196
152
|
* of a product (`{terms: [{field: "product", op: "in", values:
|
|
197
153
|
* [productId]}, {field: "variant", op: "not_in", values: [variantId]}]}` —
|
|
198
|
-
* `filters` is kind-grouped, `{terms, numbers, presence}`, every
|
|
199
|
-
* across all
|
|
154
|
+
* `filters` is kind-grouped, `{terms, numbers, presence, anyField}`, every
|
|
155
|
+
* condition across all four ANDed, 20 at most), or a category/brand listing. An explicit
|
|
200
156
|
* `variant in` id that does not resolve to an eligible variant is
|
|
201
|
-
* reported in `unresolvedVariantIds
|
|
202
|
-
* it names a
|
|
203
|
-
*
|
|
157
|
+
* reported in `unresolvedVariantIds` when it names no variant, in
|
|
158
|
+
* `unavailableVariantIds` when it names a catalogue variant this list
|
|
159
|
+
* cannot show in the requested scope (a retired one, for example), or in
|
|
160
|
+
* `excludedBySearchCatalogueSubset` when it names a real variant outside the
|
|
161
|
+
* materials catalogue, never silently dropped from the page.
|
|
204
162
|
*
|
|
205
|
-
* `filters`/`optionalFilters`/`orderBy`/`
|
|
163
|
+
* `filters`/`optionalFilters`/`orderBy`/`colors` are sent as URL-encoded
|
|
206
164
|
* JSON; `attributes`/`include`/`words` as comma-separated lists — the server
|
|
207
165
|
* validates, this method does not duplicate that check.
|
|
208
166
|
*/
|
|
@@ -212,7 +170,8 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
212
170
|
* and how many of each" (POST `/api/v1/variants/facets`, MG-2294) — the
|
|
213
171
|
* options and counts a filter UI shows beside a {@link
|
|
214
172
|
* MaterialGraphClient.listVariants} page. `filters` is the same tree
|
|
215
|
-
* `listVariants()` takes
|
|
173
|
+
* `listVariants()` takes, less its `orText` and `unstated` additions; the
|
|
174
|
+
* server validates both.
|
|
216
175
|
*/
|
|
217
176
|
listVariantFacets(input: ListVariantFacetsInput, signal?: AbortSignal): Promise<ListVariantFacetsOutput>;
|
|
218
177
|
/**
|
|
@@ -232,22 +191,20 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
232
191
|
searchVariants(input: SearchVariantsInput, signal?: AbortSignal): Promise<SearchVariantsOutput>;
|
|
233
192
|
/**
|
|
234
193
|
* THE QUESTION: "which variants hold, resemble, or can be ranked by, this
|
|
235
|
-
*
|
|
236
|
-
* One required `mode`: `contains` (a swatch for every required `
|
|
237
|
-
* condition), `palette` (whole-palette closeness to `
|
|
194
|
+
* color?" (POST `/api/v1/variants/by-color`, MG-2217/MG-2230/MG-2247).
|
|
195
|
+
* One required `mode`: `contains` (a swatch for every required `colors[]`
|
|
196
|
+
* condition), `palette` (whole-palette closeness to `colors[]`, an
|
|
238
197
|
* image's extracted palette, or `targetVariantId`'s own palette) or
|
|
239
|
-
* `rerank` (reorder a held `variantIds` set by
|
|
240
|
-
* {@link MaterialGraphClient.byColour} instead for ONE colour against the
|
|
241
|
-
* search index rather than the canonical variant graph.
|
|
198
|
+
* `rerank` (reorder a held `variantIds` set by color closeness).
|
|
242
199
|
*/
|
|
243
|
-
|
|
200
|
+
findVariantsByColor(input: FindVariantsByColorInput, signal?: AbortSignal): Promise<FindVariantsByColorOutput>;
|
|
244
201
|
/**
|
|
245
202
|
* THE QUESTION: "what did designers sample together with these?" (POST
|
|
246
203
|
* `/api/v1/variants/companions`, MG-2332). Give `variantIds` and/or
|
|
247
204
|
* `materials` (free-text names, one variant each, at most twelve together);
|
|
248
205
|
* companions come back strongest first, each with its `lift`,
|
|
249
206
|
* `seedMatchCount`, `relation` and a one-line `reason`. `projectType` reads one
|
|
250
|
-
* sector; `include` adds `image` and `
|
|
207
|
+
* sector; `include` adds `image` and `color` fields a lean page leaves out.
|
|
251
208
|
* A sample order shows sampling, never specification. Read `unresolved`
|
|
252
209
|
* before presenting: a scheme of four that resolved two is a different claim.
|
|
253
210
|
*/
|
|
@@ -257,13 +214,14 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
257
214
|
* `/api/v1/variants/by-vector`, MG-2231). Eligible variants ranked by
|
|
258
215
|
* semantic or visual similarity to a text description (mood words count),
|
|
259
216
|
* an image reference, or both fused into one embedding. `filters` is the
|
|
260
|
-
* same tree {@link MaterialGraphClient.listVariants} takes
|
|
217
|
+
* same tree {@link MaterialGraphClient.listVariants} takes, less its `orText`
|
|
218
|
+
* and `unstated` additions. `query.mode`
|
|
261
219
|
* values other than `"text"` embed through Voyage and spend the shared
|
|
262
220
|
* per-key `embed` rate budget.
|
|
263
221
|
*/
|
|
264
222
|
findVariantsByVector(input: FindVariantsByVectorInput, signal?: AbortSignal): Promise<FindVariantsByVectorOutput>;
|
|
265
|
-
/** Resolve a
|
|
266
|
-
|
|
223
|
+
/** Resolve a color name to its hex, and the named paint's catalogue variant. */
|
|
224
|
+
resolveColor(name: string, signal?: AbortSignal, options?: ResolveColorOptions): Promise<ResolveColorResponse>;
|
|
267
225
|
/**
|
|
268
226
|
* THE QUESTION: "which attribute means this phrase?" or "what could a
|
|
269
227
|
* <category> be specified by?" (GET `/api/v1/catalog/attributes`). One page of
|
|
@@ -292,15 +250,14 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
292
250
|
*/
|
|
293
251
|
whoami(signal?: AbortSignal): Promise<WhoamiResponse>;
|
|
294
252
|
/**
|
|
295
|
-
* THE QUESTION: "what
|
|
296
|
-
* materials. The bridge from an inspiration image into the
|
|
297
|
-
* here, then feed the swatches to
|
|
298
|
-
* {@link MaterialGraphClient.
|
|
299
|
-
|
|
253
|
+
* THE QUESTION: "what colors are in this image?" — the palette only, no
|
|
254
|
+
* materials. The bridge from an inspiration image into the color lens: extract
|
|
255
|
+
* here, then feed the swatches to
|
|
256
|
+
* {@link MaterialGraphClient.findVariantsByColor} (`mode: "palette"`).
|
|
300
257
|
*/
|
|
301
258
|
extractPalette(input: ExtractPaletteInput, signal?: AbortSignal): Promise<ExtractPaletteResponse>;
|
|
302
259
|
/** "Whose catalogs are in here, and how big is each?" — {@link listBrands}. */
|
|
303
|
-
brands(options?: BrandsOptions, signal?: AbortSignal): Promise<import("./brand-types.js").
|
|
260
|
+
brands(options?: BrandsOptions, signal?: AbortSignal): Promise<import("./brand-types.js").ListBrandsPage>;
|
|
304
261
|
/**
|
|
305
262
|
* Upload one atomic source-material batch (POST `/api/v1/source-material`,
|
|
306
263
|
* multipart). Pass a heterogeneous pile via `{ files }` (any mix of PDF,
|