@instruments/materialgraph 0.18.0 → 0.19.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 (55) hide show
  1. package/association-types.d.ts +29 -4
  2. package/browse-types.d.ts +14 -3
  3. package/by-colour-types.d.ts +24 -6
  4. package/by-spec-types.d.ts +4 -0
  5. package/catalogue-client.d.ts +3 -0
  6. package/catalogue-client.js +4 -0
  7. package/catalogue-types.d.ts +3 -1
  8. package/citation-types.d.ts +34 -0
  9. package/citation-types.js +1 -0
  10. package/client-browse.d.ts +1 -0
  11. package/client-browse.js +1 -0
  12. package/client-vocabulary.d.ts +10 -0
  13. package/client-vocabulary.js +32 -0
  14. package/client.d.ts +22 -45
  15. package/client.js +40 -55
  16. package/composition-types.d.ts +6 -0
  17. package/corpus-scope-types.d.ts +1 -1
  18. package/errors.d.ts +1 -1
  19. package/errors.js +2 -0
  20. package/index.d.ts +6 -0
  21. package/json-value-types.d.ts +8 -0
  22. package/json-value-types.js +1 -0
  23. package/match-types.d.ts +3 -0
  24. package/material-resources-client.d.ts +3 -0
  25. package/material-resources-client.js +4 -0
  26. package/material-types.d.ts +24 -0
  27. package/operations.d.ts +1 -1
  28. package/operations.js +37 -0
  29. package/package.json +1 -1
  30. package/palette-search-types.d.ts +16 -2
  31. package/render-assets-types.d.ts +65 -0
  32. package/render-assets-types.js +1 -0
  33. package/run-events.d.ts +13 -0
  34. package/samplize-catalogue-types.d.ts +92 -0
  35. package/samplize-catalogue-types.js +1 -0
  36. package/schedule-reference-types.d.ts +46 -0
  37. package/schedule-reference-types.js +1 -0
  38. package/schedule-references-client.d.ts +14 -0
  39. package/schedule-references-client.js +26 -0
  40. package/schedule-types.d.ts +34 -0
  41. package/search-mood-types.d.ts +6 -0
  42. package/search-mood-types.js +1 -0
  43. package/search-refinement-types.d.ts +5 -0
  44. package/search-request-types.d.ts +5 -0
  45. package/search-response-receipt-types.d.ts +8 -0
  46. package/search-result-validation.js +10 -0
  47. package/slot-pool-types.d.ts +2 -0
  48. package/spec-types.d.ts +6 -1
  49. package/specifications.d.ts +3 -1
  50. package/specifications.js +4 -0
  51. package/substitute-types.d.ts +75 -0
  52. package/substitute-types.js +1 -0
  53. package/taxonomy-coverage-types.d.ts +34 -0
  54. package/taxonomy-coverage-types.js +1 -0
  55. package/types.d.ts +15 -18
package/types.d.ts CHANGED
@@ -32,18 +32,12 @@ import type { MaterialDetail, MaterialTile } from "./material-types.js";
32
32
  import type { QueryUnderstanding } from "./query-understanding-types.js";
33
33
  import type { CollapsedVariant, SearchAnatomyMember } from "./search-collapse-types.js";
34
34
  import type { SearchDisambiguation, SearchSuggestion } from "./search-refinement-types.js";
35
- import type { CompoundColourConstraintReceipt, CompoundFormConstraintReceipt, SearchExecutionPlan, SearchMode, SearchRerankReport, SearchResponseExplainReceipts } from "./search-response-receipt-types.js";
35
+ import type { CompoundColourConstraintReceipt, CompoundFormConstraintReceipt, SearchExecutionPlan, SearchMode, SearchRefinementReceipt, SearchRerankReport, SearchResponseExplainReceipts } from "./search-response-receipt-types.js";
36
36
  import type { SearchWindowReceipt } from "./search-window-types.js";
37
37
  export type * from "./search-response-receipt-types.js";
38
+ export type { MoodInterpretation } from "./search-mood-types.js";
38
39
  export type OpenEnum<T extends string> = T | (string & {});
