@builder.io/sdk-qwik 0.1.16 → 0.2.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.
@@ -1707,8 +1707,9 @@ const getBuilderSearchParamsFromWindow = () => {
1707
1707
  return getBuilderSearchParams(searchParams);
1708
1708
  };
1709
1709
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
1710
+ const DEFAULT_API_VERSION = "v3";
1710
1711
  const generateContentUrl = (options) => {
1711
- const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion = "v2" } = options;
1712
+ const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion = DEFAULT_API_VERSION } = options;
1712
1713
  if (!apiKey)
1713
1714
  throw new Error("Missing API key");
1714
1715
  if (![
@@ -1705,8 +1705,9 @@ const getBuilderSearchParamsFromWindow = () => {
1705
1705
  return getBuilderSearchParams(searchParams);
1706
1706
  };
1707
1707
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
1708
+ const DEFAULT_API_VERSION = "v3";
1708
1709
  const generateContentUrl = (options) => {
1709
- const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion = "v2" } = options;
1710
+ const { limit = 30, userAttributes, query, noTraverse = false, model, apiKey, includeRefs = true, locale, apiVersion = DEFAULT_API_VERSION } = options;
1710
1711
  if (!apiKey)
1711
1712
  throw new Error("Missing API key");
1712
1713
  if (![
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.1.16",
3
+ "version": "0.2.0",
4
4
  "description": "Builder.io Qwik SDK",
5
5
  "type": "module",
6
6
  "main": "./lib/index.qwik.cjs",
@@ -39,7 +39,7 @@ export interface GetContentOptions {
39
39
  /**
40
40
  * If provided, sets the Builder API version used to fetch content.
41
41
  *
42
- * Defaults to `v2`.
42
+ * Defaults to `v3`.
43
43
  */
44
44
  apiVersion?: 'v2' | 'v3';
45
45
  }
@@ -1 +1,2 @@
1
1
  export type ApiVersion = 'v2' | 'v3';
2
+ export declare const DEFAULT_API_VERSION: ApiVersion;