@instruments/materialgraph 0.35.0 → 0.37.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/by-spec-types.d.ts +0 -2
- package/client.d.ts +7 -9
- package/client.js +7 -10
- package/{find-companions-types.d.ts → find-sampled-together-types.d.ts} +17 -17
- package/find-sampled-together-types.js +12 -0
- package/find-variants-by-color-types.d.ts +2 -2
- package/find-variants-by-vector-types.d.ts +2 -2
- package/get-variant-types.d.ts +2 -2
- package/get-variant-types.js +2 -2
- package/image-reference-types.d.ts +1 -1
- package/index.d.ts +1 -2
- package/list-enum-values-types.d.ts +2 -2
- package/list-variant-facets-types.d.ts +2 -2
- package/list-variants-types.d.ts +3 -3
- package/list-variants-types.js +3 -3
- package/operations.d.ts +1 -1
- package/operations.js +6 -2
- package/package.json +1 -1
- package/resolve-variant-types.d.ts +1 -1
- package/resolve-variant-types.js +1 -1
- package/response-schemas.generated.d.ts +1 -1
- package/response-schemas.generated.js +25 -26
- package/search-variants-types.d.ts +6 -4
- package/types.d.ts +3 -3
- package/webmcp.generated.js +4 -4
- package/citation-types.d.ts +0 -34
- package/citation-types.js +0 -1
- package/find-companions-types.js +0 -12
- package/ndjson.d.ts +0 -46
- package/ndjson.js +0 -111
package/by-spec-types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ValueResolution } from "./catalog-discovery-types.js";
|
|
2
|
-
import type { VerdictCitation } from "./citation-types.js";
|
|
3
2
|
/**
|
|
4
3
|
* The six states a verdict cell can report — and what each licenses you to say.
|
|
5
4
|
*
|
|
@@ -58,7 +57,6 @@ export type BySpecVerdictCell = {
|
|
|
58
57
|
* - `basis_unmet` — the value's source is weaker than the criterion demanded.
|
|
59
58
|
*/
|
|
60
59
|
trustGap: "below_confidence" | "basis_unmet" | null;
|
|
61
|
-
citation?: VerdictCitation;
|
|
62
60
|
};
|
|
63
61
|
/**
|
|
64
62
|
* A match's full report card: every cell, the rolled-up grade, weakest confidence.
|
package/client.d.ts
CHANGED
|
@@ -2,11 +2,10 @@ import type { ApplicabilityOptions, AssociatedOptions } from "./association-type
|
|
|
2
2
|
import type { BrandsOptions } from "./brand-types.js";
|
|
3
3
|
import { CatalogueClient } from "./catalogue-client.js";
|
|
4
4
|
import { CategoriesClient } from "./categories-client.js";
|
|
5
|
-
import type { ResolvedVerdictCitation } from "./citation-types.js";
|
|
6
5
|
import type { MaterialGraphClientOptions } from "./client-config.js";
|
|
7
6
|
import { ColorsClient } from "./colors-client.js";
|
|
8
7
|
import type { RateLimit } from "./errors.js";
|
|
9
|
-
import type {
|
|
8
|
+
import type { FindSampledTogetherInput, FindSampledTogetherOutput } from "./find-sampled-together-types.js";
|
|
10
9
|
import type { FindVariantsByColorInput, FindVariantsByColorOutput } from "./find-variants-by-color-types.js";
|
|
11
10
|
import type { FindVariantsByVectorInput, FindVariantsByVectorOutput } from "./find-variants-by-vector-types.js";
|
|
12
11
|
import type { GetVariantOptions, GetVariantOutput } from "./get-variant-types.js";
|
|
@@ -184,7 +183,8 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
184
183
|
* to narrow or widen the same search; page with this method's own cursor,
|
|
185
184
|
* which `listVariants()` refuses. A phrase with several meanings is
|
|
186
185
|
* answered with one and listed in `choices`; send its `handle` with an
|
|
187
|
-
* alternative's `group` and `id` in `selections` to switch it
|
|
186
|
+
* alternative's `group` and `id` in `selections` to switch it, or its
|
|
187
|
+
* `text` in `leaveOut` to drop the condition. A query that
|
|
188
188
|
* applies nothing returns no items, never the whole catalogue; a preference
|
|
189
189
|
* alone still ranks it.
|
|
190
190
|
*/
|
|
@@ -200,15 +200,15 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
200
200
|
findVariantsByColor(input: FindVariantsByColorInput, signal?: AbortSignal): Promise<FindVariantsByColorOutput>;
|
|
201
201
|
/**
|
|
202
202
|
* THE QUESTION: "what did designers sample together with these?" (POST
|
|
203
|
-
* `/api/v1/variants/
|
|
203
|
+
* `/api/v1/variants/sampled-together`, MG-2332). Give `variantIds` and/or
|
|
204
204
|
* `materials` (free-text names, one variant each, at most twelve together);
|
|
205
|
-
*
|
|
206
|
-
* `seedMatchCount`, `relation` and a one-line `reason`. `projectType` reads one
|
|
205
|
+
* the materials come back other brands first, then the most projects, each
|
|
206
|
+
* with its `lift`, `seedMatchCount`, `relation` and a one-line `reason`. `projectType` reads one
|
|
207
207
|
* sector; `include` adds `image` and `color` fields a lean page leaves out.
|
|
208
208
|
* A sample order shows sampling, never specification. Read `unresolved`
|
|
209
209
|
* before presenting: a scheme of four that resolved two is a different claim.
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
findSampledTogether(input: FindSampledTogetherInput, signal?: AbortSignal): Promise<FindSampledTogetherOutput>;
|
|
212
212
|
/**
|
|
213
213
|
* THE QUESTION: "what looks or feels like this?" (POST
|
|
214
214
|
* `/api/v1/variants/by-vector`, MG-2231). Eligible variants ranked by
|
|
@@ -265,6 +265,4 @@ export declare class MaterialGraphClient extends CatalogueClient {
|
|
|
265
265
|
* `mg:source` scope, which a `source`, `ingest` or `admin` key carries.
|
|
266
266
|
*/
|
|
267
267
|
uploadSourceMaterial(input: UploadSourceMaterialInput, signal?: AbortSignal): Promise<SourceMaterialBatchReceipt>;
|
|
268
|
-
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
269
|
-
citation(citationId: string, signal?: AbortSignal): Promise<ResolvedVerdictCitation>;
|
|
270
268
|
}
|
package/client.js
CHANGED
|
@@ -262,7 +262,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
262
262
|
* to narrow or widen the same search; page with this method's own cursor,
|
|
263
263
|
* which `listVariants()` refuses. A phrase with several meanings is
|
|
264
264
|
* answered with one and listed in `choices`; send its `handle` with an
|
|
265
|
-
* alternative's `group` and `id` in `selections` to switch it
|
|
265
|
+
* alternative's `group` and `id` in `selections` to switch it, or its
|
|
266
|
+
* `text` in `leaveOut` to drop the condition. A query that
|
|
266
267
|
* applies nothing returns no items, never the whole catalogue; a preference
|
|
267
268
|
* alone still ranks it.
|
|
268
269
|
*/
|
|
@@ -282,16 +283,16 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
282
283
|
}
|
|
283
284
|
/**
|
|
284
285
|
* THE QUESTION: "what did designers sample together with these?" (POST
|
|
285
|
-
* `/api/v1/variants/
|
|
286
|
+
* `/api/v1/variants/sampled-together`, MG-2332). Give `variantIds` and/or
|
|
286
287
|
* `materials` (free-text names, one variant each, at most twelve together);
|
|
287
|
-
*
|
|
288
|
-
* `seedMatchCount`, `relation` and a one-line `reason`. `projectType` reads one
|
|
288
|
+
* the materials come back other brands first, then the most projects, each
|
|
289
|
+
* with its `lift`, `seedMatchCount`, `relation` and a one-line `reason`. `projectType` reads one
|
|
289
290
|
* sector; `include` adds `image` and `color` fields a lean page leaves out.
|
|
290
291
|
* A sample order shows sampling, never specification. Read `unresolved`
|
|
291
292
|
* before presenting: a scheme of four that resolved two is a different claim.
|
|
292
293
|
*/
|
|
293
|
-
async
|
|
294
|
-
return await this.#post("
|
|
294
|
+
async findSampledTogether(input, signal) {
|
|
295
|
+
return await this.#post("find_sampled_together", input, signal);
|
|
295
296
|
}
|
|
296
297
|
/**
|
|
297
298
|
* THE QUESTION: "what looks or feels like this?" (POST
|
|
@@ -378,8 +379,4 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
378
379
|
async uploadSourceMaterial(input, signal) {
|
|
379
380
|
return await uploadSourceMaterial(this.#transport, input, signal);
|
|
380
381
|
}
|
|
381
|
-
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
382
|
-
async citation(citationId, signal) {
|
|
383
|
-
return await this.#get("get_verdict_citation", undefined, signal, { citationId });
|
|
384
|
-
}
|
|
385
382
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module find-
|
|
3
|
-
* @description Hand-maintained mirror of `
|
|
2
|
+
* @module find-sampled-together-types
|
|
3
|
+
* @description Hand-maintained mirror of `find_sampled_together`'s (MG-2332) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* `
|
|
7
|
-
* `@materialgraph/
|
|
5
|
+
* `packages/sampling/src/schema.ts` (`findSampledTogetherInputSchema`,
|
|
6
|
+
* `findSampledTogetherResultSchema`). This SDK has no RUNTIME dependency on
|
|
7
|
+
* `@materialgraph/sampling` (it's a devDependency only, for the parity tests in
|
|
8
8
|
* `__tests__/`), so the shapes are copied here rather than imported.
|
|
9
9
|
* `contract-parity.test.ts` keeps this mirror honest against the server types,
|
|
10
10
|
* the project-type list included.
|
|
11
11
|
*/
|
|
12
12
|
/** The closed sector vocabulary co-specification evidence is tagged with. */
|
|
13
|
-
export type
|
|
13
|
+
export type SampledTogetherProjectType = "Workplace" | "Residential" | "Institution Education" | "Hospitality: Hotel" | "Mixed-Use & Multi-Unit Residential" | "Healthcare" | "Hospitality: Restaurant" | "Government" | "Senior Living" | "Retail" | "Other" | "Sports Entertainment" | "Wellness" | "Medical Dental" | "Aviation" | "Industrial" | "Tech" | "Transportation" | "Single Family" | "Condominium Cooperative" | "Marine" | "Power & Energy" | "University Design Program: Interior Design" | "Non-Billable" | "University Design Program: Interior Architecture" | "University Design Program: Architecture" | "Historic Preservation";
|
|
14
14
|
/** At least one of `variantIds` and `materials`, at most twelve together. */
|
|
15
|
-
export type
|
|
15
|
+
export type FindSampledTogetherInput = {
|
|
16
16
|
/** Optional row fields: image adds imageUrl, color adds swatches. */
|
|
17
17
|
include?: ("image" | "color")[];
|
|
18
18
|
/** Ops and audit switch: leave sample cards in. Default false. */
|
|
19
19
|
includeSamplingArtifacts?: boolean;
|
|
20
|
-
/**
|
|
20
|
+
/** Materials to return, default 20, at most 100. */
|
|
21
21
|
limit?: number;
|
|
22
22
|
/** Names to resolve when you hold no ids. Misses come back unresolved. */
|
|
23
23
|
materials?: string[];
|
|
24
|
-
/** Only
|
|
25
|
-
projectType?:
|
|
26
|
-
/** Variants to find
|
|
24
|
+
/** Only materials sampled together in projects of this sector. */
|
|
25
|
+
projectType?: SampledTogetherProjectType;
|
|
26
|
+
/** Variants to find sampled-together materials for. */
|
|
27
27
|
variantIds?: string[];
|
|
28
28
|
};
|
|
29
|
-
export type
|
|
29
|
+
export type FindSampledTogetherRow = {
|
|
30
30
|
brand: string;
|
|
31
31
|
/** Palette likeness to the seeds. Present with `include: ["color"]`; never reorders. */
|
|
32
32
|
colorFit?: number | null;
|
|
@@ -37,8 +37,8 @@ export type FindCompanionsRow = {
|
|
|
37
37
|
product: string;
|
|
38
38
|
/** Why it was suggested, in one line. */
|
|
39
39
|
reason: string;
|
|
40
|
-
/** `
|
|
41
|
-
relation: "
|
|
40
|
+
/** `other_brand` is another brand; `brand_sibling` and `colorway` share the seed's. */
|
|
41
|
+
relation: "other_brand" | "brand_sibling" | "colorway";
|
|
42
42
|
/** How many seeds it was sampled with. */
|
|
43
43
|
seedMatchCount: number;
|
|
44
44
|
/** Present with `include: ["color"]`. */
|
|
@@ -49,9 +49,9 @@ export type FindCompanionsRow = {
|
|
|
49
49
|
variantId: string;
|
|
50
50
|
variantName: string | null;
|
|
51
51
|
};
|
|
52
|
-
export type
|
|
53
|
-
/**
|
|
54
|
-
|
|
52
|
+
export type FindSampledTogetherOutput = {
|
|
53
|
+
/** Other brands first, then seeds matched, then lift weighted by projects; one row per product. */
|
|
54
|
+
sampledTogether: FindSampledTogetherRow[];
|
|
55
55
|
/** The seeds as resolved, so a caller sees what a name became. */
|
|
56
56
|
seeds: {
|
|
57
57
|
brand: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module find-sampled-together-types
|
|
3
|
+
* @description Hand-maintained mirror of `find_sampled_together`'s (MG-2332) input and
|
|
4
|
+
* output wire shapes. The source of truth is
|
|
5
|
+
* `packages/sampling/src/schema.ts` (`findSampledTogetherInputSchema`,
|
|
6
|
+
* `findSampledTogetherResultSchema`). This SDK has no RUNTIME dependency on
|
|
7
|
+
* `@materialgraph/sampling` (it's a devDependency only, for the parity tests in
|
|
8
|
+
* `__tests__/`), so the shapes are copied here rather than imported.
|
|
9
|
+
* `contract-parity.test.ts` keeps this mirror honest against the server types,
|
|
10
|
+
* the project-type list included.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -3,11 +3,11 @@ import type { ImageReferenceInput } from "./image-reference-types.js";
|
|
|
3
3
|
* @module find-variants-by-color-types
|
|
4
4
|
* @description Hand-maintained mirror of `find_variants_by_color`'s
|
|
5
5
|
* (MG-2217/MG-2230/MG-2247/MG-2328) input and output wire shapes. The source
|
|
6
|
-
* of truth is `packages/
|
|
6
|
+
* of truth is `packages/search/src/find-variants-by-color.ts` —
|
|
7
7
|
* `rerank`'s `reference.candidates`/`reference.seed` still mirror
|
|
8
8
|
* `compare-color-similarity.ts`'s own seed shape, but its `matches[]` card
|
|
9
9
|
* is the same shape CONTAINS/PALETTE use, not a copy of that module's result.
|
|
10
|
-
* This SDK has no RUNTIME dependency on `@materialgraph/
|
|
10
|
+
* This SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
11
11
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes
|
|
12
12
|
* are copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
13
13
|
* mirror honest against the server types.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module find-variants-by-vector-types
|
|
3
3
|
* @description Hand-maintained mirror of `find_variants_by_vector`'s
|
|
4
4
|
* (MG-2231) input and output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* SDK has no runtime dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/vector-discovery/find-variants-by-vector.ts`; this
|
|
6
|
+
* SDK has no runtime dependency on `@materialgraph/search`, so the shapes
|
|
7
7
|
* are copied here and `contract-parity.test.ts` keeps them honest.
|
|
8
8
|
*/
|
|
9
9
|
import type { ImageReferenceInput } from "./image-reference-types.js";
|
package/get-variant-types.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module get-variant-types
|
|
3
3
|
* @description Hand-maintained mirror of `get_variant`'s (MG-2251) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* dependency on `@materialgraph/
|
|
5
|
+
* `packages/catalog/src/variants/get-variant.ts`, but this SDK has no RUNTIME
|
|
6
|
+
* dependency on `@materialgraph/catalog`, so the shapes are copied here and
|
|
7
7
|
* `__tests__/contract-parity.test.ts` keeps the mirror honest against the
|
|
8
8
|
* server types.
|
|
9
9
|
*/
|
package/get-variant-types.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module get-variant-types
|
|
3
3
|
* @description Hand-maintained mirror of `get_variant`'s (MG-2251) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* dependency on `@materialgraph/
|
|
5
|
+
* `packages/catalog/src/variants/get-variant.ts`, but this SDK has no RUNTIME
|
|
6
|
+
* dependency on `@materialgraph/catalog`, so the shapes are copied here and
|
|
7
7
|
* `__tests__/contract-parity.test.ts` keeps the mirror honest against the
|
|
8
8
|
* server types.
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module image-reference-types
|
|
3
3
|
* @description The one image-reference shape the vector-discovery lenses
|
|
4
|
-
* share (`@materialgraph/
|
|
4
|
+
* share (`@materialgraph/search/vector-discovery/image-reference`'s
|
|
5
5
|
* `imageReferenceInputSchema`): a catalogue asset, an upload, a public URL,
|
|
6
6
|
* or an existing variant's own image. Exactly one field is set per call; the
|
|
7
7
|
* server refuses more than one.
|
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type * from "./search-variants-types.js";
|
|
|
6
6
|
export type * from "./list-enum-values-types.js";
|
|
7
7
|
export type * from "./get-variant-types.js";
|
|
8
8
|
export type * from "./image-reference-types.js";
|
|
9
|
-
export type * from "./find-
|
|
9
|
+
export type * from "./find-sampled-together-types.js";
|
|
10
10
|
export type * from "./find-variants-by-color-types.js";
|
|
11
11
|
export { FIND_VARIANTS_BY_VECTOR_MODES } from "./find-variants-by-vector-types.js";
|
|
12
12
|
export type * from "./find-variants-by-vector-types.js";
|
|
@@ -15,7 +15,6 @@ export type { SdkOperation, SdkOperationId } from "./operations.js";
|
|
|
15
15
|
export type * from "./identifiers.js";
|
|
16
16
|
export { TERMINAL_RUN_EVENT_TYPES } from "./run-types.js";
|
|
17
17
|
export type * from "./run-types.js";
|
|
18
|
-
export type * from "./citation-types.js";
|
|
19
18
|
export { MATERIALGRAPH_PROBLEM_EXTENSIONS, MaterialGraphError, } from "./errors.js";
|
|
20
19
|
export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphRequestMetadata, ProblemDetail, RateLimit, SanitizedErrorValue, SanitizedIssue, SimpleErrorBody, } from "./errors.js";
|
|
21
20
|
export type * from "./types.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module list-enum-values-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_enum_values`'s (MG-2225) input
|
|
4
4
|
* and output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* runtime dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/browse/list-enum-values.ts`; this SDK has no
|
|
6
|
+
* runtime dependency on `@materialgraph/search`, so the shapes are copied
|
|
7
7
|
* here and `contract-parity.test.ts` keeps them honest.
|
|
8
8
|
*/
|
|
9
9
|
import type { OpenEnum } from "./types.js";
|
|
@@ -3,9 +3,9 @@ import type { FilterGroups } from "./list-variants-types.js";
|
|
|
3
3
|
* @module list-variant-facets-types
|
|
4
4
|
* @description Hand-maintained mirror of `list_variant_facets`'s (MG-2294)
|
|
5
5
|
* input and output wire shapes. The source of truth is
|
|
6
|
-
* `packages/
|
|
6
|
+
* `packages/search/src/variants/list-variant-facets.ts` (the input) and
|
|
7
7
|
* `list-variant-facets-contract.ts` (the output); this SDK has no runtime
|
|
8
|
-
* dependency on `@materialgraph/
|
|
8
|
+
* dependency on `@materialgraph/search`, so the shapes are copied here and
|
|
9
9
|
* `contract-parity.test.ts` keeps them honest.
|
|
10
10
|
*/
|
|
11
11
|
import type { SearchCatalogueSubset } from "./search-catalogue-subset-types.js";
|
package/list-variants-types.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module list-variants-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_variants`'s (MG-2222) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* and `packages/
|
|
7
|
-
* but this SDK has no RUNTIME dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/variants/variant-conditions.ts` (the filter grammar)
|
|
6
|
+
* and `packages/search/src/variants/list-variants-contract.ts` (the output),
|
|
7
|
+
* but this SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
8
8
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes are
|
|
9
9
|
* copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
10
10
|
* mirror honest against the server types.
|
package/list-variants-types.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module list-variants-types
|
|
3
3
|
* @description Hand-maintained mirror of `list_variants`'s (MG-2222) input and
|
|
4
4
|
* output wire shapes. The source of truth is
|
|
5
|
-
* `packages/
|
|
6
|
-
* and `packages/
|
|
7
|
-
* but this SDK has no RUNTIME dependency on `@materialgraph/
|
|
5
|
+
* `packages/search/src/variants/variant-conditions.ts` (the filter grammar)
|
|
6
|
+
* and `packages/search/src/variants/list-variants-contract.ts` (the output),
|
|
7
|
+
* but this SDK has no RUNTIME dependency on `@materialgraph/search` (it's a
|
|
8
8
|
* devDependency only, for the parity tests in `__tests__/`), so the shapes are
|
|
9
9
|
* copied here rather than imported. `contract-parity.test.ts` keeps this
|
|
10
10
|
* mirror honest against the server types.
|
package/operations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.8.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [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 ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], 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 ["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", "POST", "/api/v1/variants/by-color", "find_variants_by_color"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [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 ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], 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 ["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", "POST", "/api/v1/variants/by-color", "find_variants_by_color"], readonly ["findVariantsByVector", "POST", "/api/v1/variants/by-vector", "find_variants_by_vector"], readonly ["findSampledTogether", "POST", "/api/v1/variants/sampled-together", "find_sampled_together"], readonly ["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"], readonly ["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"], readonly ["resolveColor", "GET", "/api/v1/search/colors/resolve", "resolve_color_name"], readonly ["listAttributes", "GET", "/api/v1/catalog/attributes", "catalog_list_attributes"], readonly ["listEnumValues", "GET", "/api/v1/catalog/enum-values", "catalog_list_enum_values"], readonly ["categories.list", "GET", "/api/v1/categories", "list_categories"], readonly ["categories.get", "GET", "/api/v1/categories/{id}", "get_category"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["colors.profiles", "GET", "/api/v1/colors/profiles", "get_category_color_profiles"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["workflows.start", "POST", "/api/v1/workflows/{workflowId}/runs", "create_public_run"], readonly ["workflows.run", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}", "get_public_run"], readonly ["workflows.streamRunEvents", "GET", "/api/v1/workflows/{workflowId}/runs/{runId}/events", "list_public_run_events"]];
|
|
3
3
|
export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
|
|
4
4
|
export type SdkOperation = Readonly<{
|
|
5
5
|
clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
|
package/operations.js
CHANGED
|
@@ -107,7 +107,12 @@ const OPERATION_DEFINITIONS = [
|
|
|
107
107
|
"/api/v1/variants/by-vector",
|
|
108
108
|
"find_variants_by_vector",
|
|
109
109
|
],
|
|
110
|
-
[
|
|
110
|
+
[
|
|
111
|
+
"findSampledTogether",
|
|
112
|
+
"POST",
|
|
113
|
+
"/api/v1/variants/sampled-together",
|
|
114
|
+
"find_sampled_together",
|
|
115
|
+
],
|
|
111
116
|
["resolveVariant", "POST", "/api/v1/variants/resolve", "resolve_variant"],
|
|
112
117
|
["getVariant", "GET", "/api/v1/variants/{variantId}", "get_variant"],
|
|
113
118
|
[
|
|
@@ -162,7 +167,6 @@ const OPERATION_DEFINITIONS = [
|
|
|
162
167
|
"/api/v1/workflows/{workflowId}/runs/{runId}",
|
|
163
168
|
"get_public_run",
|
|
164
169
|
],
|
|
165
|
-
["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"],
|
|
166
170
|
[
|
|
167
171
|
"workflows.streamRunEvents",
|
|
168
172
|
"GET",
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `resolve_variant` contract).
|
|
4
4
|
*
|
|
5
5
|
* These intentionally mirror the domain-owned Zod contract
|
|
6
|
-
* (`@materialgraph/
|
|
6
|
+
* (`@materialgraph/catalog/identify-contract`) rather than importing it: the
|
|
7
7
|
* published SDK must carry no workspace package dependency.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
package/resolve-variant-types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `resolve_variant` contract).
|
|
4
4
|
*
|
|
5
5
|
* These intentionally mirror the domain-owned Zod contract
|
|
6
|
-
* (`@materialgraph/
|
|
6
|
+
* (`@materialgraph/catalog/identify-contract`) rather than importing it: the
|
|
7
7
|
* published SDK must carry no workspace package dependency.
|
|
8
8
|
*/
|
|
9
9
|
export {};
|
|
@@ -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 ["list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "samplize_catalogue_products", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "list_schema_value_dictionaries", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "search_variants", "find_variants_by_color", "find_variants_by_vector", "
|
|
4
|
+
export declare const RESPONSE_SCHEMA_OPERATION_IDS: readonly ["list_catalog_documents", "list_catalog_pages", "get_catalog_page_representation", "list_catalog_product_references", "samplize_catalogue_products", "get_catalogue_references_batch", "list_catalogue_channel_collections", "get_catalogue_document_access", "list_material_blocks", "list_variant_assets", "list_material_documents", "list_schema_value_dictionaries", "get_material_pairings", "list_associated_finishes", "list_associated_products", "get_applicability", "list_variants", "list_variant_facets", "search_variants", "find_variants_by_color", "find_variants_by_vector", "find_sampled_together", "resolve_variant", "get_variant", "resolve_color_name", "catalog_list_attributes", "catalog_list_enum_values", "list_categories", "get_category", "whoami", "get_category_color_profiles", "extract_image_palette", "list_brands", "upload_source_material", "create_public_run", "get_public_run"];
|
|
5
5
|
export declare const RESPONSE_SCHEMA_CATALOGUE_JSON: string;
|