@withstudiocms/sdk 0.1.0-beta.1 → 0.1.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/dist/consts.d.ts +10 -1
- package/dist/consts.js +12 -3
- package/dist/context.d.ts +36 -16
- package/dist/context.js +8 -1
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +6 -0
- package/dist/index.d.ts +341 -453
- package/dist/lib/pluginUtils.d.ts +4 -3
- package/dist/lib/pluginUtils.js +17 -10
- 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 +60 -104
- package/dist/modules/auth/index.js +33 -9
- package/dist/modules/config/index.d.ts +5 -5
- package/dist/modules/config/index.js +26 -7
- package/dist/modules/delete/index.d.ts +2 -1
- package/dist/modules/delete/index.js +7 -2
- package/dist/modules/diffTracking/index.d.ts +8 -8
- package/dist/modules/diffTracking/index.js +7 -6
- package/dist/modules/get/index.d.ts +116 -16
- package/dist/modules/get/index.js +135 -22
- package/dist/modules/index.d.ts +326 -446
- package/dist/modules/init/index.d.ts +9 -9
- package/dist/modules/middleware/index.d.ts +2 -2
- package/dist/modules/notificationSettings/index.d.ts +3 -3
- package/dist/modules/plugins/index.d.ts +9 -8
- package/dist/modules/plugins/index.js +17 -6
- package/dist/modules/post/index.d.ts +29 -28
- package/dist/modules/post/index.js +47 -15
- package/dist/modules/resetTokenBucket/index.d.ts +1 -1
- package/dist/modules/resetTokenBucket/index.js +5 -2
- package/dist/modules/rest_api/index.d.ts +8 -8
- package/dist/modules/rest_api/index.js +7 -3
- package/dist/modules/update/index.d.ts +25 -25
- package/dist/modules/update/index.js +28 -10
- package/dist/modules/util/collectors.d.ts +14 -150
- package/dist/modules/util/collectors.js +41 -14
- package/dist/modules/util/folderTree.d.ts +4 -4
- package/dist/modules/util/folderTree.js +1 -1
- package/dist/modules/util/getFromNPM.d.ts +13 -5
- package/dist/modules/util/getFromNPM.js +8 -2
- package/dist/modules/util/index.d.ts +30 -166
- package/dist/modules/util/users.d.ts +7 -7
- package/dist/tables.d.ts +433 -0
- package/dist/tables.js +169 -0
- package/dist/types.d.ts +6 -7
- package/package.json +17 -5
package/dist/modules/index.d.ts
CHANGED
|
@@ -10,16 +10,16 @@ export declare const SDKModules: {
|
|
|
10
10
|
get: (input: string) => import("effect/Effect").Effect<{
|
|
11
11
|
readonly id: string;
|
|
12
12
|
readonly userId: string;
|
|
13
|
-
readonly token: string;
|
|
14
13
|
readonly expiresAt: Date;
|
|
15
|
-
|
|
14
|
+
readonly token: string;
|
|
15
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
16
16
|
create: (userId: string) => import("effect/Effect").Effect<{
|
|
17
17
|
readonly id: string;
|
|
18
18
|
readonly userId: string;
|
|
19
|
-
readonly token: string;
|
|
20
19
|
readonly expiresAt: Date;
|
|
21
|
-
|
|
22
|
-
|
|
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
23
|
};
|
|
24
24
|
oAuth: {
|
|
25
25
|
create: (input: {
|
|
@@ -30,7 +30,7 @@ export declare const SDKModules: {
|
|
|
30
30
|
readonly providerUserId: string;
|
|
31
31
|
readonly provider: string;
|
|
32
32
|
readonly userId: string;
|
|
33
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
33
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
34
34
|
delete: (input: {
|
|
35
35
|
readonly userId: string;
|
|
36
36
|
readonly provider: string;
|
|
@@ -42,7 +42,7 @@ export declare const SDKModules: {
|
|
|
42
42
|
readonly providerUserId: string;
|
|
43
43
|
readonly provider: string;
|
|
44
44
|
readonly userId: string;
|
|
45
|
-
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
45
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
46
46
|
searchProvidersForId: (input: {
|
|
47
47
|
readonly userId: string;
|
|
48
48
|
readonly providerId: string;
|
|
@@ -50,13 +50,13 @@ export declare const SDKModules: {
|
|
|
50
50
|
readonly providerUserId: string;
|
|
51
51
|
readonly provider: string;
|
|
52
52
|
readonly userId: string;
|
|
53
|
-
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
53
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
54
54
|
};
|
|
55
55
|
permission: {
|
|
56
56
|
currentStatus: (input: string) => import("effect/Effect").Effect<{
|
|
57
57
|
readonly user: string;
|
|
58
58
|
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
59
|
-
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
59
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
60
60
|
};
|
|
61
61
|
session: {
|
|
62
62
|
create: (input: {
|
|
@@ -67,12 +67,12 @@ export declare const SDKModules: {
|
|
|
67
67
|
readonly id: string;
|
|
68
68
|
readonly userId: string;
|
|
69
69
|
readonly expiresAt: Date;
|
|
70
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
70
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
71
71
|
getById: (input: string) => import("effect/Effect").Effect<{
|
|
72
72
|
readonly id: string;
|
|
73
73
|
readonly userId: string;
|
|
74
74
|
readonly expiresAt: Date;
|
|
75
|
-
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
75
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
76
76
|
sessionWithUser: (sessionId: string) => import("effect/Effect").Effect<{
|
|
77
77
|
session: {
|
|
78
78
|
readonly id: string;
|
|
@@ -80,184 +80,139 @@ export declare const SDKModules: {
|
|
|
80
80
|
readonly expiresAt: Date;
|
|
81
81
|
};
|
|
82
82
|
user: {
|
|
83
|
-
readonly name: string;
|
|
84
83
|
readonly id: string;
|
|
85
|
-
readonly url
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
84
|
+
readonly url?: string | null | undefined;
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly email?: string | null | undefined;
|
|
87
|
+
readonly avatar?: string | null | undefined;
|
|
88
88
|
readonly username: string;
|
|
89
|
-
readonly password
|
|
89
|
+
readonly password?: string | null | undefined;
|
|
90
90
|
readonly updatedAt: Date;
|
|
91
91
|
readonly createdAt: Date;
|
|
92
92
|
readonly emailVerified: boolean;
|
|
93
|
-
readonly notifications
|
|
93
|
+
readonly notifications?: string | null | undefined;
|
|
94
94
|
};
|
|
95
|
-
} | undefined, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
95
|
+
} | undefined, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
96
96
|
delete: (input: string) => import("../types.js").AuthDeletionResponse;
|
|
97
97
|
update: (input: {
|
|
98
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
|
-
};
|
|
99
|
+
readonly newDate: Date;
|
|
146
100
|
}) => import("effect/Effect").Effect<{
|
|
147
101
|
readonly id: string;
|
|
148
102
|
readonly userId: string;
|
|
149
103
|
readonly expiresAt: Date;
|
|
150
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
104
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
151
105
|
};
|
|
152
106
|
user: {
|
|
153
107
|
create: (userData: {
|
|
154
|
-
readonly name: string;
|
|
155
108
|
readonly id: string;
|
|
156
|
-
readonly url
|
|
157
|
-
readonly
|
|
158
|
-
readonly
|
|
109
|
+
readonly url?: string | null | undefined;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly email?: string | null | undefined;
|
|
112
|
+
readonly avatar?: string | null | undefined;
|
|
159
113
|
readonly username: string;
|
|
160
|
-
readonly password
|
|
114
|
+
readonly password?: string | null | undefined;
|
|
161
115
|
readonly updatedAt: string;
|
|
162
116
|
readonly createdAt: string | undefined;
|
|
163
117
|
readonly emailVerified: boolean;
|
|
164
|
-
readonly notifications
|
|
118
|
+
readonly notifications?: string | null | undefined;
|
|
165
119
|
}, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
166
|
-
readonly name: string;
|
|
167
120
|
readonly id: string;
|
|
168
|
-
readonly url
|
|
169
|
-
readonly
|
|
170
|
-
readonly
|
|
121
|
+
readonly url?: string | null | undefined;
|
|
122
|
+
readonly name: string;
|
|
123
|
+
readonly email?: string | null | undefined;
|
|
124
|
+
readonly avatar?: string | null | undefined;
|
|
171
125
|
readonly username: string;
|
|
172
|
-
readonly password
|
|
126
|
+
readonly password?: string | null | undefined;
|
|
173
127
|
readonly updatedAt: Date;
|
|
174
128
|
readonly createdAt: Date;
|
|
175
129
|
readonly emailVerified: boolean;
|
|
176
|
-
readonly notifications
|
|
177
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
130
|
+
readonly notifications?: string | null | undefined;
|
|
131
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
178
132
|
update: (input: {
|
|
179
133
|
readonly userId: string;
|
|
180
134
|
readonly userData: {
|
|
135
|
+
readonly id: string;
|
|
181
136
|
readonly url?: string | null | undefined;
|
|
137
|
+
readonly name: string;
|
|
182
138
|
readonly email?: string | null | undefined;
|
|
183
139
|
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
140
|
readonly username: string;
|
|
141
|
+
readonly password?: string | null | undefined;
|
|
189
142
|
readonly updatedAt: string;
|
|
143
|
+
readonly createdAt: undefined;
|
|
190
144
|
readonly emailVerified: boolean;
|
|
145
|
+
readonly notifications?: string | null | undefined;
|
|
191
146
|
};
|
|
192
147
|
}) => import("effect/Effect").Effect<{
|
|
193
|
-
readonly name: string;
|
|
194
148
|
readonly id: string;
|
|
195
|
-
readonly url
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
149
|
+
readonly url?: string | null | undefined;
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly email?: string | null | undefined;
|
|
152
|
+
readonly avatar?: string | null | undefined;
|
|
198
153
|
readonly username: string;
|
|
199
|
-
readonly password
|
|
154
|
+
readonly password?: string | null | undefined;
|
|
200
155
|
readonly updatedAt: Date;
|
|
201
156
|
readonly createdAt: Date;
|
|
202
157
|
readonly emailVerified: boolean;
|
|
203
|
-
readonly notifications
|
|
204
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
158
|
+
readonly notifications?: string | null | undefined;
|
|
159
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
205
160
|
searchUsersForUsernameOrEmail: (username?: string | undefined, email?: string | undefined) => import("effect/Effect").Effect<{
|
|
206
161
|
usernameSearch: {
|
|
207
|
-
readonly name: string;
|
|
208
162
|
readonly id: string;
|
|
209
|
-
readonly url
|
|
210
|
-
readonly
|
|
211
|
-
readonly
|
|
163
|
+
readonly url?: string | null | undefined;
|
|
164
|
+
readonly name: string;
|
|
165
|
+
readonly email?: string | null | undefined;
|
|
166
|
+
readonly avatar?: string | null | undefined;
|
|
212
167
|
readonly username: string;
|
|
213
|
-
readonly password
|
|
168
|
+
readonly password?: string | null | undefined;
|
|
214
169
|
readonly updatedAt: Date;
|
|
215
170
|
readonly createdAt: Date;
|
|
216
171
|
readonly emailVerified: boolean;
|
|
217
|
-
readonly notifications
|
|
172
|
+
readonly notifications?: string | null | undefined;
|
|
218
173
|
}[];
|
|
219
174
|
emailSearch: {
|
|
220
|
-
readonly name: string;
|
|
221
175
|
readonly id: string;
|
|
222
|
-
readonly url
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
176
|
+
readonly url?: string | null | undefined;
|
|
177
|
+
readonly name: string;
|
|
178
|
+
readonly email?: string | null | undefined;
|
|
179
|
+
readonly avatar?: string | null | undefined;
|
|
225
180
|
readonly username: string;
|
|
226
|
-
readonly password
|
|
181
|
+
readonly password?: string | null | undefined;
|
|
227
182
|
readonly updatedAt: Date;
|
|
228
183
|
readonly createdAt: Date;
|
|
229
184
|
readonly emailVerified: boolean;
|
|
230
|
-
readonly notifications
|
|
185
|
+
readonly notifications?: string | null | undefined;
|
|
231
186
|
}[];
|
|
232
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
187
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
233
188
|
ghost: {
|
|
234
|
-
verifyExists: () => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
189
|
+
verifyExists: () => import("effect/Effect").Effect<boolean, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
235
190
|
create: () => import("effect/Effect").Effect<{
|
|
236
|
-
readonly name: string;
|
|
237
191
|
readonly id: string;
|
|
238
|
-
readonly url
|
|
239
|
-
readonly
|
|
240
|
-
readonly
|
|
192
|
+
readonly url?: string | null | undefined;
|
|
193
|
+
readonly name: string;
|
|
194
|
+
readonly email?: string | null | undefined;
|
|
195
|
+
readonly avatar?: string | null | undefined;
|
|
241
196
|
readonly username: string;
|
|
242
|
-
readonly password
|
|
197
|
+
readonly password?: string | null | undefined;
|
|
243
198
|
readonly updatedAt: Date;
|
|
244
199
|
readonly createdAt: Date;
|
|
245
200
|
readonly emailVerified: boolean;
|
|
246
|
-
readonly notifications
|
|
247
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
201
|
+
readonly notifications?: string | null | undefined;
|
|
202
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
248
203
|
get: () => import("effect/Effect").Effect<{
|
|
249
|
-
readonly name: string;
|
|
250
204
|
readonly id: string;
|
|
251
|
-
readonly url
|
|
252
|
-
readonly
|
|
253
|
-
readonly
|
|
205
|
+
readonly url?: string | null | undefined;
|
|
206
|
+
readonly name: string;
|
|
207
|
+
readonly email?: string | null | undefined;
|
|
208
|
+
readonly avatar?: string | null | undefined;
|
|
254
209
|
readonly username: string;
|
|
255
|
-
readonly password
|
|
210
|
+
readonly password?: string | null | undefined;
|
|
256
211
|
readonly updatedAt: Date;
|
|
257
212
|
readonly createdAt: Date;
|
|
258
213
|
readonly emailVerified: boolean;
|
|
259
|
-
readonly notifications
|
|
260
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
214
|
+
readonly notifications?: string | null | undefined;
|
|
215
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
261
216
|
};
|
|
262
217
|
};
|
|
263
218
|
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults>;
|
|
@@ -272,26 +227,26 @@ export declare const SDKModules: {
|
|
|
272
227
|
}, never, import("../cache.js").CacheService>;
|
|
273
228
|
CONFIG: import("effect/Effect").Effect<{
|
|
274
229
|
siteConfig: {
|
|
275
|
-
get: () => import("effect/Effect").Effect<import("../types.js").DynamicConfigEntry<import("
|
|
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>;
|
|
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>;
|
|
278
233
|
};
|
|
279
234
|
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>;
|
|
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>;
|
|
283
238
|
};
|
|
284
239
|
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>;
|
|
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>;
|
|
288
243
|
};
|
|
289
244
|
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>,
|
|
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>;
|
|
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>;
|
|
293
248
|
};
|
|
294
|
-
}, never, import("../context.js").DBClientLive | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
249
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
295
250
|
DELETE: import("effect/Effect").Effect<{
|
|
296
251
|
page: (id: string) => import("effect/Effect").Effect<{
|
|
297
252
|
status: "success" | "error";
|
|
@@ -329,7 +284,7 @@ export declare const SDKModules: {
|
|
|
329
284
|
status: "success" | "error";
|
|
330
285
|
message: string;
|
|
331
286
|
}, never, never>;
|
|
332
|
-
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
287
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
333
288
|
diffTracking: import("effect/Effect").Effect<{
|
|
334
289
|
insert: (userId: string, pageId: string, data: {
|
|
335
290
|
content: {
|
|
@@ -340,20 +295,20 @@ export declare const SDKModules: {
|
|
|
340
295
|
start: Partial<import("../types.js").tsPageDataSelect>;
|
|
341
296
|
end: Partial<import("../types.js").tsPageDataSelect>;
|
|
342
297
|
};
|
|
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>;
|
|
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>;
|
|
345
300
|
get: {
|
|
346
301
|
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>;
|
|
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>;
|
|
349
304
|
};
|
|
350
305
|
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>;
|
|
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>;
|
|
353
308
|
};
|
|
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>;
|
|
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>;
|
|
355
310
|
};
|
|
356
|
-
revertToDiff: (id: string, type: "
|
|
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>;
|
|
357
312
|
utils: {
|
|
358
313
|
getMetaDataDifferences: <T extends Record<string, unknown>>(obj1: T, obj2: T) => import("effect/Effect").Effect<{
|
|
359
314
|
label: string;
|
|
@@ -365,98 +320,159 @@ export declare const SDKModules: {
|
|
|
365
320
|
}, never, import("../context.js").DBClientLive>;
|
|
366
321
|
GET: import("effect/Effect").Effect<{
|
|
367
322
|
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>;
|
|
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>;
|
|
373
328
|
};
|
|
374
329
|
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>;
|
|
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>;
|
|
379
334
|
};
|
|
380
335
|
folder: (folderId: string) => import("effect/Effect").Effect<{
|
|
381
|
-
readonly name: string;
|
|
382
336
|
readonly id: string;
|
|
383
|
-
readonly
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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>;
|
|
388
343
|
latestVersion: () => import("effect/Effect").Effect<{
|
|
389
344
|
version: string;
|
|
390
345
|
lastCacheUpdate: Date;
|
|
391
|
-
}, import("effect/Cause").UnknownException |
|
|
346
|
+
}, import("effect/Cause").UnknownException | import("effect/ParseResult").ParseError | import("./util/getFromNPM.js").GetFromNPMError, never>;
|
|
392
347
|
pages: {
|
|
393
|
-
(includeDrafts?: boolean,
|
|
394
|
-
(includeDrafts?: boolean,
|
|
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>;
|
|
395
350
|
};
|
|
396
351
|
page: {
|
|
397
352
|
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>;
|
|
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>;
|
|
400
355
|
};
|
|
401
356
|
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>;
|
|
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>;
|
|
404
359
|
};
|
|
405
360
|
};
|
|
406
361
|
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>;
|
|
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>;
|
|
409
364
|
};
|
|
410
365
|
folderPages: {
|
|
411
|
-
(idOrName: string, includeDrafts?: boolean,
|
|
412
|
-
(idOrName: string, includeDrafts?: boolean,
|
|
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>;
|
|
413
368
|
};
|
|
414
|
-
pageFolderTree: (
|
|
415
|
-
|
|
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>;
|
|
416
432
|
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>;
|
|
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>;
|
|
418
434
|
ghostUser: () => import("effect/Effect").Effect<{
|
|
419
|
-
readonly name: string;
|
|
420
435
|
readonly id: string;
|
|
421
|
-
readonly url
|
|
422
|
-
readonly
|
|
423
|
-
readonly
|
|
436
|
+
readonly url?: string | null | undefined;
|
|
437
|
+
readonly name: string;
|
|
438
|
+
readonly email?: string | null | undefined;
|
|
439
|
+
readonly avatar?: string | null | undefined;
|
|
424
440
|
readonly username: string;
|
|
425
|
-
readonly password
|
|
441
|
+
readonly password?: string | null | undefined;
|
|
426
442
|
readonly updatedAt: Date;
|
|
427
443
|
readonly createdAt: Date;
|
|
428
444
|
readonly emailVerified: boolean;
|
|
429
|
-
readonly notifications
|
|
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>;
|
|
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>;
|
|
432
448
|
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>;
|
|
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>;
|
|
435
451
|
notificationSettings: import("effect/Effect").Effect<{
|
|
436
452
|
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>;
|
|
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>;
|
|
439
455
|
};
|
|
440
|
-
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
456
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
441
457
|
PLUGINS: import("effect/Effect").Effect<{
|
|
442
458
|
usePluginData: {
|
|
443
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>): {
|
|
444
|
-
getEntries: (filter?: (data: import("../types.js").PluginDataEntry<R>[]) => import("../types.js").PluginDataEntry<R>[]) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>[],
|
|
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>;
|
|
445
461
|
getEntry: (id: string) => {
|
|
446
462
|
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
447
|
-
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined,
|
|
448
|
-
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>,
|
|
449
|
-
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>,
|
|
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>;
|
|
450
466
|
};
|
|
451
467
|
};
|
|
452
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>): {
|
|
453
469
|
generatedId: () => import("effect/Effect").Effect<string, never, never>;
|
|
454
|
-
select: () => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R> | undefined,
|
|
455
|
-
insert: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>,
|
|
456
|
-
update: (data: R) => import("effect/Effect").Effect<import("../types.js").PluginDataEntry<R>,
|
|
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>;
|
|
457
473
|
};
|
|
458
474
|
};
|
|
459
|
-
initPluginDataCache: (BATCH_SIZE?: number | undefined) => import("effect/Effect").Effect<void, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
475
|
+
initPluginDataCache: (BATCH_SIZE?: number | undefined) => import("effect/Effect").Effect<void, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
460
476
|
clearPluginDataCache: () => import("effect/Effect").Effect<void, never, never>;
|
|
461
477
|
InferType: {
|
|
462
478
|
new <S extends import("effect/Schema").Struct<any>, R = import("../types.js").RecursiveSimplifyMutable<S["Type"]>>(schema: S): {
|
|
@@ -469,23 +485,23 @@ export declare const SDKModules: {
|
|
|
469
485
|
POST: import("effect/Effect").Effect<{
|
|
470
486
|
databaseEntry: {
|
|
471
487
|
pages: (pageData: import("./post/index.js").OptionalId<string, {
|
|
472
|
-
readonly tags: string;
|
|
473
488
|
readonly id: string;
|
|
474
|
-
readonly description: string;
|
|
475
|
-
readonly slug: string;
|
|
476
|
-
readonly contentLang: string;
|
|
477
489
|
readonly updatedAt: string;
|
|
490
|
+
readonly description: string;
|
|
478
491
|
readonly package: string;
|
|
479
492
|
readonly title: string;
|
|
480
493
|
readonly showOnNav: boolean;
|
|
481
494
|
readonly publishedAt: string;
|
|
482
|
-
readonly
|
|
495
|
+
readonly slug: string;
|
|
496
|
+
readonly contentLang: string;
|
|
497
|
+
readonly heroImage?: string | null | undefined;
|
|
483
498
|
readonly categories: string;
|
|
499
|
+
readonly tags: string;
|
|
484
500
|
readonly authorId: string;
|
|
485
501
|
readonly contributorIds: string;
|
|
486
502
|
readonly showAuthor: boolean;
|
|
487
503
|
readonly showContributors: boolean;
|
|
488
|
-
readonly parentFolder
|
|
504
|
+
readonly parentFolder?: string | null | undefined;
|
|
489
505
|
readonly draft: boolean;
|
|
490
506
|
readonly augments: string;
|
|
491
507
|
}>, pageContent: import("../types.js").CombinedInsertContent) => import("effect/Effect").Effect<{
|
|
@@ -495,94 +511,94 @@ export declare const SDKModules: {
|
|
|
495
511
|
pageContent: {
|
|
496
512
|
readonly id: string;
|
|
497
513
|
};
|
|
498
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
514
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
499
515
|
pageContent: (input: {
|
|
500
516
|
readonly id: string;
|
|
501
|
-
readonly contentId: string;
|
|
502
517
|
readonly contentLang: string;
|
|
518
|
+
readonly contentId: string;
|
|
503
519
|
readonly content: string;
|
|
504
520
|
}) => import("effect/Effect").Effect<{
|
|
505
521
|
readonly id: string;
|
|
506
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
522
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
507
523
|
tags: (tag: import("./post/index.js").OptionalId<number, {
|
|
508
|
-
readonly name: string;
|
|
509
524
|
readonly id: number;
|
|
525
|
+
readonly name: string;
|
|
510
526
|
readonly description: string;
|
|
511
527
|
readonly slug: string;
|
|
512
528
|
readonly meta: string;
|
|
513
529
|
}>) => import("effect/Effect").Effect<{
|
|
514
530
|
readonly id: number;
|
|
515
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
531
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
516
532
|
categories: (category: import("./post/index.js").OptionalId<number, {
|
|
517
|
-
readonly name: string;
|
|
518
533
|
readonly id: number;
|
|
519
|
-
readonly
|
|
534
|
+
readonly name: string;
|
|
520
535
|
readonly description: string;
|
|
536
|
+
readonly parent?: number | null | undefined;
|
|
521
537
|
readonly slug: string;
|
|
522
538
|
readonly meta: string;
|
|
523
539
|
}>) => import("effect/Effect").Effect<{
|
|
524
540
|
readonly id: number;
|
|
525
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
541
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
526
542
|
permissions: (userId: string, rank: "owner" | "admin" | "editor" | "visitor" | "unknown") => import("effect/Effect").Effect<{
|
|
527
543
|
readonly user: string;
|
|
528
544
|
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
529
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
545
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
530
546
|
diffTracking: (data: import("./post/index.js").OptionalId<string, {
|
|
531
547
|
readonly id: string;
|
|
532
548
|
readonly userId: string;
|
|
533
|
-
readonly pageMetaData: string;
|
|
534
549
|
readonly pageId: string;
|
|
535
550
|
readonly timestamp: string | undefined;
|
|
551
|
+
readonly pageMetaData: string;
|
|
536
552
|
readonly pageContentStart: string;
|
|
537
|
-
readonly diff
|
|
553
|
+
readonly diff?: string | null | undefined;
|
|
538
554
|
}>) => import("effect/Effect").Effect<{
|
|
539
555
|
readonly id: string;
|
|
540
556
|
readonly userId: string;
|
|
557
|
+
readonly pageId: string;
|
|
558
|
+
readonly timestamp: Date;
|
|
541
559
|
readonly pageMetaData: {
|
|
542
560
|
readonly [x: string]: unknown;
|
|
543
561
|
};
|
|
544
|
-
readonly pageId: string;
|
|
545
|
-
readonly timestamp: Date;
|
|
546
562
|
readonly pageContentStart: string;
|
|
547
|
-
readonly diff
|
|
548
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
563
|
+
readonly diff?: string | null | undefined;
|
|
564
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
549
565
|
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
550
|
-
readonly name: string;
|
|
551
566
|
readonly id: string;
|
|
552
|
-
readonly parent: string | null | undefined;
|
|
553
|
-
}>) => import("effect/Effect").Effect<{
|
|
554
567
|
readonly name: string;
|
|
568
|
+
readonly parent?: string | null | undefined;
|
|
569
|
+
}>) => import("effect/Effect").Effect<{
|
|
555
570
|
readonly id: string;
|
|
556
|
-
readonly
|
|
557
|
-
|
|
571
|
+
readonly name: string;
|
|
572
|
+
readonly parent?: string | null | undefined;
|
|
573
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
558
574
|
};
|
|
559
575
|
databaseEntries: {
|
|
560
576
|
tags: (tags: import("./post/index.js").OptionalId<number, {
|
|
561
|
-
readonly name: string;
|
|
562
577
|
readonly id: number;
|
|
578
|
+
readonly name: string;
|
|
563
579
|
readonly description: string;
|
|
564
580
|
readonly slug: string;
|
|
565
581
|
readonly meta: string;
|
|
566
582
|
}>[]) => import("effect/Effect").Effect<{
|
|
567
583
|
readonly id: number;
|
|
568
|
-
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
584
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
569
585
|
categories: (categories: import("./post/index.js").OptionalId<number, {
|
|
570
|
-
readonly name: string;
|
|
571
586
|
readonly id: number;
|
|
572
|
-
readonly
|
|
587
|
+
readonly name: string;
|
|
573
588
|
readonly description: string;
|
|
589
|
+
readonly parent?: number | null | undefined;
|
|
574
590
|
readonly slug: string;
|
|
575
591
|
readonly meta: string;
|
|
576
592
|
}>[]) => import("effect/Effect").Effect<{
|
|
577
593
|
readonly id: number;
|
|
578
|
-
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
594
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
579
595
|
permissions: (permissions: {
|
|
580
596
|
userId: string;
|
|
581
597
|
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
582
598
|
}[]) => import("effect/Effect").Effect<{
|
|
583
599
|
readonly user: string;
|
|
584
600
|
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
585
|
-
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
601
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
586
602
|
pages: (pages: import("./post/index.js").MultiPageInsert) => import("effect/Effect").Effect<{
|
|
587
603
|
pageData: {
|
|
588
604
|
readonly id: string;
|
|
@@ -590,366 +606,230 @@ export declare const SDKModules: {
|
|
|
590
606
|
pageContent: {
|
|
591
607
|
readonly id: string;
|
|
592
608
|
};
|
|
593
|
-
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
609
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
594
610
|
};
|
|
595
611
|
folder: (data: import("./post/index.js").OptionalId<string, {
|
|
596
|
-
readonly name: string;
|
|
597
612
|
readonly id: string;
|
|
598
|
-
readonly parent: string | null | undefined;
|
|
599
|
-
}>) => import("effect/Effect").Effect<{
|
|
600
613
|
readonly name: string;
|
|
614
|
+
readonly parent?: string | null | undefined;
|
|
615
|
+
}>) => import("effect/Effect").Effect<{
|
|
601
616
|
readonly id: string;
|
|
602
|
-
readonly
|
|
603
|
-
|
|
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>;
|
|
604
620
|
page: (args_0: {
|
|
605
|
-
pageData: import("./post/index.js").OptionalId<string, typeof import("
|
|
621
|
+
pageData: import("./post/index.js").OptionalId<string, typeof import("../tables.js").StudioCMSPageData["Insert"]["Type"]>;
|
|
606
622
|
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>;
|
|
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>;
|
|
609
625
|
resetTokenBucket: import("effect/Effect").Effect<{
|
|
610
626
|
new: (userId: string) => import("effect/Effect").Effect<{
|
|
611
627
|
readonly id: string;
|
|
612
628
|
readonly userId: string;
|
|
613
629
|
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>;
|
|
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>;
|
|
617
633
|
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
618
634
|
REST_API: import("effect/Effect").Effect<{
|
|
619
635
|
tokens: {
|
|
620
636
|
get: (input: string) => import("effect/Effect").Effect<readonly {
|
|
621
|
-
readonly key: string;
|
|
622
637
|
readonly id: string;
|
|
623
|
-
readonly description: string | null | undefined;
|
|
624
638
|
readonly userId: string;
|
|
639
|
+
readonly key: string;
|
|
625
640
|
readonly creationDate: Date;
|
|
626
|
-
|
|
641
|
+
readonly description?: string | null | undefined;
|
|
642
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
627
643
|
new: (userId: string, description: string) => import("effect/Effect").Effect<{
|
|
628
|
-
readonly key: string;
|
|
629
644
|
readonly id: string;
|
|
630
|
-
readonly description: string | null | undefined;
|
|
631
645
|
readonly userId: string;
|
|
646
|
+
readonly key: string;
|
|
632
647
|
readonly creationDate: Date;
|
|
633
|
-
|
|
648
|
+
readonly description?: string | null | undefined;
|
|
649
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("./util/generators.js").GeneratorError, never>;
|
|
634
650
|
delete: (input: {
|
|
635
651
|
readonly userId: string;
|
|
636
652
|
readonly tokenId: string;
|
|
637
|
-
}) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
653
|
+
}) => import("effect/Effect").Effect<import("kysely").DeleteResult[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
638
654
|
verify: (key: string) => import("effect/Effect").Effect<false | {
|
|
639
655
|
userId: string;
|
|
640
656
|
key: string;
|
|
641
657
|
rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
642
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
658
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
643
659
|
};
|
|
644
660
|
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive>;
|
|
645
661
|
UPDATE: import("effect/Effect").Effect<{
|
|
646
662
|
pageContent: (input: {
|
|
647
663
|
readonly id: string;
|
|
648
|
-
readonly contentId: string;
|
|
649
664
|
readonly contentLang: string;
|
|
665
|
+
readonly contentId: string;
|
|
650
666
|
readonly content: string;
|
|
651
667
|
}) => import("effect/Effect").Effect<{
|
|
652
668
|
readonly id: string;
|
|
653
|
-
readonly contentId: string;
|
|
654
669
|
readonly contentLang: string;
|
|
670
|
+
readonly contentId: string;
|
|
655
671
|
readonly content: string;
|
|
656
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
672
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
657
673
|
tags: (input: {
|
|
658
|
-
readonly name: string;
|
|
659
674
|
readonly id: number;
|
|
675
|
+
readonly name: string;
|
|
660
676
|
readonly description: string;
|
|
661
677
|
readonly slug: string;
|
|
662
678
|
readonly meta: string;
|
|
663
679
|
}) => import("effect/Effect").Effect<{
|
|
664
|
-
readonly name: string;
|
|
665
680
|
readonly id: number;
|
|
681
|
+
readonly name: string;
|
|
666
682
|
readonly description: string;
|
|
667
683
|
readonly slug: string;
|
|
668
684
|
readonly meta: {
|
|
669
685
|
readonly [x: string]: unknown;
|
|
670
686
|
};
|
|
671
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
687
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
672
688
|
categories: (input: {
|
|
673
|
-
readonly parent?: number | null | undefined;
|
|
674
|
-
readonly name: string;
|
|
675
689
|
readonly id: number;
|
|
690
|
+
readonly name: string;
|
|
676
691
|
readonly description: string;
|
|
692
|
+
readonly parent?: number | null | undefined;
|
|
677
693
|
readonly slug: string;
|
|
678
694
|
readonly meta: string;
|
|
679
695
|
}) => import("effect/Effect").Effect<{
|
|
680
|
-
readonly name: string;
|
|
681
696
|
readonly id: number;
|
|
682
|
-
readonly
|
|
697
|
+
readonly name: string;
|
|
683
698
|
readonly description: string;
|
|
699
|
+
readonly parent?: number | null | undefined;
|
|
684
700
|
readonly slug: string;
|
|
685
701
|
readonly meta: {
|
|
686
702
|
readonly [x: string]: unknown;
|
|
687
703
|
};
|
|
688
|
-
}, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
704
|
+
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
689
705
|
permissions: (input: {
|
|
690
706
|
readonly user: string;
|
|
691
707
|
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
692
708
|
}) => import("effect/Effect").Effect<{
|
|
693
709
|
readonly user: string;
|
|
694
710
|
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>;
|
|
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>;
|
|
698
714
|
folder: (data: {
|
|
699
|
-
readonly name: string;
|
|
700
715
|
readonly id: string;
|
|
701
|
-
readonly parent: string | null | undefined;
|
|
702
|
-
}) => import("effect/Effect").Effect<{
|
|
703
716
|
readonly name: string;
|
|
717
|
+
readonly parent?: string | null | undefined;
|
|
718
|
+
}) => import("effect/Effect").Effect<{
|
|
704
719
|
readonly id: string;
|
|
705
|
-
readonly
|
|
706
|
-
|
|
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>;
|
|
707
723
|
latestVersion: () => import("effect/Effect").Effect<{
|
|
708
724
|
version: string;
|
|
709
725
|
lastCacheUpdate: Date;
|
|
710
|
-
}, import("effect/Cause").UnknownException |
|
|
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>;
|
|
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>;
|
|
712
728
|
page: {
|
|
713
729
|
byId: (pageId: string, data: {
|
|
714
730
|
pageData: {
|
|
715
|
-
readonly tags: string;
|
|
716
731
|
readonly id: string;
|
|
717
|
-
readonly description: string;
|
|
718
|
-
readonly slug: string;
|
|
719
|
-
readonly contentLang: string;
|
|
720
732
|
readonly updatedAt: string;
|
|
733
|
+
readonly description: string;
|
|
721
734
|
readonly package: string;
|
|
722
735
|
readonly title: string;
|
|
723
736
|
readonly showOnNav: boolean;
|
|
724
737
|
readonly publishedAt: string;
|
|
725
|
-
readonly
|
|
738
|
+
readonly slug: string;
|
|
739
|
+
readonly contentLang: string;
|
|
740
|
+
readonly heroImage?: string | null | undefined;
|
|
726
741
|
readonly categories: string;
|
|
742
|
+
readonly tags: string;
|
|
727
743
|
readonly authorId: string;
|
|
728
744
|
readonly contributorIds: string;
|
|
729
745
|
readonly showAuthor: boolean;
|
|
730
746
|
readonly showContributors: boolean;
|
|
731
|
-
readonly parentFolder
|
|
747
|
+
readonly parentFolder?: string | null | undefined;
|
|
732
748
|
readonly draft: boolean;
|
|
733
749
|
readonly augments: string;
|
|
734
750
|
};
|
|
735
751
|
pageContent: {
|
|
736
752
|
readonly id: string;
|
|
737
|
-
readonly contentId: string;
|
|
738
753
|
readonly contentLang: string;
|
|
754
|
+
readonly contentId: string;
|
|
739
755
|
readonly content: string;
|
|
740
756
|
};
|
|
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>;
|
|
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>;
|
|
742
758
|
bySlug: (slug: string, data: {
|
|
743
759
|
pageData: {
|
|
744
|
-
readonly tags: string;
|
|
745
760
|
readonly id: string;
|
|
746
|
-
readonly description: string;
|
|
747
|
-
readonly slug: string;
|
|
748
|
-
readonly contentLang: string;
|
|
749
761
|
readonly updatedAt: string;
|
|
762
|
+
readonly description: string;
|
|
750
763
|
readonly package: string;
|
|
751
764
|
readonly title: string;
|
|
752
765
|
readonly showOnNav: boolean;
|
|
753
766
|
readonly publishedAt: string;
|
|
754
|
-
readonly
|
|
767
|
+
readonly slug: string;
|
|
768
|
+
readonly contentLang: string;
|
|
769
|
+
readonly heroImage?: string | null | undefined;
|
|
755
770
|
readonly categories: string;
|
|
771
|
+
readonly tags: string;
|
|
756
772
|
readonly authorId: string;
|
|
757
773
|
readonly contributorIds: string;
|
|
758
774
|
readonly showAuthor: boolean;
|
|
759
775
|
readonly showContributors: boolean;
|
|
760
|
-
readonly parentFolder
|
|
776
|
+
readonly parentFolder?: string | null | undefined;
|
|
761
777
|
readonly draft: boolean;
|
|
762
778
|
readonly augments: string;
|
|
763
779
|
};
|
|
764
780
|
pageContent: {
|
|
765
781
|
readonly id: string;
|
|
766
|
-
readonly contentId: string;
|
|
767
782
|
readonly contentLang: string;
|
|
783
|
+
readonly contentId: string;
|
|
768
784
|
readonly content: string;
|
|
769
785
|
};
|
|
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>;
|
|
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>;
|
|
771
787
|
};
|
|
772
|
-
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
788
|
+
}, never, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService | import("@withstudiocms/effect").Deepmerge>;
|
|
773
789
|
UTIL: import("effect/Effect").Effect<{
|
|
774
790
|
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;
|
|
791
|
+
collectCategories: (input: readonly number[]) => import("effect/Effect").Effect<readonly {
|
|
845
792
|
readonly id: number;
|
|
846
|
-
readonly
|
|
793
|
+
readonly name: string;
|
|
847
794
|
readonly description: string;
|
|
795
|
+
readonly parent?: number | null | undefined;
|
|
848
796
|
readonly slug: string;
|
|
849
797
|
readonly meta: {
|
|
850
798
|
readonly [x: string]: unknown;
|
|
851
799
|
};
|
|
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;
|
|
800
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
801
|
+
collectTags: (input: readonly number[]) => import("effect/Effect").Effect<readonly {
|
|
923
802
|
readonly id: number;
|
|
803
|
+
readonly name: string;
|
|
924
804
|
readonly description: string;
|
|
925
805
|
readonly slug: string;
|
|
926
806
|
readonly meta: {
|
|
927
807
|
readonly [x: string]: unknown;
|
|
928
808
|
};
|
|
929
|
-
}[], import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
809
|
+
}[], import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
930
810
|
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>;
|
|
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>;
|
|
933
813
|
};
|
|
934
814
|
collectUserData: (user: {
|
|
935
|
-
readonly name: string;
|
|
936
815
|
readonly id: string;
|
|
937
|
-
readonly url
|
|
938
|
-
readonly
|
|
939
|
-
readonly
|
|
816
|
+
readonly url?: string | null | undefined;
|
|
817
|
+
readonly name: string;
|
|
818
|
+
readonly email?: string | null | undefined;
|
|
819
|
+
readonly avatar?: string | null | undefined;
|
|
940
820
|
readonly username: string;
|
|
941
|
-
readonly password
|
|
821
|
+
readonly password?: string | null | undefined;
|
|
942
822
|
readonly updatedAt: Date;
|
|
943
823
|
readonly createdAt: Date;
|
|
944
824
|
readonly emailVerified: boolean;
|
|
945
|
-
readonly notifications
|
|
946
|
-
}) => import("effect/Effect").Effect<import("../types.js").CombinedUserData, import("@withstudiocms/kysely").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
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>;
|
|
947
827
|
};
|
|
948
828
|
FolderTree: {
|
|
949
829
|
generateFolderTree: (folders: readonly {
|
|
950
|
-
readonly name: string;
|
|
951
830
|
readonly id: string;
|
|
952
|
-
readonly
|
|
831
|
+
readonly name: string;
|
|
832
|
+
readonly parent?: string | null | undefined;
|
|
953
833
|
}[]) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
954
834
|
getFullPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<string[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
955
835
|
findNodeByPath: (tree: import("../types.js").FolderNode[], path: string[]) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
@@ -957,8 +837,8 @@ export declare const SDKModules: {
|
|
|
957
837
|
findNodesAlongPathToId: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode[], import("./util/folderTree.js").FolderTreeError, never>;
|
|
958
838
|
findNodeById: (tree: import("../types.js").FolderNode[], id: string) => import("effect/Effect").Effect<import("../types.js").FolderNode | null, import("./util/folderTree.js").FolderTreeError, never>;
|
|
959
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>;
|
|
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>;
|
|
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>;
|
|
962
842
|
};
|
|
963
843
|
Generators: {
|
|
964
844
|
generateRandomIDNumber: (length: number) => import("effect/Effect").Effect<number, import("./util/generators.js").GeneratorError, never>;
|
|
@@ -970,8 +850,8 @@ export declare const SDKModules: {
|
|
|
970
850
|
getVersion: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<{
|
|
971
851
|
version: string;
|
|
972
852
|
lastCacheUpdate: Date;
|
|
973
|
-
}, import("effect/Cause").UnknownException |
|
|
974
|
-
getDataFromNPM: (pkg: string, ver?: string | undefined) => import("effect/Effect").Effect<import("./util/getFromNPM.js").NpmRegistryResponseSchema, import("effect/Cause").UnknownException |
|
|
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>;
|
|
975
855
|
};
|
|
976
856
|
Parsers: {
|
|
977
857
|
parseIdNumberArray: (ids: unknown) => import("effect/Effect").Effect<readonly number[], import("effect/ParseResult").ParseError, never>;
|
|
@@ -980,24 +860,24 @@ export declare const SDKModules: {
|
|
|
980
860
|
};
|
|
981
861
|
Users: {
|
|
982
862
|
verifyRank: (users: readonly {
|
|
983
|
-
readonly name: string;
|
|
984
863
|
readonly id: string;
|
|
985
|
-
readonly url
|
|
986
|
-
readonly
|
|
987
|
-
readonly
|
|
864
|
+
readonly url?: string | null | undefined;
|
|
865
|
+
readonly name: string;
|
|
866
|
+
readonly email?: string | null | undefined;
|
|
867
|
+
readonly avatar?: string | null | undefined;
|
|
988
868
|
readonly username: string;
|
|
989
|
-
readonly password
|
|
869
|
+
readonly password?: string | null | undefined;
|
|
990
870
|
readonly updatedAt: Date;
|
|
991
871
|
readonly createdAt: Date;
|
|
992
872
|
readonly emailVerified: boolean;
|
|
993
|
-
readonly notifications
|
|
873
|
+
readonly notifications?: string | null | undefined;
|
|
994
874
|
}[], permissions: readonly {
|
|
995
875
|
readonly user: string;
|
|
996
876
|
readonly rank: "owner" | "admin" | "editor" | "visitor" | "unknown";
|
|
997
877
|
}[], rank: string) => import("effect/Effect").Effect<import("../types.js").SingleRank[], import("./util/users.js").UsersError, never>;
|
|
998
878
|
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>;
|
|
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>;
|
|
1000
880
|
};
|
|
1001
|
-
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../cache.js").CacheService>;
|
|
881
|
+
}, import("effect/ConfigError").ConfigError, import("../context.js").DBClientLive | import("../context.js").SDKDefaults | import("../context.js").StorageManagerResolver | import("../cache.js").CacheService>;
|
|
1002
882
|
};
|
|
1003
883
|
export default SDKModules;
|