@prosewire/sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1401 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { HttpApi, HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
+ //#region ../contract/src/import.d.ts
4
+ declare const portableImportReport: Schema.Struct<{
5
+ readonly mode: Schema.Literals<readonly ["preview", "apply"]>;
6
+ readonly fingerprint: Schema.String;
7
+ readonly preserveStates: Schema.Boolean;
8
+ readonly counts: Schema.$Record<Schema.String, Schema.Int>;
9
+ readonly alreadyImported: Schema.Boolean;
10
+ }>;
11
+ type PortableImportReport = typeof portableImportReport.Type;
12
+ //#endregion
13
+ //#region ../contract/src/router.d.ts
14
+ declare const ApiPostConflict_base: Schema.Class<ApiPostConflict, Schema.TaggedStruct<"ApiPostConflict", {
15
+ readonly message: Schema.String;
16
+ }>, import("effect/Cause").YieldableError>;
17
+ declare class ApiPostConflict extends ApiPostConflict_base {}
18
+ declare const ApiInputRejected_base: Schema.Class<ApiInputRejected, Schema.TaggedStruct<"ApiInputRejected", {
19
+ readonly message: Schema.String;
20
+ }>, import("effect/Cause").YieldableError>;
21
+ declare class ApiInputRejected extends ApiInputRejected_base {}
22
+ declare const ApiAuthenticationFailed_base: Schema.Class<ApiAuthenticationFailed, Schema.TaggedStruct<"ApiAuthenticationFailed", {
23
+ readonly message: Schema.String;
24
+ }>, import("effect/Cause").YieldableError>;
25
+ declare class ApiAuthenticationFailed extends ApiAuthenticationFailed_base {}
26
+ declare const ApiAccessDenied_base: Schema.Class<ApiAccessDenied, Schema.TaggedStruct<"ApiAccessDenied", {
27
+ readonly message: Schema.String;
28
+ }>, import("effect/Cause").YieldableError>;
29
+ declare class ApiAccessDenied extends ApiAccessDenied_base {}
30
+ declare const ApiPostNotFound_base: Schema.Class<ApiPostNotFound, Schema.TaggedStruct<"ApiPostNotFound", {
31
+ readonly message: Schema.String;
32
+ }>, import("effect/Cause").YieldableError>;
33
+ declare class ApiPostNotFound extends ApiPostNotFound_base {}
34
+ declare const ApiRevisionNotFound_base: Schema.Class<ApiRevisionNotFound, Schema.TaggedStruct<"ApiRevisionNotFound", {
35
+ readonly message: Schema.String;
36
+ }>, import("effect/Cause").YieldableError>;
37
+ declare class ApiRevisionNotFound extends ApiRevisionNotFound_base {}
38
+ declare const ApiMediaNotFound_base: Schema.Class<ApiMediaNotFound, Schema.TaggedStruct<"ApiMediaNotFound", {
39
+ readonly message: Schema.String;
40
+ }>, import("effect/Cause").YieldableError>;
41
+ declare class ApiMediaNotFound extends ApiMediaNotFound_base {}
42
+ declare const ApiMediaConflict_base: Schema.Class<ApiMediaConflict, Schema.TaggedStruct<"ApiMediaConflict", {
43
+ readonly message: Schema.String;
44
+ }>, import("effect/Cause").YieldableError>;
45
+ declare class ApiMediaConflict extends ApiMediaConflict_base {}
46
+ declare const ApiMediaTooLarge_base: Schema.Class<ApiMediaTooLarge, Schema.TaggedStruct<"ApiMediaTooLarge", {
47
+ readonly message: Schema.String;
48
+ }>, import("effect/Cause").YieldableError>;
49
+ declare class ApiMediaTooLarge extends ApiMediaTooLarge_base {}
50
+ declare const ApiMediaUnavailable_base: Schema.Class<ApiMediaUnavailable, Schema.TaggedStruct<"ApiMediaUnavailable", {
51
+ readonly message: Schema.String;
52
+ }>, import("effect/Cause").YieldableError>;
53
+ declare class ApiMediaUnavailable extends ApiMediaUnavailable_base {}
54
+ declare const ApiUnavailable_base: Schema.Class<ApiUnavailable, Schema.TaggedStruct<"ApiUnavailable", {
55
+ readonly message: Schema.String;
56
+ }>, import("effect/Cause").YieldableError>;
57
+ declare class ApiUnavailable extends ApiUnavailable_base {}
58
+ //#endregion
59
+ //#region ../contract/src/schemas.d.ts
60
+ declare const postStatus: Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>;
61
+ declare const authorOutput: Schema.Struct<{
62
+ readonly id: Schema.String;
63
+ readonly name: Schema.String;
64
+ readonly slug: Schema.String;
65
+ readonly bio: Schema.NullOr<Schema.String>;
66
+ readonly avatarUrl: Schema.NullOr<Schema.String>;
67
+ readonly jobTitle: Schema.NullOr<Schema.String>;
68
+ readonly credentials: Schema.NullOr<Schema.String>;
69
+ }>;
70
+ declare const categoryOutput: Schema.Struct<{
71
+ readonly id: Schema.String;
72
+ readonly name: Schema.String;
73
+ readonly slug: Schema.String;
74
+ readonly description: Schema.NullOr<Schema.String>;
75
+ }>;
76
+ declare const postRevisionOutput: Schema.Struct<{
77
+ readonly id: Schema.String;
78
+ readonly postId: Schema.String;
79
+ readonly editorId: Schema.NullOr<Schema.String>;
80
+ readonly version: Schema.Int;
81
+ readonly snapshot: Schema.Struct<{
82
+ readonly authorId: Schema.String;
83
+ readonly title: Schema.String;
84
+ readonly slug: Schema.String;
85
+ readonly excerpt: Schema.String;
86
+ readonly contentMarkdown: Schema.String;
87
+ readonly coverImageAssetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
88
+ readonly coverImageUrl: Schema.NullOr<Schema.String>;
89
+ readonly coverImageAlt: Schema.NullOr<Schema.String>;
90
+ readonly status: Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>;
91
+ readonly locale: Schema.String;
92
+ readonly featured: Schema.Boolean;
93
+ readonly seoTitle: Schema.NullOr<Schema.String>;
94
+ readonly seoDescription: Schema.NullOr<Schema.String>;
95
+ readonly focusKeyword: Schema.NullOr<Schema.String>;
96
+ readonly canonicalUrl: Schema.NullOr<Schema.String>;
97
+ readonly scheduledAt: Schema.NullOr<Schema.String>;
98
+ readonly publishedAt: Schema.NullOr<Schema.String>;
99
+ readonly archivedAt: Schema.NullOr<Schema.String>;
100
+ readonly categoryIds: Schema.NullOr<Schema.$Array<Schema.String>>;
101
+ }>;
102
+ readonly createdAt: Schema.String;
103
+ }>;
104
+ declare const postCreateInput: Schema.Struct<{
105
+ readonly blogId: Schema.String;
106
+ readonly authorId: Schema.String;
107
+ readonly title: Schema.Trim;
108
+ readonly slug: Schema.Trim;
109
+ readonly excerpt: Schema.optionalKey<Schema.String>;
110
+ readonly contentMarkdown: Schema.withDecodingDefaultKey<Schema.String, never>;
111
+ readonly coverImageAssetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
112
+ readonly coverImageUrl: Schema.optionalKey<Schema.NullOr<Schema.String>>;
113
+ readonly coverImageAlt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
114
+ readonly status: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>, never>;
115
+ readonly locale: Schema.optionalKey<Schema.String>;
116
+ readonly featured: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
117
+ readonly seoTitle: Schema.optionalKey<Schema.NullOr<Schema.String>>;
118
+ readonly seoDescription: Schema.optionalKey<Schema.NullOr<Schema.String>>;
119
+ readonly focusKeyword: Schema.optionalKey<Schema.NullOr<Schema.String>>;
120
+ readonly canonicalUrl: Schema.optionalKey<Schema.NullOr<Schema.String>>;
121
+ readonly scheduledAt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
122
+ readonly categoryIds: Schema.withDecodingDefaultKey<Schema.$Array<Schema.String>, never>;
123
+ }>;
124
+ declare const postUpdateInput: Schema.Struct<{
125
+ readonly authorId: Schema.optionalKey<Schema.String>;
126
+ readonly title: Schema.optionalKey<Schema.Trim>;
127
+ readonly slug: Schema.optionalKey<Schema.Trim>;
128
+ readonly excerpt: Schema.optionalKey<Schema.String>;
129
+ readonly contentMarkdown: Schema.optionalKey<Schema.String>;
130
+ readonly coverImageAssetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
131
+ readonly coverImageUrl: Schema.optionalKey<Schema.NullOr<Schema.String>>;
132
+ readonly coverImageAlt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
133
+ readonly status: Schema.optionalKey<Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>>;
134
+ readonly locale: Schema.optionalKey<Schema.String>;
135
+ readonly featured: Schema.optionalKey<Schema.Boolean>;
136
+ readonly seoTitle: Schema.optionalKey<Schema.NullOr<Schema.String>>;
137
+ readonly seoDescription: Schema.optionalKey<Schema.NullOr<Schema.String>>;
138
+ readonly focusKeyword: Schema.optionalKey<Schema.NullOr<Schema.String>>;
139
+ readonly canonicalUrl: Schema.optionalKey<Schema.NullOr<Schema.String>>;
140
+ readonly scheduledAt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
141
+ readonly categoryIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
142
+ }>;
143
+ declare const publicBlogOutput: Schema.Struct<{
144
+ readonly id: Schema.String;
145
+ readonly name: Schema.String;
146
+ readonly slug: Schema.String;
147
+ readonly description: Schema.String;
148
+ readonly locale: Schema.String;
149
+ readonly accentColor: Schema.String;
150
+ readonly publicUrl: Schema.NullOr<Schema.String>;
151
+ readonly createdAt: Schema.String;
152
+ readonly updatedAt: Schema.String;
153
+ }>;
154
+ declare const publicPostOutput: Schema.Struct<{
155
+ readonly id: Schema.String;
156
+ readonly slug: Schema.String;
157
+ readonly title: Schema.String;
158
+ readonly excerpt: Schema.String;
159
+ readonly contentMarkdown: Schema.String;
160
+ readonly contentHtml: Schema.String;
161
+ readonly coverImageUrl: Schema.NullOr<Schema.String>;
162
+ readonly coverImageAlt: Schema.NullOr<Schema.String>;
163
+ readonly status: Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>;
164
+ readonly locale: Schema.String;
165
+ readonly featured: Schema.Boolean;
166
+ readonly publishedAt: Schema.NullOr<Schema.String>;
167
+ readonly updatedAt: Schema.String;
168
+ readonly readingMinutes: Schema.Finite;
169
+ readonly seoTitle: Schema.NullOr<Schema.String>;
170
+ readonly seoDescription: Schema.NullOr<Schema.String>;
171
+ readonly canonicalUrl: Schema.NullOr<Schema.String>;
172
+ readonly author: Schema.Struct<{
173
+ readonly id: Schema.String;
174
+ readonly name: Schema.String;
175
+ readonly slug: Schema.String;
176
+ readonly bio: Schema.NullOr<Schema.String>;
177
+ readonly avatarUrl: Schema.NullOr<Schema.String>;
178
+ readonly jobTitle: Schema.NullOr<Schema.String>;
179
+ readonly credentials: Schema.NullOr<Schema.String>;
180
+ }>;
181
+ readonly categories: Schema.$Array<Schema.Struct<{
182
+ readonly id: Schema.String;
183
+ readonly name: Schema.String;
184
+ readonly slug: Schema.String;
185
+ readonly description: Schema.NullOr<Schema.String>;
186
+ }>>;
187
+ }>;
188
+ declare const publicPostPage: Schema.Struct<{
189
+ readonly blog: Schema.Struct<{
190
+ readonly id: Schema.String;
191
+ readonly name: Schema.String;
192
+ readonly slug: Schema.String;
193
+ readonly description: Schema.String;
194
+ readonly locale: Schema.String;
195
+ readonly accentColor: Schema.String;
196
+ readonly publicUrl: Schema.NullOr<Schema.String>;
197
+ readonly createdAt: Schema.String;
198
+ readonly updatedAt: Schema.String;
199
+ }>;
200
+ readonly posts: Schema.$Array<Schema.Struct<{
201
+ readonly id: Schema.String;
202
+ readonly slug: Schema.String;
203
+ readonly title: Schema.String;
204
+ readonly excerpt: Schema.String;
205
+ readonly contentMarkdown: Schema.String;
206
+ readonly contentHtml: Schema.String;
207
+ readonly coverImageUrl: Schema.NullOr<Schema.String>;
208
+ readonly coverImageAlt: Schema.NullOr<Schema.String>;
209
+ readonly status: Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>;
210
+ readonly locale: Schema.String;
211
+ readonly featured: Schema.Boolean;
212
+ readonly publishedAt: Schema.NullOr<Schema.String>;
213
+ readonly updatedAt: Schema.String;
214
+ readonly readingMinutes: Schema.Finite;
215
+ readonly seoTitle: Schema.NullOr<Schema.String>;
216
+ readonly seoDescription: Schema.NullOr<Schema.String>;
217
+ readonly canonicalUrl: Schema.NullOr<Schema.String>;
218
+ readonly author: Schema.Struct<{
219
+ readonly id: Schema.String;
220
+ readonly name: Schema.String;
221
+ readonly slug: Schema.String;
222
+ readonly bio: Schema.NullOr<Schema.String>;
223
+ readonly avatarUrl: Schema.NullOr<Schema.String>;
224
+ readonly jobTitle: Schema.NullOr<Schema.String>;
225
+ readonly credentials: Schema.NullOr<Schema.String>;
226
+ }>;
227
+ readonly categories: Schema.$Array<Schema.Struct<{
228
+ readonly id: Schema.String;
229
+ readonly name: Schema.String;
230
+ readonly slug: Schema.String;
231
+ readonly description: Schema.NullOr<Schema.String>;
232
+ }>>;
233
+ }>>;
234
+ readonly categories: Schema.$Array<Schema.Struct<{
235
+ readonly id: Schema.String;
236
+ readonly name: Schema.String;
237
+ readonly slug: Schema.String;
238
+ readonly description: Schema.NullOr<Schema.String>;
239
+ }>>;
240
+ readonly pagination: Schema.Struct<{
241
+ readonly page: Schema.Int;
242
+ readonly pageSize: Schema.Int;
243
+ readonly hasMore: Schema.Boolean;
244
+ }>;
245
+ }>;
246
+ declare const publicPostResult: Schema.Struct<{
247
+ readonly blog: Schema.Struct<{
248
+ readonly id: Schema.String;
249
+ readonly name: Schema.String;
250
+ readonly slug: Schema.String;
251
+ readonly description: Schema.String;
252
+ readonly locale: Schema.String;
253
+ readonly accentColor: Schema.String;
254
+ readonly publicUrl: Schema.NullOr<Schema.String>;
255
+ readonly createdAt: Schema.String;
256
+ readonly updatedAt: Schema.String;
257
+ }>;
258
+ readonly post: Schema.Struct<{
259
+ readonly id: Schema.String;
260
+ readonly slug: Schema.String;
261
+ readonly title: Schema.String;
262
+ readonly excerpt: Schema.String;
263
+ readonly contentMarkdown: Schema.String;
264
+ readonly contentHtml: Schema.String;
265
+ readonly coverImageUrl: Schema.NullOr<Schema.String>;
266
+ readonly coverImageAlt: Schema.NullOr<Schema.String>;
267
+ readonly status: Schema.Literals<readonly ["draft", "scheduled", "published", "archived"]>;
268
+ readonly locale: Schema.String;
269
+ readonly featured: Schema.Boolean;
270
+ readonly publishedAt: Schema.NullOr<Schema.String>;
271
+ readonly updatedAt: Schema.String;
272
+ readonly readingMinutes: Schema.Finite;
273
+ readonly seoTitle: Schema.NullOr<Schema.String>;
274
+ readonly seoDescription: Schema.NullOr<Schema.String>;
275
+ readonly canonicalUrl: Schema.NullOr<Schema.String>;
276
+ readonly author: Schema.Struct<{
277
+ readonly id: Schema.String;
278
+ readonly name: Schema.String;
279
+ readonly slug: Schema.String;
280
+ readonly bio: Schema.NullOr<Schema.String>;
281
+ readonly avatarUrl: Schema.NullOr<Schema.String>;
282
+ readonly jobTitle: Schema.NullOr<Schema.String>;
283
+ readonly credentials: Schema.NullOr<Schema.String>;
284
+ }>;
285
+ readonly categories: Schema.$Array<Schema.Struct<{
286
+ readonly id: Schema.String;
287
+ readonly name: Schema.String;
288
+ readonly slug: Schema.String;
289
+ readonly description: Schema.NullOr<Schema.String>;
290
+ }>>;
291
+ }>;
292
+ }>;
293
+ declare const publicRedirectOutput: Schema.Struct<{
294
+ readonly fromPath: Schema.String;
295
+ readonly toPath: Schema.String;
296
+ readonly statusCode: Schema.Literals<readonly [301, 302, 307, 308]>;
297
+ }>;
298
+ declare const mediaVariantOutput: Schema.Struct<{
299
+ readonly kind: Schema.Literals<readonly ["original", "large", "thumbnail"]>;
300
+ readonly url: Schema.String;
301
+ readonly mimeType: Schema.String;
302
+ readonly byteSize: Schema.Int;
303
+ readonly width: Schema.Int;
304
+ readonly height: Schema.Int;
305
+ readonly checksumSha256: Schema.String;
306
+ }>;
307
+ declare const mediaAssetOutput: Schema.Struct<{
308
+ readonly id: Schema.String;
309
+ readonly blogId: Schema.String;
310
+ readonly filename: Schema.String;
311
+ readonly mimeType: Schema.String;
312
+ readonly byteSize: Schema.Int;
313
+ readonly storageBytes: Schema.Int;
314
+ readonly width: Schema.NullOr<Schema.Int>;
315
+ readonly height: Schema.NullOr<Schema.Int>;
316
+ readonly checksumSha256: Schema.NullOr<Schema.String>;
317
+ readonly status: Schema.Literals<readonly ["pending", "processing", "ready", "failed", "deleted"]>;
318
+ readonly url: Schema.NullOr<Schema.String>;
319
+ readonly variants: Schema.$Array<Schema.Struct<{
320
+ readonly kind: Schema.Literals<readonly ["original", "large", "thumbnail"]>;
321
+ readonly url: Schema.String;
322
+ readonly mimeType: Schema.String;
323
+ readonly byteSize: Schema.Int;
324
+ readonly width: Schema.Int;
325
+ readonly height: Schema.Int;
326
+ readonly checksumSha256: Schema.String;
327
+ }>>;
328
+ readonly references: Schema.$Array<Schema.Struct<{
329
+ readonly postId: Schema.String;
330
+ readonly title: Schema.String;
331
+ readonly slug: Schema.String;
332
+ }>>;
333
+ readonly uploadedAt: Schema.NullOr<Schema.String>;
334
+ readonly createdAt: Schema.String;
335
+ readonly updatedAt: Schema.String;
336
+ }>;
337
+ declare const mediaUsageOutput: Schema.Struct<{
338
+ readonly usedBytes: Schema.Int;
339
+ readonly quotaBytes: Schema.Int;
340
+ readonly remainingBytes: Schema.Int;
341
+ }>;
342
+ declare const mediaListOutput: Schema.Struct<{
343
+ readonly items: Schema.$Array<Schema.Struct<{
344
+ readonly id: Schema.String;
345
+ readonly blogId: Schema.String;
346
+ readonly filename: Schema.String;
347
+ readonly mimeType: Schema.String;
348
+ readonly byteSize: Schema.Int;
349
+ readonly storageBytes: Schema.Int;
350
+ readonly width: Schema.NullOr<Schema.Int>;
351
+ readonly height: Schema.NullOr<Schema.Int>;
352
+ readonly checksumSha256: Schema.NullOr<Schema.String>;
353
+ readonly status: Schema.Literals<readonly ["pending", "processing", "ready", "failed", "deleted"]>;
354
+ readonly url: Schema.NullOr<Schema.String>;
355
+ readonly variants: Schema.$Array<Schema.Struct<{
356
+ readonly kind: Schema.Literals<readonly ["original", "large", "thumbnail"]>;
357
+ readonly url: Schema.String;
358
+ readonly mimeType: Schema.String;
359
+ readonly byteSize: Schema.Int;
360
+ readonly width: Schema.Int;
361
+ readonly height: Schema.Int;
362
+ readonly checksumSha256: Schema.String;
363
+ }>>;
364
+ readonly references: Schema.$Array<Schema.Struct<{
365
+ readonly postId: Schema.String;
366
+ readonly title: Schema.String;
367
+ readonly slug: Schema.String;
368
+ }>>;
369
+ readonly uploadedAt: Schema.NullOr<Schema.String>;
370
+ readonly createdAt: Schema.String;
371
+ readonly updatedAt: Schema.String;
372
+ }>>;
373
+ readonly usage: Schema.Struct<{
374
+ readonly usedBytes: Schema.Int;
375
+ readonly quotaBytes: Schema.Int;
376
+ readonly remainingBytes: Schema.Int;
377
+ }>;
378
+ readonly configured: Schema.Boolean;
379
+ readonly maxUploadBytes: Schema.Int;
380
+ }>;
381
+ declare const mediaStartUploadInput: Schema.Struct<{
382
+ readonly blogId: Schema.String;
383
+ readonly filename: Schema.String;
384
+ readonly mimeType: Schema.String;
385
+ readonly byteSize: Schema.Int;
386
+ }>;
387
+ declare const mediaUploadReservationOutput: Schema.Struct<{
388
+ readonly asset: Schema.Struct<{
389
+ readonly id: Schema.String;
390
+ readonly blogId: Schema.String;
391
+ readonly filename: Schema.String;
392
+ readonly mimeType: Schema.String;
393
+ readonly byteSize: Schema.Int;
394
+ readonly storageBytes: Schema.Int;
395
+ readonly width: Schema.NullOr<Schema.Int>;
396
+ readonly height: Schema.NullOr<Schema.Int>;
397
+ readonly checksumSha256: Schema.NullOr<Schema.String>;
398
+ readonly status: Schema.Literals<readonly ["pending", "processing", "ready", "failed", "deleted"]>;
399
+ readonly url: Schema.NullOr<Schema.String>;
400
+ readonly variants: Schema.$Array<Schema.Struct<{
401
+ readonly kind: Schema.Literals<readonly ["original", "large", "thumbnail"]>;
402
+ readonly url: Schema.String;
403
+ readonly mimeType: Schema.String;
404
+ readonly byteSize: Schema.Int;
405
+ readonly width: Schema.Int;
406
+ readonly height: Schema.Int;
407
+ readonly checksumSha256: Schema.String;
408
+ }>>;
409
+ readonly references: Schema.$Array<Schema.Struct<{
410
+ readonly postId: Schema.String;
411
+ readonly title: Schema.String;
412
+ readonly slug: Schema.String;
413
+ }>>;
414
+ readonly uploadedAt: Schema.NullOr<Schema.String>;
415
+ readonly createdAt: Schema.String;
416
+ readonly updatedAt: Schema.String;
417
+ }>;
418
+ readonly upload: Schema.Struct<{
419
+ readonly url: Schema.String;
420
+ readonly method: Schema.Literal<"PUT">;
421
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
422
+ readonly expiresAt: Schema.String;
423
+ }>;
424
+ readonly usage: Schema.Struct<{
425
+ readonly usedBytes: Schema.Int;
426
+ readonly quotaBytes: Schema.Int;
427
+ readonly remainingBytes: Schema.Int;
428
+ }>;
429
+ }>;
430
+ type PostStatus = typeof postStatus.Type;
431
+ type PostRevision = typeof postRevisionOutput.Type;
432
+ type PublicBlog = typeof publicBlogOutput.Type;
433
+ type PublicAuthor = typeof authorOutput.Type;
434
+ type PublicCategory = typeof categoryOutput.Type;
435
+ type PublicPost = typeof publicPostOutput.Type;
436
+ type PublicPostPage = typeof publicPostPage.Type;
437
+ type PublicPostResult = typeof publicPostResult.Type;
438
+ type PublicRedirect = typeof publicRedirectOutput.Type;
439
+ type PostCreateEncodedInput = typeof postCreateInput.Encoded;
440
+ type PostUpdateInput = typeof postUpdateInput.Type;
441
+ type MediaVariant = typeof mediaVariantOutput.Type;
442
+ type MediaAsset = typeof mediaAssetOutput.Type;
443
+ type MediaUsage = typeof mediaUsageOutput.Type;
444
+ type MediaList = typeof mediaListOutput.Type;
445
+ type MediaStartUploadInput = typeof mediaStartUploadInput.Type;
446
+ type MediaUploadReservation = typeof mediaUploadReservationOutput.Type;
447
+ //#endregion
448
+ //#region src/index.d.ts
449
+ interface ProsewireClientOptions {
450
+ /** Base URL of a Prosewire deployment, e.g. https://blog.example.com. */
451
+ baseUrl: string;
452
+ /** Private API key. Public rendered/raw endpoints do not need one. */
453
+ apiKey?: string;
454
+ fetch?: typeof fetch;
455
+ }
456
+ interface PrivatePostListInput {
457
+ /** Assert that the API key belongs to this publication slug or UUID. */
458
+ readonly blog?: string;
459
+ readonly search?: string;
460
+ readonly status?: PostStatus;
461
+ readonly page?: number;
462
+ readonly pageSize?: number;
463
+ }
464
+ interface PortableImportInput {
465
+ readonly body: ReadableStream<Uint8Array>;
466
+ readonly contentType: "application/json" | "application/zip";
467
+ readonly mode?: "preview" | "apply";
468
+ /** Restore published/scheduled/archive states. Otherwise all posts arrive as drafts. */
469
+ readonly preserveStates?: boolean;
470
+ }
471
+ declare const ProsewireImportError_base: Schema.Class<ProsewireImportError, Schema.TaggedStruct<"ProsewireImportError", {
472
+ readonly status: Schema.Int;
473
+ readonly item: Schema.String;
474
+ readonly reason: Schema.String;
475
+ }>, import("effect/Cause").YieldableError>;
476
+ declare class ProsewireImportError extends ProsewireImportError_base {
477
+ get message(): string;
478
+ }
479
+ declare function createEffectClient(options: ProsewireClientOptions): {
480
+ health: () => Effect.Effect<{
481
+ readonly status: "ok";
482
+ readonly version: string;
483
+ }, Schema.SchemaError | ApiUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
484
+ imports: {
485
+ run: (input: PortableImportInput) => Effect.Effect<{
486
+ readonly mode: "preview" | "apply";
487
+ readonly fingerprint: string;
488
+ readonly preserveStates: boolean;
489
+ readonly counts: {
490
+ readonly [x: string]: number;
491
+ };
492
+ readonly alreadyImported: boolean;
493
+ }, ProsewireImportError, never>;
494
+ };
495
+ blogs: {
496
+ list: () => Effect.Effect<readonly {
497
+ readonly id: string;
498
+ readonly name: string;
499
+ readonly slug: string;
500
+ readonly description: string;
501
+ readonly locale: string;
502
+ readonly locales: readonly string[];
503
+ readonly accentColor: string;
504
+ readonly customCss: string;
505
+ readonly publicUrl: string | null;
506
+ readonly createdAt: string;
507
+ readonly updatedAt: string;
508
+ }[], Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
509
+ };
510
+ posts: {
511
+ list: (input?: PrivatePostListInput) => Effect.Effect<{
512
+ readonly items: readonly {
513
+ readonly id: string;
514
+ readonly blogId: string;
515
+ readonly title: string;
516
+ readonly slug: string;
517
+ readonly excerpt: string;
518
+ readonly contentMarkdown: string;
519
+ readonly contentHtml: string;
520
+ readonly coverImageAssetId: string | null;
521
+ readonly coverImageUrl: string | null;
522
+ readonly coverImageAlt: string | null;
523
+ readonly status: "draft" | "scheduled" | "published" | "archived";
524
+ readonly locale: string;
525
+ readonly featured: boolean;
526
+ readonly seoTitle: string | null;
527
+ readonly seoDescription: string | null;
528
+ readonly focusKeyword: string | null;
529
+ readonly canonicalUrl: string | null;
530
+ readonly publishedAt: string | null;
531
+ readonly scheduledAt: string | null;
532
+ readonly createdAt: string;
533
+ readonly updatedAt: string;
534
+ readonly author: {
535
+ readonly id: string;
536
+ readonly name: string;
537
+ readonly slug: string;
538
+ readonly bio: string | null;
539
+ readonly avatarUrl: string | null;
540
+ readonly jobTitle: string | null;
541
+ readonly credentials: string | null;
542
+ };
543
+ readonly categories: readonly {
544
+ readonly id: string;
545
+ readonly name: string;
546
+ readonly slug: string;
547
+ readonly description: string | null;
548
+ }[];
549
+ }[];
550
+ readonly total: number;
551
+ readonly page: number;
552
+ readonly pageSize: number;
553
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
554
+ get: (input: {
555
+ readonly params: {
556
+ readonly id: string;
557
+ };
558
+ }) => Effect.Effect<{
559
+ readonly id: string;
560
+ readonly blogId: string;
561
+ readonly title: string;
562
+ readonly slug: string;
563
+ readonly excerpt: string;
564
+ readonly contentMarkdown: string;
565
+ readonly contentHtml: string;
566
+ readonly coverImageAssetId: string | null;
567
+ readonly coverImageUrl: string | null;
568
+ readonly coverImageAlt: string | null;
569
+ readonly status: "draft" | "scheduled" | "published" | "archived";
570
+ readonly locale: string;
571
+ readonly featured: boolean;
572
+ readonly seoTitle: string | null;
573
+ readonly seoDescription: string | null;
574
+ readonly focusKeyword: string | null;
575
+ readonly canonicalUrl: string | null;
576
+ readonly publishedAt: string | null;
577
+ readonly scheduledAt: string | null;
578
+ readonly createdAt: string;
579
+ readonly updatedAt: string;
580
+ readonly author: {
581
+ readonly id: string;
582
+ readonly name: string;
583
+ readonly slug: string;
584
+ readonly bio: string | null;
585
+ readonly avatarUrl: string | null;
586
+ readonly jobTitle: string | null;
587
+ readonly credentials: string | null;
588
+ };
589
+ readonly categories: readonly {
590
+ readonly id: string;
591
+ readonly name: string;
592
+ readonly slug: string;
593
+ readonly description: string | null;
594
+ }[];
595
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
596
+ revisions: (input: {
597
+ readonly params: {
598
+ readonly id: string;
599
+ };
600
+ }) => Effect.Effect<readonly {
601
+ readonly id: string;
602
+ readonly postId: string;
603
+ readonly editorId: string | null;
604
+ readonly version: number;
605
+ readonly snapshot: {
606
+ readonly status: "draft" | "scheduled" | "published" | "archived";
607
+ readonly excerpt: string;
608
+ readonly contentMarkdown: string;
609
+ readonly coverImageUrl: string | null;
610
+ readonly coverImageAlt: string | null;
611
+ readonly locale: string;
612
+ readonly featured: boolean;
613
+ readonly seoTitle: string | null;
614
+ readonly seoDescription: string | null;
615
+ readonly focusKeyword: string | null;
616
+ readonly canonicalUrl: string | null;
617
+ readonly scheduledAt: string | null;
618
+ readonly categoryIds: readonly string[] | null;
619
+ readonly authorId: string;
620
+ readonly title: string;
621
+ readonly slug: string;
622
+ readonly publishedAt: string | null;
623
+ readonly archivedAt: string | null;
624
+ readonly coverImageAssetId?: string | null;
625
+ };
626
+ readonly createdAt: string;
627
+ }[], Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
628
+ create: (input: PostCreateEncodedInput) => Effect.Effect<{
629
+ readonly id: string;
630
+ readonly blogId: string;
631
+ readonly title: string;
632
+ readonly slug: string;
633
+ readonly excerpt: string;
634
+ readonly contentMarkdown: string;
635
+ readonly contentHtml: string;
636
+ readonly coverImageAssetId: string | null;
637
+ readonly coverImageUrl: string | null;
638
+ readonly coverImageAlt: string | null;
639
+ readonly status: "draft" | "scheduled" | "published" | "archived";
640
+ readonly locale: string;
641
+ readonly featured: boolean;
642
+ readonly seoTitle: string | null;
643
+ readonly seoDescription: string | null;
644
+ readonly focusKeyword: string | null;
645
+ readonly canonicalUrl: string | null;
646
+ readonly publishedAt: string | null;
647
+ readonly scheduledAt: string | null;
648
+ readonly createdAt: string;
649
+ readonly updatedAt: string;
650
+ readonly author: {
651
+ readonly id: string;
652
+ readonly name: string;
653
+ readonly slug: string;
654
+ readonly bio: string | null;
655
+ readonly avatarUrl: string | null;
656
+ readonly jobTitle: string | null;
657
+ readonly credentials: string | null;
658
+ };
659
+ readonly categories: readonly {
660
+ readonly id: string;
661
+ readonly name: string;
662
+ readonly slug: string;
663
+ readonly description: string | null;
664
+ }[];
665
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
666
+ update: (input: {
667
+ readonly params: {
668
+ readonly id: string;
669
+ };
670
+ readonly body: PostUpdateInput;
671
+ }) => Effect.Effect<{
672
+ readonly id: string;
673
+ readonly blogId: string;
674
+ readonly title: string;
675
+ readonly slug: string;
676
+ readonly excerpt: string;
677
+ readonly contentMarkdown: string;
678
+ readonly contentHtml: string;
679
+ readonly coverImageAssetId: string | null;
680
+ readonly coverImageUrl: string | null;
681
+ readonly coverImageAlt: string | null;
682
+ readonly status: "draft" | "scheduled" | "published" | "archived";
683
+ readonly locale: string;
684
+ readonly featured: boolean;
685
+ readonly seoTitle: string | null;
686
+ readonly seoDescription: string | null;
687
+ readonly focusKeyword: string | null;
688
+ readonly canonicalUrl: string | null;
689
+ readonly publishedAt: string | null;
690
+ readonly scheduledAt: string | null;
691
+ readonly createdAt: string;
692
+ readonly updatedAt: string;
693
+ readonly author: {
694
+ readonly id: string;
695
+ readonly name: string;
696
+ readonly slug: string;
697
+ readonly bio: string | null;
698
+ readonly avatarUrl: string | null;
699
+ readonly jobTitle: string | null;
700
+ readonly credentials: string | null;
701
+ };
702
+ readonly categories: readonly {
703
+ readonly id: string;
704
+ readonly name: string;
705
+ readonly slug: string;
706
+ readonly description: string | null;
707
+ }[];
708
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
709
+ archive: (input: {
710
+ readonly params: {
711
+ readonly id: string;
712
+ };
713
+ }) => Effect.Effect<{
714
+ readonly ok: true;
715
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
716
+ restore: (input: {
717
+ readonly params: {
718
+ readonly id: string;
719
+ readonly revisionId: string;
720
+ };
721
+ }) => Effect.Effect<{
722
+ readonly id: string;
723
+ readonly blogId: string;
724
+ readonly title: string;
725
+ readonly slug: string;
726
+ readonly excerpt: string;
727
+ readonly contentMarkdown: string;
728
+ readonly contentHtml: string;
729
+ readonly coverImageAssetId: string | null;
730
+ readonly coverImageUrl: string | null;
731
+ readonly coverImageAlt: string | null;
732
+ readonly status: "draft" | "scheduled" | "published" | "archived";
733
+ readonly locale: string;
734
+ readonly featured: boolean;
735
+ readonly seoTitle: string | null;
736
+ readonly seoDescription: string | null;
737
+ readonly focusKeyword: string | null;
738
+ readonly canonicalUrl: string | null;
739
+ readonly publishedAt: string | null;
740
+ readonly scheduledAt: string | null;
741
+ readonly createdAt: string;
742
+ readonly updatedAt: string;
743
+ readonly author: {
744
+ readonly id: string;
745
+ readonly name: string;
746
+ readonly slug: string;
747
+ readonly bio: string | null;
748
+ readonly avatarUrl: string | null;
749
+ readonly jobTitle: string | null;
750
+ readonly credentials: string | null;
751
+ };
752
+ readonly categories: readonly {
753
+ readonly id: string;
754
+ readonly name: string;
755
+ readonly slug: string;
756
+ readonly description: string | null;
757
+ }[];
758
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
759
+ };
760
+ media: {
761
+ list: () => Effect.Effect<{
762
+ readonly items: readonly {
763
+ readonly id: string;
764
+ readonly blogId: string;
765
+ readonly filename: string;
766
+ readonly mimeType: string;
767
+ readonly byteSize: number;
768
+ readonly storageBytes: number;
769
+ readonly width: number | null;
770
+ readonly height: number | null;
771
+ readonly checksumSha256: string | null;
772
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
773
+ readonly url: string | null;
774
+ readonly variants: readonly {
775
+ readonly kind: "original" | "large" | "thumbnail";
776
+ readonly url: string;
777
+ readonly mimeType: string;
778
+ readonly byteSize: number;
779
+ readonly width: number;
780
+ readonly height: number;
781
+ readonly checksumSha256: string;
782
+ }[];
783
+ readonly references: readonly {
784
+ readonly postId: string;
785
+ readonly title: string;
786
+ readonly slug: string;
787
+ }[];
788
+ readonly uploadedAt: string | null;
789
+ readonly createdAt: string;
790
+ readonly updatedAt: string;
791
+ }[];
792
+ readonly usage: {
793
+ readonly usedBytes: number;
794
+ readonly quotaBytes: number;
795
+ readonly remainingBytes: number;
796
+ };
797
+ readonly configured: boolean;
798
+ readonly maxUploadBytes: number;
799
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
800
+ get: (input: {
801
+ readonly params: {
802
+ readonly id: string;
803
+ };
804
+ }) => Effect.Effect<{
805
+ readonly id: string;
806
+ readonly blogId: string;
807
+ readonly filename: string;
808
+ readonly mimeType: string;
809
+ readonly byteSize: number;
810
+ readonly storageBytes: number;
811
+ readonly width: number | null;
812
+ readonly height: number | null;
813
+ readonly checksumSha256: string | null;
814
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
815
+ readonly url: string | null;
816
+ readonly variants: readonly {
817
+ readonly kind: "original" | "large" | "thumbnail";
818
+ readonly url: string;
819
+ readonly mimeType: string;
820
+ readonly byteSize: number;
821
+ readonly width: number;
822
+ readonly height: number;
823
+ readonly checksumSha256: string;
824
+ }[];
825
+ readonly references: readonly {
826
+ readonly postId: string;
827
+ readonly title: string;
828
+ readonly slug: string;
829
+ }[];
830
+ readonly uploadedAt: string | null;
831
+ readonly createdAt: string;
832
+ readonly updatedAt: string;
833
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
834
+ startUpload: (input: MediaStartUploadInput) => Effect.Effect<{
835
+ readonly asset: {
836
+ readonly id: string;
837
+ readonly blogId: string;
838
+ readonly filename: string;
839
+ readonly mimeType: string;
840
+ readonly byteSize: number;
841
+ readonly storageBytes: number;
842
+ readonly width: number | null;
843
+ readonly height: number | null;
844
+ readonly checksumSha256: string | null;
845
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
846
+ readonly url: string | null;
847
+ readonly variants: readonly {
848
+ readonly kind: "original" | "large" | "thumbnail";
849
+ readonly url: string;
850
+ readonly mimeType: string;
851
+ readonly byteSize: number;
852
+ readonly width: number;
853
+ readonly height: number;
854
+ readonly checksumSha256: string;
855
+ }[];
856
+ readonly references: readonly {
857
+ readonly postId: string;
858
+ readonly title: string;
859
+ readonly slug: string;
860
+ }[];
861
+ readonly uploadedAt: string | null;
862
+ readonly createdAt: string;
863
+ readonly updatedAt: string;
864
+ };
865
+ readonly upload: {
866
+ readonly url: string;
867
+ readonly method: "PUT";
868
+ readonly headers: {
869
+ readonly [x: string]: string;
870
+ };
871
+ readonly expiresAt: string;
872
+ };
873
+ readonly usage: {
874
+ readonly usedBytes: number;
875
+ readonly quotaBytes: number;
876
+ readonly remainingBytes: number;
877
+ };
878
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
879
+ completeUpload: (input: {
880
+ readonly params: {
881
+ readonly id: string;
882
+ };
883
+ }) => Effect.Effect<{
884
+ readonly id: string;
885
+ readonly blogId: string;
886
+ readonly filename: string;
887
+ readonly mimeType: string;
888
+ readonly byteSize: number;
889
+ readonly storageBytes: number;
890
+ readonly width: number | null;
891
+ readonly height: number | null;
892
+ readonly checksumSha256: string | null;
893
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
894
+ readonly url: string | null;
895
+ readonly variants: readonly {
896
+ readonly kind: "original" | "large" | "thumbnail";
897
+ readonly url: string;
898
+ readonly mimeType: string;
899
+ readonly byteSize: number;
900
+ readonly width: number;
901
+ readonly height: number;
902
+ readonly checksumSha256: string;
903
+ }[];
904
+ readonly references: readonly {
905
+ readonly postId: string;
906
+ readonly title: string;
907
+ readonly slug: string;
908
+ }[];
909
+ readonly uploadedAt: string | null;
910
+ readonly createdAt: string;
911
+ readonly updatedAt: string;
912
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
913
+ delete: (input: {
914
+ readonly params: {
915
+ readonly id: string;
916
+ };
917
+ }) => Effect.Effect<{
918
+ readonly ok: true;
919
+ }, Schema.SchemaError | ApiUnavailable | ApiPostConflict | ApiInputRejected | ApiAuthenticationFailed | ApiAccessDenied | ApiPostNotFound | ApiRevisionNotFound | ApiMediaNotFound | ApiMediaConflict | ApiMediaTooLarge | ApiMediaUnavailable | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
920
+ };
921
+ };
922
+ type EffectClient = ReturnType<typeof createEffectClient>;
923
+ declare function createClient(options: ProsewireClientOptions): {
924
+ health: () => Promise<{
925
+ readonly status: "ok";
926
+ readonly version: string;
927
+ }>;
928
+ imports: {
929
+ run: (input: PortableImportInput) => Promise<{
930
+ readonly mode: "preview" | "apply";
931
+ readonly fingerprint: string;
932
+ readonly preserveStates: boolean;
933
+ readonly counts: {
934
+ readonly [x: string]: number;
935
+ };
936
+ readonly alreadyImported: boolean;
937
+ }>;
938
+ };
939
+ blogs: {
940
+ list: () => Promise<readonly {
941
+ readonly id: string;
942
+ readonly name: string;
943
+ readonly slug: string;
944
+ readonly description: string;
945
+ readonly locale: string;
946
+ readonly locales: readonly string[];
947
+ readonly accentColor: string;
948
+ readonly customCss: string;
949
+ readonly publicUrl: string | null;
950
+ readonly createdAt: string;
951
+ readonly updatedAt: string;
952
+ }[]>;
953
+ };
954
+ posts: {
955
+ list: (input?: PrivatePostListInput) => Promise<{
956
+ readonly items: readonly {
957
+ readonly id: string;
958
+ readonly blogId: string;
959
+ readonly title: string;
960
+ readonly slug: string;
961
+ readonly excerpt: string;
962
+ readonly contentMarkdown: string;
963
+ readonly contentHtml: string;
964
+ readonly coverImageAssetId: string | null;
965
+ readonly coverImageUrl: string | null;
966
+ readonly coverImageAlt: string | null;
967
+ readonly status: "draft" | "scheduled" | "published" | "archived";
968
+ readonly locale: string;
969
+ readonly featured: boolean;
970
+ readonly seoTitle: string | null;
971
+ readonly seoDescription: string | null;
972
+ readonly focusKeyword: string | null;
973
+ readonly canonicalUrl: string | null;
974
+ readonly publishedAt: string | null;
975
+ readonly scheduledAt: string | null;
976
+ readonly createdAt: string;
977
+ readonly updatedAt: string;
978
+ readonly author: {
979
+ readonly id: string;
980
+ readonly name: string;
981
+ readonly slug: string;
982
+ readonly bio: string | null;
983
+ readonly avatarUrl: string | null;
984
+ readonly jobTitle: string | null;
985
+ readonly credentials: string | null;
986
+ };
987
+ readonly categories: readonly {
988
+ readonly id: string;
989
+ readonly name: string;
990
+ readonly slug: string;
991
+ readonly description: string | null;
992
+ }[];
993
+ }[];
994
+ readonly total: number;
995
+ readonly page: number;
996
+ readonly pageSize: number;
997
+ }>;
998
+ get: (input: {
999
+ readonly params: {
1000
+ readonly id: string;
1001
+ };
1002
+ }) => Promise<{
1003
+ readonly id: string;
1004
+ readonly blogId: string;
1005
+ readonly title: string;
1006
+ readonly slug: string;
1007
+ readonly excerpt: string;
1008
+ readonly contentMarkdown: string;
1009
+ readonly contentHtml: string;
1010
+ readonly coverImageAssetId: string | null;
1011
+ readonly coverImageUrl: string | null;
1012
+ readonly coverImageAlt: string | null;
1013
+ readonly status: "draft" | "scheduled" | "published" | "archived";
1014
+ readonly locale: string;
1015
+ readonly featured: boolean;
1016
+ readonly seoTitle: string | null;
1017
+ readonly seoDescription: string | null;
1018
+ readonly focusKeyword: string | null;
1019
+ readonly canonicalUrl: string | null;
1020
+ readonly publishedAt: string | null;
1021
+ readonly scheduledAt: string | null;
1022
+ readonly createdAt: string;
1023
+ readonly updatedAt: string;
1024
+ readonly author: {
1025
+ readonly id: string;
1026
+ readonly name: string;
1027
+ readonly slug: string;
1028
+ readonly bio: string | null;
1029
+ readonly avatarUrl: string | null;
1030
+ readonly jobTitle: string | null;
1031
+ readonly credentials: string | null;
1032
+ };
1033
+ readonly categories: readonly {
1034
+ readonly id: string;
1035
+ readonly name: string;
1036
+ readonly slug: string;
1037
+ readonly description: string | null;
1038
+ }[];
1039
+ }>;
1040
+ revisions: (input: {
1041
+ readonly params: {
1042
+ readonly id: string;
1043
+ };
1044
+ }) => Promise<readonly {
1045
+ readonly id: string;
1046
+ readonly postId: string;
1047
+ readonly editorId: string | null;
1048
+ readonly version: number;
1049
+ readonly snapshot: {
1050
+ readonly status: "draft" | "scheduled" | "published" | "archived";
1051
+ readonly excerpt: string;
1052
+ readonly contentMarkdown: string;
1053
+ readonly coverImageUrl: string | null;
1054
+ readonly coverImageAlt: string | null;
1055
+ readonly locale: string;
1056
+ readonly featured: boolean;
1057
+ readonly seoTitle: string | null;
1058
+ readonly seoDescription: string | null;
1059
+ readonly focusKeyword: string | null;
1060
+ readonly canonicalUrl: string | null;
1061
+ readonly scheduledAt: string | null;
1062
+ readonly categoryIds: readonly string[] | null;
1063
+ readonly authorId: string;
1064
+ readonly title: string;
1065
+ readonly slug: string;
1066
+ readonly publishedAt: string | null;
1067
+ readonly archivedAt: string | null;
1068
+ readonly coverImageAssetId?: string | null;
1069
+ };
1070
+ readonly createdAt: string;
1071
+ }[]>;
1072
+ create: (input: PostCreateEncodedInput) => Promise<{
1073
+ readonly id: string;
1074
+ readonly blogId: string;
1075
+ readonly title: string;
1076
+ readonly slug: string;
1077
+ readonly excerpt: string;
1078
+ readonly contentMarkdown: string;
1079
+ readonly contentHtml: string;
1080
+ readonly coverImageAssetId: string | null;
1081
+ readonly coverImageUrl: string | null;
1082
+ readonly coverImageAlt: string | null;
1083
+ readonly status: "draft" | "scheduled" | "published" | "archived";
1084
+ readonly locale: string;
1085
+ readonly featured: boolean;
1086
+ readonly seoTitle: string | null;
1087
+ readonly seoDescription: string | null;
1088
+ readonly focusKeyword: string | null;
1089
+ readonly canonicalUrl: string | null;
1090
+ readonly publishedAt: string | null;
1091
+ readonly scheduledAt: string | null;
1092
+ readonly createdAt: string;
1093
+ readonly updatedAt: string;
1094
+ readonly author: {
1095
+ readonly id: string;
1096
+ readonly name: string;
1097
+ readonly slug: string;
1098
+ readonly bio: string | null;
1099
+ readonly avatarUrl: string | null;
1100
+ readonly jobTitle: string | null;
1101
+ readonly credentials: string | null;
1102
+ };
1103
+ readonly categories: readonly {
1104
+ readonly id: string;
1105
+ readonly name: string;
1106
+ readonly slug: string;
1107
+ readonly description: string | null;
1108
+ }[];
1109
+ }>;
1110
+ update: (input: {
1111
+ readonly params: {
1112
+ readonly id: string;
1113
+ };
1114
+ readonly body: PostUpdateInput;
1115
+ }) => Promise<{
1116
+ readonly id: string;
1117
+ readonly blogId: string;
1118
+ readonly title: string;
1119
+ readonly slug: string;
1120
+ readonly excerpt: string;
1121
+ readonly contentMarkdown: string;
1122
+ readonly contentHtml: string;
1123
+ readonly coverImageAssetId: string | null;
1124
+ readonly coverImageUrl: string | null;
1125
+ readonly coverImageAlt: string | null;
1126
+ readonly status: "draft" | "scheduled" | "published" | "archived";
1127
+ readonly locale: string;
1128
+ readonly featured: boolean;
1129
+ readonly seoTitle: string | null;
1130
+ readonly seoDescription: string | null;
1131
+ readonly focusKeyword: string | null;
1132
+ readonly canonicalUrl: string | null;
1133
+ readonly publishedAt: string | null;
1134
+ readonly scheduledAt: string | null;
1135
+ readonly createdAt: string;
1136
+ readonly updatedAt: string;
1137
+ readonly author: {
1138
+ readonly id: string;
1139
+ readonly name: string;
1140
+ readonly slug: string;
1141
+ readonly bio: string | null;
1142
+ readonly avatarUrl: string | null;
1143
+ readonly jobTitle: string | null;
1144
+ readonly credentials: string | null;
1145
+ };
1146
+ readonly categories: readonly {
1147
+ readonly id: string;
1148
+ readonly name: string;
1149
+ readonly slug: string;
1150
+ readonly description: string | null;
1151
+ }[];
1152
+ }>;
1153
+ archive: (input: {
1154
+ readonly params: {
1155
+ readonly id: string;
1156
+ };
1157
+ }) => Promise<{
1158
+ readonly ok: true;
1159
+ }>;
1160
+ restore: (input: {
1161
+ readonly params: {
1162
+ readonly id: string;
1163
+ readonly revisionId: string;
1164
+ };
1165
+ }) => Promise<{
1166
+ readonly id: string;
1167
+ readonly blogId: string;
1168
+ readonly title: string;
1169
+ readonly slug: string;
1170
+ readonly excerpt: string;
1171
+ readonly contentMarkdown: string;
1172
+ readonly contentHtml: string;
1173
+ readonly coverImageAssetId: string | null;
1174
+ readonly coverImageUrl: string | null;
1175
+ readonly coverImageAlt: string | null;
1176
+ readonly status: "draft" | "scheduled" | "published" | "archived";
1177
+ readonly locale: string;
1178
+ readonly featured: boolean;
1179
+ readonly seoTitle: string | null;
1180
+ readonly seoDescription: string | null;
1181
+ readonly focusKeyword: string | null;
1182
+ readonly canonicalUrl: string | null;
1183
+ readonly publishedAt: string | null;
1184
+ readonly scheduledAt: string | null;
1185
+ readonly createdAt: string;
1186
+ readonly updatedAt: string;
1187
+ readonly author: {
1188
+ readonly id: string;
1189
+ readonly name: string;
1190
+ readonly slug: string;
1191
+ readonly bio: string | null;
1192
+ readonly avatarUrl: string | null;
1193
+ readonly jobTitle: string | null;
1194
+ readonly credentials: string | null;
1195
+ };
1196
+ readonly categories: readonly {
1197
+ readonly id: string;
1198
+ readonly name: string;
1199
+ readonly slug: string;
1200
+ readonly description: string | null;
1201
+ }[];
1202
+ }>;
1203
+ };
1204
+ media: {
1205
+ list: () => Promise<{
1206
+ readonly items: readonly {
1207
+ readonly id: string;
1208
+ readonly blogId: string;
1209
+ readonly filename: string;
1210
+ readonly mimeType: string;
1211
+ readonly byteSize: number;
1212
+ readonly storageBytes: number;
1213
+ readonly width: number | null;
1214
+ readonly height: number | null;
1215
+ readonly checksumSha256: string | null;
1216
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
1217
+ readonly url: string | null;
1218
+ readonly variants: readonly {
1219
+ readonly kind: "original" | "large" | "thumbnail";
1220
+ readonly url: string;
1221
+ readonly mimeType: string;
1222
+ readonly byteSize: number;
1223
+ readonly width: number;
1224
+ readonly height: number;
1225
+ readonly checksumSha256: string;
1226
+ }[];
1227
+ readonly references: readonly {
1228
+ readonly postId: string;
1229
+ readonly title: string;
1230
+ readonly slug: string;
1231
+ }[];
1232
+ readonly uploadedAt: string | null;
1233
+ readonly createdAt: string;
1234
+ readonly updatedAt: string;
1235
+ }[];
1236
+ readonly usage: {
1237
+ readonly usedBytes: number;
1238
+ readonly quotaBytes: number;
1239
+ readonly remainingBytes: number;
1240
+ };
1241
+ readonly configured: boolean;
1242
+ readonly maxUploadBytes: number;
1243
+ }>;
1244
+ get: (input: {
1245
+ readonly params: {
1246
+ readonly id: string;
1247
+ };
1248
+ }) => Promise<{
1249
+ readonly id: string;
1250
+ readonly blogId: string;
1251
+ readonly filename: string;
1252
+ readonly mimeType: string;
1253
+ readonly byteSize: number;
1254
+ readonly storageBytes: number;
1255
+ readonly width: number | null;
1256
+ readonly height: number | null;
1257
+ readonly checksumSha256: string | null;
1258
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
1259
+ readonly url: string | null;
1260
+ readonly variants: readonly {
1261
+ readonly kind: "original" | "large" | "thumbnail";
1262
+ readonly url: string;
1263
+ readonly mimeType: string;
1264
+ readonly byteSize: number;
1265
+ readonly width: number;
1266
+ readonly height: number;
1267
+ readonly checksumSha256: string;
1268
+ }[];
1269
+ readonly references: readonly {
1270
+ readonly postId: string;
1271
+ readonly title: string;
1272
+ readonly slug: string;
1273
+ }[];
1274
+ readonly uploadedAt: string | null;
1275
+ readonly createdAt: string;
1276
+ readonly updatedAt: string;
1277
+ }>;
1278
+ startUpload: (input: MediaStartUploadInput) => Promise<{
1279
+ readonly asset: {
1280
+ readonly id: string;
1281
+ readonly blogId: string;
1282
+ readonly filename: string;
1283
+ readonly mimeType: string;
1284
+ readonly byteSize: number;
1285
+ readonly storageBytes: number;
1286
+ readonly width: number | null;
1287
+ readonly height: number | null;
1288
+ readonly checksumSha256: string | null;
1289
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
1290
+ readonly url: string | null;
1291
+ readonly variants: readonly {
1292
+ readonly kind: "original" | "large" | "thumbnail";
1293
+ readonly url: string;
1294
+ readonly mimeType: string;
1295
+ readonly byteSize: number;
1296
+ readonly width: number;
1297
+ readonly height: number;
1298
+ readonly checksumSha256: string;
1299
+ }[];
1300
+ readonly references: readonly {
1301
+ readonly postId: string;
1302
+ readonly title: string;
1303
+ readonly slug: string;
1304
+ }[];
1305
+ readonly uploadedAt: string | null;
1306
+ readonly createdAt: string;
1307
+ readonly updatedAt: string;
1308
+ };
1309
+ readonly upload: {
1310
+ readonly url: string;
1311
+ readonly method: "PUT";
1312
+ readonly headers: {
1313
+ readonly [x: string]: string;
1314
+ };
1315
+ readonly expiresAt: string;
1316
+ };
1317
+ readonly usage: {
1318
+ readonly usedBytes: number;
1319
+ readonly quotaBytes: number;
1320
+ readonly remainingBytes: number;
1321
+ };
1322
+ }>;
1323
+ completeUpload: (input: {
1324
+ readonly params: {
1325
+ readonly id: string;
1326
+ };
1327
+ }) => Promise<{
1328
+ readonly id: string;
1329
+ readonly blogId: string;
1330
+ readonly filename: string;
1331
+ readonly mimeType: string;
1332
+ readonly byteSize: number;
1333
+ readonly storageBytes: number;
1334
+ readonly width: number | null;
1335
+ readonly height: number | null;
1336
+ readonly checksumSha256: string | null;
1337
+ readonly status: "pending" | "processing" | "ready" | "failed" | "deleted";
1338
+ readonly url: string | null;
1339
+ readonly variants: readonly {
1340
+ readonly kind: "original" | "large" | "thumbnail";
1341
+ readonly url: string;
1342
+ readonly mimeType: string;
1343
+ readonly byteSize: number;
1344
+ readonly width: number;
1345
+ readonly height: number;
1346
+ readonly checksumSha256: string;
1347
+ }[];
1348
+ readonly references: readonly {
1349
+ readonly postId: string;
1350
+ readonly title: string;
1351
+ readonly slug: string;
1352
+ }[];
1353
+ readonly uploadedAt: string | null;
1354
+ readonly createdAt: string;
1355
+ readonly updatedAt: string;
1356
+ }>;
1357
+ delete: (input: {
1358
+ readonly params: {
1359
+ readonly id: string;
1360
+ };
1361
+ }) => Promise<{
1362
+ readonly ok: true;
1363
+ }>;
1364
+ };
1365
+ };
1366
+ type Client = ReturnType<typeof createClient>;
1367
+ interface PublicListInput {
1368
+ search?: string;
1369
+ category?: string;
1370
+ page?: number;
1371
+ pageSize?: number;
1372
+ /** @deprecated Use pageSize. */
1373
+ limit?: number;
1374
+ }
1375
+ interface PublicContentClient {
1376
+ listPosts(input?: PublicListInput): Promise<PublicPostPage>;
1377
+ listAllPosts(input?: Omit<PublicListInput, "page" | "pageSize" | "limit">): Promise<ReadonlyArray<PublicPost>>;
1378
+ getPost(slug: string): Promise<PublicPostResult>;
1379
+ resolvePost(slug: string): Promise<PublicPostResolution>;
1380
+ listRedirects(): Promise<ReadonlyArray<PublicRedirect>>;
1381
+ getRendered(path?: string): Promise<string>;
1382
+ }
1383
+ type PublicPostResolution = ({
1384
+ status: "found";
1385
+ } & PublicPostResult) | ({
1386
+ status: "redirect";
1387
+ slug: string;
1388
+ } & PublicPostResult) | {
1389
+ status: "not-found";
1390
+ };
1391
+ declare class ProsewireRequestError extends Error {
1392
+ readonly status: number;
1393
+ readonly url: string;
1394
+ constructor(response: Response);
1395
+ }
1396
+ declare function createPublicClient(options: Pick<ProsewireClientOptions, "baseUrl" | "fetch"> & {
1397
+ blog: string;
1398
+ }): PublicContentClient;
1399
+ //#endregion
1400
+ export { PublicCategory as C, PublicRedirect as D, PublicPostResult as E, PortableImportReport as O, PublicBlog as S, PublicPostPage as T, MediaUploadReservation as _, ProsewireClientOptions as a, PostRevision as b, PublicContentClient as c, createClient as d, createEffectClient as f, MediaStartUploadInput as g, MediaList as h, PrivatePostListInput as i, PublicListInput as l, MediaAsset as m, EffectClient as n, ProsewireImportError as o, createPublicClient as p, PortableImportInput as r, ProsewireRequestError as s, Client as t, PublicPostResolution as u, MediaUsage as v, PublicPost as w, PublicAuthor as x, MediaVariant as y };
1401
+ //# sourceMappingURL=index-BFz3f-oC.d.mts.map