@devpad/api 2.0.1 → 2.0.3
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/chunk-5X36WMYQ.js +130 -0
- package/dist/chunk-INGCIUMX.js +166 -0
- package/dist/errors.d-C73AkrdX.d.ts +159 -0
- package/dist/index.d.ts +541 -13
- package/dist/index.js +1587 -6
- package/dist/media.d-CQ56ckoR.d.ts +1047 -0
- package/dist/schema/blog.d.ts +5032 -0
- package/dist/schema/blog.js +277 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.js +106 -0
- package/dist/schema/media.d.ts +1675 -0
- package/dist/schema/media.js +680 -0
- package/dist/schema.d-DALWdx-o.d.ts +2666 -0
- package/dist/types.d-B1VbnHQT.d.ts +6146 -0
- package/dist/types.d-Bj4FU9Op.d.ts +539 -0
- package/dist/types.d-DLE9TSql.d.ts +684 -0
- package/package.json +17 -4
- package/dist/api-client.d.ts +0 -470
- package/dist/api-client.d.ts.map +0 -1
- package/dist/api-client.js +0 -530
- package/dist/error-handlers.d.ts +0 -55
- package/dist/error-handlers.d.ts.map +0 -1
- package/dist/error-handlers.js +0 -217
- package/dist/errors.d.ts +0 -19
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -28
- package/dist/index.d.ts.map +0 -1
- package/dist/request.d.ts +0 -51
- package/dist/request.d.ts.map +0 -1
- package/dist/request.js +0 -197
- package/dist/result.d.ts +0 -10
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -11
- package/dist/tools.d.ts +0 -84
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -474
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
import * as _f0rbit_corpus from '@f0rbit/corpus';
|
|
2
|
+
import { CorpusError, Corpus, Store } from '@f0rbit/corpus';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const PostContentSchema: z.ZodObject<{
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
content: z.ZodString;
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
format: z.ZodEnum<["md", "adoc"]>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
title: string;
|
|
12
|
+
content: string;
|
|
13
|
+
format: "md" | "adoc";
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
title: string;
|
|
17
|
+
content: string;
|
|
18
|
+
format: "md" | "adoc";
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
type PostContent = z.infer<typeof PostContentSchema>;
|
|
22
|
+
declare const postsStoreDefinition: _f0rbit_corpus.StoreDefinition<"posts", {
|
|
23
|
+
title: string;
|
|
24
|
+
content: string;
|
|
25
|
+
format: "md" | "adoc";
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
declare const postStoreId: (userId: string, postUuid: string) => string;
|
|
29
|
+
declare const corpusPath: (userId: string, postUuid: string) => string;
|
|
30
|
+
declare const VersionInfoSchema: z.ZodObject<{
|
|
31
|
+
hash: z.ZodString;
|
|
32
|
+
parent: z.ZodNullable<z.ZodString>;
|
|
33
|
+
created_at: z.ZodDate;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
created_at: Date;
|
|
36
|
+
hash: string;
|
|
37
|
+
parent: string | null;
|
|
38
|
+
}, {
|
|
39
|
+
created_at: Date;
|
|
40
|
+
hash: string;
|
|
41
|
+
parent: string | null;
|
|
42
|
+
}>;
|
|
43
|
+
type VersionInfo = z.infer<typeof VersionInfoSchema>;
|
|
44
|
+
type PostCorpusError = {
|
|
45
|
+
kind: "not_found";
|
|
46
|
+
path: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "invalid_content";
|
|
50
|
+
message: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "io_error";
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
declare const mapCorpusError: (e: CorpusError) => PostCorpusError;
|
|
56
|
+
declare const parsePostContent: (data: unknown, params?: z.util.InexactPartial<z.ParseParams>) => {
|
|
57
|
+
title: string;
|
|
58
|
+
content: string;
|
|
59
|
+
format: "md" | "adoc";
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
declare const serializePostContent: (content: PostContent) => string;
|
|
63
|
+
|
|
64
|
+
declare const PostRowSchema: z.ZodObject<{
|
|
65
|
+
id: z.ZodNumber;
|
|
66
|
+
uuid: z.ZodString;
|
|
67
|
+
author_id: z.ZodString;
|
|
68
|
+
slug: z.ZodString;
|
|
69
|
+
corpus_version: z.ZodNullable<z.ZodString>;
|
|
70
|
+
category: z.ZodString;
|
|
71
|
+
archived: z.ZodBoolean;
|
|
72
|
+
publish_at: z.ZodNullable<z.ZodDate>;
|
|
73
|
+
created_at: z.ZodDate;
|
|
74
|
+
updated_at: z.ZodDate;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
id: number;
|
|
77
|
+
created_at: Date;
|
|
78
|
+
updated_at: Date;
|
|
79
|
+
uuid: string;
|
|
80
|
+
author_id: string;
|
|
81
|
+
slug: string;
|
|
82
|
+
corpus_version: string | null;
|
|
83
|
+
category: string;
|
|
84
|
+
archived: boolean;
|
|
85
|
+
publish_at: Date | null;
|
|
86
|
+
}, {
|
|
87
|
+
id: number;
|
|
88
|
+
created_at: Date;
|
|
89
|
+
updated_at: Date;
|
|
90
|
+
uuid: string;
|
|
91
|
+
author_id: string;
|
|
92
|
+
slug: string;
|
|
93
|
+
corpus_version: string | null;
|
|
94
|
+
category: string;
|
|
95
|
+
archived: boolean;
|
|
96
|
+
publish_at: Date | null;
|
|
97
|
+
}>;
|
|
98
|
+
type PostRow = z.infer<typeof PostRowSchema>;
|
|
99
|
+
declare const PostRowInsertSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
uuid: z.ZodString;
|
|
102
|
+
author_id: z.ZodString;
|
|
103
|
+
slug: z.ZodString;
|
|
104
|
+
corpus_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
category: z.ZodOptional<z.ZodString>;
|
|
106
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
publish_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
108
|
+
created_at: z.ZodOptional<z.ZodDate>;
|
|
109
|
+
updated_at: z.ZodOptional<z.ZodDate>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
uuid: string;
|
|
112
|
+
author_id: string;
|
|
113
|
+
slug: string;
|
|
114
|
+
id?: number | undefined;
|
|
115
|
+
created_at?: Date | undefined;
|
|
116
|
+
updated_at?: Date | undefined;
|
|
117
|
+
corpus_version?: string | null | undefined;
|
|
118
|
+
category?: string | undefined;
|
|
119
|
+
archived?: boolean | undefined;
|
|
120
|
+
publish_at?: Date | null | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
uuid: string;
|
|
123
|
+
author_id: string;
|
|
124
|
+
slug: string;
|
|
125
|
+
id?: number | undefined;
|
|
126
|
+
created_at?: Date | undefined;
|
|
127
|
+
updated_at?: Date | undefined;
|
|
128
|
+
corpus_version?: string | null | undefined;
|
|
129
|
+
category?: string | undefined;
|
|
130
|
+
archived?: boolean | undefined;
|
|
131
|
+
publish_at?: Date | null | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
type PostRowInsert = z.infer<typeof PostRowInsertSchema>;
|
|
134
|
+
declare const CategorySchema: z.ZodObject<{
|
|
135
|
+
id: z.ZodNumber;
|
|
136
|
+
owner_id: z.ZodString;
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
parent: z.ZodNullable<z.ZodString>;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
id: number;
|
|
141
|
+
name: string;
|
|
142
|
+
owner_id: string;
|
|
143
|
+
parent: string | null;
|
|
144
|
+
}, {
|
|
145
|
+
id: number;
|
|
146
|
+
name: string;
|
|
147
|
+
owner_id: string;
|
|
148
|
+
parent: string | null;
|
|
149
|
+
}>;
|
|
150
|
+
type Category = z.infer<typeof CategorySchema>;
|
|
151
|
+
declare const CategoryInsertSchema: z.ZodObject<{
|
|
152
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
owner_id: z.ZodString;
|
|
154
|
+
name: z.ZodString;
|
|
155
|
+
parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
name: string;
|
|
158
|
+
owner_id: string;
|
|
159
|
+
id?: number | undefined;
|
|
160
|
+
parent?: string | null | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
name: string;
|
|
163
|
+
owner_id: string;
|
|
164
|
+
id?: number | undefined;
|
|
165
|
+
parent?: string | null | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
type CategoryInsert = z.infer<typeof CategoryInsertSchema>;
|
|
168
|
+
declare const TagSchema: z.ZodObject<{
|
|
169
|
+
post_id: z.ZodNumber;
|
|
170
|
+
tag: z.ZodString;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
tag: string;
|
|
173
|
+
post_id: number;
|
|
174
|
+
}, {
|
|
175
|
+
tag: string;
|
|
176
|
+
post_id: number;
|
|
177
|
+
}>;
|
|
178
|
+
type Tag = z.infer<typeof TagSchema>;
|
|
179
|
+
declare const TagInsertSchema: z.ZodObject<{
|
|
180
|
+
post_id: z.ZodNumber;
|
|
181
|
+
tag: z.ZodString;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
tag: string;
|
|
184
|
+
post_id: number;
|
|
185
|
+
}, {
|
|
186
|
+
tag: string;
|
|
187
|
+
post_id: number;
|
|
188
|
+
}>;
|
|
189
|
+
type TagInsert = z.infer<typeof TagInsertSchema>;
|
|
190
|
+
declare const AccessKeyRowSchema: z.ZodObject<{
|
|
191
|
+
id: z.ZodNumber;
|
|
192
|
+
user_id: z.ZodString;
|
|
193
|
+
key_hash: z.ZodString;
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
note: z.ZodNullable<z.ZodString>;
|
|
196
|
+
enabled: z.ZodBoolean;
|
|
197
|
+
created_at: z.ZodDate;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
id: number;
|
|
200
|
+
name: string;
|
|
201
|
+
user_id: string;
|
|
202
|
+
key_hash: string;
|
|
203
|
+
note: string | null;
|
|
204
|
+
enabled: boolean;
|
|
205
|
+
created_at: Date;
|
|
206
|
+
}, {
|
|
207
|
+
id: number;
|
|
208
|
+
name: string;
|
|
209
|
+
user_id: string;
|
|
210
|
+
key_hash: string;
|
|
211
|
+
note: string | null;
|
|
212
|
+
enabled: boolean;
|
|
213
|
+
created_at: Date;
|
|
214
|
+
}>;
|
|
215
|
+
type AccessKeyRow = z.infer<typeof AccessKeyRowSchema>;
|
|
216
|
+
declare const AccessKeySchema: z.ZodObject<Omit<{
|
|
217
|
+
id: z.ZodNumber;
|
|
218
|
+
user_id: z.ZodString;
|
|
219
|
+
key_hash: z.ZodString;
|
|
220
|
+
name: z.ZodString;
|
|
221
|
+
note: z.ZodNullable<z.ZodString>;
|
|
222
|
+
enabled: z.ZodBoolean;
|
|
223
|
+
created_at: z.ZodDate;
|
|
224
|
+
}, "key_hash">, "strip", z.ZodTypeAny, {
|
|
225
|
+
id: number;
|
|
226
|
+
name: string;
|
|
227
|
+
user_id: string;
|
|
228
|
+
note: string | null;
|
|
229
|
+
enabled: boolean;
|
|
230
|
+
created_at: Date;
|
|
231
|
+
}, {
|
|
232
|
+
id: number;
|
|
233
|
+
name: string;
|
|
234
|
+
user_id: string;
|
|
235
|
+
note: string | null;
|
|
236
|
+
enabled: boolean;
|
|
237
|
+
created_at: Date;
|
|
238
|
+
}>;
|
|
239
|
+
type AccessKey = z.infer<typeof AccessKeySchema>;
|
|
240
|
+
declare const AccessKeyInsertSchema: z.ZodObject<{
|
|
241
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
user_id: z.ZodString;
|
|
243
|
+
key_hash: z.ZodString;
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
246
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
247
|
+
created_at: z.ZodOptional<z.ZodDate>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
name: string;
|
|
250
|
+
user_id: string;
|
|
251
|
+
key_hash: string;
|
|
252
|
+
id?: number | undefined;
|
|
253
|
+
note?: string | null | undefined;
|
|
254
|
+
enabled?: boolean | undefined;
|
|
255
|
+
created_at?: Date | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
name: string;
|
|
258
|
+
user_id: string;
|
|
259
|
+
key_hash: string;
|
|
260
|
+
id?: number | undefined;
|
|
261
|
+
note?: string | null | undefined;
|
|
262
|
+
enabled?: boolean | undefined;
|
|
263
|
+
created_at?: Date | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
type AccessKeyInsert = z.infer<typeof AccessKeyInsertSchema>;
|
|
266
|
+
declare const IntegrationSchema: z.ZodObject<{
|
|
267
|
+
id: z.ZodNumber;
|
|
268
|
+
user_id: z.ZodString;
|
|
269
|
+
source: z.ZodString;
|
|
270
|
+
location: z.ZodString;
|
|
271
|
+
data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
|
+
last_fetch: z.ZodNullable<z.ZodDate>;
|
|
273
|
+
status: z.ZodNullable<z.ZodString>;
|
|
274
|
+
created_at: z.ZodDate;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
id: number;
|
|
277
|
+
data: Record<string, unknown> | null;
|
|
278
|
+
user_id: string;
|
|
279
|
+
created_at: Date;
|
|
280
|
+
status: string | null;
|
|
281
|
+
source: string;
|
|
282
|
+
location: string;
|
|
283
|
+
last_fetch: Date | null;
|
|
284
|
+
}, {
|
|
285
|
+
id: number;
|
|
286
|
+
data: Record<string, unknown> | null;
|
|
287
|
+
user_id: string;
|
|
288
|
+
created_at: Date;
|
|
289
|
+
status: string | null;
|
|
290
|
+
source: string;
|
|
291
|
+
location: string;
|
|
292
|
+
last_fetch: Date | null;
|
|
293
|
+
}>;
|
|
294
|
+
type Integration = z.infer<typeof IntegrationSchema>;
|
|
295
|
+
declare const IntegrationInsertSchema: z.ZodObject<{
|
|
296
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
user_id: z.ZodString;
|
|
298
|
+
source: z.ZodString;
|
|
299
|
+
location: z.ZodString;
|
|
300
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
301
|
+
last_fetch: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
302
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
303
|
+
created_at: z.ZodOptional<z.ZodDate>;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
user_id: string;
|
|
306
|
+
source: string;
|
|
307
|
+
location: string;
|
|
308
|
+
id?: number | undefined;
|
|
309
|
+
data?: Record<string, unknown> | null | undefined;
|
|
310
|
+
created_at?: Date | undefined;
|
|
311
|
+
status?: string | null | undefined;
|
|
312
|
+
last_fetch?: Date | null | undefined;
|
|
313
|
+
}, {
|
|
314
|
+
user_id: string;
|
|
315
|
+
source: string;
|
|
316
|
+
location: string;
|
|
317
|
+
id?: number | undefined;
|
|
318
|
+
data?: Record<string, unknown> | null | undefined;
|
|
319
|
+
created_at?: Date | undefined;
|
|
320
|
+
status?: string | null | undefined;
|
|
321
|
+
last_fetch?: Date | null | undefined;
|
|
322
|
+
}>;
|
|
323
|
+
type IntegrationInsert = z.infer<typeof IntegrationInsertSchema>;
|
|
324
|
+
declare const FetchLinkSchema: z.ZodObject<{
|
|
325
|
+
id: z.ZodNumber;
|
|
326
|
+
post_id: z.ZodNumber;
|
|
327
|
+
integration_id: z.ZodNumber;
|
|
328
|
+
identifier: z.ZodString;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
id: number;
|
|
331
|
+
post_id: number;
|
|
332
|
+
integration_id: number;
|
|
333
|
+
identifier: string;
|
|
334
|
+
}, {
|
|
335
|
+
id: number;
|
|
336
|
+
post_id: number;
|
|
337
|
+
integration_id: number;
|
|
338
|
+
identifier: string;
|
|
339
|
+
}>;
|
|
340
|
+
type FetchLink = z.infer<typeof FetchLinkSchema>;
|
|
341
|
+
declare const FetchLinkInsertSchema: z.ZodObject<{
|
|
342
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
post_id: z.ZodNumber;
|
|
344
|
+
integration_id: z.ZodNumber;
|
|
345
|
+
identifier: z.ZodString;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
post_id: number;
|
|
348
|
+
integration_id: number;
|
|
349
|
+
identifier: string;
|
|
350
|
+
id?: number | undefined;
|
|
351
|
+
}, {
|
|
352
|
+
post_id: number;
|
|
353
|
+
integration_id: number;
|
|
354
|
+
identifier: string;
|
|
355
|
+
id?: number | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
type FetchLinkInsert = z.infer<typeof FetchLinkInsertSchema>;
|
|
358
|
+
declare const PostSchema: z.ZodObject<{
|
|
359
|
+
id: z.ZodNumber;
|
|
360
|
+
uuid: z.ZodString;
|
|
361
|
+
author_id: z.ZodString;
|
|
362
|
+
slug: z.ZodString;
|
|
363
|
+
title: z.ZodString;
|
|
364
|
+
content: z.ZodString;
|
|
365
|
+
description: z.ZodOptional<z.ZodString>;
|
|
366
|
+
format: z.ZodEnum<["md", "adoc"]>;
|
|
367
|
+
category: z.ZodString;
|
|
368
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
369
|
+
archived: z.ZodBoolean;
|
|
370
|
+
publish_at: z.ZodNullable<z.ZodDate>;
|
|
371
|
+
created_at: z.ZodDate;
|
|
372
|
+
updated_at: z.ZodDate;
|
|
373
|
+
project_ids: z.ZodArray<z.ZodString, "many">;
|
|
374
|
+
corpus_version: z.ZodNullable<z.ZodString>;
|
|
375
|
+
}, "strip", z.ZodTypeAny, {
|
|
376
|
+
id: number;
|
|
377
|
+
created_at: Date;
|
|
378
|
+
updated_at: Date;
|
|
379
|
+
title: string;
|
|
380
|
+
tags: string[];
|
|
381
|
+
content: string;
|
|
382
|
+
format: "md" | "adoc";
|
|
383
|
+
uuid: string;
|
|
384
|
+
author_id: string;
|
|
385
|
+
slug: string;
|
|
386
|
+
corpus_version: string | null;
|
|
387
|
+
category: string;
|
|
388
|
+
archived: boolean;
|
|
389
|
+
publish_at: Date | null;
|
|
390
|
+
project_ids: string[];
|
|
391
|
+
description?: string | undefined;
|
|
392
|
+
}, {
|
|
393
|
+
id: number;
|
|
394
|
+
created_at: Date;
|
|
395
|
+
updated_at: Date;
|
|
396
|
+
title: string;
|
|
397
|
+
tags: string[];
|
|
398
|
+
content: string;
|
|
399
|
+
format: "md" | "adoc";
|
|
400
|
+
uuid: string;
|
|
401
|
+
author_id: string;
|
|
402
|
+
slug: string;
|
|
403
|
+
corpus_version: string | null;
|
|
404
|
+
category: string;
|
|
405
|
+
archived: boolean;
|
|
406
|
+
publish_at: Date | null;
|
|
407
|
+
project_ids: string[];
|
|
408
|
+
description?: string | undefined;
|
|
409
|
+
}>;
|
|
410
|
+
type Post = z.infer<typeof PostSchema>;
|
|
411
|
+
declare const PostCreateSchema: z.ZodObject<{
|
|
412
|
+
slug: z.ZodString;
|
|
413
|
+
title: z.ZodString;
|
|
414
|
+
content: z.ZodString;
|
|
415
|
+
description: z.ZodOptional<z.ZodString>;
|
|
416
|
+
format: z.ZodDefault<z.ZodEnum<["md", "adoc"]>>;
|
|
417
|
+
category: z.ZodDefault<z.ZodString>;
|
|
418
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
419
|
+
publish_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
420
|
+
project_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
421
|
+
}, "strip", z.ZodTypeAny, {
|
|
422
|
+
title: string;
|
|
423
|
+
tags: string[];
|
|
424
|
+
content: string;
|
|
425
|
+
format: "md" | "adoc";
|
|
426
|
+
slug: string;
|
|
427
|
+
category: string;
|
|
428
|
+
description?: string | undefined;
|
|
429
|
+
publish_at?: Date | null | undefined;
|
|
430
|
+
project_ids?: string[] | undefined;
|
|
431
|
+
}, {
|
|
432
|
+
title: string;
|
|
433
|
+
content: string;
|
|
434
|
+
slug: string;
|
|
435
|
+
description?: string | undefined;
|
|
436
|
+
tags?: string[] | undefined;
|
|
437
|
+
format?: "md" | "adoc" | undefined;
|
|
438
|
+
category?: string | undefined;
|
|
439
|
+
publish_at?: Date | null | undefined;
|
|
440
|
+
project_ids?: string[] | undefined;
|
|
441
|
+
}>;
|
|
442
|
+
type PostCreate = z.infer<typeof PostCreateSchema>;
|
|
443
|
+
declare const PostUpdateSchema: z.ZodObject<{
|
|
444
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
445
|
+
title: z.ZodOptional<z.ZodString>;
|
|
446
|
+
content: z.ZodOptional<z.ZodString>;
|
|
447
|
+
description: z.ZodOptional<z.ZodString>;
|
|
448
|
+
format: z.ZodOptional<z.ZodEnum<["md", "adoc"]>>;
|
|
449
|
+
category: z.ZodOptional<z.ZodString>;
|
|
450
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
451
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
452
|
+
publish_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
453
|
+
project_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
description?: string | undefined;
|
|
456
|
+
title?: string | undefined;
|
|
457
|
+
tags?: string[] | undefined;
|
|
458
|
+
content?: string | undefined;
|
|
459
|
+
format?: "md" | "adoc" | undefined;
|
|
460
|
+
slug?: string | undefined;
|
|
461
|
+
category?: string | undefined;
|
|
462
|
+
archived?: boolean | undefined;
|
|
463
|
+
publish_at?: Date | null | undefined;
|
|
464
|
+
project_ids?: string[] | undefined;
|
|
465
|
+
}, {
|
|
466
|
+
description?: string | undefined;
|
|
467
|
+
title?: string | undefined;
|
|
468
|
+
tags?: string[] | undefined;
|
|
469
|
+
content?: string | undefined;
|
|
470
|
+
format?: "md" | "adoc" | undefined;
|
|
471
|
+
slug?: string | undefined;
|
|
472
|
+
category?: string | undefined;
|
|
473
|
+
archived?: boolean | undefined;
|
|
474
|
+
publish_at?: Date | null | undefined;
|
|
475
|
+
project_ids?: string[] | undefined;
|
|
476
|
+
}>;
|
|
477
|
+
type PostUpdate = z.infer<typeof PostUpdateSchema>;
|
|
478
|
+
declare const PostListParamsSchema: z.ZodObject<{
|
|
479
|
+
category: z.ZodOptional<z.ZodString>;
|
|
480
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
481
|
+
project: z.ZodOptional<z.ZodString>;
|
|
482
|
+
status: z.ZodDefault<z.ZodEnum<["published", "scheduled", "draft", "all"]>>;
|
|
483
|
+
archived: z.ZodDefault<z.ZodBoolean>;
|
|
484
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
485
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
486
|
+
sort: z.ZodDefault<z.ZodEnum<["created", "updated", "published"]>>;
|
|
487
|
+
}, "strip", z.ZodTypeAny, {
|
|
488
|
+
status: "all" | "published" | "scheduled" | "draft";
|
|
489
|
+
sort: "published" | "created" | "updated";
|
|
490
|
+
archived: boolean;
|
|
491
|
+
limit: number;
|
|
492
|
+
offset: number;
|
|
493
|
+
project?: string | undefined;
|
|
494
|
+
tag?: string | undefined;
|
|
495
|
+
category?: string | undefined;
|
|
496
|
+
}, {
|
|
497
|
+
project?: string | undefined;
|
|
498
|
+
status?: "all" | "published" | "scheduled" | "draft" | undefined;
|
|
499
|
+
sort?: "published" | "created" | "updated" | undefined;
|
|
500
|
+
tag?: string | undefined;
|
|
501
|
+
category?: string | undefined;
|
|
502
|
+
archived?: boolean | undefined;
|
|
503
|
+
limit?: number | undefined;
|
|
504
|
+
offset?: number | undefined;
|
|
505
|
+
}>;
|
|
506
|
+
type PostListParams = z.infer<typeof PostListParamsSchema>;
|
|
507
|
+
declare const PostsResponseSchema: z.ZodObject<{
|
|
508
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
509
|
+
id: z.ZodNumber;
|
|
510
|
+
uuid: z.ZodString;
|
|
511
|
+
author_id: z.ZodString;
|
|
512
|
+
slug: z.ZodString;
|
|
513
|
+
title: z.ZodString;
|
|
514
|
+
content: z.ZodString;
|
|
515
|
+
description: z.ZodOptional<z.ZodString>;
|
|
516
|
+
format: z.ZodEnum<["md", "adoc"]>;
|
|
517
|
+
category: z.ZodString;
|
|
518
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
519
|
+
archived: z.ZodBoolean;
|
|
520
|
+
publish_at: z.ZodNullable<z.ZodDate>;
|
|
521
|
+
created_at: z.ZodDate;
|
|
522
|
+
updated_at: z.ZodDate;
|
|
523
|
+
project_ids: z.ZodArray<z.ZodString, "many">;
|
|
524
|
+
corpus_version: z.ZodNullable<z.ZodString>;
|
|
525
|
+
}, "strip", z.ZodTypeAny, {
|
|
526
|
+
id: number;
|
|
527
|
+
created_at: Date;
|
|
528
|
+
updated_at: Date;
|
|
529
|
+
title: string;
|
|
530
|
+
tags: string[];
|
|
531
|
+
content: string;
|
|
532
|
+
format: "md" | "adoc";
|
|
533
|
+
uuid: string;
|
|
534
|
+
author_id: string;
|
|
535
|
+
slug: string;
|
|
536
|
+
corpus_version: string | null;
|
|
537
|
+
category: string;
|
|
538
|
+
archived: boolean;
|
|
539
|
+
publish_at: Date | null;
|
|
540
|
+
project_ids: string[];
|
|
541
|
+
description?: string | undefined;
|
|
542
|
+
}, {
|
|
543
|
+
id: number;
|
|
544
|
+
created_at: Date;
|
|
545
|
+
updated_at: Date;
|
|
546
|
+
title: string;
|
|
547
|
+
tags: string[];
|
|
548
|
+
content: string;
|
|
549
|
+
format: "md" | "adoc";
|
|
550
|
+
uuid: string;
|
|
551
|
+
author_id: string;
|
|
552
|
+
slug: string;
|
|
553
|
+
corpus_version: string | null;
|
|
554
|
+
category: string;
|
|
555
|
+
archived: boolean;
|
|
556
|
+
publish_at: Date | null;
|
|
557
|
+
project_ids: string[];
|
|
558
|
+
description?: string | undefined;
|
|
559
|
+
}>, "many">;
|
|
560
|
+
total_posts: z.ZodNumber;
|
|
561
|
+
total_pages: z.ZodNumber;
|
|
562
|
+
per_page: z.ZodNumber;
|
|
563
|
+
current_page: z.ZodNumber;
|
|
564
|
+
}, "strip", z.ZodTypeAny, {
|
|
565
|
+
posts: {
|
|
566
|
+
id: number;
|
|
567
|
+
created_at: Date;
|
|
568
|
+
updated_at: Date;
|
|
569
|
+
title: string;
|
|
570
|
+
tags: string[];
|
|
571
|
+
content: string;
|
|
572
|
+
format: "md" | "adoc";
|
|
573
|
+
uuid: string;
|
|
574
|
+
author_id: string;
|
|
575
|
+
slug: string;
|
|
576
|
+
corpus_version: string | null;
|
|
577
|
+
category: string;
|
|
578
|
+
archived: boolean;
|
|
579
|
+
publish_at: Date | null;
|
|
580
|
+
project_ids: string[];
|
|
581
|
+
description?: string | undefined;
|
|
582
|
+
}[];
|
|
583
|
+
total_posts: number;
|
|
584
|
+
total_pages: number;
|
|
585
|
+
per_page: number;
|
|
586
|
+
current_page: number;
|
|
587
|
+
}, {
|
|
588
|
+
posts: {
|
|
589
|
+
id: number;
|
|
590
|
+
created_at: Date;
|
|
591
|
+
updated_at: Date;
|
|
592
|
+
title: string;
|
|
593
|
+
tags: string[];
|
|
594
|
+
content: string;
|
|
595
|
+
format: "md" | "adoc";
|
|
596
|
+
uuid: string;
|
|
597
|
+
author_id: string;
|
|
598
|
+
slug: string;
|
|
599
|
+
corpus_version: string | null;
|
|
600
|
+
category: string;
|
|
601
|
+
archived: boolean;
|
|
602
|
+
publish_at: Date | null;
|
|
603
|
+
project_ids: string[];
|
|
604
|
+
description?: string | undefined;
|
|
605
|
+
}[];
|
|
606
|
+
total_posts: number;
|
|
607
|
+
total_pages: number;
|
|
608
|
+
per_page: number;
|
|
609
|
+
current_page: number;
|
|
610
|
+
}>;
|
|
611
|
+
type PostsResponse = z.infer<typeof PostsResponseSchema>;
|
|
612
|
+
type PublishAtField = Pick<Post, "publish_at">;
|
|
613
|
+
declare const isPublished: (post: PublishAtField) => boolean;
|
|
614
|
+
declare const isScheduled: (post: PublishAtField) => boolean;
|
|
615
|
+
declare const isDraft: (post: PublishAtField) => boolean;
|
|
616
|
+
type PostStatus = "published" | "scheduled" | "draft";
|
|
617
|
+
declare const postStatus: (post: PublishAtField) => PostStatus;
|
|
618
|
+
declare const CategoryCreateSchema: z.ZodObject<{
|
|
619
|
+
name: z.ZodString;
|
|
620
|
+
parent: z.ZodDefault<z.ZodString>;
|
|
621
|
+
}, "strip", z.ZodTypeAny, {
|
|
622
|
+
name: string;
|
|
623
|
+
parent: string;
|
|
624
|
+
}, {
|
|
625
|
+
name: string;
|
|
626
|
+
parent?: string | undefined;
|
|
627
|
+
}>;
|
|
628
|
+
type CategoryCreate = z.infer<typeof CategoryCreateSchema>;
|
|
629
|
+
declare const AccessKeyCreateSchema: z.ZodObject<{
|
|
630
|
+
name: z.ZodString;
|
|
631
|
+
note: z.ZodOptional<z.ZodString>;
|
|
632
|
+
}, "strip", z.ZodTypeAny, {
|
|
633
|
+
name: string;
|
|
634
|
+
note?: string | undefined;
|
|
635
|
+
}, {
|
|
636
|
+
name: string;
|
|
637
|
+
note?: string | undefined;
|
|
638
|
+
}>;
|
|
639
|
+
type AccessKeyCreate = z.infer<typeof AccessKeyCreateSchema>;
|
|
640
|
+
declare const AccessKeyUpdateSchema: z.ZodObject<{
|
|
641
|
+
name: z.ZodOptional<z.ZodString>;
|
|
642
|
+
note: z.ZodOptional<z.ZodString>;
|
|
643
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
644
|
+
}, "strip", z.ZodTypeAny, {
|
|
645
|
+
name?: string | undefined;
|
|
646
|
+
note?: string | undefined;
|
|
647
|
+
enabled?: boolean | undefined;
|
|
648
|
+
}, {
|
|
649
|
+
name?: string | undefined;
|
|
650
|
+
note?: string | undefined;
|
|
651
|
+
enabled?: boolean | undefined;
|
|
652
|
+
}>;
|
|
653
|
+
type AccessKeyUpdate = z.infer<typeof AccessKeyUpdateSchema>;
|
|
654
|
+
declare const IntegrationUpsertSchema: z.ZodObject<{
|
|
655
|
+
source: z.ZodString;
|
|
656
|
+
location: z.ZodString;
|
|
657
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
658
|
+
}, "strip", z.ZodTypeAny, {
|
|
659
|
+
source: string;
|
|
660
|
+
location: string;
|
|
661
|
+
data?: Record<string, unknown> | undefined;
|
|
662
|
+
}, {
|
|
663
|
+
source: string;
|
|
664
|
+
location: string;
|
|
665
|
+
data?: Record<string, unknown> | undefined;
|
|
666
|
+
}>;
|
|
667
|
+
type IntegrationUpsert = z.infer<typeof IntegrationUpsertSchema>;
|
|
668
|
+
type ApiError = {
|
|
669
|
+
code: string;
|
|
670
|
+
message: string;
|
|
671
|
+
details?: Record<string, unknown>;
|
|
672
|
+
};
|
|
673
|
+
type PaginatedResponse<T> = {
|
|
674
|
+
items: T[];
|
|
675
|
+
total: number;
|
|
676
|
+
limit: number;
|
|
677
|
+
offset: number;
|
|
678
|
+
hasMore: boolean;
|
|
679
|
+
};
|
|
680
|
+
type PostsCorpus = Corpus<{
|
|
681
|
+
posts: Store<PostContent>;
|
|
682
|
+
}>;
|
|
683
|
+
|
|
684
|
+
export { type CategoryCreate as $, AccessKeyRowSchema as A, type IntegrationInsert as B, CategorySchema as C, type FetchLink as D, FetchLinkInsertSchema as E, FetchLinkSchema as F, type FetchLinkInsert as G, PostSchema as H, IntegrationSchema as I, type Post as J, PostCreateSchema as K, type PostCreate as L, PostUpdateSchema as M, type PostUpdate as N, PostListParamsSchema as O, PostContentSchema as P, type PostListParams as Q, PostsResponseSchema as R, type PostsResponse as S, TagSchema as T, isPublished as U, VersionInfoSchema as V, isScheduled as W, isDraft as X, type PostStatus as Y, postStatus as Z, CategoryCreateSchema as _, type PostContent as a, AccessKeyCreateSchema as a0, type AccessKeyCreate as a1, AccessKeyUpdateSchema as a2, type AccessKeyUpdate as a3, IntegrationUpsertSchema as a4, type IntegrationUpsert as a5, type ApiError as a6, type PaginatedResponse as a7, type PostsCorpus as a8, postStoreId as b, corpusPath as c, type VersionInfo as d, type PostCorpusError as e, parsePostContent as f, PostRowSchema as g, type PostRow as h, PostRowInsertSchema as i, type PostRowInsert as j, type Category as k, CategoryInsertSchema as l, mapCorpusError as m, type CategoryInsert as n, type Tag as o, postsStoreDefinition as p, TagInsertSchema as q, type TagInsert as r, serializePostContent as s, type AccessKeyRow as t, AccessKeySchema as u, type AccessKey as v, AccessKeyInsertSchema as w, type AccessKeyInsert as x, type Integration as y, IntegrationInsertSchema as z };
|