@builder.io/sdk 6.0.4 → 6.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @builder.io/sdk
2
2
 
3
+ ## 6.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d4e36b: fix: updated defaultStyles example
8
+
9
+ ## 6.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - ff56386: Fix: correctly set default value for `omit` field as `meta.componentsUsed` in Content API calls and preserve empty string
14
+
3
15
  ## 6.0.4
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -42,5 +42,6 @@ builder.canTrack = false;
42
42
  View all options for `builder.get` [here](./docs/interfaces/GetContentOptions.md)
43
43
 
44
44
  Learn more about how to use the Builder core SDK:
45
+
45
46
  - [Content API](https://www.builder.io/c/docs/content-api)
46
47
  - [Querying Cheatsheet](https://www.builder.io/c/docs/querying)
@@ -1052,7 +1052,7 @@
1052
1052
 
1053
1053
  var DEFAULT_API_VERSION = 'v3';
1054
1054
 
1055
- var SDK_VERSION = '6.0.4';
1055
+ var SDK_VERSION = '6.0.6';
1056
1056
 
1057
1057
  function datePlusMinutes(minutes) {
1058
1058
  if (minutes === void 0) { minutes = 30; }
@@ -2444,7 +2444,7 @@
2444
2444
  };
2445
2445
  Builder.prototype.flushGetContentQueue = function (usePastQueue, useQueue) {
2446
2446
  var _this = this;
2447
- var _a;
2447
+ var _a, _b;
2448
2448
  if (usePastQueue === void 0) { usePastQueue = false; }
2449
2449
  if (!this.apiKey) {
2450
2450
  throw new Error("Fetching content failed, expected apiKey to be defined instead got: ".concat(this.apiKey));
@@ -2465,7 +2465,7 @@
2465
2465
  this.getOverridesFromQueryString();
2466
2466
  var queryParams = __assign(__assign({
2467
2467
  // TODO: way to force a request to be in a separate queue. or just lower queue limit to be 1 by default
2468
- omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options), this.queryOptions);
2468
+ omit: (_a = queue[0].omit) !== null && _a !== void 0 ? _a : 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options), this.queryOptions);
2469
2469
  if (queue[0].locale) {
2470
2470
  queryParams.locale = queue[0].locale;
2471
2471
  }
@@ -2570,8 +2570,8 @@
2570
2570
  'static',
2571
2571
  'includeRefs',
2572
2572
  ];
2573
- for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
2574
- var key = properties_1[_b];
2573
+ for (var _c = 0, properties_1 = properties; _c < properties_1.length; _c++) {
2574
+ var key = properties_1[_c];
2575
2575
  var value = options[key];
2576
2576
  if (value !== undefined) {
2577
2577
  if (this.apiEndpoint === 'query') {
@@ -2585,7 +2585,7 @@
2585
2585
  }
2586
2586
  }
2587
2587
  }
2588
- if (this.preview && this.previewingModel === ((_a = queue === null || queue === void 0 ? void 0 : queue[0]) === null || _a === void 0 ? void 0 : _a.model)) {
2588
+ if (this.preview && this.previewingModel === ((_b = queue === null || queue === void 0 ? void 0 : queue[0]) === null || _b === void 0 ? void 0 : _b.model)) {
2589
2589
  queryParams.preview = 'true';
2590
2590
  }
2591
2591
  var hasParams = Object.keys(queryParams).length > 0;