@instruments/materialgraph 1.3.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.
@@ -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
@@ -4,6 +4,7 @@ import { CatalogClient } from "./catalog-client.js";
4
4
  import { CategoriesClient } from "./categories-client.js";
5
5
  import type { MaterialGraphClientOptions } from "./client-config.js";
6
6
  import { ColorsClient } from "./colors-client.js";
7
+ import type { DiscoveryReference, DiscoveryTerms, InterpretDiscoveryTermsInput, ColorlessVariantsResult, VariantSibling } from "./discovery-context-types.js";
7
8
  import type { RateLimit } from "./errors.js";
8
9
  import type { FindSampledTogetherInput, FindSampledTogetherOutput } from "./find-sampled-together-types.js";
9
10
  import type { FindVariantsByColorInput, FindVariantsByColorOutput } from "./find-variants-by-color-types.js";
@@ -15,11 +16,10 @@ import type { ListSampledTogetherPairsInput, ListSampledTogetherPairsOutput } fr
15
16
  import type { ListVariantFacetsInput, ListVariantFacetsOutput } from "./list-variant-facets-types.js";
16
17
  import type { ListVariantsInput, ListVariantsOutput } from "./list-variants-types.js";
17
18
  import type { ListVariantAssetsOptions, MaterialDocumentPageOptions, VariantAssetPage } from "./material-asset-types.js";
18
- import type { SourceMaterialBatchReceipt, UploadSourceMaterialInput } from "./run-types.js";
19
19
  import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
20
20
  import type { SearchVariantsInput, SearchVariantsOutput } from "./search-variants-types.js";
21
+ import type { SourceMaterialBatchReceipt, UploadSourceMaterialInput } from "./source-material-types.js";
21
22
  import type { ExtractPaletteInput, ExtractPaletteResponse, ListAttributesOptions, ListAttributesResult, PairingsOptions, PairingsResponse, ResolveColorOptions, ResolveColorResponse, WhoamiResponse } from "./types.js";
22
- import { WorkflowsClient } from "./workflows-client.js";
23
23
  export { DEFAULT_BASE_URL } from "./client-config.js";
24
24
  export type { MaterialGraphClientOptions } from "./client-config.js";
25
25
  /**
@@ -40,7 +40,6 @@ export type { MaterialGraphClientOptions } from "./client-config.js";
40
40
  * | "what does the brand say is AVAILABLE on this?" | {@link MaterialGraphClient.associatedFinishes}, {@link MaterialGraphClient.associatedProducts} |
41
41
  * | "what can I even ask for?" | {@link MaterialGraphClient.listVariantFacets}, `categories.list()` |
42
42
  * | "what is this word called here?" | {@link MaterialGraphClient.listAttributes} |
43
- * | "do the whole job for me, async" | `workflows.start()` + `mg:compose` |
44
43
  *
45
44
  * Three structural rules that fall out of that table:
46
45
  * - **Color is a separate lens.** {@link MaterialGraphClient.searchVariants}
@@ -88,16 +87,16 @@ export declare class MaterialGraphClient extends CatalogClient {
88
87
  * Value Source says which.
89
88
  */
90
89
  readonly colors: ColorsClient;
91
- /**
92
- * THE QUESTION: "do a whole job for me" — the ASYNC lens. `start()` begins a
93
- * Run of one registered workflow, `run()` polls it, `streamRunEvents()` and
94
- * `drainRunEvents()` follow it live. Everything else on this client answers
95
- * in one round trip; a Run may suspend for human input and finish minutes
96
- * later. Replaces the flat `createRun()` / `run()` family, with no shim.
97
- */
98
- readonly workflows: WorkflowsClient;
99
90
  constructor(options: MaterialGraphClientOptions);
100
91
  get lastRateLimit(): RateLimit | null;
92
+ /** Registry definitions and MG's catalog admission policy. */
93
+ discoveryReference(signal?: AbortSignal): Promise<DiscoveryReference>;
94
+ /** MG's exact category and generic color phrase readings. */
95
+ interpretDiscoveryTerms(input: InterpretDiscoveryTermsInput, signal?: AbortSignal): Promise<DiscoveryTerms>;
96
+ /** Colorless finishes among at most 250 supplied variants. */
97
+ colorlessVariants(variantIds: readonly string[], signal?: AbortSignal): Promise<ColorlessVariantsResult>;
98
+ /** The eligible colorways of this variant's product, in name/id order, capped at 300. */
99
+ variantSiblings(variantId: string, signal?: AbortSignal): Promise<VariantSibling[] | null>;
101
100
  /** Current catalog generation; authenticated, no SQL and no rate-limit charge. */
102
101
  getCatalogGeneration(signal?: AbortSignal): Promise<{
103
102
  generation: number;
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 { WorkflowsClient } from "./workflows-client.js";
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;
@@ -129,6 +118,24 @@ export class MaterialGraphClient extends CatalogClient {
129
118
  signal,
130
119
  });
