@instruments/materialgraph 0.25.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 +22 -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 +1 -1
  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 +38 -35
  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 +8 -8
  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 +4 -4
  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 +5 -5
  90. package/search-response-receipt-types.d.ts +58 -42
  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 -93
  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
@@ -18,7 +18,7 @@ export type SuggestKind = "product" | "brand" | "category";
18
18
  /** How the query met the suggestion's label. Strongest first. */
19
19
  export type SuggestMatch = "prefix" | "word" | "contains" | "fuzzy";
20
20
  /** One ranked typeahead suggestion, carrying the identity it resolves to. */
21
- export interface Suggestion {
21
+ export type Suggestion = {
22
22
  kind: SuggestKind;
23
23
  /** The entity's name as written, for display. */
24
24
  label: string;
@@ -38,25 +38,25 @@ export interface Suggestion {
38
38
  variantId: string | null;
39
39
  /** Variants behind this entity IN MATERIALGRAPH — a coverage figure. */
40
40
  variantCount: number;
41
- }
41
+ };
42
42
  /** The suggest response: the query as interpreted, plus the ranked suggestions. */
43
- export interface SuggestResponse {
43
+ export type SuggestResponse = {
44
44
  /** The normalised query the corpus was matched against. */
45
45
  query: string;
46
46
  /** Ranked best-match-first. Empty when nothing came close — a miss, not an error. */
47
47
  suggestions: Suggestion[];
48
48
  /** Present only when a narrowing governed corpus was applied. */
49
49
  corpusScope?: CorpusScopeReceipt;
50
- }
50
+ };
51
51
  /** Options for {@link MaterialGraphClient.suggest}. */
52
- export interface SuggestOptions {
52
+ export type SuggestOptions = {
53
53
  /** How many suggestions to return (1–20, default 8). */
54
54
  limit?: number;
55
55
  /** Restrict to these kinds. Omit for all of them. */
56
56
  kind?: SuggestKind | SuggestKind[];
57
57
  /** Governed corpus membership; absent means the whole graph. */
58
58
  corpusScope?: CorpusScope;
59
- }
59
+ };
60
60
  /**
61
61
  * Shape the query string for a suggest call.
62
62
  *
@@ -65,7 +65,7 @@ export interface SuggestOptions {
65
65
  * here rather than being sent as repeated `?kind=` pairs the route would ignore.
66
66
  * Undefined members are dropped by the transport.
67
67
  */
68
- export declare function suggestQuery(q: string, options?: SuggestOptions): {
68
+ export declare const suggestQuery: (q: string, options?: SuggestOptions) => {
69
69
  q: string;
70
70
  limit?: number;
71
71
  kind?: string;
package/suggest-types.js CHANGED
@@ -20,9 +20,9 @@
20
20
  * here rather than being sent as repeated `?kind=` pairs the route would ignore.
21
21
  * Undefined members are dropped by the transport.
22
22
  */
23
- export function suggestQuery(q, options) {
23
+ export const suggestQuery = (q, options) => {
24
24
  const kind = Array.isArray(options?.kind)
25
25
  ? options.kind.join(",")
26
26
  : options?.kind;
27
- return { q, limit: options?.limit, kind, corpusScope: options?.corpusScope };
28
- }
27
+ return { corpusScope: options?.corpusScope, kind, limit: options?.limit, q };
28
+ };
@@ -1,5 +1,5 @@
1
1
  /** Exact, source-path-grained status coverage for primary product typing. */
2
- export interface ProductTypeStatusCoverageCounts {
2
+ export type ProductTypeStatusCoverageCounts = {
3
3
  variants: number;
4
4
  accepted: number;
5
5
  proposed: number;
@@ -8,13 +8,13 @@ export interface ProductTypeStatusCoverageCounts {
8
8
  proposedUnknownConfidence: number;
9
9
  otherStatus: number;
10
10
  missingPrimary: number;
11
- }
12
- export interface ProductTypeStatusCoverageSourcePath extends ProductTypeStatusCoverageCounts {
11
+ };
12
+ export type ProductTypeStatusCoverageSourcePath = {
13
13
  /** Complete stored source path; null means the product retained no path. */
14
14
  sourcePath: string | null;
15
- }
15
+ } & ProductTypeStatusCoverageCounts;
16
16
  /** Current primary-assignment coverage, never an inferred acceptance decision. */
17
- export interface ProductTypeStatusCoverage {
17
+ export type ProductTypeStatusCoverage = {
18
18
  computedAt: string;
19
19
  basis: {
20
20
  count: "exact";
@@ -26,9 +26,9 @@ export interface ProductTypeStatusCoverage {
26
26
  };
27
27
  totals: ProductTypeStatusCoverageCounts;
28
28
  sourcePaths: ProductTypeStatusCoverageSourcePath[];
29
- }
30
- export interface ProductTypeCoverageOptions {
29
+ };
30
+ export type ProductTypeCoverageOptions = {
31
31
  [key: string]: number | undefined;
32
32
  /** Reporting cutoff in [0,1], default 0.85; it never accepts a proposal. */
33
33
  comparisonThreshold?: number;
34
- }
34
+ };