@uniformdev/canvas 19.131.1-alpha.8 → 19.133.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.
package/dist/index.esm.js CHANGED
@@ -481,22 +481,15 @@ var CanvasClient = class extends ApiClient {
481
481
  /** Fetches lists of Canvas compositions, optionally by type */
482
482
  async getCompositionList(params = {}) {
483
483
  const { projectId } = this.options;
484
- const { resolveData, filters, ...originParams } = params;
485
- const rewrittenFilters = Object.entries(filters != null ? filters : {}).reduce((acc, [key, value]) => {
486
- const lhs = `filters.${key}` + (typeof value === "object" ? `[${Object.keys(value)[0]}]` : "");
487
- let rhs = typeof value === "object" ? Object.values(value)[0] : value;
488
- rhs = Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim();
489
- return { ...acc, [lhs]: rhs };
490
- }, {});
484
+ const { resolveData, ...originParams } = params;
491
485
  if (!resolveData) {
492
- const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
486
+ const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
493
487
  return this.apiClient(fetchUri);
494
488
  }
495
489
  const edgeParams = {
496
490
  ...originParams,
497
491
  projectId,
498
- ...params.diagnostics ? { diagnostics: "true" } : {},
499
- ...rewrittenFilters
492
+ ...params.diagnostics ? { diagnostics: "true" } : {}
500
493
  };
501
494
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
502
495
  return this.apiClient(edgeUrl, this.edgeApiRequestInit);
package/dist/index.js CHANGED
@@ -616,22 +616,15 @@ var CanvasClient = class extends import_api2.ApiClient {
616
616
  /** Fetches lists of Canvas compositions, optionally by type */
617
617
  async getCompositionList(params = {}) {
618
618
  const { projectId } = this.options;
619
- const { resolveData, filters, ...originParams } = params;
620
- const rewrittenFilters = Object.entries(filters != null ? filters : {}).reduce((acc, [key, value]) => {
621
- const lhs = `filters.${key}` + (typeof value === "object" ? `[${Object.keys(value)[0]}]` : "");
622
- let rhs = typeof value === "object" ? Object.values(value)[0] : value;
623
- rhs = Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim();
624
- return { ...acc, [lhs]: rhs };
625
- }, {});
619
+ const { resolveData, ...originParams } = params;
626
620
  if (!resolveData) {
627
- const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
621
+ const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
628
622
  return this.apiClient(fetchUri);
629
623
  }
630
624
  const edgeParams = {
631
625
  ...originParams,
632
626
  projectId,
633
- ...params.diagnostics ? { diagnostics: "true" } : {},
634
- ...rewrittenFilters
627
+ ...params.diagnostics ? { diagnostics: "true" } : {}
635
628
  };
636
629
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
637
630
  return this.apiClient(edgeUrl, this.edgeApiRequestInit);
package/dist/index.mjs CHANGED
@@ -481,22 +481,15 @@ var CanvasClient = class extends ApiClient {
481
481
  /** Fetches lists of Canvas compositions, optionally by type */
482
482
  async getCompositionList(params = {}) {
483
483
  const { projectId } = this.options;
484
- const { resolveData, filters, ...originParams } = params;
485
- const rewrittenFilters = Object.entries(filters != null ? filters : {}).reduce((acc, [key, value]) => {
486
- const lhs = `filters.${key}` + (typeof value === "object" ? `[${Object.keys(value)[0]}]` : "");
487
- let rhs = typeof value === "object" ? Object.values(value)[0] : value;
488
- rhs = Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim();
489
- return { ...acc, [lhs]: rhs };
490
- }, {});
484
+ const { resolveData, ...originParams } = params;
491
485
  if (!resolveData) {
492
- const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
486
+ const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
493
487
  return this.apiClient(fetchUri);
494
488
  }
495
489
  const edgeParams = {
496
490
  ...originParams,
497
491
  projectId,
498
- ...params.diagnostics ? { diagnostics: "true" } : {},
499
- ...rewrittenFilters
492
+ ...params.diagnostics ? { diagnostics: "true" } : {}
500
493
  };
501
494
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
502
495
  return this.apiClient(edgeUrl, this.edgeApiRequestInit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "19.131.1-alpha.8+d326c2787d",
3
+ "version": "19.133.0",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "pusher-js": "8.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@uniformdev/assets": "19.131.1-alpha.8+d326c2787d",
42
- "@uniformdev/context": "19.131.1-alpha.8+d326c2787d",
41
+ "@uniformdev/assets": "19.133.0",
42
+ "@uniformdev/context": "19.133.0",
43
43
  "immer": "10.0.3"
44
44
  },
45
45
  "files": [
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "d326c2787d0b159fcd7edb45b165a8eae54862e6"
51
+ "gitHead": "405a628b0f592ca13bf65006ef5c92261468c144"
52
52
  }