131
120
  }
121
+ /** Registry definitions and MG's catalog admission policy. */
122
+ async discoveryReference(signal) {
123
+ return await this.#get("get_discovery_reference", undefined, signal);
124
+ }
125
+ /** MG's exact category and generic color phrase readings. */
126
+ async interpretDiscoveryTerms(input, signal) {
127
+ return await this.#post("interpret_discovery_terms", input, signal);
128
+ }
129
+ /** Colorless finishes among at most 250 supplied variants. */
130
+ async colorlessVariants(variantIds, signal) {
131
+ return await this.#post("find_colorless_variants", { variantIds }, signal);
132
+ }
133
+ /** The eligible colorways of this variant's product, in name/id order, capped at 300. */
134
+ async variantSiblings(variantId, signal) {
135
+ return await this.#get("list_variant_siblings", undefined, signal, {
136
+ variantId,
137
+ });
138
+ }
132
139
  /** Current catalog generation; authenticated, no SQL and no rate-limit charge. */
133
140
  async getCatalogGeneration(signal) {
134
141
  return await this.#get("get_catalog_generation", undefined, signal);
@@ -0,0 +1,45 @@
1
+ import type { MaterialTile } from "./material-types.js";
2
+ /** Static registry definitions and MG-owned discovery policy, without product counts. */
3
+ export type DiscoveryReference = {
4
+ attributes: {
5
+ id: string;
6
+ name: string;
7
+ valueKind: string;
8
+ dictionaryId: string | null;
9
+ unit: string | null;
10
+ isArray: boolean;
11
+ filterable: boolean;
12
+ }[];
13
+ categories: {
14
+ id: string;
15
+ name: string;
16
+ path: string;
17
+ ancestorIds: string[];
18
+ inCatalog: boolean;
19
+ }[];
20
+ productTypes: {
21
+ id: string;
22
+ name: string;
23
+ description: string;
24
+ }[];
25
+ admittedBrandIds: string[];
26
+ };
27
+ export type InterpretDiscoveryTermsInput = {
28
+ text: string;
29
+ categoryIds: readonly string[];
30
+ };
31
+ export type DiscoveryTerms = {
32
+ categories: {
33
+ categoryIds: string[];
34
+ words: string[];
35
+ } | null;
36
+ colorWordHexes: string[];
37
+ };
38
+ export type ColorlessVariantsResult = {
39
+ variantIds: string[];
40
+ };
41
+ /** A sibling uses the same tile contract as the catalog's material cards. */
42
+ export type VariantSibling = MaterialTile & {
43
+ distinction?: string;
44
+ distinguishedBy?: "size" | "code";
45
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -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}, {@link RunId},
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}, {@link RunId},
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
@@ -1,3 +1,4 @@
1
+ export type { DiscoveryReference, DiscoveryTerms, InterpretDiscoveryTermsInput, ColorlessVariantsResult, VariantSibling, } from "./discovery-context-types.js";
1
2
  export { MaterialGraphClient, DEFAULT_BASE_URL } from "./client.js";
2
3
  export type { MaterialGraphClientOptions } from "./client.js";
3
4
  export type { FilterOp, FilterTermCondition, FilterNumericCondition, FilterPresenceCondition, FilterAnyFieldCondition, FilterCondition, FilterGroups, OptionalFilterGroups, OrderByEntry, ListVariantsInclude, ListVariantsCollapse, ColorRegion, ColorRangeCondition, ListVariantsInput, ListVariantsPreference, ListVariantsSpecifications, ListVariantsNotApplicable, SampleSubject, ListVariantsItem, ListVariantsOutput, VariantCard, } from "./list-variants-types.js";
@@ -13,9 +14,8 @@ export { FIND_VARIANTS_BY_VECTOR_MODES } from "./find-variants-by-vector-types.j
13
14
  export type { FindVariantsByVectorMode, FindVariantsByVectorQuery, FindVariantsByVectorInput, FindVariantsByVectorItem, FindVariantsByVectorReference, FindVariantsByVectorScan, FindVariantsByVectorTimings, FindVariantsByVectorOutput, } from "./find-variants-by-vector-types.js";
14
15
  export { MATERIALGRAPH_API_VERSION, SDK_OPERATIONS } from "./operations.js";
15
16
  export type { SdkOperation, SdkOperationId } from "./operations.js";
16
- export type { OpaqueId, VariantId, ProductId, RunId, BatchId, SourceFileId, ProjectId, SchemeId, SlotId, Cursor, } from "./identifiers.js";
17
- export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
18
- 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";
19
19
  export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
20
20
  export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphRequestMetadata, ProblemDetail, RateLimit, SanitizedErrorValue, SanitizedIssue, SimpleErrorBody, } from "./errors.js";
