@better-i18n/sdk 0.4.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-i18n/sdk",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Content SDK for Better i18n - headless CMS client for fetching content models and entries",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/client.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ClientConfig, ContentClient } from "./types";
2
2
  import { createContentAPIClient } from "./content-api";
3
3
 
4
- const DEFAULT_API_BASE = "https://dash.better-i18n.com";
4
+ const DEFAULT_API_BASE = "https://content.better-i18n.com";
5
5
 
6
6
  /**
7
7
  * Creates a Better i18n content client.
@@ -15,9 +15,9 @@ import type {
15
15
  * Requires an API key for authentication via the `x-api-key` header.
16
16
  *
17
17
  * URL patterns:
18
- * - Models: `{apiBase}/api/v1/content/{org}/{project}/models`
19
- * - Entries: `{apiBase}/api/v1/content/{org}/{project}/models/{model}/entries`
20
- * - Entry: `{apiBase}/api/v1/content/{org}/{project}/models/{model}/entries/{slug}`
18
+ * - Models: `{apiBase}/v1/content/{org}/{project}/models`
19
+ * - Entries: `{apiBase}/v1/content/{org}/{project}/models/{model}/entries`
20
+ * - Entry: `{apiBase}/v1/content/{org}/{project}/models/{model}/entries/{slug}`
21
21
  */
22
22
  export function createContentAPIClient(
23
23
  apiBase: string,
@@ -26,7 +26,7 @@ export function createContentAPIClient(
26
26
  apiKey: string,
27
27
  debug = false,
28
28
  ): ContentClient {
29
- const base = `${apiBase}/api/v1/content/${org}/${project}`;
29
+ const base = `${apiBase}/v1/content/${org}/${project}`;
30
30
  const headers: Record<string, string> = {
31
31
  "x-api-key": apiKey,
32
32
  "content-type": "application/json",