@puckeditor/cloud-client 0.1.0-canary.c30878d4 → 0.1.0-canary.c433e7ae
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -19599
- package/dist/index.mjs +27 -19599
- package/package.json +6 -4
package/dist/index.d.mts
CHANGED
|
@@ -32,10 +32,10 @@ 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[]]
|
|
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
|
};
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi,
|
|
41
|
+
export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, streamingFetch, tool };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,10 +32,10 @@ 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[]]
|
|
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
|
};
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi,
|
|
41
|
+
export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, streamingFetch, tool };
|