@instruments/materialgraph 0.24.0 → 0.26.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.
Files changed (124) hide show
  1. package/association-types.d.ts +20 -20
  2. package/associations-client.d.ts +4 -4
  3. package/associations-client.js +3 -10
  4. package/attribution-types.d.ts +3 -3
  5. package/brand-most-sampled-types.d.ts +4 -4
  6. package/brand-types.d.ts +6 -6
  7. package/brands-client.d.ts +4 -4
  8. package/brands-client.js +9 -13
  9. package/browse-types.d.ts +8 -8
  10. package/by-colour-types.d.ts +18 -18
  11. package/by-spec-types.d.ts +14 -14
  12. package/catalog-discovery-types.d.ts +14 -14
  13. package/catalogue-client.d.ts +4 -4
  14. package/catalogue-client.js +38 -37
  15. package/catalogue-types.d.ts +4 -4
  16. package/citation-types.d.ts +4 -4
  17. package/client-browse.d.ts +4 -4
  18. package/client-browse.js +24 -25
  19. package/client-config.d.ts +2 -2
  20. package/client-exploration.d.ts +3 -3
  21. package/client-exploration.js +4 -6
  22. package/client-source-material-comments.d.ts +4 -4
  23. package/client-source-material-comments.js +4 -38
  24. package/client-vocabulary.d.ts +8 -8
  25. package/client-vocabulary.js +20 -30
  26. package/client.d.ts +11 -45
  27. package/client.js +143 -188
  28. package/codes-client.d.ts +2 -2
  29. package/codes-client.js +8 -8
  30. package/codes-types.d.ts +34 -34
  31. package/colour-aggregate-types.d.ts +24 -24
  32. package/colours-client.d.ts +2 -2
  33. package/colours-client.js +15 -15
  34. package/compare-types.d.ts +10 -10
  35. package/composition-client.d.ts +3 -3
  36. package/composition-client.js +8 -7
  37. package/composition-types.d.ts +12 -12
  38. package/coordinate-client.d.ts +2 -2
  39. package/coordinate-client.js +1 -13
  40. package/corpus-scope-types.d.ts +3 -3
  41. package/corpus-scope-types.js +1 -25
  42. package/correction-types.d.ts +10 -10
  43. package/demand-batch-types.d.ts +18 -18
  44. package/demand-types.d.ts +24 -24
  45. package/errors.d.ts +12 -12
  46. package/errors.js +53 -52
  47. package/exploration-types.d.ts +29 -22
  48. package/fan-deck-types.d.ts +6 -6
  49. package/http-transport.d.ts +13 -21
  50. package/http-transport.js +31 -28
  51. package/identify-types.d.ts +10 -10
  52. package/index.d.ts +0 -6
  53. package/index.js +0 -2
  54. package/match-rejection-types.d.ts +6 -6
  55. package/match-stream-types.d.ts +32 -32
  56. package/match-stream.d.ts +2 -2
  57. package/match-stream.js +55 -41
  58. package/match-types.d.ts +8 -8
  59. package/material-asset-types.d.ts +26 -26
  60. package/material-block-types.d.ts +6 -6
  61. package/material-query-plan-types.d.ts +26 -26
  62. package/material-resources-client.d.ts +5 -5
  63. package/material-resources-client.js +10 -20
  64. package/material-types.d.ts +12 -12
  65. package/ndjson.js +16 -8
  66. package/operations.d.ts +6 -6
  67. package/operations.js +9 -39
  68. package/package.json +2 -2
  69. package/palette-completion-types.d.ts +22 -22
  70. package/palette-search-types.d.ts +28 -28
  71. package/query-understanding-types.d.ts +43 -36
  72. package/render-assets-types.d.ts +8 -8
  73. package/resolve-client.d.ts +2 -2
  74. package/resolve-client.js +4 -6
  75. package/resolve-colour-types.d.ts +22 -6
  76. package/resolve-types.d.ts +10 -10
  77. package/run-types.d.ts +70 -70
  78. package/runs.d.ts +13 -26
  79. package/runs.js +77 -89
  80. package/samplize-catalogue-types.d.ts +18 -18
  81. package/samplize-colorvec.d.ts +20 -20
  82. package/samplize-colorvec.js +66 -42
  83. package/schema-resource-types.d.ts +38 -38
  84. package/schema-resource-types.js +5 -5
  85. package/search-card-types.d.ts +14 -5
  86. package/search-collapse-types.d.ts +4 -4
  87. package/search-mood-types.d.ts +2 -2
  88. package/search-refinement-types.d.ts +8 -8
  89. package/search-request-types.d.ts +6 -6
  90. package/search-response-receipt-types.d.ts +135 -34
  91. package/search-response-types.d.ts +2 -2
  92. package/search-result-validation.d.ts +3 -3
  93. package/search-result-validation.js +53 -36
  94. package/search-window-types.d.ts +2 -2
  95. package/slot-pool-types.d.ts +20 -20
  96. package/source-material-validation.d.ts +3 -3
  97. package/source-material-validation.js +35 -39
  98. package/spec-facet-types.d.ts +10 -10
  99. package/spec-types.d.ts +6 -6
  100. package/specifications.d.ts +9 -25
  101. package/specifications.js +15 -21
  102. package/sse.d.ts +2 -2
  103. package/sse.js +32 -16
  104. package/substitute-types.d.ts +22 -22
  105. package/suggest-types.d.ts +7 -7
  106. package/suggest-types.js +3 -3
  107. package/taxonomy-coverage-types.d.ts +8 -8
  108. package/types.d.ts +119 -119
  109. package/validation.d.ts +26 -26
  110. package/validation.js +97 -92
  111. package/webmcp.d.ts +2 -2
  112. package/webmcp.generated.js +94 -87
  113. package/project-types.d.ts +0 -79
  114. package/project-types.js +0 -9
  115. package/projects.d.ts +0 -13
  116. package/projects.js +0 -46
  117. package/run-events.d.ts +0 -106
  118. package/run-events.js +0 -32
  119. package/schedule-reference-types.d.ts +0 -46
  120. package/schedule-reference-types.js +0 -1
  121. package/schedule-references-client.d.ts +0 -14
  122. package/schedule-references-client.js +0 -26
  123. package/schedule-types.d.ts +0 -261
  124. package/schedule-types.js +0 -1
