@instruments/materialgraph 0.25.0 → 0.26.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 +20 -20
- package/associations-client.d.ts +4 -4
- package/associations-client.js +3 -10
- package/attribution-types.d.ts +3 -3
- package/brand-most-sampled-types.d.ts +4 -4
- package/brand-types.d.ts +6 -6
- package/brands-client.d.ts +4 -4
- package/brands-client.js +9 -13
- package/browse-types.d.ts +8 -8
- package/by-colour-types.d.ts +18 -18
- package/by-spec-types.d.ts +14 -14
- package/catalog-discovery-types.d.ts +14 -14
- package/catalogue-client.d.ts +4 -4
- package/catalogue-client.js +38 -37
- package/catalogue-types.d.ts +4 -4
- package/citation-types.d.ts +4 -4
- package/client-browse.d.ts +4 -4
- package/client-browse.js +24 -25
- package/client-config.d.ts +2 -2
- package/client-exploration.d.ts +3 -3
- package/client-exploration.js +4 -6
- package/client-source-material-comments.d.ts +4 -4
- package/client-source-material-comments.js +4 -38
- package/client-vocabulary.d.ts +8 -8
- package/client-vocabulary.js +20 -30
- package/client.d.ts +11 -45
- package/client.js +143 -188
- package/codes-client.d.ts +2 -2
- package/codes-client.js +8 -8
- package/codes-types.d.ts +34 -34
- package/colour-aggregate-types.d.ts +24 -24
- package/colours-client.d.ts +2 -2
- package/colours-client.js +15 -15
- package/compare-types.d.ts +10 -10
- package/composition-client.d.ts +3 -3
- package/composition-client.js +8 -7
- package/composition-types.d.ts +12 -12
- package/coordinate-client.d.ts +2 -2
- package/coordinate-client.js +1 -13
- package/corpus-scope-types.d.ts +3 -3
- package/corpus-scope-types.js +1 -25
- package/correction-types.d.ts +10 -10
- package/demand-batch-types.d.ts +18 -18
- package/demand-types.d.ts +24 -24
- package/errors.d.ts +12 -12
- package/errors.js +53 -52
- package/exploration-types.d.ts +22 -22
- package/fan-deck-types.d.ts +6 -6
- package/http-transport.d.ts +13 -21
- package/http-transport.js +31 -28
- package/identify-types.d.ts +10 -10
- package/index.d.ts +0 -6
- package/index.js +0 -2
- package/match-rejection-types.d.ts +6 -6
- package/match-stream-types.d.ts +32 -32
- package/match-stream.d.ts +2 -2
- package/match-stream.js +55 -41
- package/match-types.d.ts +8 -8
- package/material-asset-types.d.ts +26 -26
- package/material-block-types.d.ts +6 -6
- package/material-query-plan-types.d.ts +26 -26
- package/material-resources-client.d.ts +5 -5
- package/material-resources-client.js +10 -20
- package/material-types.d.ts +12 -12
- package/ndjson.js +16 -8
- package/operations.d.ts +6 -6
- package/operations.js +9 -39
- package/package.json +1 -1
- package/palette-completion-types.d.ts +22 -22
- package/palette-search-types.d.ts +28 -28
- package/query-understanding-types.d.ts +38 -35
- package/render-assets-types.d.ts +8 -8
- package/resolve-client.d.ts +2 -2
- package/resolve-client.js +4 -6
- package/resolve-colour-types.d.ts +8 -8
- package/resolve-types.d.ts +10 -10
- package/run-types.d.ts +70 -70
- package/runs.d.ts +13 -26
- package/runs.js +77 -89
- package/samplize-catalogue-types.d.ts +18 -18
- package/samplize-colorvec.d.ts +20 -20
- package/samplize-colorvec.js +66 -42
- package/schema-resource-types.d.ts +38 -38
- package/schema-resource-types.js +5 -5
- package/search-card-types.d.ts +4 -4
- package/search-collapse-types.d.ts +4 -4
- package/search-mood-types.d.ts +2 -2
- package/search-refinement-types.d.ts +8 -8
- package/search-request-types.d.ts +5 -5
- package/search-response-receipt-types.d.ts +58 -42
- package/search-response-types.d.ts +2 -2
- package/search-result-validation.d.ts +3 -3
- package/search-result-validation.js +53 -36
- package/search-window-types.d.ts +2 -2
- package/slot-pool-types.d.ts +20 -20
- package/source-material-validation.d.ts +3 -3
- package/source-material-validation.js +35 -39
- package/spec-facet-types.d.ts +10 -10
- package/spec-types.d.ts +6 -6
- package/specifications.d.ts +9 -25
- package/specifications.js +15 -21
- package/sse.d.ts +2 -2
- package/sse.js +32 -16
- package/substitute-types.d.ts +22 -22
- package/suggest-types.d.ts +7 -7
- package/suggest-types.js +3 -3
- package/taxonomy-coverage-types.d.ts +8 -8
- package/types.d.ts +119 -119
- package/validation.d.ts +26 -26
- package/validation.js +97 -92
- package/webmcp.d.ts +2 -2
- package/webmcp.generated.js +94 -93
- package/project-types.d.ts +0 -79
- package/project-types.js +0 -9
- package/projects.d.ts +0 -13
- package/projects.js +0 -46
- package/run-events.d.ts +0 -106
- package/run-events.js +0 -32
- package/schedule-reference-types.d.ts +0 -46
- package/schedule-reference-types.js +0 -1
- package/schedule-references-client.d.ts +0 -14
- package/schedule-references-client.js +0 -26
- package/schedule-types.d.ts +0 -261
- package/schedule-types.js +0 -1
package/suggest-types.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type SuggestKind = "product" | "brand" | "category";
|
|
|
18
18
|
/** How the query met the suggestion's label. Strongest first. */
|
|
19
19
|
export type SuggestMatch = "prefix" | "word" | "contains" | "fuzzy";
|
|
20
20
|
/** One ranked typeahead suggestion, carrying the identity it resolves to. */
|
|
21
|
-
export
|
|
21
|
+
export type Suggestion = {
|
|
22
22
|
kind: SuggestKind;
|
|
23
23
|
/** The entity's name as written, for display. */
|
|
24
24
|
label: string;
|
|
@@ -38,25 +38,25 @@ export interface Suggestion {
|
|
|
38
38
|
variantId: string | null;
|
|
39
39
|
/** Variants behind this entity IN MATERIALGRAPH — a coverage figure. */
|
|
40
40
|
variantCount: number;
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
/** The suggest response: the query as interpreted, plus the ranked suggestions. */
|
|
43
|
-
export
|
|
43
|
+
export type SuggestResponse = {
|
|
44
44
|
/** The normalised query the corpus was matched against. */
|
|
45
45
|
query: string;
|
|
46
46
|
/** Ranked best-match-first. Empty when nothing came close — a miss, not an error. */
|
|
47
47
|
suggestions: Suggestion[];
|
|
48
48
|
/** Present only when a narrowing governed corpus was applied. */
|
|
49
49
|
corpusScope?: CorpusScopeReceipt;
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
/** Options for {@link MaterialGraphClient.suggest}. */
|
|
52
|
-
export
|
|
52
|
+
export type SuggestOptions = {
|
|
53
53
|
/** How many suggestions to return (1–20, default 8). */
|
|
54
54
|
limit?: number;
|
|
55
55
|
/** Restrict to these kinds. Omit for all of them. */
|
|
56
56
|
kind?: SuggestKind | SuggestKind[];
|
|
57
57
|
/** Governed corpus membership; absent means the whole graph. */
|
|
58
58
|
corpusScope?: CorpusScope;
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
/**
|
|
61
61
|
* Shape the query string for a suggest call.
|
|
62
62
|
*
|
|
@@ -65,7 +65,7 @@ export interface SuggestOptions {
|
|
|
65
65
|
* here rather than being sent as repeated `?kind=` pairs the route would ignore.
|
|
66
66
|
* Undefined members are dropped by the transport.
|
|
67
67
|
*/
|
|
68
|
-
export declare
|
|
68
|
+
export declare const suggestQuery: (q: string, options?: SuggestOptions) => {
|
|
69
69
|
q: string;
|
|
70
70
|
limit?: number;
|
|
71
71
|
kind?: string;
|
package/suggest-types.js
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* here rather than being sent as repeated `?kind=` pairs the route would ignore.
|
|
21
21
|
* Undefined members are dropped by the transport.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export const suggestQuery = (q, options) => {
|
|
24
24
|
const kind = Array.isArray(options?.kind)
|
|
25
25
|
? options.kind.join(",")
|
|
26
26
|
: options?.kind;
|
|
27
|
-
return {
|
|
28
|
-
}
|
|
27
|
+
return { corpusScope: options?.corpusScope, kind, limit: options?.limit, q };
|
|
28
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Exact, source-path-grained status coverage for primary product typing. */
|
|
2
|
-
export
|
|
2
|
+
export type ProductTypeStatusCoverageCounts = {
|
|
3
3
|
variants: number;
|
|
4
4
|
accepted: number;
|
|
5
5
|
proposed: number;
|
|
@@ -8,13 +8,13 @@ export interface ProductTypeStatusCoverageCounts {
|
|
|
8
8
|
proposedUnknownConfidence: number;
|
|
9
9
|
otherStatus: number;
|
|
10
10
|
missingPrimary: number;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
11
|
+
};
|
|
12
|
+
export type ProductTypeStatusCoverageSourcePath = {
|
|
13
13
|
/** Complete stored source path; null means the product retained no path. */
|
|
14
14
|
sourcePath: string | null;
|
|
15
|
-
}
|
|
15
|
+
} & ProductTypeStatusCoverageCounts;
|
|
16
16
|
/** Current primary-assignment coverage, never an inferred acceptance decision. */
|
|
17
|
-
export
|
|
17
|
+
export type ProductTypeStatusCoverage = {
|
|
18
18
|
computedAt: string;
|
|
19
19
|
basis: {
|
|
20
20
|
count: "exact";
|
|
@@ -26,9 +26,9 @@ export interface ProductTypeStatusCoverage {
|
|
|
26
26
|
};
|
|
27
27
|
totals: ProductTypeStatusCoverageCounts;
|
|
28
28
|
sourcePaths: ProductTypeStatusCoverageSourcePath[];
|
|
29
|
-
}
|
|
30
|
-
export
|
|
29
|
+
};
|
|
30
|
+
export type ProductTypeCoverageOptions = {
|
|
31
31
|
[key: string]: number | undefined;
|
|
32
32
|
/** Reporting cutoff in [0,1], default 0.85; it never accepts a proposal. */
|
|
33
33
|
comparisonThreshold?: number;
|
|
34
|
-
}
|
|
34
|
+
};
|