@instruments/materialgraph 0.37.3 → 0.38.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.
@@ -40,18 +40,8 @@ export type CategoryColorProfile = {
40
40
  avgChroma: number;
41
41
  colors: CategoryColor[];
42
42
  };
43
- /**
44
- * The snapshot a profile response was computed from. `variantCount` is the
45
- * size of the whole materialized view across every category, not of the
46
- * selection; `refreshedAt` is its age.
47
- */
48
- export type CategoryColorProfilesBasis = {
49
- variantCount: number;
50
- refreshedAt: string | null;
51
- };
52
43
  export type CategoryColorProfilesResponse = {
53
44
  profiles: CategoryColorProfile[];
54
- basis: CategoryColorProfilesBasis;
55
45
  };
56
46
  /** Request parameters for `colors.profiles()`. */
57
47
  export type ColorProfilesParams = {
@@ -63,14 +63,13 @@ export declare class ColorsClient {
63
63
  * not a missing key. Category keys come from `mg.categories.list()`.
64
64
  *
65
65
  * @example
66
- * const { profiles, basis } = await mg.colors.profiles({
66
+ * const { profiles } = await mg.colors.profiles({
67
67
  * productTypeIds: ["wood_surface", "wood_flooring"],
68
68
  * groupBy: "merged",
69
69
  * select: "diverse",
70
70
  * topN: 12,
71
71
  * });
72
- * // profiles[0].members is ["wood_flooring", "wood_surface"]; check
73
- * // basis.refreshedAt before presenting the palette as current.
72
+ * // profiles[0].members is ["wood_flooring", "wood_surface"].
74
73
  */
75
74
  profiles(params: ColorProfilesParams, signal?: AbortSignal): Promise<CategoryColorProfilesResponse>;
76
75
  }
package/colors-client.js CHANGED
@@ -32,14 +32,13 @@ export class ColorsClient {
32
32
  * not a missing key. Category keys come from `mg.categories.list()`.
33
33
  *
34
34
  * @example
35
- * const { profiles, basis } = await mg.colors.profiles({
35
+ * const { profiles } = await mg.colors.profiles({
36
36
  * productTypeIds: ["wood_surface", "wood_flooring"],
37
37
  * groupBy: "merged",
38
38
  * select: "diverse",
39
39
  * topN: 12,
40
40
  * });
41
- * // profiles[0].members is ["wood_flooring", "wood_surface"]; check
42
- * // basis.refreshedAt before presenting the palette as current.
41
+ * // profiles[0].members is ["wood_flooring", "wood_surface"].
43
42
  */
44
43
  async profiles(params, signal) {
45
44
  return await this.#transport.get("get_category_color_profiles", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.37.3",
3
+ "version": "0.38.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {