@instruments/materialgraph 0.29.0 → 0.31.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/brands-client.d.ts +1 -1
- package/by-colour-types.d.ts +4 -4
- package/catalogue-client.d.ts +3 -3
- package/catalogue-client.js +3 -3
- package/catalogue-types.d.ts +1 -1
- package/client-vocabulary.d.ts +3 -5
- package/client-vocabulary.js +9 -6
- package/client.d.ts +85 -174
- package/client.js +98 -211
- package/colour-region-types.d.ts +18 -0
- package/colours-client.d.ts +10 -83
- package/colours-client.js +1 -85
- package/errors.d.ts +1 -1
- package/errors.js +1 -0
- package/find-companions-types.d.ts +70 -0
- package/find-companions-types.js +12 -0
- package/find-variants-by-colour-types.d.ts +197 -0
- package/find-variants-by-vector-types.d.ts +67 -0
- package/find-variants-by-vector-types.js +5 -0
- package/get-variant-types.d.ts +50 -0
- package/get-variant-types.js +10 -0
- package/http-transport.d.ts +1 -1
- package/identifiers.d.ts +1 -1
- package/identifiers.js +1 -1
- package/image-reference-types.d.ts +18 -0
- package/index.d.ts +9 -7
- package/index.js +1 -1
- package/list-enum-values-types.d.ts +58 -0
- package/list-variants-types.d.ts +6 -2
- package/material-asset-types.d.ts +2 -2
- package/material-types.d.ts +13 -151
- package/operations.d.ts +1 -1
- package/operations.js +27 -88
- package/package.json +1 -1
- package/palette-search-types.d.ts +3 -49
- package/resolve-colour-types.d.ts +5 -5
- package/resolve-variant-types.d.ts +75 -0
- package/{identify-types.js → resolve-variant-types.js} +2 -2
- package/response-schemas.generated.d.ts +1 -1
- package/response-schemas.generated.js +46 -84
- package/run-types.d.ts +23 -216
- package/runs.d.ts +10 -58
- package/runs.js +19 -106
- package/schema-resource-types.d.ts +2 -139
- package/schema-resource-types.js +0 -8
- package/search-card-types.d.ts +1 -1
- package/search-index-plan-types.d.ts +6 -2
- package/search-request-types.d.ts +10 -2
- package/spec-types.d.ts +4 -4
- package/spec-types.js +2 -2
- package/specifications.d.ts +1 -9
- package/specifications.js +0 -12
- package/sse.d.ts +2 -2
- package/sse.js +2 -2
- package/types.d.ts +4 -38
- package/validation.d.ts +0 -74
- package/validation.js +2 -116
- package/webmcp.generated.js +9 -9
- package/workflows-client.d.ts +54 -0
- package/workflows-client.js +41 -0
- package/client-source-material-comments.d.ts +0 -51
- package/client-source-material-comments.js +0 -6
- package/codes-client.d.ts +0 -118
- package/codes-client.js +0 -99
- package/codes-types.d.ts +0 -325
- package/colour-aggregate-types.d.ts +0 -163
- package/coordinate-client.d.ts +0 -23
- package/coordinate-client.js +0 -13
- package/demand-batch-types.d.ts +0 -118
- package/demand-types.d.ts +0 -154
- package/identify-types.d.ts +0 -82
- package/material-composition-client.d.ts +0 -21
- package/material-composition-client.js +0 -13
- package/material-composition-types.d.ts +0 -403
- package/material-composition-types.js +0 -1
- package/source-material-validation.d.ts +0 -7
- package/source-material-validation.js +0 -214
- package/spec-facet-types.d.ts +0 -48
- package/spec-facet-types.js +0 -7
- package/substitute-types.d.ts +0 -102
- package/substitute-types.js +0 -1
- package/suggest-types.d.ts +0 -67
- package/suggest-types.js +0 -28
- package/taxonomy-coverage-types.d.ts +0 -34
- package/taxonomy-coverage-types.js +0 -1
- /package/{codes-types.js → colour-region-types.js} +0 -0
- /package/{colour-aggregate-types.js → find-variants-by-colour-types.js} +0 -0
- /package/{demand-batch-types.js → image-reference-types.js} +0 -0
- /package/{demand-types.js → list-enum-values-types.js} +0 -0
|
@@ -28,7 +28,7 @@ export type ResolveColourCatalogueVariant = {
|
|
|
28
28
|
inScope: boolean | null;
|
|
29
29
|
/**
|
|
30
30
|
* True when the stored brand is Samplize, a sampling channel, and the listing
|
|
31
|
-
* is not Samplize's own: the colour is another
|
|
31
|
+
* is not Samplize's own: the colour is another brand's, so `brand` is not who
|
|
32
32
|
* made it. The variant is still the right one for the name.
|
|
33
33
|
*/
|
|
34
34
|
parentageSuspect: boolean;
|
|
@@ -37,7 +37,7 @@ export type ResolveColourCatalogueVariant = {
|
|
|
37
37
|
* Whether the named paint is a variant in the catalogue. Exact, global, and
|
|
38
38
|
* never narrowed by `corpusScope`, and run only for a `brand` library hit.
|
|
39
39
|
* `not-in-catalogue` means the catalogue was searched and nothing carries the
|
|
40
|
-
* paint; `not-looked-up` means there was no one
|
|
40
|
+
* paint; `not-looked-up` means there was no one brand's paint to search for.
|
|
41
41
|
*/
|
|
42
42
|
export type ResolveColourVariant = ({
|
|
43
43
|
status: "matched";
|
|
@@ -62,17 +62,17 @@ export type ResolveColourResponse = {
|
|
|
62
62
|
libraryName: string;
|
|
63
63
|
code?: string;
|
|
64
64
|
}[];
|
|
65
|
-
/** Generic meaning;
|
|
65
|
+
/** Generic meaning; brand-specific paint identity is carried by match. */
|
|
66
66
|
genericResolution: ColorResolution;
|
|
67
67
|
match: {
|
|
68
68
|
matchTarget: MatchTarget;
|
|
69
69
|
hex: string;
|
|
70
70
|
name: string;
|
|
71
71
|
code?: string;
|
|
72
|
-
/** The ColorScope library the colour resolved in. Not necessarily a
|
|
72
|
+
/** The ColorScope library the colour resolved in. Not necessarily a brand. */
|
|
73
73
|
libraryId?: string;
|
|
74
74
|
/**
|
|
75
|
-
* The library's own type: `brand` is a
|
|
75
|
+
* The library's own type: `brand` is a brand's paint, `reference` a colour
|
|
76
76
|
* standard (RAL, Pantone, HKS), `core` ColorScope's descriptive vocabulary.
|
|
77
77
|
* Present exactly when `libraryId` is. Only a `brand` hit is looked up.
|
|
78
78
|
*/
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public wire types for `POST /api/v1/variants/resolve` (MG-1672's
|
|
3
|
+
* `resolve_variant` contract).
|
|
4
|
+
*
|
|
5
|
+
* These intentionally mirror the domain-owned Zod contract
|
|
6
|
+
* (`@materialgraph/products/identify-contract`) rather than importing it: the
|
|
7
|
+
* published SDK must carry no workspace package dependency.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What `mg.resolveVariant()` accepts. Give `url` alone, or `code` with
|
|
11
|
+
* `brandId` (from `mg.brands()`) when there is no page to read. `labels` are
|
|
12
|
+
* product names visible on the page, sent only to tell several URL candidates
|
|
13
|
+
* apart - they never widen a search or invent an identity on their own.
|
|
14
|
+
*/
|
|
15
|
+
export type ResolveVariantInput = {
|
|
16
|
+
url?: string;
|
|
17
|
+
code?: string;
|
|
18
|
+
brandId?: string;
|
|
19
|
+
labels?: string[];
|
|
20
|
+
};
|
|
21
|
+
/** One identified, placed or bounded-candidate subject. */
|
|
22
|
+
export type ResolveVariantSubject = {
|
|
23
|
+
kind: "variant" | "brand";
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
code?: string;
|
|
27
|
+
brand?: {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** What stood behind an outcome. Exact and scoreless: never a similarity guess. */
|
|
33
|
+
export type ResolveVariantEvidence = {
|
|
34
|
+
kind: "brand-url" | "brand-homepage" | "brand-code" | "visible-label";
|
|
35
|
+
url?: string;
|
|
36
|
+
detail: string;
|
|
37
|
+
};
|
|
38
|
+
/** The submitted URL, normalised, and the steps that normalisation took. Absent for a code-only call. */
|
|
39
|
+
export type ResolveVariantReceipt = {
|
|
40
|
+
submittedUrl: string;
|
|
41
|
+
normalizedUrl: string;
|
|
42
|
+
normalizationSteps: string[];
|
|
43
|
+
};
|
|
44
|
+
type ResolveVariantOutputBase = {
|
|
45
|
+
evidence: ResolveVariantEvidence[];
|
|
46
|
+
receipt?: ResolveVariantReceipt;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Why nothing was resolved. Absent and empty differ: this names what was
|
|
50
|
+
* looked for and not found, never a similarity guess.
|
|
51
|
+
*/
|
|
52
|
+
export type ResolveVariantUnresolvedReason = "no-stored-url" | "no-code-match";
|
|
53
|
+
/**
|
|
54
|
+
* What `mg.resolveVariant()` returns: the `resolve_variant` tool's own output,
|
|
55
|
+
* unwrapped. Exact identities only - no rung carries a similarity score.
|
|
56
|
+
*/
|
|
57
|
+
export type ResolveVariantOutput = (ResolveVariantOutputBase & {
|
|
58
|
+
outcome: "identified";
|
|
59
|
+
subject: ResolveVariantSubject & {
|
|
60
|
+
kind: "variant";
|
|
61
|
+
};
|
|
62
|
+
}) | (ResolveVariantOutputBase & {
|
|
63
|
+
outcome: "placed";
|
|
64
|
+
subject: ResolveVariantSubject & {
|
|
65
|
+
kind: "brand";
|
|
66
|
+
};
|
|
67
|
+
}) | (ResolveVariantOutputBase & {
|
|
68
|
+
outcome: "ambiguous";
|
|
69
|
+
candidates: ResolveVariantSubject[];
|
|
70
|
+
truncated: boolean;
|
|
71
|
+
}) | (ResolveVariantOutputBase & {
|
|
72
|
+
outcome: "unresolved";
|
|
73
|
+
reason: ResolveVariantUnresolvedReason;
|
|
74
|
+
});
|
|
75
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public wire types for `POST /api/v1/
|
|
3
|
-
* contract).
|
|
2
|
+
* Public wire types for `POST /api/v1/variants/resolve` (MG-1672's
|
|
3
|
+
* `resolve_variant` contract).
|
|
4
4
|
*
|
|
5
5
|
* These intentionally mirror the domain-owned Zod contract
|
|
6
6
|
* (`@materialgraph/products/identify-contract`) rather than importing it: the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The API contract version the schemas were generated from. */
|
|
2
2
|
export declare const RESPONSE_SCHEMA_API_VERSION = "0.7.0";
|
|
3
3
|
/** Every SDK operation whose success response has a published JSON Schema. */
|
|
4
|
-
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["samplize_colorvec_cache", "samplize_catalogue_search", "list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "search_materials_post", "
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["samplize_colorvec_cache", "samplize_catalogue_search", "list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "search_materials_post", "match_material", "plan_material_query", "samplize_catalogue_products", "search_materials_get", "search_by_colour", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "list_schema_value_dictionaries", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "find_variants_by_colour", "find_variants_by_vector", "find_companions", "resolve_variant", "get_variant", "resolve_colour_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "search_by_palette", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run", "get_verdict_citation"];
|
|
5
5
|
export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;
|