admin-lib-cms 1.2.5 → 1.2.7
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 +28 -22
- package/dist/index.d.ts +28 -22
- package/dist/index.js +461 -122
- package/dist/index.mjs +471 -132
- package/dist/types.d.mts +17 -1
- package/dist/types.d.ts +17 -1
- package/package.json +2 -2
- package/dist/chunk-6DZX6EAA.mjs +0 -37
- package/dist/chunk-CQW7KMB2.mjs +0 -120
- package/dist/chunk-Y6FXYEAI.mjs +0 -10
- package/dist/chunk-ZG5XBIW7.mjs +0 -152
- package/dist/email.d.mts +0 -3
- package/dist/email.d.ts +0 -3
- package/dist/email.js +0 -144
- package/dist/email.mjs +0 -6
- package/dist/types-uBvGNd4_.d.mts +0 -78
- package/dist/types-uBvGNd4_.d.ts +0 -78
package/dist/types-uBvGNd4_.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
type FieldType = "text" | "textarea" | "richtext" | "image" | "link" | "color" | "list" | "password";
|
|
2
|
-
interface EditableMeta {
|
|
3
|
-
id: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
type: FieldType;
|
|
6
|
-
section?: string;
|
|
7
|
-
pageId?: string;
|
|
8
|
-
defaultValue?: unknown;
|
|
9
|
-
itemSchema?: {
|
|
10
|
-
key: string;
|
|
11
|
-
type: "text" | "textarea" | "boolean" | "icon" | "image" | "number";
|
|
12
|
-
label?: string;
|
|
13
|
-
options?: string[];
|
|
14
|
-
}[];
|
|
15
|
-
fixedLength?: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface PageDef {
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
path: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
}
|
|
23
|
-
interface CollectionField {
|
|
24
|
-
id: string;
|
|
25
|
-
label: string;
|
|
26
|
-
type: FieldType | "number" | "boolean" | "select" | "icon";
|
|
27
|
-
options?: string[] | {
|
|
28
|
-
label: string;
|
|
29
|
-
value: string;
|
|
30
|
-
}[];
|
|
31
|
-
defaultValue?: unknown;
|
|
32
|
-
}
|
|
33
|
-
interface CollectionDef {
|
|
34
|
-
id: string;
|
|
35
|
-
name: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
fields: CollectionField[];
|
|
38
|
-
}
|
|
39
|
-
interface GlobalGroup {
|
|
40
|
-
id: string;
|
|
41
|
-
label: string;
|
|
42
|
-
fields: EditableMeta[];
|
|
43
|
-
}
|
|
44
|
-
interface CmsConfig {
|
|
45
|
-
siteName?: string;
|
|
46
|
-
pages: PageDef[];
|
|
47
|
-
collections?: CollectionDef[];
|
|
48
|
-
globals?: GlobalGroup[];
|
|
49
|
-
components?: PageDef[];
|
|
50
|
-
}
|
|
51
|
-
type OverridesMap = Record<string, unknown>;
|
|
52
|
-
type CollectionEntry = {
|
|
53
|
-
id: string;
|
|
54
|
-
[k: string]: unknown;
|
|
55
|
-
};
|
|
56
|
-
interface Submission {
|
|
57
|
-
id: string;
|
|
58
|
-
formId: string;
|
|
59
|
-
submittedAt: string;
|
|
60
|
-
data: Record<string, unknown>;
|
|
61
|
-
read?: boolean;
|
|
62
|
-
}
|
|
63
|
-
interface StorageAdapter {
|
|
64
|
-
name: string;
|
|
65
|
-
getOverrides(): Promise<OverridesMap>;
|
|
66
|
-
setOverrides(map: OverridesMap): Promise<void>;
|
|
67
|
-
listEntries(collectionId: string): Promise<CollectionEntry[]>;
|
|
68
|
-
putEntry(collectionId: string, entry: CollectionEntry): Promise<void>;
|
|
69
|
-
deleteEntry(collectionId: string, entryId: string): Promise<void>;
|
|
70
|
-
saveSubmission(submission: Submission): Promise<void>;
|
|
71
|
-
listSubmissions(formId?: string): Promise<Submission[]>;
|
|
72
|
-
deleteSubmission(id: string): Promise<void>;
|
|
73
|
-
markSubmissionRead(id: string): Promise<void>;
|
|
74
|
-
/** Upload an image file and return its public URL (Sanity CDN, etc.) */
|
|
75
|
-
uploadImage?: (file: File) => Promise<string>;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export type { CmsConfig as C, EditableMeta as E, FieldType as F, GlobalGroup as G, OverridesMap as O, PageDef as P, StorageAdapter as S, CollectionDef as a, CollectionEntry as b, CollectionField as c, Submission as d };
|