@@ -4,21 +4,21 @@ import type { ResolvedMeaning } from "./resolve-types.js";
4
4
  import type { SearchInput } from "./search-request-types.js";
5
5
  import type { OpenEnum } from "./types.js";
6
6
  export type MaterialQueryVocabularyKind = OpenEnum<"attribute" | "dictionary_term" | "inline_enum" | "product_type" | "product_type_group">;
7
- export interface MaterialQuerySpan {
7
+ export type MaterialQuerySpan = {
8
8
  start: number;
9
9
  end: number;
10
10
  text: string;
11
- }
12
- export interface MaterialQueryOwner {
11
+ };
12
+ export type MaterialQueryOwner = {
13
13
  attributeId: string;
14
14
  attributeName: string;
15
- }
16
- export interface MaterialQueryLifecycle {
15
+ };
16
+ export type MaterialQueryLifecycle = {
17
17
  status: string;
18
18
  introducedIn?: string;
19
19
  deprecatedIn?: string;
20
20
  supersededBy?: string;
21
- }
21
+ };
22
22
  export type MaterialQueryOntologyContext = {
23
23
  description: string;
24
24
  valueKind: string;
@@ -26,10 +26,10 @@ export type MaterialQueryOntologyContext = {
26
26
  } | {
27
27
  dictionaryId: string;
28
28
  dictionaryName: string;
29
- owningAttributes: Array<{
29
+ owningAttributes: {
30
30
  id: string;
31
31
  name: string;
32
- }>;
32
+ }[];
33
33
  lifecycle: MaterialQueryLifecycle;
34
34
  } | {
35
35
  attributeId: string;
@@ -41,23 +41,23 @@ export type MaterialQueryOntologyContext = {
41
41
  } | {
42
42
  description: string;
43
43
  };
44
- export interface MaterialQueryApplicability {
44
+ export type MaterialQueryApplicability = {
45
45
  status: OpenEnum<"all" | "some" | "none" | "unknown">;
46
46
  categoryId?: string;
47
47
  productTypeIds: string[];
48
48
  applicableProductTypeIds: string[];
49
- }
50
- export interface MaterialQueryCoverage {
49
+ };
50
+ export type MaterialQueryCoverage = {
51
51
  variants: number;
52
52
  basis: OpenEnum<"facet_index">;
53
53
  scope: OpenEnum<"corpus">;
54
- }
55
- export interface MaterialQueryReachability {
54
+ };
55
+ export type MaterialQueryReachability = {
56
56
  status: OpenEnum<"positive" | "zero" | "unknown">;
57
57
  categoryId: string;
58
58
  basis: OpenEnum<"bounded_probe" | "unmeasured">;
59
- }
60
- export interface MaterialQueryCandidate {
59
+ };
60
+ export type MaterialQueryCandidate = {
61
61
  kind: MaterialQueryVocabularyKind;
62
62
  subjectType: MaterialQueryVocabularyKind;
63
63
  subjectId: string;
@@ -76,8 +76,8 @@ export interface MaterialQueryCandidate {
76
76
  coverage?: MaterialQueryCoverage;
77
77
  reachability?: MaterialQueryReachability;
78
78
  reason?: string;
79
- }
80
- export interface MaterialQueryCriterion {
79
+ };
80
+ export type MaterialQueryCriterion = {
81
81
  source: {
82
82
  subjectType: MaterialQueryVocabularyKind;
83
83
  subjectId: string;
@@ -95,7 +95,7 @@ export interface MaterialQueryCriterion {
95
95
  coverage: MaterialQueryCoverage;
96
96
  applicability: MaterialQueryApplicability;
97
97
  reachability?: MaterialQueryReachability;
98
- }
98
+ };
99
99
  export type MaterialQueryStandardMeaning = ResolvedMeaning | QuerySense;
100
100
  export type MaterialQueryAmbiguityAlternative = (MaterialQueryOwner & {
101
101
  kind: OpenEnum<"owner">;
@@ -108,7 +108,7 @@ export type MaterialQueryAmbiguityAlternative = (MaterialQueryOwner & {
108
108
  kind: OpenEnum<"standard_meaning">;
109
109
  meaning: MaterialQueryStandardMeaning;
110
110
  };
111
- export interface MaterialQueryPlan {
111
+ export type MaterialQueryPlan = {
112
112
  version: OpenEnum<"1">;
113
113
  verdict: OpenEnum<"executable" | "partial" | "refused">;
114
114
  rawQuery: string;
@@ -135,20 +135,20 @@ export interface MaterialQueryPlan {
135
135
  undertone?: string;
136
136
  } | null;
137
137
  residualText: string;
138
- unspentSpans: Array<MaterialQuerySpan & {
138
+ unspentSpans: (MaterialQuerySpan & {
139
139
  reason: OpenEnum<"residual" | "ambiguous" | "refused">;
140
- }>;
141
- ambiguities: Array<{
140
+ })[];
141
+ ambiguities: {
142
142
  subjectType: MaterialQueryVocabularyKind;
143
143
  subjectId: string;
144
144
  span: MaterialQuerySpan;
145
145
  reason: string;
146
146
  alternatives: MaterialQueryAmbiguityAlternative[];
147
- }>;
148
- standardMeanings: Array<{
147
+ }[];
148
+ standardMeanings: {
149
149
  span: MaterialQuerySpan;
150
150
  meanings: MaterialQueryStandardMeaning[];
151
- }>;
151
+ }[];
152
152
  /** Complete ordinary-search requests authored by MaterialGraph. Execute verbatim. */
153
153
  requests: SearchInput[];
154
- }
154
+ };
@@ -1,18 +1,18 @@
1
1
  /** Material blocks, safe assets, and technical documents over one shared transport. */
2
- import { HttpTransport } from "./http-transport.js";
2
+ import type { HttpTransport } from "./http-transport.js";
3
3
  import type { VariantId } from "./identifiers.js";
4
4
  import type { MaterialAssetProjection, MaterialDocumentPage, MaterialDocumentPageOptions } from "./material-asset-types.js";
5
5
  import type { MaterialBlockProjection } from "./material-block-types.js";
6
6
  import type { MaterialRenderAssets } from "./render-assets-types.js";
7
7
  /** Read known and explicitly unobserved canonical material fields. */
8
- export declare function materialBlocks(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialBlockProjection>;
8
+ export declare const materialBlocks: (transport: HttpTransport, variantId: VariantId, signal?: AbortSignal) => Promise<MaterialBlockProjection>;
9
9
  /** Read only redistribution-safe images and downloads for a material. */
10
- export declare function materialAssets(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialAssetProjection>;
10
+ export declare const materialAssets: (transport: HttpTransport, variantId: VariantId, signal?: AbortSignal) => Promise<MaterialAssetProjection>;
11
11
  /** Read the accepted render-ready appearance projection, or an explicit unavailable reason. */
12
- export declare function materialRenderAssets(transport: HttpTransport, variantId: VariantId, signal?: AbortSignal): Promise<MaterialRenderAssets>;
12
+ export declare const materialRenderAssets: (transport: HttpTransport, variantId: VariantId, signal?: AbortSignal) => Promise<MaterialRenderAssets>;
13
13
  /**
14
14
  * Read the owning Product's URL-deduplicated document page. Variant declarations
15
15
  * retain exact attribution; consumers inspect `appliesToRequestedVariant`
16
16
  * before presenting a sibling Variant declaration as applicable.
17
17
  */
18
- export declare function materialDocuments(transport: HttpTransport, variantId: VariantId, options?: MaterialDocumentPageOptions, signal?: AbortSignal): Promise<MaterialDocumentPage>;
18
+ export declare const materialDocuments: (transport: HttpTransport, variantId: VariantId, options?: MaterialDocumentPageOptions, signal?: AbortSignal) => Promise<MaterialDocumentPage>;
@@ -1,29 +1,19 @@
1
- /** Material blocks, safe assets, and technical documents over one shared transport. */
2
- import { HttpTransport } from "./http-transport.js";
3
1
  import { resolveOperation } from "./operations.js";
4
2
  /** Read known and explicitly unobserved canonical material fields. */
5
- export function materialBlocks(transport, variantId, signal) {
6
- return transport.requestJson(resolveOperation("list_material_blocks"), { signal, pathParams: { variantId } });
7
- }
3
+ export const materialBlocks = async (transport, variantId, signal) => await transport.requestJson(resolveOperation("list_material_blocks"), { pathParams: { variantId }, signal });
8
4
  /** Read only redistribution-safe images and downloads for a material. */
9
- export function materialAssets(transport, variantId, signal) {
10
- return transport.requestJson(resolveOperation("list_material_assets"), { signal, pathParams: { variantId } });
11
- }
5
+ export const materialAssets = async (transport, variantId, signal) => await transport.requestJson(resolveOperation("list_material_assets"), { pathParams: { variantId }, signal });
12
6
  /** Read the accepted render-ready appearance projection, or an explicit unavailable reason. */
13
- export function materialRenderAssets(transport, variantId, signal) {
14
- return transport.requestJson(resolveOperation("get_material_render_assets"), { signal, pathParams: { variantId } });
15
- }
7
+ export const materialRenderAssets = async (transport, variantId, signal) => await transport.requestJson(resolveOperation("get_material_render_assets"), { pathParams: { variantId }, signal });
16
8
  /**
17
9
  * Read the owning Product's URL-deduplicated document page. Variant declarations
18
10
  * retain exact attribution; consumers inspect `appliesToRequestedVariant`
19
11
  * before presenting a sibling Variant declaration as applicable.
20
12
  */
21
- export function materialDocuments(transport, variantId, options, signal) {
22
- return transport.requestJson(resolveOperation("list_material_documents"), {
23
- query: options
24
- ? { cursor: options.cursor, limit: options.limit }
25
- : undefined,
26
- signal,
27
- pathParams: { variantId },
28
- });
29
- }
13
+ export const materialDocuments = async (transport, variantId, options, signal) => await transport.requestJson(resolveOperation("list_material_documents"), {
14
+ pathParams: { variantId },
15
+ query: options
16
+ ? { cursor: options.cursor, limit: options.limit }
17
+ : undefined,
18
+ signal,
19
+ });
@@ -41,7 +41,7 @@ export type MaterialAvailability = OpenEnum<"available" | "discontinued" | "supe
41
41
  * successor that has itself been superseded reports `discontinued`/`unknown`
42
42
  * here; follow `variantId` for the next link in the chain.
43
43
  */
44
- export interface MaterialSuccessor {
44
+ export type MaterialSuccessor = {
45
45
  /** Opaque — round-trip verbatim to read the successor. */
46
46
  variantId: VariantId;
47
47
  brandSlug: string;
@@ -51,12 +51,12 @@ export interface MaterialSuccessor {
51
51
  variant: string;
52
52
  color: string | null;
53
53
  availability: MaterialAvailability;
54
- }
54
+ };
55
55
  /**
56
56
  * The grid-card projection of a material. Tiles carry `availability` but not the
57
57
  * successor record — read the detail projection for that.
58
58
  */
59
- export interface MaterialTile {
59
+ export type MaterialTile = {
60
60
  /** Accepted sampleability fact. Absent means unknown, never false. */
61
61
  sampleable?: boolean;
62
62
  /** Opaque — round-trip verbatim into every other material read. */
@@ -77,7 +77,7 @@ export interface MaterialTile {
77
77
  * the attribute is absent — never render a missing key as "unnamed".
78
78
  */
79
79
  colourName?: string;
80
- }
80
+ };
81
81
  /**
82
82
  * A sibling card: the tile, plus — when another variant of the same product
83
83
  * shares both its `variantName` and its `colourName` — the one attribute that
@@ -86,11 +86,11 @@ export interface MaterialTile {
86
86
  * code. The two fields arrive together or not at all; absent means nothing
87
87
  * collides, or neither attribute separates every look-alike.
88
88
  */
89
- export interface SiblingTile extends MaterialTile {
89
+ export type SiblingTile = {
90
90
  distinguishedBy?: OpenEnum<"size" | "code">;
91
91
  /** This sibling's value of `distinguishedBy`, e.g. `"3.5 in"`. */
92
92
  distinction?: string;
93
- }
93
+ } & MaterialTile;
94
94
  /**
95
95
  * A canonical attribute/term pair carried on a detail record.
96
96
  *
@@ -99,7 +99,7 @@ export interface SiblingTile extends MaterialTile {
99
99
  * `specificationFacets()` and `attributeValues()`. An attribute absent from
100
100
  * `facets` is unrecorded, never known-false.
101
101
  */
102
- export interface MaterialFacet {
102
+ export type MaterialFacet = {
103
103
  attributeId: string;
104
104
  term: string;
105
105
  /**
@@ -108,9 +108,9 @@ export interface MaterialFacet {
108
108
  * payloads. Only `specification` facets are valid inputs to `bySpec`.
109
109
  */
110
110
  role?: "identity" | "specification";
111
- }
111
+ };
112
112
  /** A retained product-type proposal. It is review evidence, never a category. */
113
- export interface ProposedProductType {
113
+ export type ProposedProductType = {
114
114
  id: string;
115
115
  displayName: string;
116
116
  confidence: number | null;
@@ -118,12 +118,12 @@ export interface ProposedProductType {
118
118
  sourceUrl: string | null;
119
119
  isPrimary: boolean;
120
120
  scope: "variant" | "product";
121
- }
121
+ };
122
122
  /** Accepted display categories remain separate from this review-state receipt. */
123
- export interface ProductTypeReceipt {
123
+ export type ProductTypeReceipt = {
124
124
  state: "accepted" | "proposed" | "unknown";
125
125
  proposedProductTypes: ProposedProductType[];
126
- }
126
+ };
127
127
  /**
128
128
  * One dimensional configuration of a material. Numeric fields are millimetres
129
129
  * (mass in kilograms); string fields are the source's own descriptors. The
package/ndjson.js CHANGED
@@ -32,8 +32,9 @@ export class NdjsonDecoder {
32
32
  const lines = [];
33
33
  for (;;) {
34
34
  const index = this.#buffer.indexOf("\n");
35
- if (index === -1)
35
+ if (index === -1) {
36
36
  break;
37
+ }
37
38
  lines.push(this.#buffer.slice(0, index));
38
39
  this.#buffer = this.#buffer.slice(index + 1);
39
40
  }
@@ -46,8 +47,9 @@ export class NdjsonDecoder {
46
47
  * raise, not this decoder's fragment to discard.
47
48
  */
48
49
  flush() {
49
- if (this.#buffer.length === 0)
50
+ if (this.#buffer.length === 0) {
50
51
  return [];
52
+ }
51
53
  const remainder = this.#buffer;
52
54
  this.#buffer = "";
53
55
  return [remainder];
@@ -66,34 +68,40 @@ export async function* readNdjsonLines(body, signal) {
66
68
  const ndjson = new NdjsonDecoder();
67
69
  try {
68
70
  for (;;) {
69
- if (signal?.aborted)
71
+ if (signal?.aborted) {
70
72
  return;
73
+ }
71
74
  let result;
72
75
  try {
73
76
  result = await reader.read();
74
77
  }
75
78
  catch (error) {
76
- if (signal?.aborted)
79
+ if (signal?.aborted) {
77
80
  return;
81
+ }
78
82
  throw error;
79
83
  }
80
84
  if (result.done) {
81
85
  // `decode()` with no argument flushes any dangling multi-byte sequence.
82
86
  for (const line of ndjson.push(decoder.decode())) {
83
- if (line.trim().length > 0)
87
+ if (line.trim().length > 0) {
84
88
  yield line;
89
+ }
85
90
  }
86
91
  for (const line of ndjson.flush()) {
87
- if (line.trim().length > 0)
92
+ if (line.trim().length > 0) {
88
93
  yield line;
94
+ }
89
95
  }
90
96
  return;
91
97
  }
92
98
  for (const line of ndjson.push(decoder.decode(result.value, { stream: true }))) {
93
- if (signal?.aborted)
99
+ if (signal?.aborted) {
94
100
  return;
95
- if (line.trim().length > 0)
101
+ }
102
+ if (line.trim().length > 0) {
96
103
  yield line;
104
+ }
97
105
  }
98
106
  }
99
107
  }
package/operations.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const MATERIALGRAPH_API_VERSION = "0.7.0";
2
- declare const OPERATION_DEFINITIONS: readonly [readonly ["brandMostSampled", "GET", "/api/v1/brands/most-sampled", "brands.most_sampled"], readonly ["colours.complete", "POST", "/api/v1/colours/palettes/complete", "complete_interior_palette"], readonly ["colours.discover", "GET", "/api/v1/colours/palettes", "discover_interior_palettes"], readonly ["samplizeColorVecCache", "GET", "/api/v1/catalogues/samplize/colorvec", "samplize_colorvec_cache"], readonly ["samplizeCatalogueSearch", "POST", "/api/v1/catalogues/samplize/search", "samplize_catalogue_search"], readonly ["scheduleReferences.list", "GET", "/api/v1/schedules/{scheduleId}/references", "list_schedule_reference_feedback"], readonly ["scheduleReferences.put", "PUT", "/api/v1/schedules/{scheduleId}/references/{referenceId}", "put_schedule_reference_feedback"], readonly ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"], readonly ["catalogPages", "GET", "/api/v1/catalogs/{catalogId}/pages", "list_catalog_pages"], readonly ["catalogPageRepresentation", "GET", "/api/v1/catalog-pages/{pageId}/representation", "get_catalog_page_representation"], readonly ["catalogReferences", "GET", "/api/v1/catalogs/{catalogId}/references", "list_catalog_product_references"], readonly ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["identify", "POST", "/api/v1/identify", "retrieval.identify"], readonly ["compare", "POST", "/api/v1/compare", "retrieval.compare"], readonly ["createCorrection", "POST", "/api/v1/corrections", "corrections.create"], readonly ["getCorrection", "GET", "/api/v1/corrections/{correctionId}", "corrections.get"], readonly ["listCorrections", "GET", "/api/v1/corrections", "corrections.list"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["rejectMatchResult", "POST", "/api/v1/search/match/{responseId}/rejections", "reject_match_result"], readonly ["matchRejections", "GET", "/api/v1/search/match/{responseId}/rejections", "list_match_rejections"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueCollections", "GET", "/api/v1/catalogues/collections", "list_catalogue_channel_collections"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_document_access"], readonly ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["materialRenderAssets", "GET", "/api/v1/materials/{variantId}/render-assets", "get_material_render_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["findSubstitutes", "POST", "/api/v1/materials/{variantId}/substitutes", "find_material_substitutes"], 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 ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["productTypeCoverage", "GET", "/api/v1/taxonomy/coverage", "get_product_type_status_coverage"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments.list", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments.post", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["runSchedule", "GET", "/api/v1/runs/{runId}/schedule", "get_run_finish_schedule"], readonly ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["createProject", "POST", "/api/v1/projects", "create_box_project"], readonly ["listProjects", "GET", "/api/v1/projects", "list_box_projects"], readonly ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"], readonly ["appendProjectEvent", "POST", "/api/v1/projects/{projectId}/events", "append_box_project_event"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
2
+ declare const OPERATION_DEFINITIONS: readonly [readonly ["brandMostSampled", "GET", "/api/v1/brands/most-sampled", "brands.most_sampled"], readonly ["colours.complete", "POST", "/api/v1/colours/palettes/complete", "complete_interior_palette"], readonly ["colours.discover", "GET", "/api/v1/colours/palettes", "discover_interior_palettes"], readonly ["samplizeColorVecCache", "GET", "/api/v1/catalogues/samplize/colorvec", "samplize_colorvec_cache"], readonly ["samplizeCatalogueSearch", "POST", "/api/v1/catalogues/samplize/search", "samplize_catalogue_search"], readonly ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"], readonly ["catalogPages", "GET", "/api/v1/catalogs/{catalogId}/pages", "list_catalog_pages"], readonly ["catalogPageRepresentation", "GET", "/api/v1/catalog-pages/{pageId}/representation", "get_catalog_page_representation"], readonly ["catalogReferences", "GET", "/api/v1/catalogs/{catalogId}/references", "list_catalog_product_references"], readonly ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["identify", "POST", "/api/v1/identify", "retrieval.identify"], readonly ["compare", "POST", "/api/v1/compare", "retrieval.compare"], readonly ["createCorrection", "POST", "/api/v1/corrections", "corrections.create"], readonly ["getCorrection", "GET", "/api/v1/corrections/{correctionId}", "corrections.get"], readonly ["listCorrections", "GET", "/api/v1/corrections", "corrections.list"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["samplizeCatalogue", "GET", "/api/v1/catalogues/samplize/products", "samplize_catalogue_products"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["rejectMatchResult", "POST", "/api/v1/search/match/{responseId}/rejections", "reject_match_result"], readonly ["matchRejections", "GET", "/api/v1/search/match/{responseId}/rejections", "list_match_rejections"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueCollections", "GET", "/api/v1/catalogues/collections", "list_catalogue_channel_collections"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_document_access"], readonly ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["materialRenderAssets", "GET", "/api/v1/materials/{variantId}/render-assets", "get_material_render_assets"], readonly ["materialDocuments", "GET", "/api/v1/materials/{variantId}/documents", "list_material_documents"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["findSubstitutes", "POST", "/api/v1/materials/{variantId}/substitutes", "find_material_substitutes"], 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 ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["productTypeCoverage", "GET", "/api/v1/taxonomy/coverage", "get_product_type_status_coverage"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments.list", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments.post", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
3
3
  export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
4
4
  export type SdkOperation = Readonly<{
5
5
  clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
@@ -9,13 +9,13 @@ export type SdkOperation = Readonly<{
9
9
  }>;
10
10
  export declare const SDK_OPERATIONS: readonly SdkOperation[];
11
11
  /** Look up a registered operation by its OpenAPI `operationId`. */
12
- export declare function findSdkOperation(operationId: SdkOperationId): SdkOperation | undefined;
12
+ export declare const findSdkOperation: (operationId: SdkOperationId) => SdkOperation | undefined;
13
13
  /**
14
14
  * Look up a registered operation, or throw. The lookup every caller that holds
15
- * a literal `operationId` wants — lived as a private copy in `client.ts` and
16
- * `projects.ts` before the association lens would have made it a third.
15
+ * a literal `operationId` wants — lived as a private copy in `client.ts`
16
+ * before the association lens would have made it a second.
17
17
  */
18
- export declare function resolveOperation(operationId: SdkOperationId): SdkOperation;
18
+ export declare const resolveOperation: (operationId: SdkOperationId) => SdkOperation;
19
19
  /** Substitute `{param}` path placeholders with percent-encoded values. */
20
- export declare function operationPath(sdkOperation: SdkOperation, pathParams?: Readonly<Record<string, string>>): string;
20
+ export declare const operationPath: (sdkOperation: SdkOperation, pathParams?: Readonly<Record<string, string>>) => string;
21
21
  export {};
package/operations.js CHANGED
@@ -31,18 +31,6 @@ const OPERATION_DEFINITIONS = [
31
31
  "/api/v1/catalogues/samplize/search",
32
32
  "samplize_catalogue_search",
33
33
  ],
34
- [
35
- "scheduleReferences.list",
36
- "GET",
37
- "/api/v1/schedules/{scheduleId}/references",
38
- "list_schedule_reference_feedback",
39
- ],
40
- [
41
- "scheduleReferences.put",
42
- "PUT",
43
- "/api/v1/schedules/{scheduleId}/references/{referenceId}",
44
- "put_schedule_reference_feedback",
45
- ],
46
34
  ["catalogs", "GET", "/api/v1/catalogs", "list_catalog_documents"],
47
35
  [
48
36
  "catalogPages",
@@ -337,12 +325,6 @@ const OPERATION_DEFINITIONS = [
337
325
  ["createRun", "POST", "/api/v1/runs", "create_public_run"],
338
326
  ["listRuns", "GET", "/api/v1/runs", "list_public_runs"],
339
327
  ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"],
340
- [
341
- "runSchedule",
342
- "GET",
343
- "/api/v1/runs/{runId}/schedule",
344
- "get_run_finish_schedule",
345
- ],
346
328
  ["citation", "GET", "/api/v1/citations/{citationId}", "get_verdict_citation"],
347
329
  [
348
330
  "streamRunEvents",
@@ -354,15 +336,6 @@ const OPERATION_DEFINITIONS = [
354
336
  ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"],
355
337
  ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"],
356
338
  ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"],
357
- ["createProject", "POST", "/api/v1/projects", "create_box_project"],
358
- ["listProjects", "GET", "/api/v1/projects", "list_box_projects"],
359
- ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"],
360
- [
361
- "appendProjectEvent",
362
- "POST",
363
- "/api/v1/projects/{projectId}/events",
364
- "append_box_project_event",
365
- ],
366
339
  ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"],
367
340
  ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"],
368
341
  ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"],
@@ -373,23 +346,20 @@ const OPERATION_DEFINITIONS = [
373
346
  "list_code_requirements",
374
347
  ],
375
348
  ];
376
- export const SDK_OPERATIONS = Object.freeze(OPERATION_DEFINITIONS.map(([clientMethod, method, path, operationId]) => Object.freeze({ clientMethod, method, path, operationId })));
349
+ export const SDK_OPERATIONS = Object.freeze(OPERATION_DEFINITIONS.map(([clientMethod, method, path, operationId]) => Object.freeze({ clientMethod, method, operationId, path })));
377
350
  /** Look up a registered operation by its OpenAPI `operationId`. */
378
- export function findSdkOperation(operationId) {
379
- return SDK_OPERATIONS.find((candidate) => candidate.operationId === operationId);
380
- }
351
+ export const findSdkOperation = (operationId) => SDK_OPERATIONS.find((candidate) => candidate.operationId === operationId);
381
352
  /**
382
353
  * Look up a registered operation, or throw. The lookup every caller that holds
383
- * a literal `operationId` wants — lived as a private copy in `client.ts` and
384
- * `projects.ts` before the association lens would have made it a third.
354
+ * a literal `operationId` wants — lived as a private copy in `client.ts`
355
+ * before the association lens would have made it a second.
385
356
  */
386
- export function resolveOperation(operationId) {
357
+ export const resolveOperation = (operationId) => {
387
358
  const match = findSdkOperation(operationId);
388
- if (!match)
359
+ if (!match) {
389
360
  throw MaterialGraphError.unexpected(`Unknown SDK operation: ${operationId}`);
361
+ }
390
362
  return match;
391
- }
363
+ };
392
364
  /** Substitute `{param}` path placeholders with percent-encoded values. */
393
- export function operationPath(sdkOperation, pathParams = {}) {
394
- return Object.entries(pathParams).reduce((path, [name, value]) => path.replace(`{${name}}`, encodeURIComponent(value)), sdkOperation.path);
395
- }
365
+ export const operationPath = (sdkOperation, pathParams = {}) => Object.entries(pathParams).reduce((path, [name, value]) => path.replace(`{${name}}`, encodeURIComponent(value)), sdkOperation.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.24.0",
3
+ "version": "0.26.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "dependencies": {
20
- "@instruments/colorscope": "7.6.0"
20
+ "@instruments/colorscope": "9.0.1"
21
21
  },
22
22
  "license": "Proprietary",
23
23
  "engines": {
@@ -1,26 +1,26 @@
1
1
  /** Public wire types; the SDK does not load the producer corpus. */
2
2
  export type CompositionalRole = "Foundation" | "Supporting" | "Accent";
3
- export interface RetainedColor {
3
+ export type RetainedColor = {
4
4
  readonly id: string;
5
5
  readonly hex: string;
6
6
  readonly role?: CompositionalRole;
7
7
  readonly paintVariantId?: string;
8
- }
9
- export interface CompletionRequest {
8
+ };
9
+ export type CompletionRequest = {
10
10
  readonly inputs: readonly RetainedColor[];
11
11
  readonly maxDistance?: number;
12
12
  readonly limit?: number;
13
13
  readonly white?: "published" | "perceptual";
14
14
  readonly memberCount?: number;
15
15
  readonly excludeHexes?: readonly string[];
16
- }
17
- export interface CompletionAssignment {
16
+ };
17
+ export type CompletionAssignment = {
18
18
  readonly input: RetainedColor;
19
19
  readonly referenceIndex: number;
20
20
  readonly referenceHex: string;
21
21
  readonly distance: number;
22
- }
23
- export interface CompletionMember {
22
+ };
23
+ export type CompletionMember = {
24
24
  readonly hex: string;
25
25
  readonly referenceHex: string;
26
26
  readonly referenceIndex: number;
@@ -29,8 +29,8 @@ export interface CompletionMember {
29
29
  readonly proportion: number;
30
30
  readonly sourceRole: string | null;
31
31
  readonly sourceRelation: string | null;
32
- }
33
- export interface PaletteCompletion {
32
+ };
33
+ export type PaletteCompletion = {
34
34
  readonly uses?: readonly {
35
35
  readonly inputId: string;
36
36
  readonly role: CompositionalRole;
@@ -52,20 +52,20 @@ export interface PaletteCompletion {
52
52
  readonly proportionBasis: "sourced" | "proposed";
53
53
  readonly worstDistance: number;
54
54
  readonly totalDistance: number;
55
- }
55
+ };
56
56
  export type PaletteCompleteInput = CompletionRequest & {
57
57
  sourceVersion: string;
58
58
  };
59
- export interface PaletteDiscoverInput {
59
+ export type PaletteDiscoverInput = {
60
60
  sourceVersion: string;
61
61
  character?: "warm" | "cool" | "very-light" | "light" | "dark" | "muted" | "soft" | "vivid";
62
62
  moreLike?: string;
63
63
  cursor?: string;
64
64
  limit?: number;
65
- }
66
- export interface MaterializedPalette {
65
+ };
66
+ export type MaterializedPalette = {
67
67
  completion: PaletteCompletion;
68
- samples: Array<{
68
+ samples: {
69
69
  retainedPaint?: {
70
70
  variantId: string;
71
71
  name: string;
@@ -87,15 +87,15 @@ export interface MaterializedPalette {
87
87
  status: string;
88
88
  distance: number | null;
89
89
  units: "oklab-euclidean";
90
- }>;
91
- }
92
- interface PaletteVersions {
90
+ }[];
91
+ };
92
+ type PaletteVersions = {
93
93
  sourceVersion: string;
94
94
  corpusVersion: string;
95
95
  algorithmVersion: string;
96
96
  transport: "colorscope-package";
97
- }
98
- export interface PaletteCompleteResponse extends PaletteVersions {
97
+ };
98
+ export type PaletteCompleteResponse = {
99
99
  results: MaterializedPalette[];
100
100
  coverage: {
101
101
  status: string;
@@ -106,10 +106,10 @@ export interface PaletteCompleteResponse extends PaletteVersions {
106
106
  units: string;
107
107
  policy: string;
108
108
  };
109
- }
110
- export interface PaletteDiscoverResponse extends PaletteVersions {
109
+ } & PaletteVersions;
110
+ export type PaletteDiscoverResponse = {
111
111
  results: MaterializedPalette[];
112
112
  total: number;
113
113
  nextCursor: string | null;
114
- }
114
+ } & PaletteVersions;
115
115
  export {};