@devpad/api 2.6.10 → 2.6.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/api",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "TypeScript client library for the devpad API - project and task management made simple",
5
5
  "keywords": [
6
6
  "api",
@@ -32,18 +32,22 @@
32
32
  "types": "dist/index.d.ts",
33
33
  "exports": {
34
34
  ".": {
35
+ "source": "./src/index.ts",
35
36
  "types": "./dist/index.d.ts",
36
37
  "import": "./dist/index.js"
37
38
  },
38
39
  "./schema": {
40
+ "source": "./src/schema/index.ts",
39
41
  "types": "./dist/schema/index.d.ts",
40
42
  "import": "./dist/schema/index.js"
41
43
  },
42
44
  "./schema/blog": {
45
+ "source": "./src/schema/blog.ts",
43
46
  "types": "./dist/schema/blog.d.ts",
44
47
  "import": "./dist/schema/blog.js"
45
48
  },
46
49
  "./schema/media": {
50
+ "source": "./src/schema/media.ts",
47
51
  "types": "./dist/schema/media.d.ts",
48
52
  "import": "./dist/schema/media.js"
49
53
  }
@@ -55,6 +59,7 @@
55
59
  "scripts": {
56
60
  "build": "bunx tsup",
57
61
  "build:watch": "bunx tsup --watch",
62
+ "typecheck": "tsc --noEmit -p .",
58
63
  "test": "bun test",
59
64
  "test:unit": "bun test tests/unit/",
60
65
  "test:integration": "bun test tests/integration/",
@@ -68,7 +73,7 @@
68
73
  "zod": "^3.22.4"
69
74
  },
70
75
  "devDependencies": {
71
- "@devpad/schema": "^2.6.10",
76
+ "@devpad/schema": "^2.6.12",
72
77
  "@types/node": "^20.11.24",
73
78
  "bun-types": "latest",
74
79
  "tsup": "^8.0.0",
@@ -32,13 +32,13 @@ declare const VersionInfoSchema: z.ZodObject<{
32
32
  parent: z.ZodNullable<z.ZodString>;
33
33
  created_at: z.ZodDate;
34
34
  }, "strip", z.ZodTypeAny, {
35
- created_at: Date;
36
35
  hash: string;
37
36
  parent: string | null;
38
- }, {
39
37
  created_at: Date;
38
+ }, {
40
39
  hash: string;
41
40
  parent: string | null;
41
+ created_at: Date;
42
42
  }>;
43
43
  type VersionInfo = z.infer<typeof VersionInfoSchema>;
44
44
  type PostCorpusError = {
@@ -73,9 +73,8 @@ declare const PostRowSchema: z.ZodObject<{
73
73
  created_at: z.ZodDate;
74
74
  updated_at: z.ZodDate;
75
75
  }, "strip", z.ZodTypeAny, {
76
- id: number;
77
76
  created_at: Date;
78
- updated_at: Date;
77
+ id: number;
79
78
  uuid: string;
80
79
  author_id: string;
81
80
  slug: string;
@@ -83,10 +82,10 @@ declare const PostRowSchema: z.ZodObject<{
83
82
  category: string;
84
83
  archived: boolean;
85
84
  publish_at: Date | null;
85
+ updated_at: Date;
86
86
  }, {
87
- id: number;
88
87
  created_at: Date;
89
- updated_at: Date;
88
+ id: number;
90
89
  uuid: string;
91
90
  author_id: string;
92
91
  slug: string;
@@ -94,6 +93,7 @@ declare const PostRowSchema: z.ZodObject<{
94
93
  category: string;
95
94
  archived: boolean;
96
95
  publish_at: Date | null;
96
+ updated_at: Date;
97
97
  }>;
98
98
  type PostRow = z.infer<typeof PostRowSchema>;
99
99
  declare const PostRowInsertSchema: z.ZodObject<{
@@ -111,24 +111,24 @@ declare const PostRowInsertSchema: z.ZodObject<{
111
111
  uuid: string;
112
112
  author_id: string;
113
113
  slug: string;
114
- id?: number | undefined;
115
114
  created_at?: Date | undefined;
116
- updated_at?: Date | undefined;
115
+ id?: number | undefined;
117
116
  corpus_version?: string | null | undefined;
118
117
  category?: string | undefined;
119
118
  archived?: boolean | undefined;
120
119
  publish_at?: Date | null | undefined;
120
+ updated_at?: Date | undefined;
121
121
  }, {
122
122
  uuid: string;
123
123
  author_id: string;
124
124
  slug: string;
125
- id?: number | undefined;
126
125
  created_at?: Date | undefined;
127
- updated_at?: Date | undefined;
126
+ id?: number | undefined;
128
127
  corpus_version?: string | null | undefined;
129
128
  category?: string | undefined;
130
129
  archived?: boolean | undefined;
131
130
  publish_at?: Date | null | undefined;
131
+ updated_at?: Date | undefined;
132
132
  }>;
133
133
  type PostRowInsert = z.infer<typeof PostRowInsertSchema>;
134
134
  declare const CategorySchema: z.ZodObject<{
@@ -137,15 +137,15 @@ declare const CategorySchema: z.ZodObject<{
137
137
  name: z.ZodString;
138
138
  parent: z.ZodNullable<z.ZodString>;
139
139
  }, "strip", z.ZodTypeAny, {
140
+ parent: string | null;
140
141
  id: number;
141
142
  name: string;
142
143
  owner_id: string;
143
- parent: string | null;
144
144
  }, {
145
+ parent: string | null;
145
146
  id: number;
146
147
  name: string;
147
148
  owner_id: string;
148
- parent: string | null;
149
149
  }>;
150
150
  type Category = z.infer<typeof CategorySchema>;
151
151
  declare const CategoryInsertSchema: z.ZodObject<{
@@ -156,35 +156,35 @@ declare const CategoryInsertSchema: z.ZodObject<{
156
156
  }, "strip", z.ZodTypeAny, {
157
157
  name: string;
158
158
  owner_id: string;
159
- id?: number | undefined;
160
159
  parent?: string | null | undefined;
160
+ id?: number | undefined;
161
161
  }, {
162
162
  name: string;
163
163
  owner_id: string;
164
- id?: number | undefined;
165
164
  parent?: string | null | undefined;
165
+ id?: number | undefined;
166
166
  }>;
167
167
  type CategoryInsert = z.infer<typeof CategoryInsertSchema>;
168
168
  declare const TagSchema: z.ZodObject<{
169
169
  post_id: z.ZodNumber;
170
170
  tag: z.ZodString;
171
171
  }, "strip", z.ZodTypeAny, {
172
- tag: string;
173
172
  post_id: number;
174
- }, {
175
173
  tag: string;
174
+ }, {
176
175
  post_id: number;
176
+ tag: string;
177
177
  }>;
178
178
  type Tag = z.infer<typeof TagSchema>;
179
179
  declare const TagInsertSchema: z.ZodObject<{
180
180
  post_id: z.ZodNumber;
181
181
  tag: z.ZodString;
182
182
  }, "strip", z.ZodTypeAny, {
183
- tag: string;
184
183
  post_id: number;
185
- }, {
186
184
  tag: string;
185
+ }, {
187
186
  post_id: number;
187
+ tag: string;
188
188
  }>;
189
189
  type TagInsert = z.infer<typeof TagInsertSchema>;
190
190
  declare const AccessKeyRowSchema: z.ZodObject<{
@@ -196,20 +196,20 @@ declare const AccessKeyRowSchema: z.ZodObject<{
196
196
  enabled: z.ZodBoolean;
197
197
  created_at: z.ZodDate;
198
198
  }, "strip", z.ZodTypeAny, {
199
+ created_at: Date;
199
200
  id: number;
200
201
  name: string;
201
202
  user_id: string;
202
203
  key_hash: string;
203
204
  note: string | null;
204
- created_at: Date;
205
205
  enabled: boolean;
206
206
  }, {
207
+ created_at: Date;
207
208
  id: number;
208
209
  name: string;
209
210
  user_id: string;
210
211
  key_hash: string;
211
212
  note: string | null;
212
- created_at: Date;
213
213
  enabled: boolean;
214
214
  }>;
215
215
  type AccessKeyRow = z.infer<typeof AccessKeyRowSchema>;
@@ -222,18 +222,18 @@ declare const AccessKeySchema: z.ZodObject<Omit<{
222
222
  enabled: z.ZodBoolean;
223
223
  created_at: z.ZodDate;
224
224
  }, "key_hash">, "strip", z.ZodTypeAny, {
225
+ created_at: Date;
225
226
  id: number;
226
227
  name: string;
227
228
  user_id: string;
228
229
  note: string | null;
229
- created_at: Date;
230
230
  enabled: boolean;
231
231
  }, {
232
+ created_at: Date;
232
233
  id: number;
233
234
  name: string;
234
235
  user_id: string;
235
236
  note: string | null;
236
- created_at: Date;
237
237
  enabled: boolean;
238
238
  }>;
239
239
  type AccessKey = z.infer<typeof AccessKeySchema>;
@@ -249,17 +249,17 @@ declare const AccessKeyInsertSchema: z.ZodObject<{
249
249
  name: string;
250
250
  user_id: string;
251
251
  key_hash: string;
252
+ created_at?: Date | undefined;
252
253
  id?: number | undefined;
253
254
  note?: string | null | undefined;
254
- created_at?: Date | undefined;
255
255
  enabled?: boolean | undefined;
256
256
  }, {
257
257
  name: string;
258
258
  user_id: string;
259
259
  key_hash: string;
260
+ created_at?: Date | undefined;
260
261
  id?: number | undefined;
261
262
  note?: string | null | undefined;
262
- created_at?: Date | undefined;
263
263
  enabled?: boolean | undefined;
264
264
  }>;
265
265
  type AccessKeyInsert = z.infer<typeof AccessKeyInsertSchema>;
@@ -273,20 +273,20 @@ declare const IntegrationSchema: z.ZodObject<{
273
273
  status: z.ZodNullable<z.ZodString>;
274
274
  created_at: z.ZodDate;
275
275
  }, "strip", z.ZodTypeAny, {
276
- id: number;
277
276
  status: string | null;
277
+ created_at: Date;
278
+ id: number;
278
279
  data: Record<string, unknown> | null;
279
280
  user_id: string;
280
- created_at: Date;
281
281
  source: string;
282
282
  location: string;
283
283
  last_fetch: Date | null;
284
284
  }, {
285
- id: number;
286
285
  status: string | null;
286
+ created_at: Date;
287
+ id: number;
287
288
  data: Record<string, unknown> | null;
288
289
  user_id: string;
289
- created_at: Date;
290
290
  source: string;
291
291
  location: string;
292
292
  last_fetch: Date | null;
@@ -305,19 +305,19 @@ declare const IntegrationInsertSchema: z.ZodObject<{
305
305
  user_id: string;
306
306
  source: string;
307
307
  location: string;
308
- id?: number | undefined;
309
308
  status?: string | null | undefined;
310
- data?: Record<string, unknown> | null | undefined;
311
309
  created_at?: Date | undefined;
310
+ id?: number | undefined;
311
+ data?: Record<string, unknown> | null | undefined;
312
312
  last_fetch?: Date | null | undefined;
313
313
  }, {
314
314
  user_id: string;
315
315
  source: string;
316
316
  location: string;
317
- id?: number | undefined;
318
317
  status?: string | null | undefined;
319
- data?: Record<string, unknown> | null | undefined;
320
318
  created_at?: Date | undefined;
319
+ id?: number | undefined;
320
+ data?: Record<string, unknown> | null | undefined;
321
321
  last_fetch?: Date | null | undefined;
322
322
  }>;
323
323
  type IntegrationInsert = z.infer<typeof IntegrationInsertSchema>;
@@ -373,37 +373,37 @@ declare const PostSchema: z.ZodObject<{
373
373
  project_ids: z.ZodArray<z.ZodString, "many">;
374
374
  corpus_version: z.ZodNullable<z.ZodString>;
375
375
  }, "strip", z.ZodTypeAny, {
376
- id: number;
377
- created_at: Date;
378
- updated_at: Date;
379
376
  title: string;
380
- tags: string[];
381
- uuid: string;
382
377
  content: string;
383
378
  format: "md" | "adoc";
379
+ created_at: Date;
380
+ id: number;
381
+ uuid: string;
384
382
  author_id: string;
385
383
  slug: string;
386
384
  corpus_version: string | null;
387
385
  category: string;
388
386
  archived: boolean;
389
387
  publish_at: Date | null;
388
+ updated_at: Date;
389
+ tags: string[];
390
390
  project_ids: string[];
391
391
  description?: string | undefined;
392
392
  }, {
393
- id: number;
394
- created_at: Date;
395
- updated_at: Date;
396
393
  title: string;
397
- tags: string[];
398
- uuid: string;
399
394
  content: string;
400
395
  format: "md" | "adoc";
396
+ created_at: Date;
397
+ id: number;
398
+ uuid: string;
401
399
  author_id: string;
402
400
  slug: string;
403
401
  corpus_version: string | null;
404
402
  category: string;
405
403
  archived: boolean;
406
404
  publish_at: Date | null;
405
+ updated_at: Date;
406
+ tags: string[];
407
407
  project_ids: string[];
408
408
  description?: string | undefined;
409
409
  }>;
@@ -420,11 +420,11 @@ declare const PostCreateSchema: z.ZodObject<{
420
420
  project_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
421
421
  }, "strip", z.ZodTypeAny, {
422
422
  title: string;
423
- tags: string[];
424
423
  content: string;
425
424
  format: "md" | "adoc";
426
425
  slug: string;
427
426
  category: string;
427
+ tags: string[];
428
428
  description?: string | undefined;
429
429
  publish_at?: Date | null | undefined;
430
430
  project_ids?: string[] | undefined;
@@ -433,10 +433,10 @@ declare const PostCreateSchema: z.ZodObject<{
433
433
  content: string;
434
434
  slug: string;
435
435
  description?: string | undefined;
436
- tags?: string[] | undefined;
437
436
  format?: "md" | "adoc" | undefined;
438
437
  category?: string | undefined;
439
438
  publish_at?: Date | null | undefined;
439
+ tags?: string[] | undefined;
440
440
  project_ids?: string[] | undefined;
441
441
  }>;
442
442
  type PostCreate = z.infer<typeof PostCreateSchema>;
@@ -452,26 +452,26 @@ declare const PostUpdateSchema: z.ZodObject<{
452
452
  publish_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
453
453
  project_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
454
454
  }, "strip", z.ZodTypeAny, {
455
- description?: string | undefined;
456
455
  title?: string | undefined;
457
- tags?: string[] | undefined;
458
456
  content?: string | undefined;
457
+ description?: string | undefined;
459
458
  format?: "md" | "adoc" | undefined;
460
459
  slug?: string | undefined;
461
460
  category?: string | undefined;
462
461
  archived?: boolean | undefined;
463
462
  publish_at?: Date | null | undefined;
463
+ tags?: string[] | undefined;
464
464
  project_ids?: string[] | undefined;
465
465
  }, {
466
- description?: string | undefined;
467
466
  title?: string | undefined;
468
- tags?: string[] | undefined;
469
467
  content?: string | undefined;
468
+ description?: string | undefined;
470
469
  format?: "md" | "adoc" | undefined;
471
470
  slug?: string | undefined;
472
471
  category?: string | undefined;
473
472
  archived?: boolean | undefined;
474
473
  publish_at?: Date | null | undefined;
474
+ tags?: string[] | undefined;
475
475
  project_ids?: string[] | undefined;
476
476
  }>;
477
477
  type PostUpdate = z.infer<typeof PostUpdateSchema>;
@@ -490,16 +490,16 @@ declare const PostListParamsSchema: z.ZodObject<{
490
490
  archived: boolean;
491
491
  limit: number;
492
492
  offset: number;
493
- project?: string | undefined;
494
- tag?: string | undefined;
495
493
  category?: string | undefined;
494
+ tag?: string | undefined;
495
+ project?: string | undefined;
496
496
  }, {
497
497
  status?: "all" | "draft" | "published" | "scheduled" | undefined;
498
498
  sort?: "published" | "created" | "updated" | undefined;
499
- project?: string | undefined;
500
- tag?: string | undefined;
501
499
  category?: string | undefined;
502
500
  archived?: boolean | undefined;
501
+ tag?: string | undefined;
502
+ project?: string | undefined;
503
503
  limit?: number | undefined;
504
504
  offset?: number | undefined;
505
505
  }>;
@@ -523,37 +523,37 @@ declare const PostsResponseSchema: z.ZodObject<{
523
523
  project_ids: z.ZodArray<z.ZodString, "many">;
524
524
  corpus_version: z.ZodNullable<z.ZodString>;
525
525
  }, "strip", z.ZodTypeAny, {
526
- id: number;
527
- created_at: Date;
528
- updated_at: Date;
529
526
  title: string;
530
- tags: string[];
531
- uuid: string;
532
527
  content: string;
533
528
  format: "md" | "adoc";
529
+ created_at: Date;
530
+ id: number;
531
+ uuid: string;
534
532
  author_id: string;
535
533
  slug: string;
536
534
  corpus_version: string | null;
537
535
  category: string;
538
536
  archived: boolean;
539
537
  publish_at: Date | null;
538
+ updated_at: Date;
539
+ tags: string[];
540
540
  project_ids: string[];
541
541
  description?: string | undefined;
542
542
  }, {
543
- id: number;
544
- created_at: Date;
545
- updated_at: Date;
546
543
  title: string;
547
- tags: string[];
548
- uuid: string;
549
544
  content: string;
550
545
  format: "md" | "adoc";
546
+ created_at: Date;
547
+ id: number;
548
+ uuid: string;
551
549
  author_id: string;
552
550
  slug: string;
553
551
  corpus_version: string | null;
554
552
  category: string;
555
553
  archived: boolean;
556
554
  publish_at: Date | null;
555
+ updated_at: Date;
556
+ tags: string[];
557
557
  project_ids: string[];
558
558
  description?: string | undefined;
559
559
  }>, "many">;
@@ -563,20 +563,20 @@ declare const PostsResponseSchema: z.ZodObject<{
563
563
  current_page: z.ZodNumber;
564
564
  }, "strip", z.ZodTypeAny, {
565
565
  posts: {
566
- id: number;
567
- created_at: Date;
568
- updated_at: Date;
569
566
  title: string;
570
- tags: string[];
571
- uuid: string;
572
567
  content: string;
573
568
  format: "md" | "adoc";
569
+ created_at: Date;
570
+ id: number;
571
+ uuid: string;
574
572
  author_id: string;
575
573
  slug: string;
576
574
  corpus_version: string | null;
577
575
  category: string;
578
576
  archived: boolean;
579
577
  publish_at: Date | null;
578
+ updated_at: Date;
579
+ tags: string[];
580
580
  project_ids: string[];
581
581
  description?: string | undefined;
582
582
  }[];
@@ -586,20 +586,20 @@ declare const PostsResponseSchema: z.ZodObject<{
586
586
  current_page: number;
587
587
  }, {
588
588
  posts: {
589
- id: number;
590
- created_at: Date;
591
- updated_at: Date;
592
589
  title: string;
593
- tags: string[];
594
- uuid: string;
595
590
  content: string;
596
591
  format: "md" | "adoc";
592
+ created_at: Date;
593
+ id: number;
594
+ uuid: string;
597
595
  author_id: string;
598
596
  slug: string;
599
597
  corpus_version: string | null;
600
598
  category: string;
601
599
  archived: boolean;
602
600
  publish_at: Date | null;
601
+ updated_at: Date;
602
+ tags: string[];
603
603
  project_ids: string[];
604
604
  description?: string | undefined;
605
605
  }[];
@@ -619,8 +619,8 @@ declare const CategoryCreateSchema: z.ZodObject<{
619
619
  name: z.ZodString;
620
620
  parent: z.ZodDefault<z.ZodString>;
621
621
  }, "strip", z.ZodTypeAny, {
622
- name: string;
623
622
  parent: string;
623
+ name: string;
624
624
  }, {
625
625
  name: string;
626
626
  parent?: string | undefined;