@instruments/materialgraph 0.27.0 → 0.27.1

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/client.js CHANGED
@@ -325,6 +325,8 @@ export class MaterialGraphClient extends CatalogueClient {
325
325
  attributes: input.attributes?.length
326
326
  ? input.attributes.join(",")
327
327
  : undefined,
328
+ collapse: input.collapse,
329
+ corpusScope: input.corpusScope,
328
330
  cursor: input.cursor,
329
331
  filters: input.filters ? JSON.stringify(input.filters) : undefined,
330
332
  include: input.include?.length ? input.include.join(",") : undefined,
@@ -59,9 +59,16 @@ export type OrderByEntry = {
59
59
  field: string;
60
60
  };
61
61
  export type ListVariantsInclude = "image" | "url";
62
+ export type ListVariantsCollapse = "product";
62
63
  export type ListVariantsInput = {
63
64
  /** Attribute ids to project under each item's `specifications`. */
64
65
  attributes?: string[];
66
+ /**
67
+ * `product`: one row per product, its lead colourway by the page's order,
68
+ * with `variantCount` saying how many colourways stand behind it. The
69
+ * cursor pages products.
70
+ */
71
+ collapse?: ListVariantsCollapse;
65
72
  /**
66
73
  * Only variants in this corpus scope: the rows, the page and the cursor.
67
74
  * Absent or `all` is every variant.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instruments/materialgraph",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {