@puckeditor/cloud-client 0.1.0-canary.6ea74618 → 0.1.0-canary.7292c21d

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.d.mts CHANGED
@@ -32,7 +32,7 @@ declare const createPuckApi: ({ apiKey, host, }?: {
32
32
  host?: string;
33
33
  apiKey?: string;
34
34
  }) => {
35
- all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]] | string[] | string, body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
35
+ all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]], body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
36
36
  ai: {
37
37
  chat: ({ chatId, context, messages: initialMessages, config, pageData, tools, }: ApiParams["chat"]) => Promise<Response>;
38
38
  };
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ declare const createPuckApi: ({ apiKey, host, }?: {
32
32
  host?: string;
33
33
  apiKey?: string;
34
34
  }) => {
35
- all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]] | string[] | string, body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
35
+ all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]], body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
36
36
  ai: {
37
37
  chat: ({ chatId, context, messages: initialMessages, config, pageData, tools, }: ApiParams["chat"]) => Promise<Response>;
38
38
  };
package/dist/index.js CHANGED
@@ -19820,8 +19820,7 @@ var createPuckApi = ({
19820
19820
  }
19821
19821
  };
19822
19822
  const all = (path, body) => __async(null, null, function* () {
19823
- const parts = typeof path === "string" ? path.split("/") : path;
19824
- const endpoint = parts[0];
19823
+ const endpoint = path[0];
19825
19824
  if (endpoint === "chat") {
19826
19825
  return ai.chat(body);
19827
19826
  }
package/dist/index.mjs CHANGED
@@ -19788,8 +19788,7 @@ var createPuckApi = ({
19788
19788
  }
19789
19789
  };
19790
19790
  const all = (path, body) => __async(null, null, function* () {
19791
- const parts = typeof path === "string" ? path.split("/") : path;
19792
- const endpoint = parts[0];
19791
+ const endpoint = path[0];
19793
19792
  if (endpoint === "chat") {
19794
19793
  return ai.chat(body);
19795
19794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/cloud-client",
3
- "version": "0.1.0-canary.6ea74618",
3
+ "version": "0.1.0-canary.7292c21d",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",