@instruments/materialgraph 0.6.0 → 0.7.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/brand-types.d.ts +20 -1
- package/brand-types.js +7 -0
- package/by-spec-types.d.ts +62 -3
- package/catalog-discovery-types.d.ts +19 -2
- package/client-browse.d.ts +7 -1
- package/client.d.ts +339 -53
- package/client.js +316 -33
- package/codes-client.d.ts +36 -0
- package/codes-client.js +26 -0
- package/codes-types.d.ts +77 -11
- package/colours-client.d.ts +41 -6
- package/colours-client.js +27 -6
- package/composition-types.d.ts +27 -18
- package/demand-batch-types.d.ts +118 -0
- package/demand-batch-types.js +1 -0
- package/demand-types.d.ts +134 -0
- package/demand-types.js +1 -0
- package/identifiers.d.ts +71 -0
- package/identifiers.js +26 -0
- package/index.d.ts +1 -0
- package/material-asset-types.d.ts +20 -1
- package/material-block-types.d.ts +30 -1
- package/material-types.d.ts +45 -7
- package/package.json +1 -1
- package/palette-search-types.d.ts +17 -2
- package/project-types.d.ts +20 -8
- package/project-types.js +0 -7
- package/run-types.d.ts +20 -8
- package/schedule-types.d.ts +18 -7
- package/schedule-types.js +0 -11
- package/schema-resource-types.d.ts +15 -0
- package/search-refinement-types.d.ts +24 -4
- package/spec-types.d.ts +14 -5
- package/spec-types.js +14 -5
- package/suggest-types.d.ts +10 -1
- package/suggest-types.js +5 -0
- package/types.d.ts +215 -214
package/spec-types.d.ts
CHANGED
|
@@ -11,12 +11,21 @@
|
|
|
11
11
|
* class, but with an EPD on record" reaches for a NAMED, typed criterion instead
|
|
12
12
|
* of hand-assembling a magic `attribute:value` string.
|
|
13
13
|
*
|
|
14
|
-
* These criteria drive two operations equally
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* These criteria drive two operations equally, and choosing between them IS the
|
|
15
|
+
* routing decision:
|
|
16
|
+
* - `client.search({ filters: [...] })` — spec gates layered onto a RANKED
|
|
17
|
+
* (colour / visual / lexical) search. Reach for it when relevance still
|
|
18
|
+
* matters: "something like this seed, but Class A".
|
|
19
|
+
* - `client.bySpec(...)` — the value-anchored, SPEC-ONLY primitive, which takes
|
|
18
20
|
* the same criteria as `attribute:value` strings (build them with the helpers
|
|
19
|
-
* in `./specifications`).
|
|
21
|
+
* in `./specifications`). Reach for it when the spec is the whole question and
|
|
22
|
+
* ranking would be noise.
|
|
23
|
+
*
|
|
24
|
+
* Discover the tokens before you spend them: `client.specificationFacets()` for
|
|
25
|
+
* what is facetable at all, `client.attributeValues()` for one attribute's
|
|
26
|
+
* values, `client.resolveAttribute()` / `client.resolveAttributeValue()` to turn
|
|
27
|
+
* a phrase into a canonical pair. A hand-guessed token returns an honest empty
|
|
28
|
+
* answer, which is the hardest kind of bug to see.
|
|
20
29
|
*/
|
|
21
30
|
/**
|
|
22
31
|
* The virtual attribute id that matches a certification PROGRAMME wherever it
|
package/spec-types.js
CHANGED
|
@@ -11,12 +11,21 @@
|
|
|
11
11
|
* class, but with an EPD on record" reaches for a NAMED, typed criterion instead
|
|
12
12
|
* of hand-assembling a magic `attribute:value` string.
|
|
13
13
|
*
|
|
14
|
-
* These criteria drive two operations equally
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* These criteria drive two operations equally, and choosing between them IS the
|
|
15
|
+
* routing decision:
|
|
16
|
+
* - `client.search({ filters: [...] })` — spec gates layered onto a RANKED
|
|
17
|
+
* (colour / visual / lexical) search. Reach for it when relevance still
|
|
18
|
+
* matters: "something like this seed, but Class A".
|
|
19
|
+
* - `client.bySpec(...)` — the value-anchored, SPEC-ONLY primitive, which takes
|
|
18
20
|
* the same criteria as `attribute:value` strings (build them with the helpers
|
|
19
|
-
* in `./specifications`).
|
|
21
|
+
* in `./specifications`). Reach for it when the spec is the whole question and
|
|
22
|
+
* ranking would be noise.
|
|
23
|
+
*
|
|
24
|
+
* Discover the tokens before you spend them: `client.specificationFacets()` for
|
|
25
|
+
* what is facetable at all, `client.attributeValues()` for one attribute's
|
|
26
|
+
* values, `client.resolveAttribute()` / `client.resolveAttributeValue()` to turn
|
|
27
|
+
* a phrase into a canonical pair. A hand-guessed token returns an honest empty
|
|
28
|
+
* answer, which is the hardest kind of bug to see.
|
|
20
29
|
*/
|
|
21
30
|
/**
|
|
22
31
|
* The virtual attribute id that matches a certification PROGRAMME wherever it
|
package/suggest-types.d.ts
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* Split out of `types.ts` for the repository's source-file size budget, the same
|
|
7
7
|
* reason `catalog-discovery-types.ts` sits beside it; both are re-exported from
|
|
8
8
|
* `types.ts`, so importers see no difference.
|
|
9
|
+
*
|
|
10
|
+
* THE LENS: entity typeahead — it ranks NAMES, not materials. `mg.search()` is
|
|
11
|
+
* what answers a committed query; `mg.suggestColour()` covers colour names and
|
|
12
|
+
* `mg.searchVocabulary()` covers attribute/value tokens. Suggestions are a page
|
|
13
|
+
* of the best matches, never a census of matching entities.
|
|
9
14
|
*/
|
|
10
15
|
/** Which kind of entity a suggestion is — and therefore what `refId` means. */
|
|
11
16
|
export type SuggestKind = "product" | "brand" | "category";
|
|
@@ -25,8 +30,12 @@ export interface Suggestion {
|
|
|
25
30
|
brandSlug: string | null;
|
|
26
31
|
brandName: string | null;
|
|
27
32
|
categoryKey: string | null;
|
|
28
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* A representative variant, so a client can open a material record directly.
|
|
35
|
+
* Opaque, and null when none was picked — not a product without variants.
|
|
36
|
+
*/
|
|
29
37
|
variantId: string | null;
|
|
38
|
+
/** Variants behind this entity IN MATERIALGRAPH — a coverage figure. */
|
|
30
39
|
variantCount: number;
|
|
31
40
|
}
|
|
32
41
|
/** The suggest response: the query as interpreted, plus the ranked suggestions. */
|
package/suggest-types.js
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* Split out of `types.ts` for the repository's source-file size budget, the same
|
|
7
7
|
* reason `catalog-discovery-types.ts` sits beside it; both are re-exported from
|
|
8
8
|
* `types.ts`, so importers see no difference.
|
|
9
|
+
*
|
|
10
|
+
* THE LENS: entity typeahead — it ranks NAMES, not materials. `mg.search()` is
|
|
11
|
+
* what answers a committed query; `mg.suggestColour()` covers colour names and
|
|
12
|
+
* `mg.searchVocabulary()` covers attribute/value tokens. Suggestions are a page
|
|
13
|
+
* of the best matches, never a census of matching entities.
|
|
9
14
|
*/
|
|
10
15
|
/**
|
|
11
16
|
* Shape the query string for a suggest call.
|