@puckeditor/cloud-client 0.1.0-canary.5f6dc7c0 → 0.1.0-canary.63828df0
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
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[]], body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
|
|
35
|
+
all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]] | 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[]], body: ThisEndpoint extends Endpoint ? ApiParams[ThisEndpoint] : any) => Promise<Response>;
|
|
35
|
+
all: <ThisEndpoint extends Endpoint | string>(path: [ThisEndpoint | string, ...string[]] | 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,7 +19820,8 @@ var createPuckApi = ({
|
|
|
19820
19820
|
}
|
|
19821
19821
|
};
|
|
19822
19822
|
const all = (path, body) => __async(null, null, function* () {
|
|
19823
|
-
const
|
|
19823
|
+
const parts = typeof path === "string" ? path.split("/") : path;
|
|
19824
|
+
const endpoint = parts[0];
|
|
19824
19825
|
if (endpoint === "chat") {
|
|
19825
19826
|
return ai.chat(body);
|
|
19826
19827
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -19788,7 +19788,8 @@ var createPuckApi = ({
|
|
|
19788
19788
|
}
|
|
19789
19789
|
};
|
|
19790
19790
|
const all = (path, body) => __async(null, null, function* () {
|
|
19791
|
-
const
|
|
19791
|
+
const parts = typeof path === "string" ? path.split("/") : path;
|
|
19792
|
+
const endpoint = parts[0];
|
|
19792
19793
|
if (endpoint === "chat") {
|
|
19793
19794
|
return ai.chat(body);
|
|
19794
19795
|
}
|
package/package.json
CHANGED