@puckeditor/cloud-client 0.1.0-canary.c433e7ae → 0.1.0-canary.cad10367

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,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[]], 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
  };
39
39
  };
40
40
 
41
- export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, streamingFetch, tool };
41
+ export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, createPuckApi as default, 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[]], 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
  };
39
39
  };
40
40
 
41
- export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, streamingFetch, tool };
41
+ export { type ApiParams, type Endpoint, type PuckCatchAll, createPuckApi, createPuckApi as default, streamingFetch, tool };