@instruments/materialgraph 1.4.0 → 2.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/client-response-schema.js +0 -1
- package/client.d.ts +1 -11
- package/client.js +1 -12
- package/http-transport.d.ts +0 -16
- package/http-transport.js +0 -73
- package/identifiers.d.ts +1 -6
- package/identifiers.js +1 -1
- package/index.d.ts +2 -3
- package/index.js +0 -1
- package/operation-responses.d.ts +1 -3
- package/operations.generated.d.ts +1 -1
- package/operations.generated.js +0 -18
- package/package.json +2 -2
- package/response-schemas.generated.d.ts +1 -1
- package/response-schemas.generated.js +29 -32
- package/response-schemas.js +1 -2
- package/source-material-types.d.ts +59 -0
- package/source-material-types.js +1 -0
- package/source-material.d.ts +8 -0
- package/source-material.js +92 -0
- package/webmcp.generated.js +4 -4
- package/run-types.d.ts +0 -161
- package/run-types.js +0 -6
- package/runs.d.ts +0 -36
- package/runs.js +0 -198
- package/sse.d.ts +0 -36
- package/sse.js +0 -167
- package/workflows-client.d.ts +0 -54
- package/workflows-client.js +0 -41
|
@@ -29,7 +29,6 @@ const openStrings = new Set([
|
|
|
29
29
|
"ProductDocumentPage.documents.declarations.status",
|
|
30
30
|
"ProductDocumentPage.documents.documentTypes",
|
|
31
31
|
"ProductDocumentPage.documents.status",
|
|
32
|
-
"PublicRun.status",
|
|
33
32
|
"ResolveColorResponse.match.libraryType",
|
|
34
33
|
"ResolveColorResponse.match.variant.reason",
|
|
35
34
|
"SchemaValueDictionariesResponse.items.lifecycle.status",
|
package/client.d.ts
CHANGED
|
@@ -16,11 +16,10 @@ import type { ListSampledTogetherPairsInput, ListSampledTogetherPairsOutput } fr
|
|
|
16
16
|
import type { ListVariantFacetsInput, ListVariantFacetsOutput } from "./list-variant-facets-types.js";
|
|
17
17
|
import type { ListVariantsInput, ListVariantsOutput } from "./list-variants-types.js";
|
|
18
18
|
import type { ListVariantAssetsOptions, MaterialDocumentPageOptions, VariantAssetPage } from "./material-asset-types.js";
|
|
19
|
-
import type { SourceMaterialBatchReceipt, UploadSourceMaterialInput } from "./run-types.js";
|
|
20
19
|
import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
|
|
21
20
|
import type { SearchVariantsInput, SearchVariantsOutput } from "./search-variants-types.js";
|
|
21
|
+
import type { SourceMaterialBatchReceipt, UploadSourceMaterialInput } from "./source-material-types.js";
|
|
22
22
|
import type { ExtractPaletteInput, ExtractPaletteResponse, ListAttributesOptions, ListAttributesResult, PairingsOptions, PairingsResponse, ResolveColorOptions, ResolveColorResponse, WhoamiResponse } from "./types.js";
|
|
23
|
-
import { WorkflowsClient } from "./workflows-client.js";
|
|
24
23
|
export { DEFAULT_BASE_URL } from "./client-config.js";
|
|
25
24
|
export type { MaterialGraphClientOptions } from "./client-config.js";
|
|
26
25
|
/**
|
|
@@ -41,7 +40,6 @@ export type { MaterialGraphClientOptions } from "./client-config.js";
|
|
|
41
40
|
* | "what does the brand say is AVAILABLE on this?" | {@link MaterialGraphClient.associatedFinishes}, {@link MaterialGraphClient.associatedProducts} |
|
|
42
41
|
* | "what can I even ask for?" | {@link MaterialGraphClient.listVariantFacets}, `categories.list()` |
|
|
43
42
|
* | "what is this word called here?" | {@link MaterialGraphClient.listAttributes} |
|
|
44
|
-
* | "do the whole job for me, async" | `workflows.start()` + `mg:compose` |
|
|
45
43
|
*
|
|
46
44
|
* Three structural rules that fall out of that table:
|
|
47
45
|
* - **Color is a separate lens.** {@link MaterialGraphClient.searchVariants}
|
|
@@ -89,14 +87,6 @@ export declare class MaterialGraphClient extends CatalogClient {
|
|
|
89
87
|
* Value Source says which.
|
|
90
88
|
*/
|
|
91
89
|
readonly colors: ColorsClient;
|
|
92
|
-
/**
|
|
93
|
-
* THE QUESTION: "do a whole job for me" — the ASYNC lens. `start()` begins a
|
|
94
|
-
* Run of one registered workflow, `run()` polls it, `streamRunEvents()` and
|
|
95
|
-
* `drainRunEvents()` follow it live. Everything else on this client answers
|
|
96
|
-
* in one round trip; a Run may suspend for human input and finish minutes
|
|
97
|
-
* later. Replaces the flat `createRun()` / `run()` family, with no shim.
|
|
98
|
-
*/
|
|
99
|
-
readonly workflows: WorkflowsClient;
|
|
100
90
|
constructor(options: MaterialGraphClientOptions);
|
|
101
91
|
get lastRateLimit(): RateLimit | null;
|
|
102
92
|
/** Registry definitions and MG's catalog admission policy. */
|
package/client.js
CHANGED
|
@@ -10,9 +10,8 @@ import { HttpTransport } from "./http-transport.js";
|
|
|
10
10
|
import { listVariantAssets as listVariantAssetsCall, materialBlocks as materialBlocksCall, materialDocuments as materialDocumentsCall, } from "./material-resources-client.js";
|
|
11
11
|
// Aliased to `operation` — the local name every call site here already used.
|
|
12
12
|
import { resolveOperation as operation } from "./operations.js";
|
|
13
|
-
import { uploadSourceMaterial } from "./runs.js";
|
|
14
13
|
import { SCHEMA_RESOURCE_OPERATION_IDS } from "./schema-resource-types.js";
|
|
15
|
-
import {
|
|
14
|
+
import { uploadSourceMaterial } from "./source-material.js";
|
|
16
15
|
// Re-exported whole so `index.ts` and every existing importer keep their path.
|
|
17
16
|
export { DEFAULT_BASE_URL } from "./client-config.js";
|
|
18
17
|
/**
|
|
@@ -33,7 +32,6 @@ export { DEFAULT_BASE_URL } from "./client-config.js";
|
|
|
33
32
|
* | "what does the brand say is AVAILABLE on this?" | {@link MaterialGraphClient.associatedFinishes}, {@link MaterialGraphClient.associatedProducts} |
|
|
34
33
|
* | "what can I even ask for?" | {@link MaterialGraphClient.listVariantFacets}, `categories.list()` |
|
|
35
34
|
* | "what is this word called here?" | {@link MaterialGraphClient.listAttributes} |
|
|
36
|
-
* | "do the whole job for me, async" | `workflows.start()` + `mg:compose` |
|
|
37
35
|
*
|
|
38
36
|
* Three structural rules that fall out of that table:
|
|
39
37
|
* - **Color is a separate lens.** {@link MaterialGraphClient.searchVariants}
|
|
@@ -80,14 +78,6 @@ export class MaterialGraphClient extends CatalogClient {
|
|
|
80
78
|
* Value Source says which.
|
|
81
79
|
*/
|
|
82
80
|
colors;
|
|
83
|
-
/**
|
|
84
|
-
* THE QUESTION: "do a whole job for me" — the ASYNC lens. `start()` begins a
|
|
85
|
-
* Run of one registered workflow, `run()` polls it, `streamRunEvents()` and
|
|
86
|
-
* `drainRunEvents()` follow it live. Everything else on this client answers
|
|
87
|
-
* in one round trip; a Run may suspend for human input and finish minutes
|
|
88
|
-
* later. Replaces the flat `createRun()` / `run()` family, with no shim.
|
|
89
|
-
*/
|
|
90
|
-
workflows;
|
|
91
81
|
#transport;
|
|
92
82
|
constructor(options) {
|
|
93
83
|
if (!options.apiKey) {
|
|
@@ -110,7 +100,6 @@ export class MaterialGraphClient extends CatalogClient {
|
|
|
110
100
|
this.colors = new ColorsClient({
|
|
111
101
|
get: async (operationId, query, signal) => await this.#get(operationId, query, signal),
|
|
112
102
|
});
|
|
113
|
-
this.workflows = new WorkflowsClient({ transport });
|
|
114
103
|
}
|
|
115
104
|
get lastRateLimit() {
|
|
116
105
|
return this.#transport.lastRateLimit;
|
package/http-transport.d.ts
CHANGED
|
@@ -11,12 +11,6 @@ export type RequestOptions = {
|
|
|
11
11
|
signal?: AbortSignal;
|
|
12
12
|
pathParams?: Readonly<Record<string, string>>;
|
|
13
13
|
};
|
|
14
|
-
export type StreamRequestOptions = {
|
|
15
|
-
/** The streaming media type to negotiate (`text/event-stream`, `application/x-ndjson`). */
|
|
16
|
-
accept: string;
|
|
17
|
-
/** Names this stream in the "returned no body" diagnostic, e.g. `"run-event stream"`. */
|
|
18
|
-
subject: string;
|
|
19
|
-
} & RequestOptions;
|
|
20
14
|
/** A read, status-checked HTTP response with its parsed body. */
|
|
21
15
|
export type SentResponse = {
|
|
22
16
|
response: Response;
|
|
@@ -55,16 +49,6 @@ export declare class HttpTransport {
|
|
|
55
49
|
* it consumes the whole body via `response.text()`.
|
|
56
50
|
*/
|
|
57
51
|
send(input: SendInput): Promise<SentResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* Open a streaming operation and hand back its UNREAD byte body — the one
|
|
60
|
-
* entry point for every long-lived read (SSE run events, NDJSON Match
|
|
61
|
-
* progress). Everything up to the first byte behaves exactly like
|
|
62
|
-
* {@link send}: same URL building, same bearer header, same rate-limit
|
|
63
|
-
* capture, same {@link MaterialGraphError} mapping for a transport failure or
|
|
64
|
-
* a non-2xx (whose short error body IS read, since it is not a stream).
|
|
65
|
-
* Framing and cancellation belong to the caller.
|
|
66
|
-
*/
|
|
67
|
-
openStream(sdkOperation: SdkOperation, options: StreamRequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
68
52
|
/** Execute a registered JSON operation and return its typed body. */
|
|
69
53
|
requestJson<K extends JsonOperationId>(sdkOperation: SdkOperation<K>, options?: RequestOptions): Promise<OperationResponses[K]>;
|
|
70
54
|
}
|
package/http-transport.js
CHANGED
|
@@ -148,79 +148,6 @@ export class HttpTransport {
|
|
|
148
148
|
}
|
|
149
149
|
return { parsed, response, text };
|
|
150
150
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Open a streaming operation and hand back its UNREAD byte body — the one
|
|
153
|
-
* entry point for every long-lived read (SSE run events, NDJSON Match
|
|
154
|
-
* progress). Everything up to the first byte behaves exactly like
|
|
155
|
-
* {@link send}: same URL building, same bearer header, same rate-limit
|
|
156
|
-
* capture, same {@link MaterialGraphError} mapping for a transport failure or
|
|
157
|
-
* a non-2xx (whose short error body IS read, since it is not a stream).
|
|
158
|
-
* Framing and cancellation belong to the caller.
|
|
159
|
-
*/
|
|
160
|
-
async openStream(sdkOperation, options) {
|
|
161
|
-
const url = this.buildUrl(operationPath(sdkOperation, options.pathParams), options.query);
|
|
162
|
-
const requestUrl = new URL(url);
|
|
163
|
-
const metadata = {
|
|
164
|
-
method: sdkOperation.method,
|
|
165
|
-
origin: requestUrl.origin,
|
|
166
|
-
path: requestUrl.pathname,
|
|
167
|
-
};
|
|
168
|
-
const hasBody = options.body !== undefined;
|
|
169
|
-
let response;
|
|
170
|
-
try {
|
|
171
|
-
response = await this.fetch(url, {
|
|
172
|
-
body: hasBody ? JSON.stringify(options.body) : undefined,
|
|
173
|
-
headers: this.authHeaders({
|
|
174
|
-
Accept: options.accept,
|
|
175
|
-
...(hasBody ? { "Content-Type": "application/json" } : {}),
|
|
176
|
-
}),
|
|
177
|
-
method: sdkOperation.method,
|
|
178
|
-
signal: options.signal,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
catch (cause) {
|
|
182
|
-
throw MaterialGraphError.fromTransport({
|
|
183
|
-
...metadata,
|
|
184
|
-
callerSignal: options.signal,
|
|
185
|
-
cause,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
const rateLimit = parseRateLimit(response.headers);
|
|
189
|
-
this.#lastRateLimit = rateLimit;
|
|
190
|
-
if (!response.ok) {
|
|
191
|
-
let text = "";
|
|
192
|
-
try {
|
|
193
|
-
text = await response.text();
|
|
194
|
-
}
|
|
195
|
-
catch {
|
|
196
|
-
// The status IS the error; a body that will not read adds nothing and
|
|
197
|
-
// must not mask it. Report the failure with an empty detail instead.
|
|
198
|
-
text = "";
|
|
199
|
-
}
|
|
200
|
-
let parsed;
|
|
201
|
-
if (text.length > 0) {
|
|
202
|
-
try {
|
|
203
|
-
parsed = JSON.parse(text);
|
|
204
|
-
}
|
|
205
|
-
catch {
|
|
206
|
-
parsed = text;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
throw MaterialGraphError.fromResponse({
|
|
210
|
-
...metadata,
|
|
211
|
-
apiKey: this.apiKey,
|
|
212
|
-
body: parsed,
|
|
213
|
-
queryValues: [...requestUrl.searchParams.values()],
|
|
214
|
-
rateLimit,
|
|
215
|
-
responseText: text,
|
|
216
|
-
status: response.status,
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
if (response.body === null) {
|
|
220
|
-
throw MaterialGraphError.unexpected(`MaterialGraph ${options.subject} returned no body`);
|
|
221
|
-
}
|
|
222
|
-
return response.body;
|
|
223
|
-
}
|
|
224
151
|
/** Execute a registered JSON operation and return its typed body. */
|
|
225
152
|
async requestJson(sdkOperation, options = {}) {
|
|
226
153
|
const url = this.buildUrl(operationPath(sdkOperation, options.pathParams), options.query);
|
package/identifiers.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* MaterialGraph hands back two very different kinds of string, and the whole
|
|
6
6
|
* class of caller bugs this file exists to prevent comes from confusing them:
|
|
7
7
|
*
|
|
8
|
-
* - **Opaque tokens** ({@link VariantId}, {@link ProductId},
|
|
8
|
+
* - **Opaque tokens** ({@link VariantId}, {@link ProductId},
|
|
9
9
|
* {@link BatchId}, {@link ProjectId}, {@link SchemeId}, {@link SlotId},
|
|
10
10
|
* {@link Cursor}). Round-trip them BYTE-FOR-BYTE. Never parse one, never
|
|
11
11
|
* construct one, never pattern-match one, never sort by one, and never read
|
|
@@ -42,11 +42,6 @@ export type VariantId = OpaqueId;
|
|
|
42
42
|
* Opaque: preserve verbatim, never parse or construct one.
|
|
43
43
|
*/
|
|
44
44
|
export type ProductId = OpaqueId;
|
|
45
|
-
/**
|
|
46
|
-
* A Run id from the hosted agentic surface. Opaque: preserve verbatim, never
|
|
47
|
-
* parse or construct one.
|
|
48
|
-
*/
|
|
49
|
-
export type RunId = OpaqueId;
|
|
50
45
|
/**
|
|
51
46
|
* A source-material batch id (`smb_…`). The prefix is a reading convenience,
|
|
52
47
|
* not a contract — treat the whole string as opaque.
|
package/identifiers.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* MaterialGraph hands back two very different kinds of string, and the whole
|
|
6
6
|
* class of caller bugs this file exists to prevent comes from confusing them:
|
|
7
7
|
*
|
|
8
|
-
* - **Opaque tokens** ({@link VariantId}, {@link ProductId},
|
|
8
|
+
* - **Opaque tokens** ({@link VariantId}, {@link ProductId},
|
|
9
9
|
* {@link BatchId}, {@link ProjectId}, {@link SchemeId}, {@link SlotId},
|
|
10
10
|
* {@link Cursor}). Round-trip them BYTE-FOR-BYTE. Never parse one, never
|
|
11
11
|
* construct one, never pattern-match one, never sort by one, and never read
|
package/index.d.ts
CHANGED
|
@@ -14,9 +14,8 @@ export { FIND_VARIANTS_BY_VECTOR_MODES } from "./find-variants-by-vector-types.j
|
|
|
14
14
|
export type { FindVariantsByVectorMode, FindVariantsByVectorQuery, FindVariantsByVectorInput, FindVariantsByVectorItem, FindVariantsByVectorReference, FindVariantsByVectorScan, FindVariantsByVectorTimings, FindVariantsByVectorOutput, } from "./find-variants-by-vector-types.js";
|
|
15
15
|
export { MATERIALGRAPH_API_VERSION, SDK_OPERATIONS } from "./operations.js";
|
|
16
16
|
export type { SdkOperation, SdkOperationId } from "./operations.js";
|
|
17
|
-
export type { OpaqueId, VariantId, ProductId,
|
|
18
|
-
export {
|
|
19
|
-
export type { FileInput, UploadSourceMaterialInput, SourceMaterialReceiptFile, SourceMaterialBatchReceipt, PublicRunStatus, PublicRunFailure, PublicRunArtifactRef, PublicRun, CreatePublicRunRequest, CreatePublicRunResponse, PublicRunResponse, RunEvent, StreamRunEventsOptions, DrainRunEventsOptions, } from "./run-types.js";
|
|
17
|
+
export type { OpaqueId, VariantId, ProductId, BatchId, SourceFileId, ProjectId, SchemeId, SlotId, Cursor, } from "./identifiers.js";
|
|
18
|
+
export type { FileInput, UploadSourceMaterialInput, SourceMaterialReceiptFile, SourceMaterialBatchReceipt, } from "./source-material-types.js";
|
|
20
19
|
export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
|
|
21
20
|
export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphRequestMetadata, ProblemDetail, RateLimit, SanitizedErrorValue, SanitizedIssue, SimpleErrorBody, } from "./errors.js";
|
|
22
21
|
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";
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { MaterialGraphClient, DEFAULT_BASE_URL } from "./client.js";
|
|
2
2
|
export { FIND_VARIANTS_BY_VECTOR_MODES } from "./find-variants-by-vector-types.js";
|
|
3
3
|
export { MATERIALGRAPH_API_VERSION, SDK_OPERATIONS } from "./operations.js";
|
|
4
|
-
export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
|
|
5
4
|
export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
|
|
6
5
|
export { CategoriesClient } from "./categories-client.js";
|
|
7
6
|
export { ColorsClient } from "./colors-client.js";
|
package/operation-responses.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ import type { MaterialDocumentPage, VariantAssetPage } from "./material-asset-ty
|
|
|
17
17
|
import type { MaterialBlockProjection } from "./material-block-types.js";
|
|
18
18
|
import type { NearestPaintsOutput } from "./nearest-paints-types.js";
|
|
19
19
|
import type { ResolveVariantOutput } from "./resolve-variant-types.js";
|
|
20
|
-
import type { CreatePublicRunResponse, PublicRunResponse, SourceMaterialBatchReceipt } from "./run-types.js";
|
|
21
20
|
import type { SamplizeCatalogPage } from "./samplize-catalog-types.js";
|
|
22
21
|
import type { SchemaResourceResponse } from "./schema-resource-types.js";
|
|
23
22
|
import type { SearchVariantsOutput } from "./search-variants-types.js";
|
|
23
|
+
import type { SourceMaterialBatchReceipt } from "./source-material-types.js";
|
|
24
24
|
import type { ExtractPaletteResponse, ListAttributesResult, PairingsResponse, ResolveColorResponse, WhoamiResponse } from "./types.js";
|
|
25
25
|
export type OperationResponses = {
|
|
26
26
|
get_discovery_reference: DiscoveryReference;
|
|
@@ -33,7 +33,6 @@ export type OperationResponses = {
|
|
|
33
33
|
};
|
|
34
34
|
catalog_list_attributes: ListAttributesResult;
|
|
35
35
|
catalog_list_enum_values: ListEnumValuesResult;
|
|
36
|
-
create_public_run: CreatePublicRunResponse;
|
|
37
36
|
extract_image_palette: ExtractPaletteResponse;
|
|
38
37
|
find_sampled_together: FindSampledTogetherOutput;
|
|
39
38
|
list_sampled_together_pairs: ListSampledTogetherPairsOutput;
|
|
@@ -46,7 +45,6 @@ export type OperationResponses = {
|
|
|
46
45
|
get_category: CategoriesGetResult;
|
|
47
46
|
get_category_color_profiles: CategoryColorProfilesResponse;
|
|
48
47
|
get_material_pairings: PairingsResponse;
|
|
49
|
-
get_public_run: PublicRunResponse;
|
|
50
48
|
get_variant: GetVariantOutput;
|
|
51
49
|
list_associated_finishes: DeclaredAssociationsResponse;
|
|
52
50
|
list_associated_products: DeclaredAssociationsResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.8.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [readonly ["discoveryReference", "GET", "/api/v1/catalog/discovery-reference", "get_discovery_reference"], readonly ["interpretDiscoveryTerms", "POST", "/api/v1/catalog/interpret-terms", "interpret_discovery_terms"], readonly ["colorlessVariants", "POST", "/api/v1/variants/colorless", "find_colorless_variants"], readonly ["variantSiblings", "GET", "/api/v1/variants/{variantId}/siblings", "list_variant_siblings"], 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 ["listSampledTogetherPairs", "GET", "/api/v1/variants/sampled-together/pairs", "list_sampled_together_pairs"], 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"]
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["discoveryReference", "GET", "/api/v1/catalog/discovery-reference", "get_discovery_reference"], readonly ["interpretDiscoveryTerms", "POST", "/api/v1/catalog/interpret-terms", "interpret_discovery_terms"], readonly ["colorlessVariants", "POST", "/api/v1/variants/colorless", "find_colorless_variants"], readonly ["variantSiblings", "GET", "/api/v1/variants/{variantId}/siblings", "list_variant_siblings"], 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 ["listSampledTogetherPairs", "GET", "/api/v1/variants/sampled-together/pairs", "list_sampled_together_pairs"], 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"]];
|
|
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
|
@@ -197,23 +197,5 @@ const OPERATION_DEFINITIONS = [
|
|
|
197
197
|
"/api/v1/source-material",
|
|
198
198
|
"upload_source_material",
|
|
199
199
|
],
|
|
200
|
-
[
|
|
201
|
-
"workflows.start",
|
|
202
|
-
"POST",
|
|
203
|
-
"/api/v1/workflows/{workflowId}/runs",
|
|
204
|
-
"create_public_run",
|
|
205
|
-
],
|
|
206
|
-
[
|
|
207
|
-
"workflows.run",
|
|
208
|
-
"GET",
|
|
209
|
-
"/api/v1/workflows/{workflowId}/runs/{runId}",
|
|
210
|
-
"get_public_run",
|
|
211
|
-
],
|
|
212
|
-
[
|
|
213
|
-
"workflows.streamRunEvents",
|
|
214
|
-
"GET",
|
|
215
|
-
"/api/v1/workflows/{workflowId}/runs/{runId}/events",
|
|
216
|
-
"list_public_run_events",
|
|
217
|
-
],
|
|
218
200
|
];
|
|
219
201
|
export const SDK_OPERATIONS = Object.freeze(OPERATION_DEFINITIONS.map(([clientMethod, method, path, operationId]) => Object.freeze({ clientMethod, method, operationId, path })));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instruments/materialgraph",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@materialinstruments/colorscope": "
|
|
24
|
+
"@materialinstruments/colorscope": "14.0.1"
|
|
25
25
|
},
|
|
26
26
|
"license": "Proprietary",
|
|
27
27
|
"engines": {
|
|
@@ -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 ["get_discovery_reference", "interpret_discovery_terms", "find_colorless_variants", "list_variant_siblings", "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", "list_sampled_together_pairs", "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"
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["get_discovery_reference", "interpret_discovery_terms", "find_colorless_variants", "list_variant_siblings", "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", "list_sampled_together_pairs", "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"];
|
|
5
5
|
export declare const RESPONSE_SCHEMA_CATALOG_JSON: string;
|