talizen 0.0.4 → 0.0.5

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/cms/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { requestJson, resolveTalizenConfig } from "../core/index.js";
2
2
  export async function ListContent(key, params = {}, options) {
3
3
  const projectId = requireProjectId(options);
4
- const response = await requestJson(`/api/r/project/${projectId}/cms_by_key/${key}/content_list`, {
4
+ const response = await requestJson(`/cms/${key}/content_list`, {
5
5
  method: "POST",
6
6
  body: JSON.stringify({
7
7
  limit: params.limit,
@@ -16,7 +16,7 @@ export async function ListContent(key, params = {}, options) {
16
16
  }
17
17
  export async function GetContent(key, slug, params, options) {
18
18
  const projectId = requireProjectId(options);
19
- const url = new URL(`/api/r/project/${projectId}/cms_by_key/${key}/content`, "https://talizen.local");
19
+ const url = new URL(`/cms/${key}/content`, "https://talizen.local");
20
20
  url.searchParams.set("slug", slug);
21
21
  if (params?.builtinRef != null) {
22
22
  url.searchParams.set("builtin_ref", String(params.builtinRef));
@@ -25,7 +25,7 @@ export async function GetContent(key, slug, params, options) {
25
25
  }
26
26
  export async function GetContentWithPrevNext(key, slug, params = {}, options) {
27
27
  const projectId = requireProjectId(options);
28
- const url = new URL(`/api/r/project/${projectId}/cms_by_key/${key}/content_with_prev_next`, "https://talizen.local");
28
+ const url = new URL(`/cms/${key}/content_with_prev_next`, "https://talizen.local");
29
29
  url.searchParams.set("slug", slug);
30
30
  if (params.prev != null) {
31
31
  url.searchParams.set("prev", String(params.prev));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "talizen",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Talizen frontend SDK types for cms, form and core.",
5
5
  "type": "module",
6
6
  "license": "MIT",