@withstudiocms/sdk 0.0.0-beta.0 → 0.1.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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/cache.d.ts +109 -0
- package/dist/cache.js +94 -0
- package/dist/consts.d.ts +37 -0
- package/dist/consts.js +35 -0
- package/dist/context.d.ts +208 -0
- package/dist/context.js +40 -0
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +6 -0
- package/dist/index.d.ts +1024 -0
- package/dist/index.js +24 -0
- package/dist/lib/diff.d.ts +39 -0
- package/dist/lib/diff.js +29 -0
- package/dist/lib/logger.d.ts +31 -0
- package/dist/lib/logger.js +131 -0
- package/dist/lib/pluginUtils.d.ts +222 -0
- package/dist/lib/pluginUtils.js +87 -0
- package/dist/lib/storage-manager.d.ts +10 -0
- package/dist/lib/storage-manager.js +17 -0
- package/dist/migrations/20251025T040912_init.d.ts +17 -0
- package/dist/migrations/20251025T040912_init.js +260 -0
- package/dist/migrations/20251130T150847_drop_deprecated.d.ts +13 -0
- package/dist/migrations/20251130T150847_drop_deprecated.js +262 -0
- package/dist/migrations/20251221T002125_url-mapping.d.ts +13 -0
- package/dist/migrations/20251221T002125_url-mapping.js +228 -0
- package/dist/migrator.d.ts +25 -0
- package/dist/migrator.js +21 -0
- package/dist/modules/auth/index.d.ts +419 -0
- package/dist/modules/auth/index.js +436 -0
- package/dist/modules/clear/index.d.ts +72 -0
- package/dist/modules/clear/index.js +52 -0
- package/dist/modules/config/consts.d.ts +32 -0
- package/dist/modules/config/consts.js +18 -0
- package/dist/modules/config/index.d.ts +100 -0
- package/dist/modules/config/index.js +224 -0
- package/dist/modules/config/templates/mailer.d.ts +36 -0
- package/dist/modules/config/templates/mailer.js +218 -0
- package/dist/modules/config/type-utils.d.ts +13 -0
- package/dist/modules/config/type-utils.js +11 -0
- package/dist/modules/delete/index.d.ts +141 -0
- package/dist/modules/delete/index.js +279 -0
- package/dist/modules/diffTracking/index.d.ts +188 -0
- package/dist/modules/diffTracking/index.js +277 -0
- package/dist/modules/get/index.d.ts +372 -0
- package/dist/modules/get/index.js +579 -0
- package/dist/modules/index.d.ts +883 -0
- package/dist/modules/index.js +37 -0
- package/dist/modules/init/index.d.ts +60 -0
- package/dist/modules/init/index.js +38 -0
- package/dist/modules/middleware/index.d.ts +56 -0
- package/dist/modules/middleware/index.js +50 -0
- package/dist/modules/notificationSettings/index.d.ts +57 -0
- package/dist/modules/notificationSettings/index.js +39 -0
- package/dist/modules/plugins/index.d.ts +167 -0
- package/dist/modules/plugins/index.js +272 -0
- package/dist/modules/post/index.d.ts +306 -0
- package/dist/modules/post/index.js +337 -0
- package/dist/modules/resetTokenBucket/index.d.ts +91 -0
- package/dist/modules/resetTokenBucket/index.js +96 -0
- package/dist/modules/rest_api/index.d.ts +92 -0
- package/dist/modules/rest_api/index.js +117 -0
- package/dist/modules/update/index.d.ts +184 -0
- package/dist/modules/update/index.js +192 -0
- package/dist/modules/util/collectors.d.ts +125 -0
- package/dist/modules/util/collectors.js +168 -0
- package/dist/modules/util/folderTree.d.ts +100 -0
- package/dist/modules/util/folderTree.js +176 -0
- package/dist/modules/util/generators.d.ts +83 -0
- package/dist/modules/util/generators.js +106 -0
- package/dist/modules/util/getFromNPM.d.ts +199 -0
- package/dist/modules/util/getFromNPM.js +106 -0
- package/dist/modules/util/index.d.ts +100 -0
- package/dist/modules/util/index.js +20 -0
- package/dist/modules/util/parsers.d.ts +60 -0
- package/dist/modules/util/parsers.js +43 -0
- package/dist/modules/util/slugify.d.ts +22 -0
- package/dist/modules/util/slugify.js +19 -0
- package/dist/modules/util/users.d.ts +99 -0
- package/dist/modules/util/users.js +78 -0
- package/dist/tables.d.ts +433 -0
- package/dist/tables.js +169 -0
- package/dist/types.d.ts +359 -0
- package/dist/types.js +10 -0
- package/package.json +67 -7
|
@@ -0,0 +1,883 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aggregated SDK Modules Index
|
|
3
|
+
*
|
|
4
|
+
* This module exports all individual SDK modules as
|
|
5
|
+
* a single object for easier import and management.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SDKModules: {
|
|
8
|
+
AUTH: import("effect/Effect").Effect<{
|
|
9
|
+
verifyEmail: {
|
|
10
|
+
get: (input: string) => import("effect/Effect").Effect<{
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly userId: string;
|
|
13
|
+
readonly expiresAt: Date;
|
|
14
|
+
readonly token: string;
|
|
15
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
16
|
+
create: (userId: string) => import("effect/Effect").Effect<{
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly userId: string;
|
|
19
|
+
readonly expiresAt: Date;
|
|
20
|
+
readonly token: string;
|
|
21
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
22
|
+
delete: (input: string) => import("effect/Effect").Effect<import("kysely").DeleteResult, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
23
|
+
};
|
|
24
|
+
oAuth: {
|
|
25
|
+
create: (input: {
|
|
26
|
+
readonly providerUserId: string;
|
|
27
|
+
readonly provider: string;
|
|
28
|
+
readonly userId: string;
|
|
29
|
+
}) => import("effect/Effect").Effect<{
|
|
30
|
+
readonly providerUserId: string;
|
|
31
|
+
readonly provider: string;
|
|
32
|
+
readonly userId: string;
|
|
33
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
34
|
+
delete: (input: {
|
|
35
|
+
readonly userId: string;
|
|
36
|
+
readonly provider: string;
|
|
37
|
+
}) => import("../types.js").AuthDeletionResponse;
|
|
38
|
+
searchByProviderId: (input: {
|
|
39
|
+
readonly providerUserId: string;
|
|
40
|
+
readonly userId: string;
|
|
41
|
+
}) => import("effect/Effect").Effect<{
|
|
42
|
+
readonly providerUserId: string;
|
|
43
|
+
readonly provider: string;
|
|
44
|
+
readonly userId: string;
|
|
45
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
46
|
+
searchProvidersForId: (input: {
|
|
47
|
+
readonly userId: string;
|
|
48
|
+
readonly providerId: string;
|
|
49
|
+
}) => import("effect/Effect").Effect<{
|
|
50
|
+
readonly providerUserId: string;
|
|
51
|
+
readonly provider: string;
|
|
52
|
+
readonly userId: string;
|
|
53
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
54
|
+
};
|
|
55
|
+
permission: {
|
|
56
|
+
currentStatus: (input: string) => import("effect/Effect").Effect<{
|
|
57
|
+
readonly user: string;
|
|
58
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
59
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
60
|
+
};
|
|
61
|
+
session: {
|
|
62
|
+
create: (input: {
|
|
63
|
+
readonly id: string;
|
|
64
|
+
readonly userId: string;
|
|
65
|
+
readonly expiresAt: string;
|
|
66
|
+
}) => import("effect/Effect").Effect<{
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly userId: string;
|
|
69
|
+
readonly expiresAt: Date;
|
|
70
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
71
|
+
getById: (input: string) => import("effect/Effect").Effect<{
|
|
72
|
+
readonly id: string;
|
|
73
|
+
readonly userId: string;
|
|
74
|
+
readonly expiresAt: Date;
|
|
75
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
76
|
+
sessionWithUser: (sessionId: string) => import("effect/Effect").Effect<{
|
|
77
|
+
session: {
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly userId: string;
|
|
80
|
+
readonly expiresAt: Date;
|
|
81
|
+
};
|
|
82
|
+
user: {
|
|
83
|
+
readonly id: string;
|
|
84
|
+
readonly url?: string | null | undefined;
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly email?: string | null | undefined;
|
|
87
|
+
readonly avatar?: string | null | undefined;
|
|
88
|
+
readonly username: string;
|
|
89
|
+
readonly password?: string | null | undefined;
|
|
90
|
+
readonly updatedAt: Date;
|
|
91
|
+
readonly createdAt: Date;
|
|
92
|
+
readonly emailVerified: boolean;
|
|
93
|
+
readonly notifications?: string | null | undefined;
|
|
94
|
+
};
|
|
95
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
96
|
+
delete: (input: string) => import("../types.js").AuthDeletionResponse;
|
|
97
|
+
update: (input: {
|
|
98
|
+
readonly id: string;
|
|
99
|
+
readonly newDate: Date;
|
|
100
|
+
}) => import("effect/Effect").Effect<{
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly userId: string;
|
|
103
|
+
readonly expiresAt: Date;
|
|
104
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
105
|
+
};
|
|
106
|
+
user: {
|
|
107
|
+
create: (userData: {
|
|
108
|
+
readonly id: string;
|
|
109
|
+
readonly url?: string | null | undefined;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly email?: string | null | undefined;
|
|
112
|
+
readonly avatar?: string | null | undefined;
|
|
113
|
+
readonly username: string;
|
|
114
|
+
readonly password?: string | null | undefined;
|
|
115
|
+
readonly updatedAt: string;
|
|
116
|
+
readonly createdAt: string | undefined;
|
|
117
|
+
readonly emailVerified: boolean;
|
|
118
|
+
readonly notifications?: string | null | undefined;
|
|
119
|
+
}, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
120
|
+
readonly id: string;
|
|
121
|
+
readonly url?: string | null | undefined;
|
|
122
|
+
readonly name: string;
|
|
123
|
+
readonly email?: string | null | undefined;
|
|
124
|
+
readonly avatar?: string | null | undefined;
|
|
125
|
+
readonly username: string;
|
|
126
|
+
readonly password?: string | null | undefined;
|
|
127
|
+
readonly updatedAt: Date;
|
|
128
|
+
readonly createdAt: Date;
|
|
129
|
+
readonly emailVerified: boolean;
|
|
130
|
+
readonly notifications?: string | null | undefined;
|
|
131
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
132
|
+
update: (input: {
|
|
133
|
+
readonly userId: string;
|
|
134
|
+
readonly userData: {
|
|
135
|
+
readonly id: string;
|
|
136
|
+
readonly url?: string | null | undefined;
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly email?: string | null | undefined;
|
|
139
|
+
readonly avatar?: string | null | undefined;
|
|
140
|
+
readonly username: string;
|
|
141
|
+
readonly password?: string | null | undefined;
|
|
142
|
+
readonly updatedAt: string;
|
|
143
|
+
readonly createdAt: undefined;
|
|
144
|
+
readonly emailVerified: boolean;
|
|
145
|
+
readonly notifications?: string | null | undefined;
|
|
146
|
+
};
|
|
147
|
+
}) => import("effect/Effect").Effect<{
|
|
148
|
+
readonly id: string;
|
|
149
|
+
readonly url?: string | null | undefined;
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly email?: string | null | undefined;
|
|
152
|
+
readonly avatar?: string | null | undefined;
|
|
153
|
+
readonly username: string;
|
|
154
|
+
readonly password?: string | null | undefined;
|
|
155
|
+
readonly updatedAt: Date;
|
|
156
|
+
readonly createdAt: Date;
|
|
157
|
+
readonly emailVerified: boolean;
|
|
158
|
+
readonly notifications?: string | null | undefined;
|
|
159
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
160
|
+
searchUsersForUsernameOrEmail: (username?: string | undefined, email?: string | undefined) => import("effect/Effect").Effect<{
|
|
161
|
+
usernameSearch: {
|
|
162
|
+
readonly id: string;
|
|
163
|
+
readonly url?: string | null | undefined;
|
|
164
|
+
readonly name: string;
|
|
165
|
+
readonly email?: string | null | undefined;
|
|
166
|
+
readonly avatar?: string | null | undefined;
|
|
167
|
+
readonly username: string;
|
|
168
|
+
readonly password?: string | null | undefined;
|
|
169
|
+
readonly updatedAt: Date;
|
|
170
|
+
readonly createdAt: Date;
|
|
171
|
+
readonly emailVerified: boolean;
|
|
172
|
+
readonly notifications?: string | null | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
emailSearch: {
|
|
175
|
+
readonly id: string;
|
|
176
|
+
readonly url?: string | null | undefined;
|
|
177
|
+
readonly name: string;
|
|
178
|
+
readonly email?: string | null | undefined;
|
|
179
|
+
readonly avatar?: string | null | undefined;
|
|
180
|
+
readonly username: string;
|
|
181
|
+
readonly password?: string | null | undefined;
|
|
182
|
+
readonly updatedAt: Date;
|
|
183
|
+
readonly createdAt: Date;
|
|
184
|
+
readonly emailVerified: boolean;
|
|
185
|
+
readonly notifications?: string | null | undefined;
|
|
186
|
+
}[];
|
|
187
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
188
|
+
ghost: {
|
|
189
|
+
verifyExists: () => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
190
|
+
create: () => import("effect/Effect").Effect<{
|
|
191
|
+
readonly id: string;
|
|
192
|
+
readonly url?: string | null | undefined;
|
|
193
|
+
readonly name: string;
|
|
194
|
+
readonly email?: string | null | undefined;
|
|
195
|
+
readonly avatar?: string | null | undefined;
|
|
196
|
+
readonly username: string;
|
|
197
|
+
readonly password?: string | null | undefined;
|
|
198
|
+
readonly updatedAt: Date;
|
|
199
|
+
readonly createdAt: Date;
|
|
200
|
+
readonly emailVerified: boolean;
|
|
201
|
+
readonly notifications?: string | null | undefined;
|
|
202
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
203
|
+
get: () => import("effect/Effect").Effect<{
|
|
204
|
+
readonly id: string;
|
|
205
|
+
readonly url?: string | null | undefined;
|
|
206
|
+
readonly name: string;
|
|
207
|
+
readonly email?: string | null | undefined;
|
|
208
|
+
readonly avatar?: string | null | undefined;
|
|
209
|
+
readonly username: string;
|
|
210
|
+
readonly password?: string | null | undefined;
|
|
211
|
+
readonly updatedAt: Date;
|
|
212
|
+
readonly createdAt: Date;
|
|
213
|
+
readonly emailVerified: boolean;
|
|
214
|
+
readonly notifications?: string | null | undefined;
|
|
215
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults>;
|
|
219
|
+
CLEAR: import("effect/Effect").Effect<{
|
|
220
|
+
page: {
|
|
221
|
+
byId: (id: string) => import("effect/Effect").Effect<void, never, never>;
|
|
222
|
+
};
|
|
223
|
+
pages: import("effect/Effect").Effect<void, never, never>;
|
|
224
|
+
latestVersion: import("effect/Effect").Effect<void, never, never>;
|
|
225
|
+
folderTree: import("effect/Effect").Effect<void, never, never>;
|
|
226
|
+
folderList: import("effect/Effect").Effect<void, never, never>;
|
|
227
|
+
}, never, import("../cache.js").CacheService>;
|
|
228
|
+
CONFIG: import("effect/Effect").Effect<{
|
|
229
|
+
siteConfig: {
|
|
230
|
+
get: <T extends import("../types.js").StudioCMSSiteConfig>() => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<T> | undefined, import("effect/Cause").UnknownException | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
231
|
+
update: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSSiteConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
232
|
+
init: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSSiteConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
233
|
+
};
|
|
234
|
+
mailerConfig: {
|
|
235
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSMailerConfig> | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
236
|
+
update: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSMailerConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSMailerConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
237
|
+
init: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSMailerConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSMailerConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
238
|
+
};
|
|
239
|
+
notificationConfig: {
|
|
240
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings> | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
241
|
+
update: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSNotificationSettings>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
242
|
+
init: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSNotificationSettings>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
243
|
+
};
|
|
244
|
+
templateConfig: {
|
|
245
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSTemplateConfig> | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
246
|
+
update: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSTemplateConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSTemplateConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("@withstudiocms/effect").DeepmergeError, never>;
|
|
247
|
+
init: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSTemplateConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSTemplateConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
248
|
+
};
|
|
249
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
250
|
+
DELETE: import("effect/Effect").Effect<{
|
|
251
|
+
page: (id: string) => import("effect/Effect").Effect<{
|
|
252
|
+
status: "success" | "error";
|
|
253
|
+
message: string;
|
|
254
|
+
}, never, never>;
|
|
255
|
+
pageContent: (id: string) => import("effect/Effect").Effect<{
|
|
256
|
+
status: "success" | "error";
|
|
257
|
+
message: string;
|
|
258
|
+
}, never, never>;
|
|
259
|
+
pageContentLang: (id: string, lang: string) => import("effect/Effect").Effect<{
|
|
260
|
+
status: "success" | "error";
|
|
261
|
+
message: string;
|
|
262
|
+
}, never, never>;
|
|
263
|
+
tags: (id: number) => import("effect/Effect").Effect<{
|
|
264
|
+
status: "success" | "error";
|
|
265
|
+
message: string;
|
|
266
|
+
}, never, never>;
|
|
267
|
+
categories: (id: number) => import("effect/Effect").Effect<{
|
|
268
|
+
status: "success" | "error";
|
|
269
|
+
message: string;
|
|
270
|
+
}, never, never>;
|
|
271
|
+
permissions: (userId: string) => import("effect/Effect").Effect<{
|
|
272
|
+
status: "success" | "error";
|
|
273
|
+
message: string;
|
|
274
|
+
}, never, never>;
|
|
275
|
+
diffTracking: (id: string) => import("effect/Effect").Effect<{
|
|
276
|
+
status: "success" | "error";
|
|
277
|
+
message: string;
|
|
278
|
+
}, never, never>;
|
|
279
|
+
folder: (folderId: string) => import("effect/Effect").Effect<{
|
|
280
|
+
status: "success" | "error";
|
|
281
|
+
message: string;
|
|
282
|
+
}, never, never>;
|
|
283
|
+
user: (userId: string) => import("effect/Effect").Effect<{
|
|
284
|
+
status: "success" | "error";
|
|
285
|
+
message: string;
|
|
286
|
+
}, never, never>;
|
|
287
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
288
|
+
diffTracking: import("effect/Effect").Effect<{
|
|
289
|
+
insert: (userId: string, pageId: string, data: {
|
|
290
|
+
content: {
|
|
291
|
+
start: string;
|
|
292
|
+
end: string;
|
|
293
|
+
};
|
|
294
|
+
metaData: {
|
|
295
|
+
start: Partial<import("../types.js").tsPageDataSelect>;
|
|
296
|
+
end: Partial<import("../types.js").tsPageDataSelect>;
|
|
297
|
+
};
|
|
298
|
+
}, diffLength: number) => import("effect/Effect").Effect<import("../types.js").diffReturn, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError | import("../lib/diff.js").DiffError, never>;
|
|
299
|
+
clear: (input: string) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
300
|
+
get: {
|
|
301
|
+
byPageId: {
|
|
302
|
+
all: (pageId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
303
|
+
latest: (pageId: string, count: number) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
304
|
+
};
|
|
305
|
+
byUserId: {
|
|
306
|
+
all: (userId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
307
|
+
latest: (userId: string, count: number) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
308
|
+
};
|
|
309
|
+
single: (diffId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
310
|
+
};
|
|
311
|
+
revertToDiff: (id: string, type: "content" | "data" | "both") => import("effect/Effect").Effect<import("../types.js").diffReturn, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError | import("./diffTracking/index.js").DiffTrackingError, never>;
|
|
312
|
+
utils: {
|
|
313
|
+
getMetaDataDifferences: <T extends Record<string, unknown>>(obj1: T, obj2: T) => import("effect/Effect").Effect<{
|
|
314
|
+
label: string;
|
|
315
|
+
previous: unknown;
|
|
316
|
+
current: unknown;
|
|
317
|
+
}[], never, never>;
|
|
318
|
+
getDiffHTML: (diff: string, options?: import("diff2html").Diff2HtmlConfig | undefined) => import("effect/Effect").Effect<string, import("../lib/diff.js").DiffError, never>;
|
|
319
|
+
};
|
|
320
|
+
}, never, import("../context.js").DBClientLive>;
|
|
321
|
+
GET: import("effect/Effect").Effect<{
|
|
322
|
+
permissionsLists: {
|
|
323
|
+
owners: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
324
|
+
admins: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
325
|
+
editors: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
326
|
+
visitors: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
327
|
+
all: () => import("effect/Effect").Effect<import("../types.js").CombinedRank[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/users.js").UsersError, never>;
|
|
328
|
+
};
|
|
329
|
+
users: {
|
|
330
|
+
all: () => import("effect/Effect").Effect<import("../types.js").CombinedUserData[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
331
|
+
byId: (userId: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
332
|
+
byUsername: (username: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
333
|
+
byEmail: (email: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
334
|
+
};
|
|
335
|
+
folder: (folderId: string) => import("effect/Effect").Effect<{
|
|
336
|
+
readonly id: string;
|
|
337
|
+
readonly name: string;
|
|
338
|
+
readonly parent?: string | null | undefined;
|
|
339
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
340
|
+
folderTree: () => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
341
|
+
folderList: () => import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
342
|
+
siteConfig: <T extends import("../types.js").StudioCMSSiteConfig>() => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<T> | undefined, import("effect/Cause").UnknownException | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
343
|
+
latestVersion: () => import("effect/Effect").Effect<{
|
|
344
|
+
version: string;
|
|
345
|
+
lastCacheUpdate: Date;
|
|
346
|
+
}, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("./util/getFromNPM.js").GetFromNPMError, never>;
|
|
347
|
+
pages: {
|
|
348
|
+
(includeDrafts?: boolean, metaOnly?: false, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
349
|
+
(includeDrafts?: boolean, metaOnly?: true, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
350
|
+
};
|
|
351
|
+
page: {
|
|
352
|
+
byId: {
|
|
353
|
+
(id: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
354
|
+
(id: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
355
|
+
};
|
|
356
|
+
bySlug: {
|
|
357
|
+
(slug: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
358
|
+
(slug: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
packagePages: {
|
|
362
|
+
(packageName: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
363
|
+
(packageName: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
364
|
+
};
|
|
365
|
+
folderPages: {
|
|
366
|
+
(idOrName: string, includeDrafts?: boolean, metaOnly?: false, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
367
|
+
(idOrName: string, includeDrafts?: boolean, metaOnly?: true, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
368
|
+
};
|
|
369
|
+
pageFolderTree: (excludeDrafts?: boolean) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryParseError | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
370
|
+
categories: {
|
|
371
|
+
getAll: () => import("effect/Effect").Effect<readonly {
|
|
372
|
+
readonly id: number;
|
|
373
|
+
readonly name: string;
|
|
374
|
+
readonly description: string;
|
|
375
|
+
readonly parent?: number | null | undefined;
|
|
376
|
+
readonly slug: string;
|
|
377
|
+
readonly meta: {
|
|
378
|
+
readonly [x: string]: unknown;
|
|
379
|
+
};
|
|
380
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
381
|
+
byId: (categoryId: number) => import("effect/Effect").Effect<{
|
|
382
|
+
readonly id: number;
|
|
383
|
+
readonly name: string;
|
|
384
|
+
readonly description: string;
|
|
385
|
+
readonly parent?: number | null | undefined;
|
|
386
|
+
readonly slug: string;
|
|
387
|
+
readonly meta: {
|
|
388
|
+
readonly [x: string]: unknown;
|
|
389
|
+
};
|
|
390
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
391
|
+
bySlug: (slug: string) => import("effect/Effect").Effect<{
|
|
392
|
+
readonly id: number;
|
|
393
|
+
readonly name: string;
|
|
394
|
+
readonly description: string;
|
|
395
|
+
readonly parent?: number | null | undefined;
|
|
396
|
+
readonly slug: string;
|
|
397
|
+
readonly meta: {
|
|
398
|
+
readonly [x: string]: unknown;
|
|
399
|
+
};
|
|
400
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
401
|
+
};
|
|
402
|
+
tags: {
|
|
403
|
+
getAll: () => import("effect/Effect").Effect<readonly {
|
|
404
|
+
readonly id: number;
|
|
405
|
+
readonly name: string;
|
|
406
|
+
readonly description: string;
|
|
407
|
+
readonly slug: string;
|
|
408
|
+
readonly meta: {
|
|
409
|
+
readonly [x: string]: unknown;
|
|
410
|
+
};
|
|
411
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
412
|
+
byId: (tagId: number) => import("effect/Effect").Effect<{
|
|
413
|
+
readonly id: number;
|
|
414
|
+
readonly name: string;
|
|
415
|
+
readonly description: string;
|
|
416
|
+
readonly slug: string;
|
|
417
|
+
readonly meta: {
|
|
418
|
+
readonly [x: string]: unknown;
|
|
419
|
+
};
|
|
420
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
421
|
+
bySlug: (slug: string) => import("effect/Effect").Effect<{
|
|
422
|
+
readonly id: number;
|
|
423
|
+
readonly name: string;
|
|
424
|
+
readonly description: string;
|
|
425
|
+
readonly slug: string;
|
|
426
|
+
readonly meta: {
|
|
427
|
+
readonly [x: string]: unknown;
|
|
428
|
+
};
|
|
429
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
430
|
+
};
|
|
431
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
432
|
+
INIT: import("effect/Effect").Effect<{
|
|
433
|
+
siteConfig: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSSiteConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
434
|
+
ghostUser: () => import("effect/Effect").Effect<{
|
|
435
|
+
readonly id: string;
|
|
436
|
+
readonly url?: string | null | undefined;
|
|
437
|
+
readonly name: string;
|
|
438
|
+
readonly email?: string | null | undefined;
|
|
439
|
+
readonly avatar?: string | null | undefined;
|
|
440
|
+
readonly username: string;
|
|
441
|
+
readonly password?: string | null | undefined;
|
|
442
|
+
readonly updatedAt: Date;
|
|
443
|
+
readonly createdAt: Date;
|
|
444
|
+
readonly emailVerified: boolean;
|
|
445
|
+
readonly notifications?: string | null | undefined;
|
|
446
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
447
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
448
|
+
MIDDLEWARES: import("effect/Effect").Effect<{
|
|
449
|
+
verifyCache: () => import("effect/Effect").Effect<void, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryParseError | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
450
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
451
|
+
notificationSettings: import("effect/Effect").Effect<{
|
|
452
|
+
site: {
|
|
453
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
454
|
+
update: (settings: Omit<import("../types.js").StudioCMSNotificationSettings, "_config_version">) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
455
|
+
};
|
|
456
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
457
|
+
PLUGINS: import("effect/Effect").Effect<{
|
|
458
|
+
usePluginData: {
|
|
459
|
+
<T extends import("effect/Schema").Struct<import("effect/Schema").Struct.Fields> | object, R extends object = T extends import("effect/Schema").Struct<any> ? import("../types.js").RecursiveSimplifyMutable<T["Type"]> : T>(pluginId: string, opts?: import("../types.js").UsePluginDataOptsBase<T>): {
|
|
460
|
+
getEntries: (filter?: (data: import("../types.js").PluginDataEntry<R>[]) => import("../types.js").PluginDataEntry<R>[]) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>[], import("../errors.js").StudioCMSSDKError, never>;
|
|
461
|
+
getEntry: (id: string) => {
|
|
462
|
+
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
463
|
+
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined, import("../errors.js").StudioCMSSDKError, never>;
|
|
464
|
+
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, import("../errors.js").StudioCMSSDKError, never>;
|
|
465
|
+
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, import("../errors.js").StudioCMSSDKError, never>;
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
<T extends import("effect/Schema").Struct<import("effect/Schema").Struct.Fields> | object, R extends object = T extends import("effect/Schema").Struct<any> ? import("../types.js").RecursiveSimplifyMutable<T["Type"]> : T>(pluginId: string, opts?: import("../types.js").UsePluginDataOpts<T>): {
|
|
469
|
+
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
470
|
+
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined, import("../errors.js").StudioCMSSDKError, never>;
|
|
471
|
+
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, import("../errors.js").StudioCMSSDKError, never>;
|
|
472
|
+
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, import("../errors.js").StudioCMSSDKError, never>;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
initPluginDataCache: (BATCH_SIZE?: number | undefined) => import("effect/Effect").Effect<void, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
476
|
+
clearPluginDataCache: () => import("effect/Effect").Effect<void, never, never>;
|
|
477
|
+
InferType: {
|
|
478
|
+
new <S extends import("effect/Schema").Struct<any>, R = import("../types.js").RecursiveSimplifyMutable<S["Type"]>>(schema: S): {
|
|
479
|
+
readonly _Schema: S;
|
|
480
|
+
readonly $UsePluginData: S;
|
|
481
|
+
readonly $Insert: R;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
}, never, import("../context.js").DBClientLive | import("../cache.js").CacheService>;
|
|
485
|
+
POST: import("effect/Effect").Effect<{
|
|
486
|
+
databaseEntry: {
|
|
487
|
+
pages: (pageData: import("./post/index.js").OptionalId<string, {
|
|
488
|
+
readonly id: string;
|
|
489
|
+
readonly updatedAt: string;
|
|
490
|
+
readonly description: string;
|
|
491
|
+
readonly package: string;
|
|
492
|
+
readonly title: string;
|
|
493
|
+
readonly showOnNav: boolean;
|
|
494
|
+
readonly publishedAt: string;
|
|
495
|
+
readonly slug: string;
|
|
496
|
+
readonly contentLang: string;
|
|
497
|
+
readonly heroImage?: string | null | undefined;
|
|
498
|
+
readonly categories: string;
|
|
499
|
+
readonly tags: string;
|
|
500
|
+
readonly authorId: string;
|
|
501
|
+
readonly contributorIds: string;
|
|
502
|
+
readonly showAuthor: boolean;
|
|
503
|
+
readonly showContributors: boolean;
|
|
504
|
+
readonly parentFolder?: string | null | undefined;
|
|
505
|
+
readonly draft: boolean;
|
|
506
|
+
readonly augments: string;
|
|
507
|
+
}>, pageContent: import("../types.js").CombinedInsertContent) => import("effect/Effect").Effect<{
|
|
508
|
+
pageData: {
|
|
509
|
+
readonly id: string;
|
|
510
|
+
};
|
|
511
|
+
pageContent: {
|
|
512
|
+
readonly id: string;
|
|
513
|
+
};
|
|
514
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
515
|
+
pageContent: (input: {
|
|
516
|
+
readonly id: string;
|
|
517
|
+
readonly contentLang: string;
|
|
518
|
+
readonly contentId: string;
|
|
519
|
+
readonly content: string;
|
|
520
|
+
}) => import("effect/Effect").Effect<{
|
|
521
|
+
readonly id: string;
|
|
522
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
523
|
+
tags: (tag: import("./post/index.js").OptionalId<number, {
|
|
524
|
+
readonly id: number;
|
|
525
|
+
readonly name: string;
|
|
526
|
+
readonly description: string;
|
|
527
|
+
readonly slug: string;
|
|
528
|
+
readonly meta: string;
|
|
529
|
+
}>) => import("effect/Effect").Effect<{
|
|
530
|
+
readonly id: number;
|
|
531
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
532
|
+
categories: (category: import("./post/index.js").OptionalId<number, {
|
|
533
|
+
readonly id: number;
|
|
534
|
+
readonly name: string;
|
|
535
|
+
readonly description: string;
|
|
536
|
+
readonly parent?: number | null | undefined;
|
|
537
|
+
readonly slug: string;
|
|
538
|
+
readonly meta: string;
|
|
539
|
+
}>) => import("effect/Effect").Effect<{
|
|
540
|
+
readonly id: number;
|
|
541
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
542
|
+
permissions: (userId: string, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
543
|
+
readonly user: string;
|
|
544
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
545
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
546
|
+
diffTracking: (data: import("./post/index.js").OptionalId<string, {
|
|
547
|
+
readonly id: string;
|
|
548
|
+
readonly userId: string;
|
|
549
|
+
readonly pageId: string;
|
|
550
|
+
readonly timestamp: string | undefined;
|
|
551
|
+
readonly pageMetaData: string;
|
|
552
|
+
readonly pageContentStart: string;
|
|
553
|
+
readonly diff?: string | null | undefined;
|
|
554
|
+
}>) => import("effect/Effect").Effect<{
|
|
555
|
+
readonly id: string;
|
|
556
|
+
readonly userId: string;
|
|
557
|
+
readonly pageId: string;
|
|
558
|
+
readonly timestamp: Date;
|
|
559
|
+
readonly pageMetaData: {
|
|
560
|
+
readonly [x: string]: unknown;
|
|
561
|
+
};
|
|
562
|
+
readonly pageContentStart: string;
|
|
563
|
+
readonly diff?: string | null | undefined;
|
|
564
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
565
|
+
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
566
|
+
readonly id: string;
|
|
567
|
+
readonly name: string;
|
|
568
|
+
readonly parent?: string | null | undefined;
|
|
569
|
+
}>) => import("effect/Effect").Effect<{
|
|
570
|
+
readonly id: string;
|
|
571
|
+
readonly name: string;
|
|
572
|
+
readonly parent?: string | null | undefined;
|
|
573
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
574
|
+
};
|
|
575
|
+
databaseEntries: {
|
|
576
|
+
tags: (tags: import("./post/index.js").OptionalId<number, {
|
|
577
|
+
readonly id: number;
|
|
578
|
+
readonly name: string;
|
|
579
|
+
readonly description: string;
|
|
580
|
+
readonly slug: string;
|
|
581
|
+
readonly meta: string;
|
|
582
|
+
}>[]) => import("effect/Effect").Effect<{
|
|
583
|
+
readonly id: number;
|
|
584
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
585
|
+
categories: (categories: import("./post/index.js").OptionalId<number, {
|
|
586
|
+
readonly id: number;
|
|
587
|
+
readonly name: string;
|
|
588
|
+
readonly description: string;
|
|
589
|
+
readonly parent?: number | null | undefined;
|
|
590
|
+
readonly slug: string;
|
|
591
|
+
readonly meta: string;
|
|
592
|
+
}>[]) => import("effect/Effect").Effect<{
|
|
593
|
+
readonly id: number;
|
|
594
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
595
|
+
permissions: (permissions: {
|
|
596
|
+
userId: string;
|
|
597
|
+
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
598
|
+
}[]) => import("effect/Effect").Effect<{
|
|
599
|
+
readonly user: string;
|
|
600
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
601
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
602
|
+
pages: (pages: import("./post/index.js").MultiPageInsert) => import("effect/Effect").Effect<{
|
|
603
|
+
pageData: {
|
|
604
|
+
readonly id: string;
|
|
605
|
+
};
|
|
606
|
+
pageContent: {
|
|
607
|
+
readonly id: string;
|
|
608
|
+
};
|
|
609
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
610
|
+
};
|
|
611
|
+
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
612
|
+
readonly id: string;
|
|
613
|
+
readonly name: string;
|
|
614
|
+
readonly parent?: string | null | undefined;
|
|
615
|
+
}>) => import("effect/Effect").Effect<{
|
|
616
|
+
readonly id: string;
|
|
617
|
+
readonly name: string;
|
|
618
|
+
readonly parent?: string | null | undefined;
|
|
619
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
620
|
+
page: (args_0: {
|
|
621
|
+
pageData: import("./post/index.js").OptionalId<string, typeof import("../tables.js").StudioCMSPageData["Insert"]["Type"]>;
|
|
622
|
+
pageContent: import("../types.js").CombinedInsertContent;
|
|
623
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryParseError | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
624
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
625
|
+
resetTokenBucket: import("effect/Effect").Effect<{
|
|
626
|
+
new: (userId: string) => import("effect/Effect").Effect<{
|
|
627
|
+
readonly id: string;
|
|
628
|
+
readonly userId: string;
|
|
629
|
+
readonly token: string;
|
|
630
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
631
|
+
delete: (input: string) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
632
|
+
check: (token: string) => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
633
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
634
|
+
REST_API: import("effect/Effect").Effect<{
|
|
635
|
+
tokens: {
|
|
636
|
+
get: (input: string) => import("effect/Effect").Effect<readonly {
|
|
637
|
+
readonly id: string;
|
|
638
|
+
readonly userId: string;
|
|
639
|
+
readonly key: string;
|
|
640
|
+
readonly creationDate: Date;
|
|
641
|
+
readonly description?: string | null | undefined;
|
|
642
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
643
|
+
new: (userId: string, description: string) => import("effect/Effect").Effect<{
|
|
644
|
+
readonly id: string;
|
|
645
|
+
readonly userId: string;
|
|
646
|
+
readonly key: string;
|
|
647
|
+
readonly creationDate: Date;
|
|
648
|
+
readonly description?: string | null | undefined;
|
|
649
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
650
|
+
delete: (input: {
|
|
651
|
+
readonly userId: string;
|
|
652
|
+
readonly tokenId: string;
|
|
653
|
+
}) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
654
|
+
verify: (key: string) => import("effect/Effect").Effect<false | {
|
|
655
|
+
userId: string;
|
|
656
|
+
key: string;
|
|
657
|
+
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
658
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
659
|
+
};
|
|
660
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
661
|
+
UPDATE: import("effect/Effect").Effect<{
|
|
662
|
+
pageContent: (input: {
|
|
663
|
+
readonly id: string;
|
|
664
|
+
readonly contentLang: string;
|
|
665
|
+
readonly contentId: string;
|
|
666
|
+
readonly content: string;
|
|
667
|
+
}) => import("effect/Effect").Effect<{
|
|
668
|
+
readonly id: string;
|
|
669
|
+
readonly contentLang: string;
|
|
670
|
+
readonly contentId: string;
|
|
671
|
+
readonly content: string;
|
|
672
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
673
|
+
tags: (input: {
|
|
674
|
+
readonly id: number;
|
|
675
|
+
readonly name: string;
|
|
676
|
+
readonly description: string;
|
|
677
|
+
readonly slug: string;
|
|
678
|
+
readonly meta: string;
|
|
679
|
+
}) => import("effect/Effect").Effect<{
|
|
680
|
+
readonly id: number;
|
|
681
|
+
readonly name: string;
|
|
682
|
+
readonly description: string;
|
|
683
|
+
readonly slug: string;
|
|
684
|
+
readonly meta: {
|
|
685
|
+
readonly [x: string]: unknown;
|
|
686
|
+
};
|
|
687
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
688
|
+
categories: (input: {
|
|
689
|
+
readonly id: number;
|
|
690
|
+
readonly name: string;
|
|
691
|
+
readonly description: string;
|
|
692
|
+
readonly parent?: number | null | undefined;
|
|
693
|
+
readonly slug: string;
|
|
694
|
+
readonly meta: string;
|
|
695
|
+
}) => import("effect/Effect").Effect<{
|
|
696
|
+
readonly id: number;
|
|
697
|
+
readonly name: string;
|
|
698
|
+
readonly description: string;
|
|
699
|
+
readonly parent?: number | null | undefined;
|
|
700
|
+
readonly slug: string;
|
|
701
|
+
readonly meta: {
|
|
702
|
+
readonly [x: string]: unknown;
|
|
703
|
+
};
|
|
704
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
705
|
+
permissions: (input: {
|
|
706
|
+
readonly user: string;
|
|
707
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
708
|
+
}) => import("effect/Effect").Effect<{
|
|
709
|
+
readonly user: string;
|
|
710
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
711
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
712
|
+
folderTree: import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
713
|
+
folderList: import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
714
|
+
folder: (data: {
|
|
715
|
+
readonly id: string;
|
|
716
|
+
readonly name: string;
|
|
717
|
+
readonly parent?: string | null | undefined;
|
|
718
|
+
}) => import("effect/Effect").Effect<{
|
|
719
|
+
readonly id: string;
|
|
720
|
+
readonly name: string;
|
|
721
|
+
readonly parent?: string | null | undefined;
|
|
722
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
723
|
+
latestVersion: () => import("effect/Effect").Effect<{
|
|
724
|
+
version: string;
|
|
725
|
+
lastCacheUpdate: Date;
|
|
726
|
+
}, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("./util/getFromNPM.js").GetFromNPMError, never>;
|
|
727
|
+
siteConfig: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSSiteConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
728
|
+
page: {
|
|
729
|
+
byId: (pageId: string, data: {
|
|
730
|
+
pageData: {
|
|
731
|
+
readonly id: string;
|
|
732
|
+
readonly updatedAt: string;
|
|
733
|
+
readonly description: string;
|
|
734
|
+
readonly package: string;
|
|
735
|
+
readonly title: string;
|
|
736
|
+
readonly showOnNav: boolean;
|
|
737
|
+
readonly publishedAt: string;
|
|
738
|
+
readonly slug: string;
|
|
739
|
+
readonly contentLang: string;
|
|
740
|
+
readonly heroImage?: string | null | undefined;
|
|
741
|
+
readonly categories: string;
|
|
742
|
+
readonly tags: string;
|
|
743
|
+
readonly authorId: string;
|
|
744
|
+
readonly contributorIds: string;
|
|
745
|
+
readonly showAuthor: boolean;
|
|
746
|
+
readonly showContributors: boolean;
|
|
747
|
+
readonly parentFolder?: string | null | undefined;
|
|
748
|
+
readonly draft: boolean;
|
|
749
|
+
readonly augments: string;
|
|
750
|
+
};
|
|
751
|
+
pageContent: {
|
|
752
|
+
readonly id: string;
|
|
753
|
+
readonly contentLang: string;
|
|
754
|
+
readonly contentId: string;
|
|
755
|
+
readonly content: string;
|
|
756
|
+
};
|
|
757
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryParseError | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
758
|
+
bySlug: (slug: string, data: {
|
|
759
|
+
pageData: {
|
|
760
|
+
readonly id: string;
|
|
761
|
+
readonly updatedAt: string;
|
|
762
|
+
readonly description: string;
|
|
763
|
+
readonly package: string;
|
|
764
|
+
readonly title: string;
|
|
765
|
+
readonly showOnNav: boolean;
|
|
766
|
+
readonly publishedAt: string;
|
|
767
|
+
readonly slug: string;
|
|
768
|
+
readonly contentLang: string;
|
|
769
|
+
readonly heroImage?: string | null | undefined;
|
|
770
|
+
readonly categories: string;
|
|
771
|
+
readonly tags: string;
|
|
772
|
+
readonly authorId: string;
|
|
773
|
+
readonly contributorIds: string;
|
|
774
|
+
readonly showAuthor: boolean;
|
|
775
|
+
readonly showContributors: boolean;
|
|
776
|
+
readonly parentFolder?: string | null | undefined;
|
|
777
|
+
readonly draft: boolean;
|
|
778
|
+
readonly augments: string;
|
|
779
|
+
};
|
|
780
|
+
pageContent: {
|
|
781
|
+
readonly id: string;
|
|
782
|
+
readonly contentLang: string;
|
|
783
|
+
readonly contentId: string;
|
|
784
|
+
readonly content: string;
|
|
785
|
+
};
|
|
786
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
787
|
+
};
|
|
788
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
789
|
+
UTIL: import("effect/Effect").Effect<{
|
|
790
|
+
Collectors: {
|
|
791
|
+
collectCategories: (input: readonly number[]) => import("effect/Effect").Effect<readonly {
|
|
792
|
+
readonly id: number;
|
|
793
|
+
readonly name: string;
|
|
794
|
+
readonly description: string;
|
|
795
|
+
readonly parent?: number | null | undefined;
|
|
796
|
+
readonly slug: string;
|
|
797
|
+
readonly meta: {
|
|
798
|
+
readonly [x: string]: unknown;
|
|
799
|
+
};
|
|
800
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
801
|
+
collectTags: (input: readonly number[]) => import("effect/Effect").Effect<readonly {
|
|
802
|
+
readonly id: number;
|
|
803
|
+
readonly name: string;
|
|
804
|
+
readonly description: string;
|
|
805
|
+
readonly slug: string;
|
|
806
|
+
readonly meta: {
|
|
807
|
+
readonly [x: string]: unknown;
|
|
808
|
+
};
|
|
809
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
810
|
+
collectPageData: {
|
|
811
|
+
(page: import("../types.js").tsPageDataSelect, tree: import("../types.js").FolderNode[]): import("effect/Effect").Effect<import("../types.js").CombinedPageData, import("./util/collectors.js").CollectorError | import("./util/folderTree.js").FolderTreeError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/ParseResult").ParseError, never>;
|
|
812
|
+
(page: import("../types.js").tsPageDataSelect, tree: import("../types.js").FolderNode[], metaOnly: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData, import("./util/collectors.js").CollectorError | import("./util/folderTree.js").FolderTreeError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/ParseResult").ParseError, never>;
|
|
813
|
+
};
|
|
814
|
+
collectUserData: (user: {
|
|
815
|
+
readonly id: string;
|
|
816
|
+
readonly url?: string | null | undefined;
|
|
817
|
+
readonly name: string;
|
|
818
|
+
readonly email?: string | null | undefined;
|
|
819
|
+
readonly avatar?: string | null | undefined;
|
|
820
|
+
readonly username: string;
|
|
821
|
+
readonly password?: string | null | undefined;
|
|
822
|
+
readonly updatedAt: Date;
|
|
823
|
+
readonly createdAt: Date;
|
|
824
|
+
readonly emailVerified: boolean;
|
|
825
|
+
readonly notifications?: string | null | undefined;
|
|
826
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedUserData, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
827
|
+
};
|
|
828
|
+
FolderTree: {
|
|
829
|
+
generateFolderTree: (folders: readonly {
|
|
830
|
+
readonly id: string;
|
|
831
|
+
readonly name: string;
|
|
832
|
+
readonly parent?: string | null | undefined;
|
|
833
|
+
}[]) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
834
|
+
getFullPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<string[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
835
|
+
findNodeByPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
836
|
+
findNodesAlongPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
837
|
+
findNodesAlongPathToId: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
838
|
+
findNodeById: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
839
|
+
addPageToFolderTree: (tree: import("../types.js").FolderNode[], folderId: string, newPage: import("../types.js").FolderNode) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
840
|
+
buildFolderTree: import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
841
|
+
getAvailableFolders: import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
842
|
+
};
|
|
843
|
+
Generators: {
|
|
844
|
+
generateRandomIDNumber: (length: number) => import("effect/Effect").Effect<number, import("./util/generators.js").GeneratorError, never>;
|
|
845
|
+
generateRandomPassword: (length: number) => import("effect/Effect").Effect<string, import("./util/generators.js").GeneratorError, never>;
|
|
846
|
+
generateToken: (userId: string, noExpire?: boolean | undefined) => import("effect/Effect").Effect<string, import("./util/generators.js").GeneratorError, never>;
|
|
847
|
+
testToken: (token: string) => import("effect/Effect").Effect<import("../types.js").JwtVerificationResult, import("./util/generators.js").GeneratorError, never>;
|
|
848
|
+
};
|
|
849
|
+
GetFromNPM: {
|
|
850
|
+
getVersion: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<{
|
|
851
|
+
version: string;
|
|
852
|
+
lastCacheUpdate: Date;
|
|
853
|
+
}, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("./util/getFromNPM.js").GetFromNPMError, never>;
|
|
854
|
+
getDataFromNPM: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<import("./util/getFromNPM.js").NpmRegistryResponseSchema, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("./util/getFromNPM.js").GetFromNPMError, never>;
|
|
855
|
+
};
|
|
856
|
+
Parsers: {
|
|
857
|
+
parseIdNumberArray: (ids: unknown) => import("effect/Effect").Effect<readonly number[], import("effect/ParseResult").ParseError, never>;
|
|
858
|
+
parseIdStringArray: (ids: unknown) => import("effect/Effect").Effect<readonly string[], import("effect/ParseResult").ParseError, never>;
|
|
859
|
+
fixDiff: <T extends import("../types.js").diffItem | import("../types.js").diffItem[]>(items: T) => import("effect/Effect").Effect<import("../types.js").DiffReturnType<T>, import("./util/parsers.js").ParsersError, never>;
|
|
860
|
+
};
|
|
861
|
+
Users: {
|
|
862
|
+
verifyRank: (users: readonly {
|
|
863
|
+
readonly id: string;
|
|
864
|
+
readonly url?: string | null | undefined;
|
|
865
|
+
readonly name: string;
|
|
866
|
+
readonly email?: string | null | undefined;
|
|
867
|
+
readonly avatar?: string | null | undefined;
|
|
868
|
+
readonly username: string;
|
|
869
|
+
readonly password?: string | null | undefined;
|
|
870
|
+
readonly updatedAt: Date;
|
|
871
|
+
readonly createdAt: Date;
|
|
872
|
+
readonly emailVerified: boolean;
|
|
873
|
+
readonly notifications?: string | null | undefined;
|
|
874
|
+
}[], permissions: readonly {
|
|
875
|
+
readonly user: string;
|
|
876
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
877
|
+
}[], rank: string) => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError, never>;
|
|
878
|
+
combineRanks: (rank: string, users: import("../types.js").SingleRank[]) => import("effect/Effect").Effect<import("../types.js").CombinedRank[], import("./util/users.js").UsersError, never>;
|
|
879
|
+
clearUserReferences: (userId: string) => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError, never>;
|
|
880
|
+
};
|
|
881
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService>;
|
|
882
|
+
};
|
|
883
|
+
export default SDKModules;
|