21
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";
@@ -4,6 +4,7 @@ import type { ListBrandsPage } from "./brand-types.js";
4
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
+ import type { DiscoveryReference, DiscoveryTerms, ColorlessVariantsResult, VariantSibling } from "./discovery-context-types.js";
7
8
  import type { FindSampledTogetherOutput } from "./find-sampled-together-types.js";
8
9
  import type { FindVariantsByColorOutput } from "./find-variants-by-color-types.js";
9
10
  import type { FindVariantsByVectorOutput } from "./find-variants-by-vector-types.js";
@@ -16,19 +17,22 @@ import type { MaterialDocumentPage, VariantAssetPage } from "./material-asset-ty
16
17
  import type { MaterialBlockProjection } from "./material-block-types.js";
17
18
  import type { NearestPaintsOutput } from "./nearest-paints-types.js";
18
19
  import type { ResolveVariantOutput } from "./resolve-variant-types.js";
19
- import type { CreatePublicRunResponse, PublicRunResponse, SourceMaterialBatchReceipt } from "./run-types.js";
20
20
  import type { SamplizeCatalogPage } from "./samplize-catalog-types.js";
21
21
  import type { SchemaResourceResponse } from "./schema-resource-types.js";
22
22
  import type { SearchVariantsOutput } from "./search-variants-types.js";
23
+ import type { SourceMaterialBatchReceipt } from "./source-material-types.js";
23
24
  import type { ExtractPaletteResponse, ListAttributesResult, PairingsResponse, ResolveColorResponse, WhoamiResponse } from "./types.js";
24
25
  export type OperationResponses = {
26
+ get_discovery_reference: DiscoveryReference;
27
+ interpret_discovery_terms: DiscoveryTerms;
28
+ find_colorless_variants: ColorlessVariantsResult;
29
+ list_variant_siblings: VariantSibling[] | null;
25
30
  find_nearest_paints: NearestPaintsOutput;
26
31
  get_catalog_generation: {
27
32
  generation: number;
28
33
  };
29
34
  catalog_list_attributes: ListAttributesResult;
30
35
  catalog_list_enum_values: ListEnumValuesResult;
31
- create_public_run: CreatePublicRunResponse;
32
36
  extract_image_palette: ExtractPaletteResponse;
33
37
  find_sampled_together: FindSampledTogetherOutput;
34
38
  list_sampled_together_pairs: ListSampledTogetherPairsOutput;
@@ -41,7 +45,6 @@ export type OperationResponses = {
41
45
  get_category: CategoriesGetResult;
42
46
  get_category_color_profiles: CategoryColorProfilesResponse;
43
47
  get_material_pairings: PairingsResponse;
44
- get_public_run: PublicRunResponse;
45
48
  get_variant: GetVariantOutput;
46
49
  list_associated_finishes: DeclaredAssociationsResponse;
47
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 ["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"], 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"]];
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];
@@ -1,6 +1,30 @@
1
1
  // GENERATED by apps/web/scripts/generate-openapi-v1.ts. Do not edit.
2
2
  export const MATERIALGRAPH_API_VERSION = "0.8.0";
3
3
  const OPERATION_DEFINITIONS = [
4
+ [
5
+ "discoveryReference",
6
+ "GET",
7
+ "/api/v1/catalog/discovery-reference",
8
+ "get_discovery_reference",
9
+ ],
10
+ [
11
+ "interpretDiscoveryTerms",
12
+ "POST",
13
+ "/api/v1/catalog/interpret-terms",
14
+ "interpret_discovery_terms",
15
+ ],
16
+ [
17
+ "colorlessVariants",
18
+ "POST",
19
+ "/api/v1/variants/colorless",
20
+ "find_colorless_variants",
21
+ ],
22
+ [
23
+ "variantSiblings",
24
+ "GET",
25
+ "/api/v1/variants/{variantId}/siblings",
26
+ "list_variant_siblings",
27
+ ],
4
28
  [
5
29
  "colors.nearestPaints",
6
30
  "GET",
@@ -173,23 +197,5 @@ const OPERATION_DEFINITIONS = [
173
197
  "/api/v1/source-material",
174
198
  "upload_source_material",
175
199
  ],
176
- [
177
- "workflows.start",
178
- "POST",
179
- "/api/v1/workflows/{workflowId}/runs",
180
- "create_public_run",
181
- ],
182
- [
183
- "workflows.run",
184
- "GET",
185
- "/api/v1/workflows/{workflowId}/runs/{runId}",
186
- "get_public_run",
187
- ],
188
- [
189
- "workflows.streamRunEvents",
190
- "GET",
191
- "/api/v1/workflows/{workflowId}/runs/{runId}/events",
192
- "list_public_run_events",
193
- ],
194
200
  ];
195
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": "1.3.0",
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": "10.6.1"
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 ["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", "create_public_run", "get_public_run"];
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;