@puckeditor/cloud-client 0.7.0-canary.75c0f12c → 0.7.0
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/chunk-4OIQ53M4.mjs +20734 -0
- package/dist/experimental.d.mts +81 -0
- package/dist/experimental.d.ts +81 -0
- package/dist/experimental.js +21082 -0
- package/dist/experimental.mjs +358 -0
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +162 -115
- package/dist/index.mjs +7 -20672
- package/package.json +21 -7
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PuckCloudOptions as PuckCloudOptions$1 } from './index.mjs';
|
|
2
|
+
export { ChatParams, Endpoint, GenerateParams, OnFinishCallback, OnFinishResult, UserTool, UserToolRegistry, chat, endpoints, generate, tool } from './index.mjs';
|
|
3
|
+
import { Data } from '@puckeditor/core';
|
|
4
|
+
import 'zod/v4';
|
|
5
|
+
import 'ai';
|
|
6
|
+
|
|
7
|
+
type VerifyPuckHostParams = {
|
|
8
|
+
host?: string;
|
|
9
|
+
siteId?: string | null;
|
|
10
|
+
token?: string | null;
|
|
11
|
+
};
|
|
12
|
+
declare const verifyPuckHost: ({ host, siteId, token, }: VerifyPuckHostParams) => Promise<boolean>;
|
|
13
|
+
|
|
14
|
+
type GetPageParams = {
|
|
15
|
+
apiKey?: string | null;
|
|
16
|
+
host?: string;
|
|
17
|
+
path: string;
|
|
18
|
+
siteId?: string | null;
|
|
19
|
+
};
|
|
20
|
+
declare const getPublishedPageData: ({ apiKey, host, path, siteId, }: GetPageParams) => Promise<Data | null>;
|
|
21
|
+
|
|
22
|
+
type PageVersionStatus = "published" | "unpublished" | "error";
|
|
23
|
+
type ReadPageArgs = {
|
|
24
|
+
id?: string | null;
|
|
25
|
+
path?: string | null;
|
|
26
|
+
siteId: string;
|
|
27
|
+
versionId?: string | null;
|
|
28
|
+
};
|
|
29
|
+
type CreatePageBody = {
|
|
30
|
+
data?: Data;
|
|
31
|
+
path: string;
|
|
32
|
+
status?: PageVersionStatus;
|
|
33
|
+
versionId?: string | null;
|
|
34
|
+
};
|
|
35
|
+
type PublishPageBody = {
|
|
36
|
+
data?: Data;
|
|
37
|
+
path?: string;
|
|
38
|
+
status?: PageVersionStatus;
|
|
39
|
+
versionId?: string | null;
|
|
40
|
+
};
|
|
41
|
+
type PageVersion = {
|
|
42
|
+
id?: string;
|
|
43
|
+
data: Data;
|
|
44
|
+
status?: PageVersionStatus;
|
|
45
|
+
versionNumber?: number;
|
|
46
|
+
createdAt?: string;
|
|
47
|
+
updatedAt?: string;
|
|
48
|
+
isNew?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type PageRecord = {
|
|
51
|
+
id?: string;
|
|
52
|
+
path: string;
|
|
53
|
+
status?: PageVersionStatus;
|
|
54
|
+
versions?: PageVersion[];
|
|
55
|
+
};
|
|
56
|
+
type SitePageSummary = Pick<PageRecord, "id" | "path" | "status"> & {
|
|
57
|
+
status: PageVersionStatus;
|
|
58
|
+
};
|
|
59
|
+
type PageReadResponse = {
|
|
60
|
+
page: Required<Pick<PageRecord, "id" | "path">> & {
|
|
61
|
+
versions: PageVersion[];
|
|
62
|
+
};
|
|
63
|
+
sitePages: SitePageSummary[];
|
|
64
|
+
};
|
|
65
|
+
type PagePublishResponse = {
|
|
66
|
+
page: Required<Pick<PageRecord, "id" | "path">> & {
|
|
67
|
+
versions: PageVersion[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
type PageDeleteResponse = {
|
|
71
|
+
page: Required<Pick<PageRecord, "id" | "path">>;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type PuckCloudOptions = PuckCloudOptions$1 & {
|
|
75
|
+
pages?: {
|
|
76
|
+
siteId?: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
declare function puckHandler(request: Request, options?: PuckCloudOptions): Promise<Response>;
|
|
80
|
+
|
|
81
|
+
export { type CreatePageBody, type GetPageParams, type PageDeleteResponse, type PagePublishResponse, type PageReadResponse, type PageRecord, type PageVersion, type PageVersionStatus, type PublishPageBody, type PuckCloudOptions, type ReadPageArgs, type SitePageSummary, type VerifyPuckHostParams, getPublishedPageData as getPage, puckHandler, verifyPuckHost };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PuckCloudOptions as PuckCloudOptions$1 } from './index.js';
|
|
2
|
+
export { ChatParams, Endpoint, GenerateParams, OnFinishCallback, OnFinishResult, UserTool, UserToolRegistry, chat, endpoints, generate, tool } from './index.js';
|
|
3
|
+
import { Data } from '@puckeditor/core';
|
|
4
|
+
import 'zod/v4';
|
|
5
|
+
import 'ai';
|
|
6
|
+
|
|
7
|
+
type VerifyPuckHostParams = {
|
|
8
|
+
host?: string;
|
|
9
|
+
siteId?: string | null;
|
|
10
|
+
token?: string | null;
|
|
11
|
+
};
|
|
12
|
+
declare const verifyPuckHost: ({ host, siteId, token, }: VerifyPuckHostParams) => Promise<boolean>;
|
|
13
|
+
|
|
14
|
+
type GetPageParams = {
|
|
15
|
+
apiKey?: string | null;
|
|
16
|
+
host?: string;
|
|
17
|
+
path: string;
|
|
18
|
+
siteId?: string | null;
|
|
19
|
+
};
|
|
20
|
+
declare const getPublishedPageData: ({ apiKey, host, path, siteId, }: GetPageParams) => Promise<Data | null>;
|
|
21
|
+
|
|
22
|
+
type PageVersionStatus = "published" | "unpublished" | "error";
|
|
23
|
+
type ReadPageArgs = {
|
|
24
|
+
id?: string | null;
|
|
25
|
+
path?: string | null;
|
|
26
|
+
siteId: string;
|
|
27
|
+
versionId?: string | null;
|
|
28
|
+
};
|
|
29
|
+
type CreatePageBody = {
|
|
30
|
+
data?: Data;
|
|
31
|
+
path: string;
|
|
32
|
+
status?: PageVersionStatus;
|
|
33
|
+
versionId?: string | null;
|
|
34
|
+
};
|
|
35
|
+
type PublishPageBody = {
|
|
36
|
+
data?: Data;
|
|
37
|
+
path?: string;
|
|
38
|
+
status?: PageVersionStatus;
|
|
39
|
+
versionId?: string | null;
|
|
40
|
+
};
|
|
41
|
+
type PageVersion = {
|
|
42
|
+
id?: string;
|
|
43
|
+
data: Data;
|
|
44
|
+
status?: PageVersionStatus;
|
|
45
|
+
versionNumber?: number;
|
|
46
|
+
createdAt?: string;
|
|
47
|
+
updatedAt?: string;
|
|
48
|
+
isNew?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type PageRecord = {
|
|
51
|
+
id?: string;
|
|
52
|
+
path: string;
|
|
53
|
+
status?: PageVersionStatus;
|
|
54
|
+
versions?: PageVersion[];
|
|
55
|
+
};
|
|
56
|
+
type SitePageSummary = Pick<PageRecord, "id" | "path" | "status"> & {
|
|
57
|
+
status: PageVersionStatus;
|
|
58
|
+
};
|
|
59
|
+
type PageReadResponse = {
|
|
60
|
+
page: Required<Pick<PageRecord, "id" | "path">> & {
|
|
61
|
+
versions: PageVersion[];
|
|
62
|
+
};
|
|
63
|
+
sitePages: SitePageSummary[];
|
|
64
|
+
};
|
|
65
|
+
type PagePublishResponse = {
|
|
66
|
+
page: Required<Pick<PageRecord, "id" | "path">> & {
|
|
67
|
+
versions: PageVersion[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
type PageDeleteResponse = {
|
|
71
|
+
page: Required<Pick<PageRecord, "id" | "path">>;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type PuckCloudOptions = PuckCloudOptions$1 & {
|
|
75
|
+
pages?: {
|
|
76
|
+
siteId?: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
declare function puckHandler(request: Request, options?: PuckCloudOptions): Promise<Response>;
|
|
80
|
+
|
|
81
|
+
export { type CreatePageBody, type GetPageParams, type PageDeleteResponse, type PagePublishResponse, type PageReadResponse, type PageRecord, type PageVersion, type PageVersionStatus, type PublishPageBody, type PuckCloudOptions, type ReadPageArgs, type SitePageSummary, type VerifyPuckHostParams, getPublishedPageData as getPage, puckHandler, verifyPuckHost };
|