@instruments/materialgraph 0.46.0 → 1.0.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 +2 -2
- package/brand-types.d.ts +3 -3
- package/brands-client.d.ts +3 -3
- package/brands-client.js +3 -3
- package/{catalogue-client.d.ts → catalog-client.d.ts} +13 -13
- package/{catalogue-client.js → catalog-client.js} +13 -13
- package/{catalogue-types.d.ts → catalog-types.d.ts} +42 -42
- package/client-response-schema.js +1 -1
- package/client-vocabulary.js +1 -1
- package/client.d.ts +13 -12
- package/client.js +16 -14
- package/color-profiles-types.d.ts +1 -1
- package/colors-client.d.ts +6 -6
- package/colors-client.js +3 -3
- package/find-sampled-together-types.d.ts +2 -2
- package/find-variants-by-color-types.d.ts +6 -6
- package/find-variants-by-vector-types.d.ts +5 -5
- package/get-variant-types.d.ts +26 -0
- package/identifiers.d.ts +1 -1
- package/image-reference-types.d.ts +2 -2
- package/index.d.ts +4 -4
- package/list-variant-facets-types.d.ts +2 -2
- package/list-variants-types.d.ts +5 -5
- package/material-asset-types.d.ts +1 -1
- package/operation-responses.d.ts +8 -8
- package/operations.generated.d.ts +1 -1
- package/operations.generated.js +14 -14
- package/package.json +1 -1
- package/resolve-color-types.d.ts +13 -13
- package/resolve-variant-types.d.ts +1 -1
- package/response-schemas.generated.d.ts +2 -2
- package/response-schemas.generated.js +43 -42
- package/response-schemas.js +20 -20
- package/runs.js +1 -1
- package/{samplize-catalogue-types.d.ts → samplize-catalog-types.d.ts} +5 -5
- package/samplize-colorvec.d.ts +1 -1
- package/samplize-colorvec.js +2 -2
- package/{search-catalogue-subset-types.d.ts → search-catalog-subset-types.d.ts} +5 -5
- package/search-variants-types.d.ts +4 -4
- package/types.d.ts +6 -6
- package/webmcp.generated.js +4 -4
- /package/{catalogue-types.js → catalog-types.js} +0 -0
- /package/{samplize-catalogue-types.js → samplize-catalog-types.js} +0 -0
- /package/{search-catalogue-subset-types.js → search-catalog-subset-types.js} +0 -0
package/colors-client.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { JsonOperationId, OperationResponses } from "./operation-responses.
|
|
|
11
11
|
* The namespace holds no transport of its own: the client hands it a bound
|
|
12
12
|
* `get`, so auth, rate-limit accounting and error shaping stay in one place.
|
|
13
13
|
*
|
|
14
|
-
* `profiles` is an aggregate
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* `profiles` is an aggregate over a category. It is counted live at request
|
|
15
|
+
* time from `resolved_variant_bands`, the dominant color of each searchable
|
|
16
|
+
* variant, so it is as current as the last write to a variant.
|
|
17
17
|
*
|
|
18
18
|
* ROUTING OUT OF THIS NAMESPACE. Color is a lens, and this is not the only
|
|
19
19
|
* door into it:
|
|
@@ -35,7 +35,7 @@ export type ColorsTransport = {
|
|
|
35
35
|
export declare class ColorsClient {
|
|
36
36
|
#private;
|
|
37
37
|
constructor(transport: ColorsTransport);
|
|
38
|
-
/** Nearest Samplize
|
|
38
|
+
/** Nearest Samplize catalog paints for up to twelve hexes, deduplicated in input order. */
|
|
39
39
|
nearestPaints(params: NearestPaintsParams, signal?: AbortSignal): Promise<NearestPaintsOutput>;
|
|
40
40
|
/**
|
|
41
41
|
* THE QUESTION: "what colors does this CATEGORY come in?" - the
|
|
@@ -44,8 +44,8 @@ export declare class ColorsClient {
|
|
|
44
44
|
*
|
|
45
45
|
* An aggregate over a category, not a list of materials: use
|
|
46
46
|
* `mg.findVariantsByColor()` or `mg.searchVariants()` when you want the
|
|
47
|
-
* materials themselves.
|
|
48
|
-
*
|
|
47
|
+
* materials themselves. The counts are read live at
|
|
48
|
+
* request time from `resolved_variant_bands`, so they do not lag the catalog.
|
|
49
49
|
*
|
|
50
50
|
* `groupBy: "group"` takes product-type GROUP keys and merges every leaf type
|
|
51
51
|
* under a group into one histogram BEFORE ranking - a group's palette, not
|
package/colors-client.js
CHANGED
|
@@ -3,7 +3,7 @@ export class ColorsClient {
|
|
|
3
3
|
constructor(transport) {
|
|
4
4
|
this.#transport = transport;
|
|
5
5
|
}
|
|
6
|
-
/** Nearest Samplize
|
|
6
|
+
/** Nearest Samplize catalog paints for up to twelve hexes, deduplicated in input order. */
|
|
7
7
|
async nearestPaints(params, signal) {
|
|
8
8
|
return await this.#transport.get("find_nearest_paints", { hex: params.hexes, limit: params.limit }, signal);
|
|
9
9
|
}
|
|
@@ -14,8 +14,8 @@ export class ColorsClient {
|
|
|
14
14
|
*
|
|
15
15
|
* An aggregate over a category, not a list of materials: use
|
|
16
16
|
* `mg.findVariantsByColor()` or `mg.searchVariants()` when you want the
|
|
17
|
-
* materials themselves.
|
|
18
|
-
*
|
|
17
|
+
* materials themselves. The counts are read live at
|
|
18
|
+
* request time from `resolved_variant_bands`, so they do not lag the catalog.
|
|
19
19
|
*
|
|
20
20
|
* `groupBy: "group"` takes product-type GROUP keys and merges every leaf type
|
|
21
21
|
* under a group into one histogram BEFORE ranking - a group's palette, not
|
|
@@ -65,8 +65,8 @@ export type FindSampledTogetherOutput = {
|
|
|
65
65
|
variantId: string;
|
|
66
66
|
variantName: string | null;
|
|
67
67
|
}[];
|
|
68
|
-
/** Seed ids outside the materials
|
|
69
|
-
|
|
68
|
+
/** Seed ids outside the materials catalog; present only when at least one was. */
|
|
69
|
+
excludedBySearchCatalogSubset?: string[];
|
|
70
70
|
/** References that matched no variant. */
|
|
71
71
|
unresolved: string[];
|
|
72
72
|
};
|
|
@@ -12,7 +12,7 @@ import type { ImageReferenceInput } from "./image-reference-types.js";
|
|
|
12
12
|
* are copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
13
13
|
* mirror honest against the server types.
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { SearchCatalogSubset, SearchCatalogSubsetReceipt } from "./search-catalog-subset-types.js";
|
|
16
16
|
export type FindVariantsByColorMode = "contains" | "palette" | "rerank";
|
|
17
17
|
/** One color condition. `role` defaults to `required`; every other field defaults to absent/false/0. */
|
|
18
18
|
export type ColorConditionInput = {
|
|
@@ -33,7 +33,7 @@ export type FindVariantsByColorInput = {
|
|
|
33
33
|
colors?: ColorConditionInput[];
|
|
34
34
|
/** Material Bank category IDs or exact source paths, including descendants against actual memberships. Materials and decking only. */
|
|
35
35
|
categoryIds?: string[];
|
|
36
|
-
|
|
36
|
+
searchCatalogSubset?: SearchCatalogSubset;
|
|
37
37
|
cursor?: string;
|
|
38
38
|
/** Palette only: targets from this image's colors, not `colors[]`. */
|
|
39
39
|
image?: ImageReferenceInput;
|
|
@@ -67,7 +67,7 @@ export type PaintCatalogVariant = {
|
|
|
67
67
|
variantName: string | null;
|
|
68
68
|
};
|
|
69
69
|
export type ResolvedColor = {
|
|
70
|
-
|
|
70
|
+
catalogVariant: PaintCatalogVariant | null;
|
|
71
71
|
hex: string;
|
|
72
72
|
index: number;
|
|
73
73
|
/** `region`: a named meaning's own OKLCh bounds, kept — never collapsed to one hex. */
|
|
@@ -194,9 +194,9 @@ export type CompareColorSimilarityReference = {
|
|
|
194
194
|
};
|
|
195
195
|
export type FindVariantsByColorRerankResult = {
|
|
196
196
|
/** Present ONLY when the request narrowed it. ABSENT means the whole graph. */
|
|
197
|
-
|
|
198
|
-
/** Real variant ids outside `
|
|
199
|
-
|
|
197
|
+
searchCatalogSubset?: SearchCatalogSubsetReceipt;
|
|
198
|
+
/** Real variant ids outside `searchCatalogSubset` or the materials catalog. Present when a scope narrowed or any was excluded. */
|
|
199
|
+
excludedBySearchCatalogSubset?: string[];
|
|
200
200
|
/** Candidates ranked by ascending color distance; unembedded ones last. */
|
|
201
201
|
matches: ColorRankMatch[];
|
|
202
202
|
mode: "rerank";
|
|
@@ -9,7 +9,7 @@ import type { PaintCatalogVariant } from "./find-variants-by-color-types.js";
|
|
|
9
9
|
*/
|
|
10
10
|
import type { ImageReferenceInput } from "./image-reference-types.js";
|
|
11
11
|
import type { FilterGroups, VariantCard } from "./list-variants-types.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type { SearchCatalogSubset } from "./search-catalog-subset-types.js";
|
|
13
13
|
export declare const FIND_VARIANTS_BY_VECTOR_MODES: readonly ["text", "image", "text_and_image"];
|
|
14
14
|
export type FindVariantsByVectorMode = (typeof FIND_VARIANTS_BY_VECTOR_MODES)[number];
|
|
15
15
|
export type FindVariantsByVectorQuery = {
|
|
@@ -29,7 +29,7 @@ export type FindVariantsByVectorInput = {
|
|
|
29
29
|
limit?: number;
|
|
30
30
|
query: FindVariantsByVectorQuery;
|
|
31
31
|
/** Only this corpus scope. Absent or all: every variant. */
|
|
32
|
-
|
|
32
|
+
searchCatalogSubset?: SearchCatalogSubset;
|
|
33
33
|
};
|
|
34
34
|
export type FindVariantsByVectorItem = Omit<VariantCard, "materialBankId"> & {
|
|
35
35
|
/** The variant's Material Bank SKU; null means none is recorded. Always present here, unlike `list_variants`' optional field. */
|
|
@@ -57,13 +57,13 @@ export type FindVariantsByVectorTimings = {
|
|
|
57
57
|
verifyMs: number;
|
|
58
58
|
};
|
|
59
59
|
export type FindVariantsByVectorOutput = {
|
|
60
|
-
/** Explicit `{field: "variant", op: "in"}` filter ids that name a real variant outside the materials
|
|
61
|
-
|
|
60
|
+
/** Explicit `{field: "variant", op: "in"}` filter ids that name a real variant outside the materials catalog — present only when at least one did. */
|
|
61
|
+
excludedBySearchCatalogSubset?: string[];
|
|
62
62
|
items: FindVariantsByVectorItem[];
|
|
63
63
|
mode: FindVariantsByVectorMode;
|
|
64
64
|
/** The image references the query used, in order. Empty in text mode. */
|
|
65
65
|
references: FindVariantsByVectorReference[];
|
|
66
|
-
/** The exact brand paint named by the text query, when held in the
|
|
66
|
+
/** The exact brand paint named by the text query, when held in the catalog. */
|
|
67
67
|
namedPaint?: PaintCatalogVariant;
|
|
68
68
|
scan: FindVariantsByVectorScan;
|
|
69
69
|
timings: FindVariantsByVectorTimings;
|
package/get-variant-types.d.ts
CHANGED
|
@@ -15,6 +15,30 @@ export type GetVariantOptions = {
|
|
|
15
15
|
attributes?: readonly string[];
|
|
16
16
|
/** Canonical block ids, returned whole, e.g. `["acoustic"]`. */
|
|
17
17
|
blocks?: readonly string[];
|
|
18
|
+
/** Add `ifc`: the IFC 4.3 manufacturer property set and classification references. */
|
|
19
|
+
ifc?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The variant as an IFC 4.3 type states it. Properties the record does not
|
|
23
|
+
* hold are left out, so an absent property is unknown.
|
|
24
|
+
*/
|
|
25
|
+
export type GetVariantIfc = {
|
|
26
|
+
propertySets: {
|
|
27
|
+
name: "Pset_ManufacturerTypeInformation";
|
|
28
|
+
properties: {
|
|
29
|
+
name: string;
|
|
30
|
+
value: string;
|
|
31
|
+
dataType: "IfcLabel" | "IfcIdentifier";
|
|
32
|
+
/** The property's bSDD URI. */
|
|
33
|
+
uri: string;
|
|
34
|
+
}[];
|
|
35
|
+
}[];
|
|
36
|
+
classificationReferences: {
|
|
37
|
+
classification: "MasterFormat" | "OmniClass" | "UniFormat";
|
|
38
|
+
identification: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
edition?: string;
|
|
41
|
+
}[];
|
|
18
42
|
};
|
|
19
43
|
/**
|
|
20
44
|
* One variant: the compact identity, and `specifications` only for the
|
|
@@ -71,6 +95,8 @@ export type GetVariantOutput = {
|
|
|
71
95
|
name: string;
|
|
72
96
|
/** Requested blocks or attributes the variant's product type does not carry. */
|
|
73
97
|
notApplicable?: ListVariantsNotApplicable;
|
|
98
|
+
/** Present when `ifc` was asked for. */
|
|
99
|
+
ifc?: GetVariantIfc;
|
|
74
100
|
product: {
|
|
75
101
|
id: string;
|
|
76
102
|
name: string;
|
package/identifiers.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export type SlotId = OpaqueId;
|
|
|
63
63
|
/**
|
|
64
64
|
* A pagination cursor. Opaque keyset state, not an offset and not a page
|
|
65
65
|
* number: pass the value you were handed back unchanged to continue, and never
|
|
66
|
-
*
|
|
66
|
+
* synthesize one. A response with no cursor is the end of the walk.
|
|
67
67
|
*
|
|
68
68
|
* A cursor is only valid for the query that produced it — changing sort,
|
|
69
69
|
* filters or limit invalidates it.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* @module image-reference-types
|
|
3
3
|
* @description The one image-reference shape the vector-discovery lenses
|
|
4
4
|
* share (`@materialgraph/search/vector-discovery/image-reference`'s
|
|
5
|
-
* `imageReferenceInputSchema`): a
|
|
5
|
+
* `imageReferenceInputSchema`): a catalog asset, an upload, a public URL,
|
|
6
6
|
* or an existing variant's own image. Exactly one field is set per call; the
|
|
7
7
|
* server refuses more than one.
|
|
8
8
|
*/
|
|
9
9
|
export type ImageReferenceInput = {
|
|
10
|
-
/**
|
|
10
|
+
/** Catalog asset id. */
|
|
11
11
|
assetId?: string;
|
|
12
12
|
/** Upload id (`smf_...`) from source-material. */
|
|
13
13
|
sourceId?: string;
|
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { FilterOp, FilterTermCondition, FilterNumericCondition, FilterPrese
|
|
|
4
4
|
export type { ListVariantFacetsInput, VariantFacetValue, CategoricalVariantFacet, BooleanVariantFacet, NumericVariantFacet, VariantFacet, ListVariantFacetsOutput, } from "./list-variant-facets-types.js";
|
|
5
5
|
export type { SearchVariantsSelection, SearchVariantsInput, SearchVariantsUnderstood, SearchVariantsReading, SearchVariantsChoice, SearchVariantsOutput, } from "./search-variants-types.js";
|
|
6
6
|
export type { ListEnumValuesOptions, EnumValueMatch, EnumValueItem, ListEnumValuesResult, } from "./list-enum-values-types.js";
|
|
7
|
-
export type { GetVariantOptions, GetVariantOutput, } from "./get-variant-types.js";
|
|
7
|
+
export type { GetVariantIfc, GetVariantOptions, GetVariantOutput, } from "./get-variant-types.js";
|
|
8
8
|
export type { ImageReferenceInput } from "./image-reference-types.js";
|
|
9
9
|
export type { SampledTogetherProjectType, FindSampledTogetherInput, FindSampledTogetherRow, FindSampledTogetherOutput, } from "./find-sampled-together-types.js";
|
|
10
10
|
export type { FindVariantsByColorMode, ColorConditionInput, FindVariantsByColorInput, ColorConditionReceipt, PaintCatalogVariant, ResolvedColor, ColorAlternative, UnresolvedColor, ColorVariantMatch, ColorPageInfo, FindVariantsByColorContainsResult, FindVariantsByColorPaletteResult, ColorRankedSeed, ColorRankMatch, ResolvedColorReference, CompareColorSimilarityReference, FindVariantsByColorRerankResult, FindVariantsByColorOutput, } from "./find-variants-by-color-types.js";
|
|
@@ -17,9 +17,9 @@ export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
|
|
|
17
17
|
export type { FileInput, UploadSourceMaterialInput, SourceMaterialReceiptFile, SourceMaterialBatchReceipt, PublicRunStatus, PublicRunFailure, PublicRunArtifactRef, PublicRun, CreatePublicRunRequest, CreatePublicRunResponse, PublicRunResponse, RunEvent, StreamRunEventsOptions, DrainRunEventsOptions, } from "./run-types.js";
|
|
18
18
|
export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
|
|
19
19
|
export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphRequestMetadata, ProblemDetail, RateLimit, SanitizedErrorValue, SanitizedIssue, SimpleErrorBody, } from "./errors.js";
|
|
20
|
-
export type { OpenEnum, JsonValue, OklabTriple, MaterialColor, ImageSource, MaterialAvailability, MaterialTile, DemandMomentum, CompanionDemand, ProjectTypeShare, CospecPairing, ColorPairing, PairingOrderMode, PairingRanking, PairingOrdering, PairingItem, PairingsResponse, AttributeMatch, AttributeListItem, OutsideScopeAttribute, ListAttributesResult, WhoamiResponse, PairingsOptions, ListAttributesOptions, ExtractedPalette, ExtractPaletteResponse, ExtractPaletteInput, ResolveValueCandidate, ValueResolution, ResolveColorOptions,
|
|
20
|
+
export type { OpenEnum, JsonValue, OklabTriple, MaterialColor, ImageSource, MaterialAvailability, MaterialTile, DemandMomentum, CompanionDemand, ProjectTypeShare, CospecPairing, ColorPairing, PairingOrderMode, PairingRanking, PairingOrdering, PairingItem, PairingsResponse, AttributeMatch, AttributeListItem, OutsideScopeAttribute, ListAttributesResult, WhoamiResponse, PairingsOptions, ListAttributesOptions, ExtractedPalette, ExtractPaletteResponse, ExtractPaletteInput, ResolveValueCandidate, ValueResolution, ResolveColorOptions, ResolveColorCatalogVariant, ResolveColorVariant, ResolveColorResponse, BySpecVerdictState, BySpecVerdictCell, BySpecVerdict, MaterialVerdict, BySpecUnresolvedCriterion, } from "./types.js";
|
|
21
21
|
export type { ResolveVariantInput, ResolveVariantSubject, ResolveVariantEvidence, ResolveVariantReceipt, ResolveVariantUnresolvedReason, ResolveVariantOutput, } from "./resolve-variant-types.js";
|
|
22
|
-
export type {
|
|
22
|
+
export type { CatalogReference, CatalogReferenceAbsenceReason, CatalogReferencePublication, CatalogReferenceResult, CatalogReferenceBatchResponse, CatalogCollectionsOptions, CatalogCollectionSampleProduct, CatalogChannelCollection, CatalogChannelCollectionsResponse, CatalogDocumentAccess, CatalogDocumentAccessResult, CatalogDocument, CatalogEdition, CatalogAvailableReceipt, CatalogFailureReceipt, UnavailableCatalogDocument, CatalogPublication, CatalogDocumentList, CatalogProductReferenceList, CatalogProductReferenceUnavailable, CatalogProductReferenceReadResult, CatalogPageRequiredArtifact, CatalogPageAvailableArtifact, CatalogPage, CatalogPageListResult, CatalogPageRepresentationReadResult, } from "./catalog-types.js";
|
|
23
23
|
export { CategoriesClient } from "./categories-client.js";
|
|
24
24
|
export type { CategoryRef, CategoryKind, CategoryMatch, CategoryItem, CategoriesPageInfo, CategoriesListInput, CategoriesListResult, CategoryConcept, CategoryProductCategory, CategoriesGetResult, } from "./category-types.js";
|
|
25
25
|
export { ColorsClient } from "./colors-client.js";
|
|
@@ -30,5 +30,5 @@ export type { BrandsOptions, BrandItem, ListBrandsPage, } from "./brand-types.js
|
|
|
30
30
|
export type { VariantAssetAvailability, VariantImageRole, VariantImagePresentation, VariantDocumentType, VariantAssetKind, VariantAssetItem, VariantDocumentCoverageState, VariantAssetPageInfo, ListVariantAssetsOptions, VariantAssetPage, MaterialDocumentStatus, MaterialDocumentCoverageState, MaterialDocumentScope, MaterialDocumentSource, MaterialDocumentProjectionItem, MaterialDocumentCoverageSource, MaterialDocumentCoverage, MaterialDocumentCoverageSummary, MaterialDocumentPageOptions, MaterialDocumentPage, } from "./material-asset-types.js";
|
|
31
31
|
export type { MaterialCoverageStatus, MaterialBlockStatus, MaterialBlockFieldStatus, MaterialBlockFieldValue, MaterialBlockProjectionField, MaterialBlockProjectionItem, MaterialBlockProjection, VariantColorPalette, } from "./material-block-types.js";
|
|
32
32
|
export type { SchemaResource, SCHEMA_RESOURCE_OPERATION_IDS, SchemaResourceRequest, SchemaLifecycle, SchemaExternalMapping, SchemaMatchStrength, SchemaValueDictionaryTerm, SchemaValueDictionaryItem, SchemaResourceItemMap, SchemaResourceResponse, } from "./schema-resource-types.js";
|
|
33
|
-
export type { SamplizePublicationSource, SamplizeLrvObservation, SamplizeDemand, SamplizeCollectionMembership,
|
|
33
|
+
export type { SamplizePublicationSource, SamplizeLrvObservation, SamplizeDemand, SamplizeCollectionMembership, SamplizeCatalogOptions, SamplizeCatalogPage, SamplizeCatalogProduct, SamplizeHexObservation, } from "./samplize-catalog-types.js";
|
|
34
34
|
export type { NearestPaintsParams, NearestPaintCard, NearestPaintsHexResult, NearestPaintsOutput, } from "./nearest-paints-types.js";
|
|
@@ -8,13 +8,13 @@ import type { FilterGroups } from "./list-variants-types.js";
|
|
|
8
8
|
* dependency on `@materialgraph/search`, so the shapes are copied here and
|
|
9
9
|
* `contract-parity.test.ts` keeps them honest.
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
11
|
+
import type { SearchCatalogSubset } from "./search-catalog-subset-types.js";
|
|
12
12
|
export type ListVariantFacetsInput = {
|
|
13
13
|
/** 1–10 facetable attribute ids, or `brand`. Find attribute ids with `listAttributes()`. */
|
|
14
14
|
attributeIds: string[];
|
|
15
15
|
/** The same kind-grouped filter tree `listVariants()` takes. */
|
|
16
16
|
/** Count only this corpus scope; absent or `all` counts every variant. */
|
|
17
|
-
|
|
17
|
+
searchCatalogSubset?: SearchCatalogSubset;
|
|
18
18
|
filters?: FilterGroups;
|
|
19
19
|
/** Top values per categorical or boolean facet, 1–50. Defaults to 10. */
|
|
20
20
|
valuesPerFacet?: number;
|
package/list-variants-types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
10
10
|
* mirror honest against the server types.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { SearchCatalogSubset } from "./search-catalog-subset-types.js";
|
|
13
13
|
export type FilterOp = "in" | "not_in" | "all" | "exists" | "missing" | "eq" | "gt" | "gte" | "lt" | "lte";
|
|
14
14
|
export type FilterTermCondition = {
|
|
15
15
|
field: string;
|
|
@@ -132,7 +132,7 @@ export type ListVariantsInput = {
|
|
|
132
132
|
* Only variants in this corpus scope: the rows, the page and the cursor.
|
|
133
133
|
* Absent or `all` is every variant.
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
searchCatalogSubset?: SearchCatalogSubset;
|
|
136
136
|
cursor?: string;
|
|
137
137
|
/** Every condition, across `terms`/`numbers`/`presence`/`anyField`, must match. */
|
|
138
138
|
filters?: FilterGroups;
|
|
@@ -232,8 +232,8 @@ export type VariantCard = Omit<ListVariantsItem, "materialBankId"> & {
|
|
|
232
232
|
materialBankId?: string | null;
|
|
233
233
|
};
|
|
234
234
|
export type ListVariantsOutput = {
|
|
235
|
-
/** Explicit `{field: "variant", op: "in"}` ids that name a real variant outside the materials
|
|
236
|
-
|
|
235
|
+
/** Explicit `{field: "variant", op: "in"}` ids that name a real variant outside the materials catalog. Present only when at least one did. */
|
|
236
|
+
excludedBySearchCatalogSubset?: string[];
|
|
237
237
|
items: ListVariantsItem[];
|
|
238
238
|
/** Present only when a `name` lookup's first page was empty: each name word, and whether a name in scope starts it. The lookup left out the unmatched words and looked again, unless every word or none matched. */
|
|
239
239
|
nameWords?: {
|
|
@@ -246,7 +246,7 @@ export type ListVariantsOutput = {
|
|
|
246
246
|
};
|
|
247
247
|
/** False: nothing from this page on meets any `optionalFilters` entry. Absent when not measured. */
|
|
248
248
|
preferenceMatchesRemain?: boolean;
|
|
249
|
-
/** Explicit `{field: "variant", op: "in"}` ids that name a variant in the materials
|
|
249
|
+
/** Explicit `{field: "variant", op: "in"}` ids that name a variant in the materials catalog that this list cannot show in the requested `searchCatalogSubset`: retired, not orderable, or outside the scope. Read one with `getVariant`. Present only when at least one did. */
|
|
250
250
|
unavailableVariantIds?: string[];
|
|
251
251
|
/** Explicit `{field: "variant", op: "in"}` ids anywhere in `filters.terms` that name no variant at all. */
|
|
252
252
|
unresolvedVariantIds?: string[];
|
|
@@ -21,7 +21,7 @@ export type VariantImageRole = OpenEnum<"product" | "swatch" | "detail" | "scene
|
|
|
21
21
|
/** How an image must be framed, a different question from what it shows. */
|
|
22
22
|
export type VariantImagePresentation = OpenEnum<"edge_to_edge" | "packshot" | "cutout_margin" | "montage" | "unknown">;
|
|
23
23
|
/** What a document is for; a document can carry more than one purpose. */
|
|
24
|
-
export type VariantDocumentType = OpenEnum<"technical_data_sheet" | "product_sheet" | "technical_bulletin" | "sustainability_report" | "specification" | "installation_guide" | "care_maintenance_guide" | "operation_manual" | "warranty" | "parts_list" | "technical_drawing" | "test_report" | "certificate" | "declaration_of_performance" | "environmental_product_declaration" | "health_product_declaration" | "ingredient_disclosure" | "safety_data_sheet" | "brochure" | "
|
|
24
|
+
export type VariantDocumentType = OpenEnum<"technical_data_sheet" | "product_sheet" | "technical_bulletin" | "sustainability_report" | "specification" | "installation_guide" | "care_maintenance_guide" | "operation_manual" | "warranty" | "parts_list" | "technical_drawing" | "test_report" | "certificate" | "declaration_of_performance" | "environmental_product_declaration" | "health_product_declaration" | "ingredient_disclosure" | "safety_data_sheet" | "brochure" | "catalog" | "color_finish_chart" | "other" | "unknown">;
|
|
25
25
|
/** Every asset kind the registry knows. */
|
|
26
26
|
export type VariantAssetKind = OpenEnum<"image" | "document" | "cad" | "bim" | "model_3d" | "texture" | "archive" | "other" | "unknown">;
|
|
27
27
|
/**
|
package/operation-responses.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Response types belong to operation ids, never a caller-selected generic. */
|
|
2
2
|
import type { ApplicabilityResponse, DeclaredAssociationsResponse } from "./association-types.js";
|
|
3
3
|
import type { ListBrandsPage } from "./brand-types.js";
|
|
4
|
-
import type { CatalogDocumentList, CatalogPageListResult, CatalogProductReferenceReadResult,
|
|
4
|
+
import type { CatalogDocumentList, CatalogPageListResult, CatalogProductReferenceReadResult, CatalogChannelCollectionsResponse, CatalogDocumentAccessResult, CatalogPageRepresentationReadResult, CatalogReferenceBatchResponse } from "./catalog-types.js";
|
|
5
5
|
import type { CategoriesGetResult, CategoriesListResult } from "./category-types.js";
|
|
6
6
|
import type { CategoryColorProfilesResponse } from "./color-profiles-types.js";
|
|
7
7
|
import type { FindSampledTogetherOutput } from "./find-sampled-together-types.js";
|
|
@@ -16,13 +16,13 @@ import type { MaterialBlockProjection } from "./material-block-types.js";
|
|
|
16
16
|
import type { NearestPaintsOutput } from "./nearest-paints-types.js";
|
|
17
17
|
import type { ResolveVariantOutput } from "./resolve-variant-types.js";
|
|
18
18
|
import type { CreatePublicRunResponse, PublicRunResponse, SourceMaterialBatchReceipt } from "./run-types.js";
|
|
19
|
-
import type {
|
|
19
|
+
import type { SamplizeCatalogPage } from "./samplize-catalog-types.js";
|
|
20
20
|
import type { SchemaResourceResponse } from "./schema-resource-types.js";
|
|
21
21
|
import type { SearchVariantsOutput } from "./search-variants-types.js";
|
|
22
22
|
import type { ExtractPaletteResponse, ListAttributesResult, PairingsResponse, ResolveColorResponse, WhoamiResponse } from "./types.js";
|
|
23
23
|
export type OperationResponses = {
|
|
24
24
|
find_nearest_paints: NearestPaintsOutput;
|
|
25
|
-
|
|
25
|
+
get_catalog_generation: {
|
|
26
26
|
generation: number;
|
|
27
27
|
};
|
|
28
28
|
catalog_list_attributes: ListAttributesResult;
|
|
@@ -33,9 +33,9 @@ export type OperationResponses = {
|
|
|
33
33
|
find_variants_by_color: FindVariantsByColorOutput;
|
|
34
34
|
find_variants_by_vector: FindVariantsByVectorOutput;
|
|
35
35
|
get_applicability: ApplicabilityResponse;
|
|
36
|
-
get_catalog_page_representation:
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
get_catalog_page_representation: CatalogPageRepresentationReadResult;
|
|
37
|
+
get_catalog_document_access: CatalogDocumentAccessResult;
|
|
38
|
+
get_catalog_references_batch: CatalogReferenceBatchResponse;
|
|
39
39
|
get_category: CategoriesGetResult;
|
|
40
40
|
get_category_color_profiles: CategoryColorProfilesResponse;
|
|
41
41
|
get_material_pairings: PairingsResponse;
|
|
@@ -47,7 +47,7 @@ export type OperationResponses = {
|
|
|
47
47
|
list_catalog_documents: CatalogDocumentList;
|
|
48
48
|
list_catalog_pages: CatalogPageListResult;
|
|
49
49
|
list_catalog_product_references: CatalogProductReferenceReadResult;
|
|
50
|
-
|
|
50
|
+
list_catalog_channel_collections: CatalogChannelCollectionsResponse;
|
|
51
51
|
list_categories: CategoriesListResult;
|
|
52
52
|
list_material_blocks: MaterialBlockProjection;
|
|
53
53
|
list_material_documents: MaterialDocumentPage;
|
|
@@ -57,7 +57,7 @@ export type OperationResponses = {
|
|
|
57
57
|
list_variants: ListVariantsOutput;
|
|
58
58
|
resolve_color_name: ResolveColorResponse;
|
|
59
59
|
resolve_variant: ResolveVariantOutput;
|
|
60
|
-
|
|
60
|
+
samplize_catalog_products: SamplizeCatalogPage;
|
|
61
61
|
search_variants: SearchVariantsOutput;
|
|
62
62
|
upload_source_material: SourceMaterialBatchReceipt;
|
|
63
63
|
whoami: WhoamiResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.8.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [readonly ["colors.nearestPaints", "GET", "/api/v1/colors/nearest-paints", "find_nearest_paints"], readonly ["
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["colors.nearestPaints", "GET", "/api/v1/colors/nearest-paints", "find_nearest_paints"], readonly ["getCatalogGeneration", "GET", "/api/v1/catalog/generation", "get_catalog_generation"], 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 ["samplizeCatalog", "GET", "/api/v1/catalogs/samplize/products", "samplize_catalog_products"], readonly ["catalogReferencesForVariants", "POST", "/api/v1/catalogs/references", "get_catalog_references_batch"], readonly ["catalogCollections", "GET", "/api/v1/catalogs/collections", "list_catalog_channel_collections"], readonly ["catalogDocumentAccess", "GET", "/api/v1/catalogs/documents/{documentId}", "get_catalog_document_access"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["listVariantAssets", "GET", "/api/v1/variants/{variantId}/assets", "list_variant_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], 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 ["listVariants", "GET", "/api/v1/variants", "list_variants"], readonly ["listVariantFacets", "POST", "/api/v1/variants/facets", "list_variant_facets"], readonly ["searchVariants", "POST", "/api/v1/variants/search", "search_variants"], readonly ["findVariantsByColor", "GET", "/api/v1/variants/by-color", "find_variants_by_color"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["findSampledTogether", "GET", "/api/v1/variants/sampled-together", "find_sampled_together"], readonly ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"], readonly ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"], readonly ["resolveColor", "GET", "/api/v1/search/colors/resolve", "resolve_color_name"], readonly ["listAttributes", "GET", "/api/v1/catalog/attributes", "catalog_list_attributes"], readonly ["listEnumValues", "GET", "/api/v1/catalog/enum-values", "catalog_list_enum_values"], readonly ["categories.list", "GET", "/api/v1/categories", "list_categories"], readonly ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["colors.profiles", "GET", "/api/v1/colors/profiles", "get_category_color_profiles"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["workflows.start", "POST", "/api/v1/workflows/{workflowId}/runs", "create_public_run"], readonly ["workflows.run", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}", "get_public_run"], readonly ["workflows.streamRunEvents", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}/events", "list_public_run_events"]];
|
|
3
3
|
export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
|
|
4
4
|
export type SdkOperation<K extends SdkOperationId = SdkOperationId> = Readonly<{
|
|
5
5
|
clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
|
package/operations.generated.js
CHANGED
|
@@ -8,10 +8,10 @@ const OPERATION_DEFINITIONS = [
|
|
|
8
8
|
"find_nearest_paints",
|
|
9
9
|
],
|
|
10
10
|
[
|
|
11
|
-
"
|
|
11
|
+
"getCatalogGeneration",
|
|
12
12
|
"GET",
|
|
13
13
|
"/api/v1/catalog/generation",
|
|
14
|
-
"
|
|
14
|
+
"get_catalog_generation",
|
|
15
15
|
],
|
|
16
16
|
["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"],
|
|
17
17
|
[
|
|
@@ -33,28 +33,28 @@ const OPERATION_DEFINITIONS = [
|
|
|
33
33
|
"list_catalog_product_references",
|
|
34
34
|
],
|
|
35
35
|
[
|
|
36
|
-
"
|
|
36
|
+
"samplizeCatalog",
|
|
37
37
|
"GET",
|
|
38
|
-
"/api/v1/
|
|
39
|
-
"
|
|
38
|
+
"/api/v1/catalogs/samplize/products",
|
|
39
|
+
"samplize_catalog_products",
|
|
40
40
|
],
|
|
41
41
|
[
|
|
42
|
-
"
|
|
42
|
+
"catalogReferencesForVariants",
|
|
43
43
|
"POST",
|
|
44
|
-
"/api/v1/
|
|
45
|
-
"
|
|
44
|
+
"/api/v1/catalogs/references",
|
|
45
|
+
"get_catalog_references_batch",
|
|
46
46
|
],
|
|
47
47
|
[
|
|
48
|
-
"
|
|
48
|
+
"catalogCollections",
|
|
49
49
|
"GET",
|
|
50
|
-
"/api/v1/
|
|
51
|
-
"
|
|
50
|
+
"/api/v1/catalogs/collections",
|
|
51
|
+
"list_catalog_channel_collections",
|
|
52
52
|
],
|
|
53
53
|
[
|
|
54
|
-
"
|
|
54
|
+
"catalogDocumentAccess",
|
|
55
55
|
"GET",
|
|
56
|
-
"/api/v1/
|
|
57
|
-
"
|
|
56
|
+
"/api/v1/catalogs/documents/{documentId}",
|
|
57
|
+
"get_catalog_document_access",
|
|
58
58
|
],
|
|
59
59
|
[
|
|
60
60
|
"materialBlocks",
|
package/package.json
CHANGED
package/resolve-color-types.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { MatchTarget } from "@materialinstruments/colorscope/match";
|
|
2
2
|
/**
|
|
3
3
|
* Color-name resolution (GET `/api/v1/search/colors/resolve`): the resolved
|
|
4
|
-
* color, and whether the named paint is a variant in the
|
|
4
|
+
* color, and whether the named paint is a variant in the catalog.
|
|
5
5
|
*/
|
|
6
6
|
import type { ColorResolution } from "@materialinstruments/colorscope/naming";
|
|
7
7
|
import type { VariantId } from "./identifiers.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { SearchCatalogSubset } from "./search-catalog-subset-types.js";
|
|
9
9
|
import type { OpenEnum } from "./types.js";
|
|
10
10
|
/** Options for `resolveColor`. */
|
|
11
11
|
export type ResolveColorOptions = {
|
|
12
12
|
/**
|
|
13
|
-
* Sets `inScope` on each
|
|
13
|
+
* Sets `inScope` on each catalog variant the lookup reports. It never
|
|
14
14
|
* narrows the lookup. Absent leaves every `inScope` null.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
searchCatalogSubset?: SearchCatalogSubset;
|
|
17
17
|
};
|
|
18
|
-
/** One
|
|
19
|
-
export type
|
|
18
|
+
/** One catalog variant carrying the named paint. */
|
|
19
|
+
export type ResolveColorCatalogVariant = {
|
|
20
20
|
variantId: VariantId;
|
|
21
21
|
/** The brand exactly as stored, suspect or not. */
|
|
22
22
|
brand: {
|
|
@@ -34,18 +34,18 @@ export type ResolveColorCatalogueVariant = {
|
|
|
34
34
|
parentageSuspect: boolean;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Whether the named paint is a variant in the
|
|
38
|
-
* never narrowed by `
|
|
39
|
-
* `not-in-
|
|
37
|
+
* Whether the named paint is a variant in the catalog. Exact, global, and
|
|
38
|
+
* never narrowed by `searchCatalogSubset`, and run only for a `brand` library hit.
|
|
39
|
+
* `not-in-catalog` means the catalog was searched and nothing carries the
|
|
40
40
|
* paint; `not-looked-up` means there was no one brand's paint to search for.
|
|
41
41
|
*/
|
|
42
42
|
export type ResolveColorVariant = ({
|
|
43
43
|
status: "matched";
|
|
44
|
-
} &
|
|
44
|
+
} & ResolveColorCatalogVariant) | {
|
|
45
45
|
status: "ambiguous";
|
|
46
|
-
candidates:
|
|
46
|
+
candidates: ResolveColorCatalogVariant[];
|
|
47
47
|
} | {
|
|
48
|
-
status: "not-in-
|
|
48
|
+
status: "not-in-catalog";
|
|
49
49
|
} | {
|
|
50
50
|
status: "not-looked-up";
|
|
51
51
|
reason: OpenEnum<"reference-color" | "descriptive-color" | "no-paint-identity" | "generic-color" | "several-paints">;
|
|
@@ -77,7 +77,7 @@ export type ResolveColorResponse = {
|
|
|
77
77
|
* Present exactly when `libraryId` is. Only a `brand` hit is looked up.
|
|
78
78
|
*/
|
|
79
79
|
libraryType?: OpenEnum<"brand" | "reference" | "core" | "consumer">;
|
|
80
|
-
/** The
|
|
80
|
+
/** The catalog lookup for the name. Absent from servers that predate it. */
|
|
81
81
|
variant?: ResolveColorVariant;
|
|
82
82
|
} | null;
|
|
83
83
|
};
|
|
@@ -35,7 +35,7 @@ export type ResolveVariantEvidence = {
|
|
|
35
35
|
url?: string;
|
|
36
36
|
detail: string;
|
|
37
37
|
};
|
|
38
|
-
/** The submitted URL,
|
|
38
|
+
/** The submitted URL, normalized, and the steps that normalization took. Absent for a code-only call. */
|
|
39
39
|
export type ResolveVariantReceipt = {
|
|
40
40
|
submittedUrl: string;
|
|
41
41
|
normalizedUrl: string;
|
|
@@ -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.8.0";
|
|
3
3
|
/** Every SDK operation whose success response has a published JSON Schema. */
|
|
4
|
-
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["find_nearest_paints", "
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["find_nearest_paints", "get_catalog_generation", "list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "samplize_catalog_products", "get_catalog_references_batch", "list_catalog_channel_collections", "get_catalog_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", "search_variants", "find_variants_by_color", "find_variants_by_vector", "find_sampled_together", "resolve_variant", "get_variant", "resolve_color_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "get_category_color_profiles", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run"];
|
|
5
|
+
export declare const RESPONSE_SCHEMA_CATALOG_JSON: string;
|