@withstudiocms/sdk 0.0.0-beta.0 → 0.1.0-beta.1
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 +28 -0
- package/dist/consts.js +26 -0
- package/dist/context.d.ts +188 -0
- package/dist/context.js +33 -0
- package/dist/index.d.ts +1136 -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 +221 -0
- package/dist/lib/pluginUtils.js +80 -0
- package/dist/modules/auth/index.d.ts +463 -0
- package/dist/modules/auth/index.js +412 -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 +205 -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 +140 -0
- package/dist/modules/delete/index.js +274 -0
- package/dist/modules/diffTracking/index.d.ts +188 -0
- package/dist/modules/diffTracking/index.js +276 -0
- package/dist/modules/get/index.d.ts +272 -0
- package/dist/modules/get/index.js +466 -0
- package/dist/modules/index.d.ts +1003 -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 +166 -0
- package/dist/modules/plugins/index.js +261 -0
- package/dist/modules/post/index.d.ts +305 -0
- package/dist/modules/post/index.js +305 -0
- package/dist/modules/resetTokenBucket/index.d.ts +91 -0
- package/dist/modules/resetTokenBucket/index.js +93 -0
- package/dist/modules/rest_api/index.d.ts +92 -0
- package/dist/modules/rest_api/index.js +113 -0
- package/dist/modules/update/index.d.ts +184 -0
- package/dist/modules/update/index.js +174 -0
- package/dist/modules/util/collectors.d.ts +261 -0
- package/dist/modules/util/collectors.js +141 -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 +191 -0
- package/dist/modules/util/getFromNPM.js +100 -0
- package/dist/modules/util/index.d.ts +236 -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/types.d.ts +360 -0
- package/dist/types.js +10 -0
- package/package.json +55 -7
|
@@ -0,0 +1,1003 @@
|
|
|
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 token: string;
|
|
14
|
+
readonly expiresAt: Date;
|
|
15
|
+
} | undefined, import("@withstudiocms/kysely").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 token: string;
|
|
20
|
+
readonly expiresAt: Date;
|
|
21
|
+
}, import("@withstudiocms/kysely").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").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").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").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").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").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").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").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 name: string;
|
|
84
|
+
readonly id: string;
|
|
85
|
+
readonly url: string | null | undefined;
|
|
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").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: {
|
|
100
|
+
toString: {};
|
|
101
|
+
toDateString: {};
|
|
102
|
+
toTimeString: {};
|
|
103
|
+
toLocaleString: {};
|
|
104
|
+
toLocaleDateString: {};
|
|
105
|
+
toLocaleTimeString: {};
|
|
106
|
+
valueOf: {};
|
|
107
|
+
getTime: {};
|
|
108
|
+
getFullYear: {};
|
|
109
|
+
getUTCFullYear: {};
|
|
110
|
+
getMonth: {};
|
|
111
|
+
getUTCMonth: {};
|
|
112
|
+
getDate: {};
|
|
113
|
+
getUTCDate: {};
|
|
114
|
+
getDay: {};
|
|
115
|
+
getUTCDay: {};
|
|
116
|
+
getHours: {};
|
|
117
|
+
getUTCHours: {};
|
|
118
|
+
getMinutes: {};
|
|
119
|
+
getUTCMinutes: {};
|
|
120
|
+
getSeconds: {};
|
|
121
|
+
getUTCSeconds: {};
|
|
122
|
+
getMilliseconds: {};
|
|
123
|
+
getUTCMilliseconds: {};
|
|
124
|
+
getTimezoneOffset: {};
|
|
125
|
+
setTime: {};
|
|
126
|
+
setMilliseconds: {};
|
|
127
|
+
setUTCMilliseconds: {};
|
|
128
|
+
setSeconds: {};
|
|
129
|
+
setUTCSeconds: {};
|
|
130
|
+
setMinutes: {};
|
|
131
|
+
setUTCMinutes: {};
|
|
132
|
+
setHours: {};
|
|
133
|
+
setUTCHours: {};
|
|
134
|
+
setDate: {};
|
|
135
|
+
setUTCDate: {};
|
|
136
|
+
setMonth: {};
|
|
137
|
+
setUTCMonth: {};
|
|
138
|
+
setFullYear: {};
|
|
139
|
+
setUTCFullYear: {};
|
|
140
|
+
toUTCString: {};
|
|
141
|
+
toISOString: {};
|
|
142
|
+
toJSON: {};
|
|
143
|
+
getVarDate: {};
|
|
144
|
+
[Symbol.toPrimitive]: {};
|
|
145
|
+
};
|
|
146
|
+
}) => import("effect/Effect").Effect<{
|
|
147
|
+
readonly id: string;
|
|
148
|
+
readonly userId: string;
|
|
149
|
+
readonly expiresAt: Date;
|
|
150
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
151
|
+
};
|
|
152
|
+
user: {
|
|
153
|
+
create: (userData: {
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly id: string;
|
|
156
|
+
readonly url: string | null | undefined;
|
|
157
|
+
readonly email: string | null | undefined;
|
|
158
|
+
readonly avatar: string | null | undefined;
|
|
159
|
+
readonly username: string;
|
|
160
|
+
readonly password: string | null | undefined;
|
|
161
|
+
readonly updatedAt: string;
|
|
162
|
+
readonly createdAt: string | undefined;
|
|
163
|
+
readonly emailVerified: boolean;
|
|
164
|
+
readonly notifications: string | null | undefined;
|
|
165
|
+
}, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
166
|
+
readonly name: string;
|
|
167
|
+
readonly id: string;
|
|
168
|
+
readonly url: string | null | undefined;
|
|
169
|
+
readonly email: string | null | undefined;
|
|
170
|
+
readonly avatar: string | null | undefined;
|
|
171
|
+
readonly username: string;
|
|
172
|
+
readonly password: string | null | undefined;
|
|
173
|
+
readonly updatedAt: Date;
|
|
174
|
+
readonly createdAt: Date;
|
|
175
|
+
readonly emailVerified: boolean;
|
|
176
|
+
readonly notifications: string | null | undefined;
|
|
177
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
178
|
+
update: (input: {
|
|
179
|
+
readonly userId: string;
|
|
180
|
+
readonly userData: {
|
|
181
|
+
readonly url?: string | null | undefined;
|
|
182
|
+
readonly email?: string | null | undefined;
|
|
183
|
+
readonly avatar?: string | null | undefined;
|
|
184
|
+
readonly password?: string | null | undefined;
|
|
185
|
+
readonly notifications?: string | null | undefined;
|
|
186
|
+
readonly name: string;
|
|
187
|
+
readonly id: string;
|
|
188
|
+
readonly username: string;
|
|
189
|
+
readonly updatedAt: string;
|
|
190
|
+
readonly emailVerified: boolean;
|
|
191
|
+
};
|
|
192
|
+
}) => import("effect/Effect").Effect<{
|
|
193
|
+
readonly name: string;
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly url: string | null | undefined;
|
|
196
|
+
readonly email: string | null | undefined;
|
|
197
|
+
readonly avatar: string | null | undefined;
|
|
198
|
+
readonly username: string;
|
|
199
|
+
readonly password: string | null | undefined;
|
|
200
|
+
readonly updatedAt: Date;
|
|
201
|
+
readonly createdAt: Date;
|
|
202
|
+
readonly emailVerified: boolean;
|
|
203
|
+
readonly notifications: string | null | undefined;
|
|
204
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
205
|
+
searchUsersForUsernameOrEmail: (username?: string | undefined, email?: string | undefined) => import("effect/Effect").Effect<{
|
|
206
|
+
usernameSearch: {
|
|
207
|
+
readonly name: string;
|
|
208
|
+
readonly id: string;
|
|
209
|
+
readonly url: string | null | undefined;
|
|
210
|
+
readonly email: string | null | undefined;
|
|
211
|
+
readonly avatar: string | null | undefined;
|
|
212
|
+
readonly username: string;
|
|
213
|
+
readonly password: string | null | undefined;
|
|
214
|
+
readonly updatedAt: Date;
|
|
215
|
+
readonly createdAt: Date;
|
|
216
|
+
readonly emailVerified: boolean;
|
|
217
|
+
readonly notifications: string | null | undefined;
|
|
218
|
+
}[];
|
|
219
|
+
emailSearch: {
|
|
220
|
+
readonly name: string;
|
|
221
|
+
readonly id: string;
|
|
222
|
+
readonly url: string | null | undefined;
|
|
223
|
+
readonly email: string | null | undefined;
|
|
224
|
+
readonly avatar: string | null | undefined;
|
|
225
|
+
readonly username: string;
|
|
226
|
+
readonly password: string | null | undefined;
|
|
227
|
+
readonly updatedAt: Date;
|
|
228
|
+
readonly createdAt: Date;
|
|
229
|
+
readonly emailVerified: boolean;
|
|
230
|
+
readonly notifications: string | null | undefined;
|
|
231
|
+
}[];
|
|
232
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
233
|
+
ghost: {
|
|
234
|
+
verifyExists: () => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
235
|
+
create: () => import("effect/Effect").Effect<{
|
|
236
|
+
readonly name: string;
|
|
237
|
+
readonly id: string;
|
|
238
|
+
readonly url: string | null | undefined;
|
|
239
|
+
readonly email: string | null | undefined;
|
|
240
|
+
readonly avatar: string | null | undefined;
|
|
241
|
+
readonly username: string;
|
|
242
|
+
readonly password: string | null | undefined;
|
|
243
|
+
readonly updatedAt: Date;
|
|
244
|
+
readonly createdAt: Date;
|
|
245
|
+
readonly emailVerified: boolean;
|
|
246
|
+
readonly notifications: string | null | undefined;
|
|
247
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
248
|
+
get: () => import("effect/Effect").Effect<{
|
|
249
|
+
readonly name: string;
|
|
250
|
+
readonly id: string;
|
|
251
|
+
readonly url: string | null | undefined;
|
|
252
|
+
readonly email: string | null | undefined;
|
|
253
|
+
readonly avatar: string | null | undefined;
|
|
254
|
+
readonly username: string;
|
|
255
|
+
readonly password: string | null | undefined;
|
|
256
|
+
readonly updatedAt: Date;
|
|
257
|
+
readonly createdAt: Date;
|
|
258
|
+
readonly emailVerified: boolean;
|
|
259
|
+
readonly notifications: string | null | undefined;
|
|
260
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults>;
|
|
264
|
+
CLEAR: import("effect/Effect").Effect<{
|
|
265
|
+
page: {
|
|
266
|
+
byId: (id: string) => import("effect/Effect").Effect<void, never, never>;
|
|
267
|
+
};
|
|
268
|
+
pages: import("effect/Effect").Effect<void, never, never>;
|
|
269
|
+
latestVersion: import("effect/Effect").Effect<void, never, never>;
|
|
270
|
+
folderTree: import("effect/Effect").Effect<void, never, never>;
|
|
271
|
+
folderList: import("effect/Effect").Effect<void, never, never>;
|
|
272
|
+
}, never, import("../cache.js").CacheService>;
|
|
273
|
+
CONFIG: import("effect/Effect").Effect<{
|
|
274
|
+
siteConfig: {
|
|
275
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig> | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
276
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
277
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
278
|
+
};
|
|
279
|
+
mailerConfig: {
|
|
280
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSMailerConfig> | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
281
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
282
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
283
|
+
};
|
|
284
|
+
notificationConfig: {
|
|
285
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings> | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
286
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
287
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
288
|
+
};
|
|
289
|
+
templateConfig: {
|
|
290
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSTemplateConfig> | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
291
|
+
update: (data: import("../types.js").ConfigFinal<import("../types.js").StudioCMSTemplateConfig>) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSTemplateConfig>, Error, never>;
|
|
292
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
293
|
+
};
|
|
294
|
+
}, never, import("../context.js").DBClientLive | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
295
|
+
DELETE: import("effect/Effect").Effect<{
|
|
296
|
+
page: (id: string) => import("effect/Effect").Effect<{
|
|
297
|
+
status: "success" | "error";
|
|
298
|
+
message: string;
|
|
299
|
+
}, never, never>;
|
|
300
|
+
pageContent: (id: string) => import("effect/Effect").Effect<{
|
|
301
|
+
status: "success" | "error";
|
|
302
|
+
message: string;
|
|
303
|
+
}, never, never>;
|
|
304
|
+
pageContentLang: (id: string, lang: string) => import("effect/Effect").Effect<{
|
|
305
|
+
status: "success" | "error";
|
|
306
|
+
message: string;
|
|
307
|
+
}, never, never>;
|
|
308
|
+
tags: (id: number) => import("effect/Effect").Effect<{
|
|
309
|
+
status: "success" | "error";
|
|
310
|
+
message: string;
|
|
311
|
+
}, never, never>;
|
|
312
|
+
categories: (id: number) => import("effect/Effect").Effect<{
|
|
313
|
+
status: "success" | "error";
|
|
314
|
+
message: string;
|
|
315
|
+
}, never, never>;
|
|
316
|
+
permissions: (userId: string) => import("effect/Effect").Effect<{
|
|
317
|
+
status: "success" | "error";
|
|
318
|
+
message: string;
|
|
319
|
+
}, never, never>;
|
|
320
|
+
diffTracking: (id: string) => import("effect/Effect").Effect<{
|
|
321
|
+
status: "success" | "error";
|
|
322
|
+
message: string;
|
|
323
|
+
}, never, never>;
|
|
324
|
+
folder: (folderId: string) => import("effect/Effect").Effect<{
|
|
325
|
+
status: "success" | "error";
|
|
326
|
+
message: string;
|
|
327
|
+
}, never, never>;
|
|
328
|
+
user: (userId: string) => import("effect/Effect").Effect<{
|
|
329
|
+
status: "success" | "error";
|
|
330
|
+
message: string;
|
|
331
|
+
}, never, never>;
|
|
332
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
333
|
+
diffTracking: import("effect/Effect").Effect<{
|
|
334
|
+
insert: (userId: string, pageId: string, data: {
|
|
335
|
+
content: {
|
|
336
|
+
start: string;
|
|
337
|
+
end: string;
|
|
338
|
+
};
|
|
339
|
+
metaData: {
|
|
340
|
+
start: Partial<import("../types.js").tsPageDataSelect>;
|
|
341
|
+
end: Partial<import("../types.js").tsPageDataSelect>;
|
|
342
|
+
};
|
|
343
|
+
}, diffLength: number) => import("effect/Effect").Effect<import("../types.js").diffReturn, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError | import("../lib/diff.js").DiffError, never>;
|
|
344
|
+
clear: (input: string) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
345
|
+
get: {
|
|
346
|
+
byPageId: {
|
|
347
|
+
all: (pageId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
348
|
+
latest: (pageId: string, count: number) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
349
|
+
};
|
|
350
|
+
byUserId: {
|
|
351
|
+
all: (userId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
352
|
+
latest: (userId: string, count: number) => import("effect/Effect").Effect<import("../types.js").diffReturn[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
353
|
+
};
|
|
354
|
+
single: (diffId: string) => import("effect/Effect").Effect<import("../types.js").diffReturn | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError, never>;
|
|
355
|
+
};
|
|
356
|
+
revertToDiff: (id: string, type: "data" | "content" | "both") => import("effect/Effect").Effect<import("../types.js").diffReturn, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/parsers.js").ParsersError | import("./diffTracking/index.js").DiffTrackingError, never>;
|
|
357
|
+
utils: {
|
|
358
|
+
getMetaDataDifferences: <T extends Record<string, unknown>>(obj1: T, obj2: T) => import("effect/Effect").Effect<{
|
|
359
|
+
label: string;
|
|
360
|
+
previous: unknown;
|
|
361
|
+
current: unknown;
|
|
362
|
+
}[], never, never>;
|
|
363
|
+
getDiffHTML: (diff: string, options?: import("diff2html").Diff2HtmlConfig | undefined) => import("effect/Effect").Effect<string, import("../lib/diff.js").DiffError, never>;
|
|
364
|
+
};
|
|
365
|
+
}, never, import("../context.js").DBClientLive>;
|
|
366
|
+
GET: import("effect/Effect").Effect<{
|
|
367
|
+
permissionsLists: {
|
|
368
|
+
owners: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
369
|
+
admins: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
370
|
+
editors: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
371
|
+
visitors: () => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
372
|
+
all: () => import("effect/Effect").Effect<import("../types.js").CombinedRank[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/users.js").UsersError, never>;
|
|
373
|
+
};
|
|
374
|
+
users: {
|
|
375
|
+
all: () => import("effect/Effect").Effect<import("../types.js").CombinedUserData[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
376
|
+
byId: (userId: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
377
|
+
byUsername: (username: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
378
|
+
byEmail: (email: string) => import("effect/Effect").Effect<import("../types.js").CombinedUserData | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
379
|
+
};
|
|
380
|
+
folder: (folderId: string) => import("effect/Effect").Effect<{
|
|
381
|
+
readonly name: string;
|
|
382
|
+
readonly id: string;
|
|
383
|
+
readonly parent: string | null | undefined;
|
|
384
|
+
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
385
|
+
folderTree: () => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
386
|
+
folderList: () => import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
387
|
+
siteConfig: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSSiteConfig> | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
388
|
+
latestVersion: () => import("effect/Effect").Effect<{
|
|
389
|
+
version: string;
|
|
390
|
+
lastCacheUpdate: Date;
|
|
391
|
+
}, import("effect/Cause").UnknownException | Error | import("effect/ParseResult").ParseError, never>;
|
|
392
|
+
pages: {
|
|
393
|
+
(includeDrafts?: boolean, hideDefaultIndex?: boolean, metaOnly?: false, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
394
|
+
(includeDrafts?: boolean, hideDefaultIndex?: boolean, metaOnly?: true, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
395
|
+
};
|
|
396
|
+
page: {
|
|
397
|
+
byId: {
|
|
398
|
+
(id: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
399
|
+
(id: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
400
|
+
};
|
|
401
|
+
bySlug: {
|
|
402
|
+
(slug: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
403
|
+
(slug: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
packagePages: {
|
|
407
|
+
(packageName: string): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
408
|
+
(packageName: string, metaOnly?: boolean): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
409
|
+
};
|
|
410
|
+
folderPages: {
|
|
411
|
+
(idOrName: string, includeDrafts?: boolean, hideDefaultIndex?: boolean, metaOnly?: false, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").CombinedPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
412
|
+
(idOrName: string, includeDrafts?: boolean, hideDefaultIndex?: boolean, metaOnly?: true, paginate?: import("./get/index.js").PaginateInput): import("effect/Effect").Effect<import("../types.js").MetaOnlyPageData[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
413
|
+
};
|
|
414
|
+
pageFolderTree: (hideDefaultIndex?: boolean) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").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>;
|
|
415
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
416
|
+
INIT: import("effect/Effect").Effect<{
|
|
417
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
418
|
+
ghostUser: () => import("effect/Effect").Effect<{
|
|
419
|
+
readonly name: string;
|
|
420
|
+
readonly id: string;
|
|
421
|
+
readonly url: string | null | undefined;
|
|
422
|
+
readonly email: string | null | undefined;
|
|
423
|
+
readonly avatar: string | null | undefined;
|
|
424
|
+
readonly username: string;
|
|
425
|
+
readonly password: string | null | undefined;
|
|
426
|
+
readonly updatedAt: Date;
|
|
427
|
+
readonly createdAt: Date;
|
|
428
|
+
readonly emailVerified: boolean;
|
|
429
|
+
readonly notifications: string | null | undefined;
|
|
430
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
431
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
432
|
+
MIDDLEWARES: import("effect/Effect").Effect<{
|
|
433
|
+
verifyCache: () => import("effect/Effect").Effect<void, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").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>;
|
|
434
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
435
|
+
notificationSettings: import("effect/Effect").Effect<{
|
|
436
|
+
site: {
|
|
437
|
+
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
438
|
+
update: (settings: Omit<import("../types.js").StudioCMSNotificationSettings, "_config_version">) => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("../types.js").StudioCMSNotificationSettings>, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
439
|
+
};
|
|
440
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
441
|
+
PLUGINS: import("effect/Effect").Effect<{
|
|
442
|
+
usePluginData: {
|
|
443
|
+
<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>): {
|
|
444
|
+
getEntries: (filter?: (data: import("../types.js").PluginDataEntry<R>[]) => import("../types.js").PluginDataEntry<R>[]) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>[], Error, never>;
|
|
445
|
+
getEntry: (id: string) => {
|
|
446
|
+
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
447
|
+
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined, Error, never>;
|
|
448
|
+
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, Error, never>;
|
|
449
|
+
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, Error, never>;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
<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>): {
|
|
453
|
+
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
454
|
+
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined, Error, never>;
|
|
455
|
+
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, Error, never>;
|
|
456
|
+
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>, Error, never>;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
initPluginDataCache: (BATCH_SIZE?: number | undefined) => import("effect/Effect").Effect<void, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
460
|
+
clearPluginDataCache: () => import("effect/Effect").Effect<void, never, never>;
|
|
461
|
+
InferType: {
|
|
462
|
+
new <S extends import("effect/Schema").Struct<any>, R = import("../types.js").RecursiveSimplifyMutable<S["Type"]>>(schema: S): {
|
|
463
|
+
readonly _Schema: S;
|
|
464
|
+
readonly $UsePluginData: S;
|
|
465
|
+
readonly $Insert: R;
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
}, never, import("../context.js").DBClientLive | import("../cache.js").CacheService>;
|
|
469
|
+
POST: import("effect/Effect").Effect<{
|
|
470
|
+
databaseEntry: {
|
|
471
|
+
pages: (pageData: import("./post/index.js").OptionalId<string, {
|
|
472
|
+
readonly tags: string;
|
|
473
|
+
readonly id: string;
|
|
474
|
+
readonly description: string;
|
|
475
|
+
readonly slug: string;
|
|
476
|
+
readonly contentLang: string;
|
|
477
|
+
readonly updatedAt: string;
|
|
478
|
+
readonly package: string;
|
|
479
|
+
readonly title: string;
|
|
480
|
+
readonly showOnNav: boolean;
|
|
481
|
+
readonly publishedAt: string;
|
|
482
|
+
readonly heroImage: string | null | undefined;
|
|
483
|
+
readonly categories: string;
|
|
484
|
+
readonly authorId: string;
|
|
485
|
+
readonly contributorIds: string;
|
|
486
|
+
readonly showAuthor: boolean;
|
|
487
|
+
readonly showContributors: boolean;
|
|
488
|
+
readonly parentFolder: string | null | undefined;
|
|
489
|
+
readonly draft: boolean;
|
|
490
|
+
readonly augments: string;
|
|
491
|
+
}>, pageContent: import("../types.js").CombinedInsertContent) => import("effect/Effect").Effect<{
|
|
492
|
+
pageData: {
|
|
493
|
+
readonly id: string;
|
|
494
|
+
};
|
|
495
|
+
pageContent: {
|
|
496
|
+
readonly id: string;
|
|
497
|
+
};
|
|
498
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
499
|
+
pageContent: (input: {
|
|
500
|
+
readonly id: string;
|
|
501
|
+
readonly contentId: string;
|
|
502
|
+
readonly contentLang: string;
|
|
503
|
+
readonly content: string;
|
|
504
|
+
}) => import("effect/Effect").Effect<{
|
|
505
|
+
readonly id: string;
|
|
506
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
507
|
+
tags: (tag: import("./post/index.js").OptionalId<number, {
|
|
508
|
+
readonly name: string;
|
|
509
|
+
readonly id: number;
|
|
510
|
+
readonly description: string;
|
|
511
|
+
readonly slug: string;
|
|
512
|
+
readonly meta: string;
|
|
513
|
+
}>) => import("effect/Effect").Effect<{
|
|
514
|
+
readonly id: number;
|
|
515
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
516
|
+
categories: (category: import("./post/index.js").OptionalId<number, {
|
|
517
|
+
readonly name: string;
|
|
518
|
+
readonly id: number;
|
|
519
|
+
readonly parent: number | null | undefined;
|
|
520
|
+
readonly description: string;
|
|
521
|
+
readonly slug: string;
|
|
522
|
+
readonly meta: string;
|
|
523
|
+
}>) => import("effect/Effect").Effect<{
|
|
524
|
+
readonly id: number;
|
|
525
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
526
|
+
permissions: (userId: string, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
527
|
+
readonly user: string;
|
|
528
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
529
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
530
|
+
diffTracking: (data: import("./post/index.js").OptionalId<string, {
|
|
531
|
+
readonly id: string;
|
|
532
|
+
readonly userId: string;
|
|
533
|
+
readonly pageMetaData: string;
|
|
534
|
+
readonly pageId: string;
|
|
535
|
+
readonly timestamp: string | undefined;
|
|
536
|
+
readonly pageContentStart: string;
|
|
537
|
+
readonly diff: string | null | undefined;
|
|
538
|
+
}>) => import("effect/Effect").Effect<{
|
|
539
|
+
readonly id: string;
|
|
540
|
+
readonly userId: string;
|
|
541
|
+
readonly pageMetaData: {
|
|
542
|
+
readonly [x: string]: unknown;
|
|
543
|
+
};
|
|
544
|
+
readonly pageId: string;
|
|
545
|
+
readonly timestamp: Date;
|
|
546
|
+
readonly pageContentStart: string;
|
|
547
|
+
readonly diff: string | null | undefined;
|
|
548
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
549
|
+
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
550
|
+
readonly name: string;
|
|
551
|
+
readonly id: string;
|
|
552
|
+
readonly parent: string | null | undefined;
|
|
553
|
+
}>) => import("effect/Effect").Effect<{
|
|
554
|
+
readonly name: string;
|
|
555
|
+
readonly id: string;
|
|
556
|
+
readonly parent: string | null | undefined;
|
|
557
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
558
|
+
};
|
|
559
|
+
databaseEntries: {
|
|
560
|
+
tags: (tags: import("./post/index.js").OptionalId<number, {
|
|
561
|
+
readonly name: string;
|
|
562
|
+
readonly id: number;
|
|
563
|
+
readonly description: string;
|
|
564
|
+
readonly slug: string;
|
|
565
|
+
readonly meta: string;
|
|
566
|
+
}>[]) => import("effect/Effect").Effect<{
|
|
567
|
+
readonly id: number;
|
|
568
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
569
|
+
categories: (categories: import("./post/index.js").OptionalId<number, {
|
|
570
|
+
readonly name: string;
|
|
571
|
+
readonly id: number;
|
|
572
|
+
readonly parent: number | null | undefined;
|
|
573
|
+
readonly description: string;
|
|
574
|
+
readonly slug: string;
|
|
575
|
+
readonly meta: string;
|
|
576
|
+
}>[]) => import("effect/Effect").Effect<{
|
|
577
|
+
readonly id: number;
|
|
578
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
579
|
+
permissions: (permissions: {
|
|
580
|
+
userId: string;
|
|
581
|
+
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
582
|
+
}[]) => import("effect/Effect").Effect<{
|
|
583
|
+
readonly user: string;
|
|
584
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
585
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
586
|
+
pages: (pages: import("./post/index.js").MultiPageInsert) => import("effect/Effect").Effect<{
|
|
587
|
+
pageData: {
|
|
588
|
+
readonly id: string;
|
|
589
|
+
};
|
|
590
|
+
pageContent: {
|
|
591
|
+
readonly id: string;
|
|
592
|
+
};
|
|
593
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
594
|
+
};
|
|
595
|
+
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
596
|
+
readonly name: string;
|
|
597
|
+
readonly id: string;
|
|
598
|
+
readonly parent: string | null | undefined;
|
|
599
|
+
}>) => import("effect/Effect").Effect<{
|
|
600
|
+
readonly name: string;
|
|
601
|
+
readonly id: string;
|
|
602
|
+
readonly parent: string | null | undefined;
|
|
603
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
604
|
+
page: (args_0: {
|
|
605
|
+
pageData: import("./post/index.js").OptionalId<string, typeof import("@withstudiocms/kysely").StudioCMSPageData["Insert"]["Type"]>;
|
|
606
|
+
pageContent: import("../types.js").CombinedInsertContent;
|
|
607
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").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>;
|
|
608
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
609
|
+
resetTokenBucket: import("effect/Effect").Effect<{
|
|
610
|
+
new: (userId: string) => import("effect/Effect").Effect<{
|
|
611
|
+
readonly id: string;
|
|
612
|
+
readonly userId: string;
|
|
613
|
+
readonly token: string;
|
|
614
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
615
|
+
delete: (input: string) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
616
|
+
check: (token: string) => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
617
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
618
|
+
REST_API: import("effect/Effect").Effect<{
|
|
619
|
+
tokens: {
|
|
620
|
+
get: (input: string) => import("effect/Effect").Effect<readonly {
|
|
621
|
+
readonly key: string;
|
|
622
|
+
readonly id: string;
|
|
623
|
+
readonly description: string | null | undefined;
|
|
624
|
+
readonly userId: string;
|
|
625
|
+
readonly creationDate: Date;
|
|
626
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
627
|
+
new: (userId: string, description: string) => import("effect/Effect").Effect<{
|
|
628
|
+
readonly key: string;
|
|
629
|
+
readonly id: string;
|
|
630
|
+
readonly description: string | null | undefined;
|
|
631
|
+
readonly userId: string;
|
|
632
|
+
readonly creationDate: Date;
|
|
633
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
634
|
+
delete: (input: {
|
|
635
|
+
readonly userId: string;
|
|
636
|
+
readonly tokenId: string;
|
|
637
|
+
}) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
638
|
+
verify: (key: string) => import("effect/Effect").Effect<false | {
|
|
639
|
+
userId: string;
|
|
640
|
+
key: string;
|
|
641
|
+
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
642
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
643
|
+
};
|
|
644
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
645
|
+
UPDATE: import("effect/Effect").Effect<{
|
|
646
|
+
pageContent: (input: {
|
|
647
|
+
readonly id: string;
|
|
648
|
+
readonly contentId: string;
|
|
649
|
+
readonly contentLang: string;
|
|
650
|
+
readonly content: string;
|
|
651
|
+
}) => import("effect/Effect").Effect<{
|
|
652
|
+
readonly id: string;
|
|
653
|
+
readonly contentId: string;
|
|
654
|
+
readonly contentLang: string;
|
|
655
|
+
readonly content: string;
|
|
656
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
657
|
+
tags: (input: {
|
|
658
|
+
readonly name: string;
|
|
659
|
+
readonly id: number;
|
|
660
|
+
readonly description: string;
|
|
661
|
+
readonly slug: string;
|
|
662
|
+
readonly meta: string;
|
|
663
|
+
}) => import("effect/Effect").Effect<{
|
|
664
|
+
readonly name: string;
|
|
665
|
+
readonly id: number;
|
|
666
|
+
readonly description: string;
|
|
667
|
+
readonly slug: string;
|
|
668
|
+
readonly meta: {
|
|
669
|
+
readonly [x: string]: unknown;
|
|
670
|
+
};
|
|
671
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
672
|
+
categories: (input: {
|
|
673
|
+
readonly parent?: number | null | undefined;
|
|
674
|
+
readonly name: string;
|
|
675
|
+
readonly id: number;
|
|
676
|
+
readonly description: string;
|
|
677
|
+
readonly slug: string;
|
|
678
|
+
readonly meta: string;
|
|
679
|
+
}) => import("effect/Effect").Effect<{
|
|
680
|
+
readonly name: string;
|
|
681
|
+
readonly id: number;
|
|
682
|
+
readonly parent: number | null | undefined;
|
|
683
|
+
readonly description: string;
|
|
684
|
+
readonly slug: string;
|
|
685
|
+
readonly meta: {
|
|
686
|
+
readonly [x: string]: unknown;
|
|
687
|
+
};
|
|
688
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
689
|
+
permissions: (input: {
|
|
690
|
+
readonly user: string;
|
|
691
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
692
|
+
}) => import("effect/Effect").Effect<{
|
|
693
|
+
readonly user: string;
|
|
694
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
695
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
696
|
+
folderTree: import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
697
|
+
folderList: import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
698
|
+
folder: (data: {
|
|
699
|
+
readonly name: string;
|
|
700
|
+
readonly id: string;
|
|
701
|
+
readonly parent: string | null | undefined;
|
|
702
|
+
}) => import("effect/Effect").Effect<{
|
|
703
|
+
readonly name: string;
|
|
704
|
+
readonly id: string;
|
|
705
|
+
readonly parent: string | null | undefined;
|
|
706
|
+
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
707
|
+
latestVersion: () => import("effect/Effect").Effect<{
|
|
708
|
+
version: string;
|
|
709
|
+
lastCacheUpdate: Date;
|
|
710
|
+
}, import("effect/Cause").UnknownException | Error | import("effect/ParseResult").ParseError, never>;
|
|
711
|
+
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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
712
|
+
page: {
|
|
713
|
+
byId: (pageId: string, data: {
|
|
714
|
+
pageData: {
|
|
715
|
+
readonly tags: string;
|
|
716
|
+
readonly id: string;
|
|
717
|
+
readonly description: string;
|
|
718
|
+
readonly slug: string;
|
|
719
|
+
readonly contentLang: string;
|
|
720
|
+
readonly updatedAt: string;
|
|
721
|
+
readonly package: string;
|
|
722
|
+
readonly title: string;
|
|
723
|
+
readonly showOnNav: boolean;
|
|
724
|
+
readonly publishedAt: string;
|
|
725
|
+
readonly heroImage: string | null | undefined;
|
|
726
|
+
readonly categories: string;
|
|
727
|
+
readonly authorId: string;
|
|
728
|
+
readonly contributorIds: string;
|
|
729
|
+
readonly showAuthor: boolean;
|
|
730
|
+
readonly showContributors: boolean;
|
|
731
|
+
readonly parentFolder: string | null | undefined;
|
|
732
|
+
readonly draft: boolean;
|
|
733
|
+
readonly augments: string;
|
|
734
|
+
};
|
|
735
|
+
pageContent: {
|
|
736
|
+
readonly id: string;
|
|
737
|
+
readonly contentId: string;
|
|
738
|
+
readonly contentLang: string;
|
|
739
|
+
readonly content: string;
|
|
740
|
+
};
|
|
741
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").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>;
|
|
742
|
+
bySlug: (slug: string, data: {
|
|
743
|
+
pageData: {
|
|
744
|
+
readonly tags: string;
|
|
745
|
+
readonly id: string;
|
|
746
|
+
readonly description: string;
|
|
747
|
+
readonly slug: string;
|
|
748
|
+
readonly contentLang: string;
|
|
749
|
+
readonly updatedAt: string;
|
|
750
|
+
readonly package: string;
|
|
751
|
+
readonly title: string;
|
|
752
|
+
readonly showOnNav: boolean;
|
|
753
|
+
readonly publishedAt: string;
|
|
754
|
+
readonly heroImage: string | null | undefined;
|
|
755
|
+
readonly categories: string;
|
|
756
|
+
readonly authorId: string;
|
|
757
|
+
readonly contributorIds: string;
|
|
758
|
+
readonly showAuthor: boolean;
|
|
759
|
+
readonly showContributors: boolean;
|
|
760
|
+
readonly parentFolder: string | null | undefined;
|
|
761
|
+
readonly draft: boolean;
|
|
762
|
+
readonly augments: string;
|
|
763
|
+
};
|
|
764
|
+
pageContent: {
|
|
765
|
+
readonly id: string;
|
|
766
|
+
readonly contentId: string;
|
|
767
|
+
readonly contentLang: string;
|
|
768
|
+
readonly content: string;
|
|
769
|
+
};
|
|
770
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedPageData | undefined, import("effect/ParseResult").ParseError | import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError | import("./util/collectors.js").CollectorError | import("./get/index.js").PaginateError, never>;
|
|
771
|
+
};
|
|
772
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
773
|
+
UTIL: import("effect/Effect").Effect<{
|
|
774
|
+
Collectors: {
|
|
775
|
+
collectCategories: (input: {
|
|
776
|
+
readonly [x: number]: number;
|
|
777
|
+
readonly length: number;
|
|
778
|
+
toString: {};
|
|
779
|
+
toLocaleString: {};
|
|
780
|
+
concat: {};
|
|
781
|
+
join: {};
|
|
782
|
+
slice: {};
|
|
783
|
+
indexOf: {};
|
|
784
|
+
lastIndexOf: {};
|
|
785
|
+
every: {};
|
|
786
|
+
some: {};
|
|
787
|
+
forEach: {};
|
|
788
|
+
map: {};
|
|
789
|
+
filter: {};
|
|
790
|
+
reduce: {};
|
|
791
|
+
reduceRight: {};
|
|
792
|
+
find: {};
|
|
793
|
+
findIndex: {};
|
|
794
|
+
entries: {};
|
|
795
|
+
keys: {};
|
|
796
|
+
values: {};
|
|
797
|
+
includes: {};
|
|
798
|
+
flatMap: {};
|
|
799
|
+
flat: {};
|
|
800
|
+
at: {};
|
|
801
|
+
findLast: {};
|
|
802
|
+
findLastIndex: {};
|
|
803
|
+
toReversed: {};
|
|
804
|
+
toSorted: {};
|
|
805
|
+
toSpliced: {};
|
|
806
|
+
with: {};
|
|
807
|
+
[Symbol.iterator]: {};
|
|
808
|
+
readonly [Symbol.unscopables]: {
|
|
809
|
+
readonly [x: number]: boolean | undefined;
|
|
810
|
+
readonly length?: boolean | undefined;
|
|
811
|
+
toString?: boolean | undefined;
|
|
812
|
+
toLocaleString?: boolean | undefined;
|
|
813
|
+
concat?: boolean | undefined;
|
|
814
|
+
join?: boolean | undefined;
|
|
815
|
+
slice?: boolean | undefined;
|
|
816
|
+
indexOf?: boolean | undefined;
|
|
817
|
+
lastIndexOf?: boolean | undefined;
|
|
818
|
+
every?: boolean | undefined;
|
|
819
|
+
some?: boolean | undefined;
|
|
820
|
+
forEach?: boolean | undefined;
|
|
821
|
+
map?: boolean | undefined;
|
|
822
|
+
filter?: boolean | undefined;
|
|
823
|
+
reduce?: boolean | undefined;
|
|
824
|
+
reduceRight?: boolean | undefined;
|
|
825
|
+
find?: boolean | undefined;
|
|
826
|
+
findIndex?: boolean | undefined;
|
|
827
|
+
entries?: boolean | undefined;
|
|
828
|
+
keys?: boolean | undefined;
|
|
829
|
+
values?: boolean | undefined;
|
|
830
|
+
includes?: boolean | undefined;
|
|
831
|
+
flatMap?: boolean | undefined;
|
|
832
|
+
flat?: boolean | undefined;
|
|
833
|
+
at?: boolean | undefined;
|
|
834
|
+
findLast?: boolean | undefined;
|
|
835
|
+
findLastIndex?: boolean | undefined;
|
|
836
|
+
toReversed?: boolean | undefined;
|
|
837
|
+
toSorted?: boolean | undefined;
|
|
838
|
+
toSpliced?: boolean | undefined;
|
|
839
|
+
with?: boolean | undefined;
|
|
840
|
+
[Symbol.iterator]?: boolean | undefined;
|
|
841
|
+
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
842
|
+
};
|
|
843
|
+
}) => import("effect/Effect").Effect<readonly {
|
|
844
|
+
readonly name: string;
|
|
845
|
+
readonly id: number;
|
|
846
|
+
readonly parent: number | null | undefined;
|
|
847
|
+
readonly description: string;
|
|
848
|
+
readonly slug: string;
|
|
849
|
+
readonly meta: {
|
|
850
|
+
readonly [x: string]: unknown;
|
|
851
|
+
};
|
|
852
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
853
|
+
collectTags: (input: {
|
|
854
|
+
readonly [x: number]: number;
|
|
855
|
+
readonly length: number;
|
|
856
|
+
toString: {};
|
|
857
|
+
toLocaleString: {};
|
|
858
|
+
concat: {};
|
|
859
|
+
join: {};
|
|
860
|
+
slice: {};
|
|
861
|
+
indexOf: {};
|
|
862
|
+
lastIndexOf: {};
|
|
863
|
+
every: {};
|
|
864
|
+
some: {};
|
|
865
|
+
forEach: {};
|
|
866
|
+
map: {};
|
|
867
|
+
filter: {};
|
|
868
|
+
reduce: {};
|
|
869
|
+
reduceRight: {};
|
|
870
|
+
find: {};
|
|
871
|
+
findIndex: {};
|
|
872
|
+
entries: {};
|
|
873
|
+
keys: {};
|
|
874
|
+
values: {};
|
|
875
|
+
includes: {};
|
|
876
|
+
flatMap: {};
|
|
877
|
+
flat: {};
|
|
878
|
+
at: {};
|
|
879
|
+
findLast: {};
|
|
880
|
+
findLastIndex: {};
|
|
881
|
+
toReversed: {};
|
|
882
|
+
toSorted: {};
|
|
883
|
+
toSpliced: {};
|
|
884
|
+
with: {};
|
|
885
|
+
[Symbol.iterator]: {};
|
|
886
|
+
readonly [Symbol.unscopables]: {
|
|
887
|
+
readonly [x: number]: boolean | undefined;
|
|
888
|
+
readonly length?: boolean | undefined;
|
|
889
|
+
toString?: boolean | undefined;
|
|
890
|
+
toLocaleString?: boolean | undefined;
|
|
891
|
+
concat?: boolean | undefined;
|
|
892
|
+
join?: boolean | undefined;
|
|
893
|
+
slice?: boolean | undefined;
|
|
894
|
+
indexOf?: boolean | undefined;
|
|
895
|
+
lastIndexOf?: boolean | undefined;
|
|
896
|
+
every?: boolean | undefined;
|
|
897
|
+
some?: boolean | undefined;
|
|
898
|
+
forEach?: boolean | undefined;
|
|
899
|
+
map?: boolean | undefined;
|
|
900
|
+
filter?: boolean | undefined;
|
|
901
|
+
reduce?: boolean | undefined;
|
|
902
|
+
reduceRight?: boolean | undefined;
|
|
903
|
+
find?: boolean | undefined;
|
|
904
|
+
findIndex?: boolean | undefined;
|
|
905
|
+
entries?: boolean | undefined;
|
|
906
|
+
keys?: boolean | undefined;
|
|
907
|
+
values?: boolean | undefined;
|
|
908
|
+
includes?: boolean | undefined;
|
|
909
|
+
flatMap?: boolean | undefined;
|
|
910
|
+
flat?: boolean | undefined;
|
|
911
|
+
at?: boolean | undefined;
|
|
912
|
+
findLast?: boolean | undefined;
|
|
913
|
+
findLastIndex?: boolean | undefined;
|
|
914
|
+
toReversed?: boolean | undefined;
|
|
915
|
+
toSorted?: boolean | undefined;
|
|
916
|
+
toSpliced?: boolean | undefined;
|
|
917
|
+
with?: boolean | undefined;
|
|
918
|
+
[Symbol.iterator]?: boolean | undefined;
|
|
919
|
+
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
920
|
+
};
|
|
921
|
+
}) => import("effect/Effect").Effect<readonly {
|
|
922
|
+
readonly name: string;
|
|
923
|
+
readonly id: number;
|
|
924
|
+
readonly description: string;
|
|
925
|
+
readonly slug: string;
|
|
926
|
+
readonly meta: {
|
|
927
|
+
readonly [x: string]: unknown;
|
|
928
|
+
};
|
|
929
|
+
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
930
|
+
collectPageData: {
|
|
931
|
+
(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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/ParseResult").ParseError, never>;
|
|
932
|
+
(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").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/ParseResult").ParseError, never>;
|
|
933
|
+
};
|
|
934
|
+
collectUserData: (user: {
|
|
935
|
+
readonly name: string;
|
|
936
|
+
readonly id: string;
|
|
937
|
+
readonly url: string | null | undefined;
|
|
938
|
+
readonly email: string | null | undefined;
|
|
939
|
+
readonly avatar: string | null | undefined;
|
|
940
|
+
readonly username: string;
|
|
941
|
+
readonly password: string | null | undefined;
|
|
942
|
+
readonly updatedAt: Date;
|
|
943
|
+
readonly createdAt: Date;
|
|
944
|
+
readonly emailVerified: boolean;
|
|
945
|
+
readonly notifications: string | null | undefined;
|
|
946
|
+
}) => import("effect/Effect").Effect<import("../types.js").CombinedUserData, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
947
|
+
};
|
|
948
|
+
FolderTree: {
|
|
949
|
+
generateFolderTree: (folders: readonly {
|
|
950
|
+
readonly name: string;
|
|
951
|
+
readonly id: string;
|
|
952
|
+
readonly parent: string | null | undefined;
|
|
953
|
+
}[]) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
954
|
+
getFullPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<string[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
955
|
+
findNodeByPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
956
|
+
findNodesAlongPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
957
|
+
findNodesAlongPathToId: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
958
|
+
findNodeById: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
959
|
+
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>;
|
|
960
|
+
buildFolderTree: import("effect/Effect").Effect<import("../types.js").FolderNode[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/folderTree.js").FolderTreeError, never>;
|
|
961
|
+
getAvailableFolders: import("effect/Effect").Effect<import("../types.js").FolderListItem[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
962
|
+
};
|
|
963
|
+
Generators: {
|
|
964
|
+
generateRandomIDNumber: (length: number) => import("effect/Effect").Effect<number, import("./util/generators.js").GeneratorError, never>;
|
|
965
|
+
generateRandomPassword: (length: number) => import("effect/Effect").Effect<string, import("./util/generators.js").GeneratorError, never>;
|
|
966
|
+
generateToken: (userId: string, noExpire?: boolean | undefined) => import("effect/Effect").Effect<string, import("./util/generators.js").GeneratorError, never>;
|
|
967
|
+
testToken: (token: string) => import("effect/Effect").Effect<import("../types.js").JwtVerificationResult, import("./util/generators.js").GeneratorError, never>;
|
|
968
|
+
};
|
|
969
|
+
GetFromNPM: {
|
|
970
|
+
getVersion: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<{
|
|
971
|
+
version: string;
|
|
972
|
+
lastCacheUpdate: Date;
|
|
973
|
+
}, import("effect/Cause").UnknownException | Error | import("effect/ParseResult").ParseError, never>;
|
|
974
|
+
getDataFromNPM: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<import("./util/getFromNPM.js").NpmRegistryResponseSchema, import("effect/Cause").UnknownException | Error | import("effect/ParseResult").ParseError, never>;
|
|
975
|
+
};
|
|
976
|
+
Parsers: {
|
|
977
|
+
parseIdNumberArray: (ids: unknown) => import("effect/Effect").Effect<readonly number[], import("effect/ParseResult").ParseError, never>;
|
|
978
|
+
parseIdStringArray: (ids: unknown) => import("effect/Effect").Effect<readonly string[], import("effect/ParseResult").ParseError, never>;
|
|
979
|
+
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>;
|
|
980
|
+
};
|
|
981
|
+
Users: {
|
|
982
|
+
verifyRank: (users: readonly {
|
|
983
|
+
readonly name: string;
|
|
984
|
+
readonly id: string;
|
|
985
|
+
readonly url: string | null | undefined;
|
|
986
|
+
readonly email: string | null | undefined;
|
|
987
|
+
readonly avatar: string | null | undefined;
|
|
988
|
+
readonly username: string;
|
|
989
|
+
readonly password: string | null | undefined;
|
|
990
|
+
readonly updatedAt: Date;
|
|
991
|
+
readonly createdAt: Date;
|
|
992
|
+
readonly emailVerified: boolean;
|
|
993
|
+
readonly notifications: string | null | undefined;
|
|
994
|
+
}[], permissions: readonly {
|
|
995
|
+
readonly user: string;
|
|
996
|
+
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
997
|
+
}[], rank: string) => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError, never>;
|
|
998
|
+
combineRanks: (rank: string, users: import("../types.js").SingleRank[]) => import("effect/Effect").Effect<import("../types.js").CombinedRank[], import("./util/users.js").UsersError, never>;
|
|
999
|
+
clearUserReferences: (userId: string) => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").QueryError | import("@withstudiocms/kysely/core/errors").NotFoundError, never>;
|
|
1000
|
+
};
|
|
1001
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService>;
|
|
1002
|
+
};
|
|
1003
|
+
export default SDKModules;
|