39
- /**
40
- * A JSON value, recursively — exactly what survives a `jsonb` round-trip
41
- * unchanged. Used where a payload's SHAPE belongs to its producer but its values
42
- * must still be JSON: `Date`, `bigint`, `undefined`, and functions are not.
43
- */
44
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
45
- [key: string]: JsonValue;
46
- };
40
+ export type { JsonValue } from "./json-value-types.js";
47
41
  /**
48
42
  * One palette swatch of a material's main image — colour DERIVED FROM PRODUCT
49
43
  * IMAGERY, so read it as visual likeness, never as a declared colour spec.
@@ -120,6 +114,8 @@ export interface VisualMeaning {
120
114
  * `visualMeanings` is not "this material has no visual meaning".
121
115
  */
122
116
  export interface SearchResultItem {
117
+ /** Accepted sampleability fact. Absent means unknown, never false. */
118
+ sampleable?: boolean;
123
119
  /** Opaque — round-trip verbatim into `material()`, `pairings()`, `similarTo`. */
124
120
  variantId: VariantId;
125
121
  brand: string;
@@ -134,7 +130,7 @@ export interface SearchResultItem {
134
130
  * Populated on EVERY lane: `search()` (all four arms), `match()`, and
135
131
  * `matchStream()` frames.
136
132
  * ABSENT means no MB identity is known for the variant — never that the SKU
137
- * cannot be ordered. Presence is the orderability tell; absence is silence.
133
+ * cannot be ordered. Presence identifies the source; it does not establish sampleability.
138
134
  */
139
135
  materialBankId?: string;
140
136
  manufacturerCode?: string;
@@ -276,6 +272,8 @@ export interface SearchResultItem {
276
272
  * card does not carry.
277
273
  */
278
274
  export interface SearchCardItem {
275
+ /** Accepted sampleability fact. Absent means unknown, never false. */
276
+ sampleable?: boolean;
279
277
  /** Opaque — round-trip verbatim. */
280
278
  variantId: VariantId;
281
279
  productId: ProductId | null;
@@ -380,14 +378,6 @@ export interface SearchFacets {
380
378
  absent: SearchAbsentFacet[];
381
379
  counts: Record<string, SearchFacetCount>;
382
380
  }
383
- /** Inspectable metadata for an opaque, principal-bound search refinement receipt. */
384
- export interface SearchRefinementReceipt {
385
- token: string;
386
- expiresAt: string;
387
- poolSize: number;
388
- schemaVersion: string;
389
- projectionVersion: number;
390
- }
391
381
  /**
392
382
  * The search response envelope. `view` discriminates the `results` union:
393
383
  * `"full"` (default) carries {@link SearchResultItem}s, `"card"` the lean
@@ -438,6 +428,11 @@ export interface SearchResponse extends SearchResponseExplainReceipts {
438
428
  timings?: Record<string, number>;
439
429
  /** A detected mood term overridden by a stronger colour reading. */
440
430
  supersededMoodId?: string;
431
+ /**
432
+ * Explicit standard-search mood reading; null ids mean no selected mood.
433
+ * Absent when mood was not evaluated or an older server produced the result.
434
+ */
435
+ moodInterpretation?: import("./search-mood-types.js").MoodInterpretation;
441
436
  /**
442
437
  * Present when the query had multiple defensible readings. Says which one
443
438
  * ran, or leaves every reading non-default when the engine chose none. Every
@@ -713,6 +708,8 @@ export interface PairingsOptions {
713
708
  categories?: string;
714
709
  /** Page size, 1–24 inclusive (default 12). The server rejects (400), not clamps, values outside this range. */
715
710
  limit?: number;
711
+ /** Return sampled order evidence only, without board or colour fallback. */
712
+ sampledOnly?: boolean;
716
713
  /** Graph-owned order applied within fixed cospec → considered → colour tiers. */
717
714
  order?: PairingOrderMode;
718
715
  /** Optional Material Bank/orderable gate; requires an explicit `order`. */