@instruments/materialgraph 0.26.0 → 0.27.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 +18 -7
- package/attribution-types.d.ts +2 -2
- package/brand-types.d.ts +8 -0
- package/brands-client.d.ts +5 -36
- package/brands-client.js +7 -33
- package/by-colour-types.d.ts +40 -13
- package/by-spec-types.d.ts +0 -67
- package/by-spec-types.js +7 -5
- package/catalog-discovery-types.d.ts +1 -16
- package/catalogue-client.d.ts +12 -31
- package/catalogue-client.js +10 -46
- package/catalogue-types.d.ts +40 -0
- package/categories-client.d.ts +63 -0
- package/categories-client.js +48 -0
- package/category-types.d.ts +114 -0
- package/client-config.d.ts +2 -4
- package/client-config.js +2 -4
- package/client-vocabulary.d.ts +2 -4
- package/client-vocabulary.js +11 -9
- package/client.d.ts +103 -203
- package/client.js +126 -251
- package/codes-types.d.ts +21 -0
- package/colours-client.d.ts +4 -9
- package/colours-client.js +0 -8
- package/errors.d.ts +1 -1
- package/errors.js +1 -0
- package/identify-types.d.ts +49 -39
- package/identify-types.js +5 -3
- package/index.d.ts +11 -21
- package/index.js +4 -4
- package/list-variant-facets-types.d.ts +60 -0
- package/list-variants-types.d.ts +142 -0
- package/list-variants-types.js +12 -0
- package/match-stream-types.d.ts +13 -0
- package/match-stream-types.js +2 -0
- package/match-stream.js +12 -8
- package/match-types.d.ts +24 -0
- package/material-asset-types.d.ts +69 -49
- package/material-block-types.d.ts +2 -0
- package/material-composition-client.d.ts +21 -0
- package/material-composition-client.js +13 -0
- package/material-composition-types.d.ts +403 -0
- package/material-query-plan-types.d.ts +57 -141
- package/material-resources-client.d.ts +9 -7
- package/material-resources-client.js +19 -4
- package/material-types.d.ts +6 -14
- package/operations.d.ts +1 -1
- package/operations.js +20 -117
- package/package.json +5 -1
- package/palette-search-types.d.ts +59 -24
- package/query-understanding-types.d.ts +27 -5
- package/resolve-client.d.ts +6 -10
- package/resolve-client.js +5 -7
- package/response-schemas.d.ts +20 -0
- package/response-schemas.generated.d.ts +5 -0
- package/response-schemas.generated.js +160 -0
- package/response-schemas.js +113 -0
- package/run-types.d.ts +12 -93
- package/runs.d.ts +1 -37
- package/runs.js +2 -79
- package/schema-resource-types.d.ts +14 -1
- package/search-card-types.d.ts +22 -0
- package/search-index-plan-types.d.ts +70 -0
- package/search-refinement-types.d.ts +8 -38
- package/search-refinement-types.js +1 -0
- package/search-request-types.d.ts +117 -200
- package/search-response-receipt-types.d.ts +12 -268
- package/search-result-validation.d.ts +0 -16
- package/search-result-validation.js +22 -180
- package/spec-facet-types.d.ts +3 -8
- package/spec-types.d.ts +17 -10
- package/spec-types.js +8 -7
- package/specifications.d.ts +13 -55
- package/specifications.js +29 -73
- package/suggest-types.d.ts +4 -10
- package/suggest-types.js +1 -1
- package/types.d.ts +135 -338
- package/webmcp.d.ts +1 -1
- package/webmcp.generated.js +10 -94
- package/brand-most-sampled-types.d.ts +0 -33
- package/browse-types.d.ts +0 -236
- package/client-browse.d.ts +0 -78
- package/client-browse.js +0 -71
- package/client-exploration.d.ts +0 -9
- package/client-exploration.js +0 -5
- package/compare-types.d.ts +0 -89
- package/composition-client.d.ts +0 -33
- package/composition-client.js +0 -28
- package/composition-types.d.ts +0 -455
- package/composition-types.js +0 -10
- package/correction-types.d.ts +0 -88
- package/exploration-types.d.ts +0 -118
- package/exploration-types.js +0 -1
- package/fan-deck-types.d.ts +0 -42
- package/fan-deck-types.js +0 -9
- package/match-rejection-types.d.ts +0 -43
- package/match-rejection-types.js +0 -7
- package/palette-completion-types.d.ts +0 -115
- package/palette-completion-types.js +0 -1
- package/render-assets-types.d.ts +0 -65
- package/render-assets-types.js +0 -1
- package/search-collapse-types.d.ts +0 -69
- package/search-collapse-types.js +0 -1
- package/search-mood-types.d.ts +0 -6
- package/search-mood-types.js +0 -1
- package/search-window-types.d.ts +0 -25
- package/search-window-types.js +0 -1
- package/slot-pool-types.d.ts +0 -372
- package/slot-pool-types.js +0 -1
- /package/{brand-most-sampled-types.js → category-types.js} +0 -0
- /package/{browse-types.js → list-variant-facets-types.js} +0 -0
- /package/{compare-types.js → material-composition-types.js} +0 -0
- /package/{correction-types.js → search-index-plan-types.js} +0 -0
|
@@ -1,154 +1,70 @@
|
|
|
1
1
|
/** Hand-mirrored wire types for `POST /api/v1/search/plan`. */
|
|
2
|
-
import type { QuerySense } from "./query-understanding-types.js";
|
|
3
|
-
import type { ResolvedMeaning } from "./resolve-types.js";
|
|
4
|
-
import type { SearchInput } from "./search-request-types.js";
|
|
5
2
|
import type { OpenEnum } from "./types.js";
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
start: number;
|
|
9
|
-
end: number;
|
|
10
|
-
text: string;
|
|
11
|
-
};
|
|
12
|
-
export type MaterialQueryOwner = {
|
|
3
|
+
/** One wanted value: hard filters the page, soft only orders it. */
|
|
4
|
+
export type MaterialQueryWant = {
|
|
13
5
|
attributeId: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
introducedIn?: string;
|
|
19
|
-
deprecatedIn?: string;
|
|
20
|
-
supersededBy?: string;
|
|
6
|
+
terms: string[];
|
|
7
|
+
phrase: string;
|
|
8
|
+
strength: OpenEnum<"hard" | "soft">;
|
|
9
|
+
fill: number;
|
|
21
10
|
};
|
|
22
|
-
export type
|
|
23
|
-
description: string;
|
|
24
|
-
valueKind: string;
|
|
25
|
-
valueDictionaryId?: string;
|
|
26
|
-
} | {
|
|
27
|
-
dictionaryId: string;
|
|
28
|
-
dictionaryName: string;
|
|
29
|
-
owningAttributes: {
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
}[];
|
|
33
|
-
lifecycle: MaterialQueryLifecycle;
|
|
34
|
-
} | {
|
|
11
|
+
export type MaterialQueryExclusion = {
|
|
35
12
|
attributeId: string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
description: string;
|
|
39
|
-
lifecycle: MaterialQueryLifecycle;
|
|
40
|
-
parentProductTypeGroupId?: string;
|
|
41
|
-
} | {
|
|
42
|
-
description: string;
|
|
43
|
-
};
|
|
44
|
-
export type MaterialQueryApplicability = {
|
|
45
|
-
status: OpenEnum<"all" | "some" | "none" | "unknown">;
|
|
46
|
-
categoryId?: string;
|
|
47
|
-
productTypeIds: string[];
|
|
48
|
-
applicableProductTypeIds: string[];
|
|
13
|
+
term: string;
|
|
14
|
+
phrase: string;
|
|
49
15
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
coverage?: MaterialQueryCoverage;
|
|
77
|
-
reachability?: MaterialQueryReachability;
|
|
78
|
-
reason?: string;
|
|
16
|
+
/** The dictionary reading of one query, as the index search runs it. */
|
|
17
|
+
export type MaterialQueryReading = {
|
|
18
|
+
normalised: string;
|
|
19
|
+
category: {
|
|
20
|
+
productTypeIds: string[];
|
|
21
|
+
label: string;
|
|
22
|
+
phrase: string;
|
|
23
|
+
} | null;
|
|
24
|
+
brands: {
|
|
25
|
+
ids: string[];
|
|
26
|
+
names: string[];
|
|
27
|
+
phrase: string;
|
|
28
|
+
} | null;
|
|
29
|
+
wants: MaterialQueryWant[];
|
|
30
|
+
excludes: MaterialQueryExclusion[];
|
|
31
|
+
excludeBrands: string[];
|
|
32
|
+
colour: {
|
|
33
|
+
phrase: string;
|
|
34
|
+
familyId: string;
|
|
35
|
+
hex: string;
|
|
36
|
+
oklab: [number, number, number];
|
|
37
|
+
family12: string[];
|
|
38
|
+
} | null;
|
|
39
|
+
vendorColourNames: string[];
|
|
40
|
+
leftover: string[];
|
|
41
|
+
softAlone: boolean;
|
|
79
42
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
name: string;
|
|
89
|
-
};
|
|
90
|
-
ownerAlternatives: MaterialQueryOwner[];
|
|
91
|
-
operator: OpenEnum<"term" | "presence" | "numeric_range">;
|
|
92
|
-
term?: string;
|
|
93
|
-
min?: number;
|
|
94
|
-
max?: number;
|
|
95
|
-
coverage: MaterialQueryCoverage;
|
|
96
|
-
applicability: MaterialQueryApplicability;
|
|
97
|
-
reachability?: MaterialQueryReachability;
|
|
43
|
+
/** Present when a word no material carries was corrected: showing results for `to`. */
|
|
44
|
+
export type MaterialQueryCorrection = {
|
|
45
|
+
from: string;
|
|
46
|
+
to: string;
|
|
47
|
+
words: {
|
|
48
|
+
word: string;
|
|
49
|
+
correction: string;
|
|
50
|
+
}[];
|
|
98
51
|
};
|
|
99
|
-
|
|
100
|
-
export type
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
subjectId: string;
|
|
106
|
-
label: string;
|
|
107
|
-
} | {
|
|
108
|
-
kind: OpenEnum<"standard_meaning">;
|
|
109
|
-
meaning: MaterialQueryStandardMeaning;
|
|
52
|
+
/** One search over the index. */
|
|
53
|
+
export type MaterialSearchRequest = {
|
|
54
|
+
text: string;
|
|
55
|
+
view?: OpenEnum<"card" | "full">;
|
|
56
|
+
limit?: number;
|
|
57
|
+
cursor?: string;
|
|
110
58
|
};
|
|
111
59
|
export type MaterialQueryPlan = {
|
|
112
|
-
version: OpenEnum<"
|
|
113
|
-
verdict: OpenEnum<"executable" | "partial" | "refused">;
|
|
60
|
+
version: OpenEnum<"2">;
|
|
114
61
|
rawQuery: string;
|
|
115
62
|
normalisedQuery: string;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
name: string;
|
|
124
|
-
level: OpenEnum<"group" | "type">;
|
|
125
|
-
parentKey: string | null;
|
|
126
|
-
source: {
|
|
127
|
-
subjectType: MaterialQueryVocabularyKind;
|
|
128
|
-
subjectId: string;
|
|
129
|
-
span: MaterialQuerySpan;
|
|
130
|
-
};
|
|
131
|
-
} | null;
|
|
132
|
-
criteria: MaterialQueryCriterion[];
|
|
133
|
-
colour: {
|
|
134
|
-
family?: string;
|
|
135
|
-
undertone?: string;
|
|
136
|
-
} | null;
|
|
137
|
-
residualText: string;
|
|
138
|
-
unspentSpans: (MaterialQuerySpan & {
|
|
139
|
-
reason: OpenEnum<"residual" | "ambiguous" | "refused">;
|
|
140
|
-
})[];
|
|
141
|
-
ambiguities: {
|
|
142
|
-
subjectType: MaterialQueryVocabularyKind;
|
|
143
|
-
subjectId: string;
|
|
144
|
-
span: MaterialQuerySpan;
|
|
145
|
-
reason: string;
|
|
146
|
-
alternatives: MaterialQueryAmbiguityAlternative[];
|
|
147
|
-
}[];
|
|
148
|
-
standardMeanings: {
|
|
149
|
-
span: MaterialQuerySpan;
|
|
150
|
-
meanings: MaterialQueryStandardMeaning[];
|
|
151
|
-
}[];
|
|
152
|
-
/** Complete ordinary-search requests authored by MaterialGraph. Execute verbatim. */
|
|
153
|
-
requests: SearchInput[];
|
|
63
|
+
readingVersion: string;
|
|
64
|
+
source: OpenEnum<"dictionary" | "jev">;
|
|
65
|
+
cached: boolean;
|
|
66
|
+
plan: MaterialQueryReading;
|
|
67
|
+
correction: MaterialQueryCorrection | null;
|
|
68
|
+
/** The one search to run, in the phrasing that was read. */
|
|
69
|
+
requests: MaterialSearchRequest[];
|
|
154
70
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
/** Material blocks,
|
|
1
|
+
/** Material blocks, a variant's assets, and technical documents over one shared transport. */
|
|
2
2
|
import type { HttpTransport } from "./http-transport.js";
|
|
3
3
|
import type { VariantId } from "./identifiers.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ListVariantAssetsOptions, MaterialDocumentPage, MaterialDocumentPageOptions, VariantAssetPage } from "./material-asset-types.js";
|
|
5
5
|
import type { MaterialBlockProjection } from "./material-block-types.js";
|
|
6
|
-
import type { MaterialRenderAssets } from "./render-assets-types.js";
|
|
7
6
|
/** Read known and explicitly unobserved canonical material fields. */
|
|
8
7
|
export declare const materialBlocks: (transport: HttpTransport, variantId: VariantId, signal?: AbortSignal) => Promise<MaterialBlockProjection>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Read one bounded, filtered, cursor-paged page of a variant's images and
|
|
10
|
+
* files. `imageRoles` narrows only images and `documentTypes` narrows only
|
|
11
|
+
* documents, each implying its own kind; the server refuses either paired
|
|
12
|
+
* with other kinds, or with each other, rather than silently widening.
|
|
13
|
+
*/
|
|
14
|
+
export declare const listVariantAssets: (transport: HttpTransport, variantId: VariantId, options?: ListVariantAssetsOptions, signal?: AbortSignal) => Promise<VariantAssetPage>;
|
|
13
15
|
/**
|
|
14
16
|
* Read the owning Product's URL-deduplicated document page. Variant declarations
|
|
15
17
|
* retain exact attribution; consumers inspect `appliesToRequestedVariant`
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import { resolveOperation } from "./operations.js";
|
|
2
2
|
/** Read known and explicitly unobserved canonical material fields. */
|
|
3
3
|
export const materialBlocks = async (transport, variantId, signal) => await transport.requestJson(resolveOperation("list_material_blocks"), { pathParams: { variantId }, signal });
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Read one bounded, filtered, cursor-paged page of a variant's images and
|
|
6
|
+
* files. `imageRoles` narrows only images and `documentTypes` narrows only
|
|
7
|
+
* documents, each implying its own kind; the server refuses either paired
|
|
8
|
+
* with other kinds, or with each other, rather than silently widening.
|
|
9
|
+
*/
|
|
10
|
+
export const listVariantAssets = async (transport, variantId, options, signal) => await transport.requestJson(resolveOperation("list_variant_assets"), {
|
|
11
|
+
pathParams: { variantId },
|
|
12
|
+
query: options
|
|
13
|
+
? {
|
|
14
|
+
cursor: options.cursor,
|
|
15
|
+
documentTypes: options.documentTypes?.join(","),
|
|
16
|
+
imageRoles: options.imageRoles?.join(","),
|
|
17
|
+
kinds: options.kinds?.join(","),
|
|
18
|
+
limit: options.limit,
|
|
19
|
+
}
|
|
20
|
+
: undefined,
|
|
21
|
+
signal,
|
|
22
|
+
});
|
|
8
23
|
/**
|
|
9
24
|
* Read the owning Product's URL-deduplicated document page. Variant declarations
|
|
10
25
|
* retain exact attribution; consumers inspect `appliesToRequestedVariant`
|
package/material-types.d.ts
CHANGED
|
@@ -78,19 +78,6 @@ export type MaterialTile = {
|
|
|
78
78
|
*/
|
|
79
79
|
colourName?: string;
|
|
80
80
|
};
|
|
81
|
-
/**
|
|
82
|
-
* A sibling card: the tile, plus — when another variant of the same product
|
|
83
|
-
* shares both its `variantName` and its `colourName` — the one attribute that
|
|
84
|
-
* tells them apart (MG-1857: IndoTeak's Reclaimed Teak is ten "Unfinished"
|
|
85
|
-
* variants that differ only by product code). Declared size first, then product
|
|
86
|
-
* code. The two fields arrive together or not at all; absent means nothing
|
|
87
|
-
* collides, or neither attribute separates every look-alike.
|
|
88
|
-
*/
|
|
89
|
-
export type SiblingTile = {
|
|
90
|
-
distinguishedBy?: OpenEnum<"size" | "code">;
|
|
91
|
-
/** This sibling's value of `distinguishedBy`, e.g. `"3.5 in"`. */
|
|
92
|
-
distinction?: string;
|
|
93
|
-
} & MaterialTile;
|
|
94
81
|
/**
|
|
95
82
|
* A canonical attribute/term pair carried on a detail record.
|
|
96
83
|
*
|
|
@@ -154,8 +141,13 @@ export interface MaterialDetail extends MaterialTile {
|
|
|
154
141
|
/** Opaque — the product family; siblings share it. */
|
|
155
142
|
productId: ProductId;
|
|
156
143
|
color: string | null;
|
|
157
|
-
/**
|
|
144
|
+
/** The variant's Material Bank SKU. Null means none is recorded, not unknown. */
|
|
158
145
|
materialBankId: string | null;
|
|
146
|
+
/**
|
|
147
|
+
* The manufacturer's own item code from `variants.code`, the same key search
|
|
148
|
+
* results carry. ABSENT means no code is recorded, never an invented one.
|
|
149
|
+
*/
|
|
150
|
+
manufacturerCode?: string;
|
|
159
151
|
/**
|
|
160
152
|
* Explicit source-governed permission to save this exact source-coded variant
|
|
161
153
|
* to a Project. Absent means unknown/not allowed; never infer it from identity.
|
package/operations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.7.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [readonly ["
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["samplizeColorVecCache", "GET", "/api/v1/catalogues/samplize/colorvec", "samplize_colorvec_cache"], readonly ["samplizeCatalogueSearch", "POST", "/api/v1/catalogues/samplize/search", "samplize_catalogue_search"], 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 ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["identify", "POST", "/api/v1/identify", "retrieval.identify"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueCollections", "GET", "/api/v1/catalogues/collections", "list_catalogue_channel_collections"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_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 ["compositionReport", "GET", "/api/v1/composition/report", "get_composition_report"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], 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 ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["listAttributes", "GET", "/api/v1/catalog/attributes", "catalog_list_attributes"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["categories.list", "GET", "/api/v1/categories", "list_categories"], readonly ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"], readonly ["productTypeCoverage", "GET", "/api/v1/taxonomy/coverage", "get_product_type_status_coverage"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments.list", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments.post", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
|
|
3
3
|
export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
|
|
4
4
|
export type SdkOperation = Readonly<{
|
|
5
5
|
clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
|
package/operations.js
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
import { MaterialGraphError } from "./errors.js";
|
|
2
2
|
export const MATERIALGRAPH_API_VERSION = "0.7.0";
|
|
3
3
|
const OPERATION_DEFINITIONS = [
|
|
4
|
-
[
|
|
5
|
-
"brandMostSampled",
|
|
6
|
-
"GET",
|
|
7
|
-
"/api/v1/brands/most-sampled",
|
|
8
|
-
"brands.most_sampled",
|
|
9
|
-
],
|
|
10
|
-
[
|
|
11
|
-
"colours.complete",
|
|
12
|
-
"POST",
|
|
13
|
-
"/api/v1/colours/palettes/complete",
|
|
14
|
-
"complete_interior_palette",
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"colours.discover",
|
|
18
|
-
"GET",
|
|
19
|
-
"/api/v1/colours/palettes",
|
|
20
|
-
"discover_interior_palettes",
|
|
21
|
-
],
|
|
22
4
|
[
|
|
23
5
|
"samplizeColorVecCache",
|
|
24
6
|
"GET",
|
|
@@ -52,15 +34,10 @@ const OPERATION_DEFINITIONS = [
|
|
|
52
34
|
],
|
|
53
35
|
["search", "POST", "/api/v1/search", "search_materials_post"],
|
|
54
36
|
["identify", "POST", "/api/v1/identify", "retrieval.identify"],
|
|
55
|
-
["
|
|
56
|
-
["
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
"GET",
|
|
60
|
-
"/api/v1/corrections/{correctionId}",
|
|
61
|
-
"corrections.get",
|
|
62
|
-
],
|
|
63
|
-
["listCorrections", "GET", "/api/v1/corrections", "corrections.list"],
|
|
37
|
+
["match", "POST", "/api/v1/search/match", "match_material"],
|
|
38
|
+
["suggest", "GET", "/api/v1/search/suggest", "search_suggest"],
|
|
39
|
+
["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"],
|
|
40
|
+
["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"],
|
|
64
41
|
["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"],
|
|
65
42
|
[
|
|
66
43
|
"samplizeCatalogue",
|
|
@@ -69,19 +46,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
69
46
|
"samplize_catalogue_products",
|
|
70
47
|
],
|
|
71
48
|
["searchGet", "GET", "/api/v1/search", "search_materials_get"],
|
|
72
|
-
["match", "POST", "/api/v1/search/match", "match_material"],
|
|
73
|
-
[
|
|
74
|
-
"rejectMatchResult",
|
|
75
|
-
"POST",
|
|
76
|
-
"/api/v1/search/match/{responseId}/rejections",
|
|
77
|
-
"reject_match_result",
|
|
78
|
-
],
|
|
79
|
-
[
|
|
80
|
-
"matchRejections",
|
|
81
|
-
"GET",
|
|
82
|
-
"/api/v1/search/match/{responseId}/rejections",
|
|
83
|
-
"list_match_rejections",
|
|
84
|
-
],
|
|
85
49
|
["byColour", "GET", "/api/v1/search/colours", "search_by_colour"],
|
|
86
50
|
["material", "GET", "/api/v1/materials/{variantId}", "get_material"],
|
|
87
51
|
[
|
|
@@ -102,12 +66,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
102
66
|
"/api/v1/catalogues/documents/{documentId}",
|
|
103
67
|
"get_catalogue_document_access",
|
|
104
68
|
],
|
|
105
|
-
[
|
|
106
|
-
"siblings",
|
|
107
|
-
"GET",
|
|
108
|
-
"/api/v1/materials/{variantId}/siblings",
|
|
109
|
-
"get_material_siblings",
|
|
110
|
-
],
|
|
111
69
|
[
|
|
112
70
|
"materialBlocks",
|
|
113
71
|
"GET",
|
|
@@ -115,16 +73,10 @@ const OPERATION_DEFINITIONS = [
|
|
|
115
73
|
"list_material_blocks",
|
|
116
74
|
],
|
|
117
75
|
[
|
|
118
|
-
"
|
|
76
|
+
"listVariantAssets",
|
|
119
77
|
"GET",
|
|
120
|
-
"/api/v1/
|
|
121
|
-
"
|
|
122
|
-
],
|
|
123
|
-
[
|
|
124
|
-
"materialRenderAssets",
|
|
125
|
-
"GET",
|
|
126
|
-
"/api/v1/materials/{variantId}/render-assets",
|
|
127
|
-
"get_material_render_assets",
|
|
78
|
+
"/api/v1/variants/{variantId}/assets",
|
|
79
|
+
"list_variant_assets",
|
|
128
80
|
],
|
|
129
81
|
[
|
|
130
82
|
"materialDocuments",
|
|
@@ -133,16 +85,10 @@ const OPERATION_DEFINITIONS = [
|
|
|
133
85
|
"list_material_documents",
|
|
134
86
|
],
|
|
135
87
|
[
|
|
136
|
-
"
|
|
88
|
+
"compositionReport",
|
|
137
89
|
"GET",
|
|
138
|
-
"/api/v1/
|
|
139
|
-
"
|
|
140
|
-
],
|
|
141
|
-
[
|
|
142
|
-
"exploration.candidates",
|
|
143
|
-
"POST",
|
|
144
|
-
"/api/v1/materials/{variantId}/candidates",
|
|
145
|
-
"read_material_candidates",
|
|
90
|
+
"/api/v1/composition/report",
|
|
91
|
+
"get_composition_report",
|
|
146
92
|
],
|
|
147
93
|
["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"],
|
|
148
94
|
["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"],
|
|
@@ -179,12 +125,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
179
125
|
"/api/v1/materials/{variantId}/pairings",
|
|
180
126
|
"get_material_pairings",
|
|
181
127
|
],
|
|
182
|
-
[
|
|
183
|
-
"findSubstitutes",
|
|
184
|
-
"POST",
|
|
185
|
-
"/api/v1/materials/{variantId}/substitutes",
|
|
186
|
-
"find_material_substitutes",
|
|
187
|
-
],
|
|
188
128
|
[
|
|
189
129
|
"associatedFinishes",
|
|
190
130
|
"GET",
|
|
@@ -198,22 +138,19 @@ const OPERATION_DEFINITIONS = [
|
|
|
198
138
|
"list_associated_products",
|
|
199
139
|
],
|
|
200
140
|
["applicability", "GET", "/api/v1/applicability", "get_applicability"],
|
|
201
|
-
["
|
|
141
|
+
["listVariants", "GET", "/api/v1/variants", "list_variants"],
|
|
202
142
|
[
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"/api/v1/
|
|
206
|
-
"
|
|
143
|
+
"listVariantFacets",
|
|
144
|
+
"POST",
|
|
145
|
+
"/api/v1/variants/facets",
|
|
146
|
+
"list_variant_facets",
|
|
207
147
|
],
|
|
208
|
-
["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"],
|
|
209
|
-
["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"],
|
|
210
148
|
[
|
|
211
149
|
"colours.profiles",
|
|
212
150
|
"GET",
|
|
213
151
|
"/api/v1/colours/profiles",
|
|
214
152
|
"get_category_colour_profiles",
|
|
215
153
|
],
|
|
216
|
-
["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"],
|
|
217
154
|
[
|
|
218
155
|
"resolveColour",
|
|
219
156
|
"GET",
|
|
@@ -226,18 +163,11 @@ const OPERATION_DEFINITIONS = [
|
|
|
226
163
|
"/api/v1/search/colours/suggest",
|
|
227
164
|
"suggest_colour_names",
|
|
228
165
|
],
|
|
229
|
-
["suggest", "GET", "/api/v1/search/suggest", "search_suggest"],
|
|
230
|
-
[
|
|
231
|
-
"resolveAttribute",
|
|
232
|
-
"GET",
|
|
233
|
-
"/api/v1/catalog/attributes/resolve",
|
|
234
|
-
"catalog_resolve_attribute",
|
|
235
|
-
],
|
|
236
166
|
[
|
|
237
|
-
"
|
|
167
|
+
"listAttributes",
|
|
238
168
|
"GET",
|
|
239
|
-
"/api/v1/catalog/attributes
|
|
240
|
-
"
|
|
169
|
+
"/api/v1/catalog/attributes",
|
|
170
|
+
"catalog_list_attributes",
|
|
241
171
|
],
|
|
242
172
|
[
|
|
243
173
|
"searchVocabulary",
|
|
@@ -246,8 +176,8 @@ const OPERATION_DEFINITIONS = [
|
|
|
246
176
|
"catalog_vocabulary_search",
|
|
247
177
|
],
|
|
248
178
|
["resolve", "POST", "/api/v1/resolve", "resolve_phrases"],
|
|
249
|
-
["
|
|
250
|
-
["
|
|
179
|
+
["categories.list", "GET", "/api/v1/categories", "list_categories"],
|
|
180
|
+
["categories.get", "GET", "/api/v1/categories/{id}", "get_category"],
|
|
251
181
|
[
|
|
252
182
|
"productTypeCoverage",
|
|
253
183
|
"GET",
|
|
@@ -255,7 +185,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
255
185
|
"get_product_type_status_coverage",
|
|
256
186
|
],
|
|
257
187
|
["whoami", "GET", "/api/v1/whoami", "whoami"],
|
|
258
|
-
["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"],
|
|
259
188
|
["demand", "GET", "/api/v1/demand", "get_material_demand"],
|
|
260
189
|
["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"],
|
|
261
190
|
[
|
|
@@ -276,27 +205,7 @@ const OPERATION_DEFINITIONS = [
|
|
|
276
205
|
"/api/v1/catalog/specifications/facets",
|
|
277
206
|
"list_spec_facets",
|
|
278
207
|
],
|
|
279
|
-
[
|
|
280
|
-
"attributeValues",
|
|
281
|
-
"GET",
|
|
282
|
-
"/api/v1/catalog/attributes/{attributeId}/values",
|
|
283
|
-
"list_attribute_values",
|
|
284
|
-
],
|
|
285
|
-
[
|
|
286
|
-
"applicableSpecs",
|
|
287
|
-
"GET",
|
|
288
|
-
"/api/v1/taxonomy/categories/{key}/specs",
|
|
289
|
-
"get_applicable_specs",
|
|
290
|
-
],
|
|
291
|
-
["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"],
|
|
292
208
|
["brands", "GET", "/api/v1/brands", "list_brands"],
|
|
293
|
-
["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"],
|
|
294
|
-
[
|
|
295
|
-
"brandColourDeck",
|
|
296
|
-
"GET",
|
|
297
|
-
"/api/v1/brands/{brandSlug}/colours",
|
|
298
|
-
"brand_colour_deck",
|
|
299
|
-
],
|
|
300
209
|
[
|
|
301
210
|
"uploadSourceMaterial",
|
|
302
211
|
"POST",
|
|
@@ -321,9 +230,7 @@ const OPERATION_DEFINITIONS = [
|
|
|
321
230
|
"/api/v1/source-material/{batchId}/sources/{sourceId}/comments",
|
|
322
231
|
"post_source_material_comment",
|
|
323
232
|
],
|
|
324
|
-
["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"],
|
|
325
233
|
["createRun", "POST", "/api/v1/runs", "create_public_run"],
|
|
326
|
-
["listRuns", "GET", "/api/v1/runs", "list_public_runs"],
|
|
327
234
|
["run", "GET", "/api/v1/runs/{runId}", "get_public_run"],
|
|
328
235
|
["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"],
|
|
329
236
|
[
|
|
@@ -332,10 +239,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
332
239
|
"/api/v1/runs/{runId}/events",
|
|
333
240
|
"list_public_run_events",
|
|
334
241
|
],
|
|
335
|
-
["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"],
|
|
336
|
-
["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"],
|
|
337
|
-
["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"],
|
|
338
|
-
["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"],
|
|
339
242
|
["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"],
|
|
340
243
|
["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"],
|
|
341
244
|
["codes.context", "GET", "/api/v1/codes/context", "list_code_context"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instruments/materialgraph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"./samplize-colorvec": {
|
|
15
15
|
"types": "./samplize-colorvec.d.ts",
|
|
16
16
|
"import": "./samplize-colorvec.js"
|
|
17
|
+
},
|
|
18
|
+
"./response-schemas": {
|
|
19
|
+
"types": "./response-schemas.d.ts",
|
|
20
|
+
"import": "./response-schemas.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"dependencies": {
|