@devpad/api 2.2.11 → 2.2.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.
@@ -0,0 +1,261 @@
1
+ // ../schema/dist/blog/corpus.js
2
+ import { define_store, json_codec } from "@f0rbit/corpus";
3
+ import { z } from "zod";
4
+ var PostContentSchema = z.object({
5
+ title: z.string().min(1),
6
+ content: z.string(),
7
+ description: z.string().optional(),
8
+ format: z.enum(["md", "adoc"])
9
+ });
10
+ var postsStoreDefinition = define_store("posts", json_codec(PostContentSchema));
11
+ var postStoreId = (userId, postUuid) => `posts/${userId}/${postUuid}`;
12
+ var corpusPath = postStoreId;
13
+ var VersionInfoSchema = z.object({
14
+ hash: z.string(),
15
+ parent: z.string().nullable(),
16
+ created_at: z.date()
17
+ });
18
+ var hasCause = (value) => typeof value === "object" && value !== null && "cause" in value;
19
+ var mapCorpusError = (e) => {
20
+ if (e.kind === "not_found") {
21
+ return { kind: "not_found", path: e.store_id, version: e.version };
22
+ }
23
+ if (e.kind === "decode_error" || e.kind === "validation_error") {
24
+ return { kind: "invalid_content", message: e.cause.message };
25
+ }
26
+ if (e.kind === "storage_error") {
27
+ const drizzle_err = e.cause;
28
+ const underlying = hasCause(drizzle_err) ? drizzle_err.cause : void 0;
29
+ const message = underlying instanceof Error ? underlying.message : drizzle_err.message;
30
+ return { kind: "io_error", message };
31
+ }
32
+ return { kind: "io_error", message: "Unknown corpus error" };
33
+ };
34
+ var parsePostContent = PostContentSchema.parse.bind(PostContentSchema);
35
+ var serializePostContent = (content) => JSON.stringify(content);
36
+
37
+ // ../schema/dist/blog/corpus-shim.js
38
+ import { at, fetch_result, first, format_error, last, match, pipe, to_fallback, to_nullable, try_catch, try_catch_async, unwrap_or } from "@f0rbit/corpus";
39
+
40
+ // ../schema/dist/blog/types.js
41
+ import { z as z2 } from "zod";
42
+ import { at as at2, err, fetch_result as fetch_result2, first as first2, format_error as format_error2, last as last2, match as match2, ok, pipe as pipe2, to_fallback as to_fallback2, to_nullable as to_nullable2, try_catch as try_catch2, try_catch_async as try_catch_async2, unwrap_or as unwrap_or2 } from "@f0rbit/corpus";
43
+ var PostRowSchema = z2.object({
44
+ id: z2.number(),
45
+ uuid: z2.string(),
46
+ author_id: z2.string(),
47
+ slug: z2.string(),
48
+ corpus_version: z2.string().nullable(),
49
+ category: z2.string(),
50
+ archived: z2.boolean(),
51
+ publish_at: z2.coerce.date().nullable(),
52
+ created_at: z2.coerce.date(),
53
+ updated_at: z2.coerce.date()
54
+ });
55
+ var PostRowInsertSchema = z2.object({
56
+ id: z2.number().optional(),
57
+ uuid: z2.string(),
58
+ author_id: z2.string(),
59
+ slug: z2.string(),
60
+ corpus_version: z2.string().nullable().optional(),
61
+ category: z2.string().optional(),
62
+ archived: z2.boolean().optional(),
63
+ publish_at: z2.coerce.date().nullable().optional(),
64
+ created_at: z2.coerce.date().optional(),
65
+ updated_at: z2.coerce.date().optional()
66
+ });
67
+ var CategorySchema = z2.object({
68
+ id: z2.number(),
69
+ owner_id: z2.string(),
70
+ name: z2.string(),
71
+ parent: z2.string().nullable()
72
+ });
73
+ var CategoryInsertSchema = z2.object({
74
+ id: z2.number().optional(),
75
+ owner_id: z2.string(),
76
+ name: z2.string(),
77
+ parent: z2.string().nullable().optional()
78
+ });
79
+ var TagSchema = z2.object({
80
+ post_id: z2.number(),
81
+ tag: z2.string()
82
+ });
83
+ var TagInsertSchema = z2.object({
84
+ post_id: z2.number(),
85
+ tag: z2.string()
86
+ });
87
+ var AccessKeyRowSchema = z2.object({
88
+ id: z2.number(),
89
+ user_id: z2.string(),
90
+ key_hash: z2.string(),
91
+ name: z2.string(),
92
+ note: z2.string().nullable(),
93
+ enabled: z2.boolean(),
94
+ created_at: z2.coerce.date()
95
+ });
96
+ var AccessKeySchema = AccessKeyRowSchema.omit({ key_hash: true });
97
+ var AccessKeyInsertSchema = z2.object({
98
+ id: z2.number().optional(),
99
+ user_id: z2.string(),
100
+ key_hash: z2.string(),
101
+ name: z2.string(),
102
+ note: z2.string().nullable().optional(),
103
+ enabled: z2.boolean().optional(),
104
+ created_at: z2.coerce.date().optional()
105
+ });
106
+ var IntegrationSchema = z2.object({
107
+ id: z2.number(),
108
+ user_id: z2.string(),
109
+ source: z2.string(),
110
+ location: z2.string(),
111
+ data: z2.record(z2.unknown()).nullable(),
112
+ last_fetch: z2.coerce.date().nullable(),
113
+ status: z2.string().nullable(),
114
+ created_at: z2.coerce.date()
115
+ });
116
+ var IntegrationInsertSchema = z2.object({
117
+ id: z2.number().optional(),
118
+ user_id: z2.string(),
119
+ source: z2.string(),
120
+ location: z2.string(),
121
+ data: z2.record(z2.unknown()).nullable().optional(),
122
+ last_fetch: z2.coerce.date().nullable().optional(),
123
+ status: z2.string().nullable().optional(),
124
+ created_at: z2.coerce.date().optional()
125
+ });
126
+ var FetchLinkSchema = z2.object({
127
+ id: z2.number(),
128
+ post_id: z2.number(),
129
+ integration_id: z2.number(),
130
+ identifier: z2.string()
131
+ });
132
+ var FetchLinkInsertSchema = z2.object({
133
+ id: z2.number().optional(),
134
+ post_id: z2.number(),
135
+ integration_id: z2.number(),
136
+ identifier: z2.string()
137
+ });
138
+ var PostSchema = z2.object({
139
+ id: z2.number(),
140
+ uuid: z2.string().uuid(),
141
+ author_id: z2.string(),
142
+ slug: z2.string(),
143
+ title: z2.string(),
144
+ content: z2.string(),
145
+ description: z2.string().optional(),
146
+ format: z2.enum(["md", "adoc"]),
147
+ category: z2.string(),
148
+ tags: z2.array(z2.string()),
149
+ archived: z2.boolean(),
150
+ publish_at: z2.coerce.date().nullable(),
151
+ created_at: z2.coerce.date(),
152
+ updated_at: z2.coerce.date(),
153
+ project_ids: z2.array(z2.string()),
154
+ corpus_version: z2.string().nullable()
155
+ });
156
+ var SlugPattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
157
+ var PostCreateSchema = z2.object({
158
+ slug: z2.string().regex(SlugPattern, "Slug must be lowercase alphanumeric with hyphens"),
159
+ title: z2.string().min(1),
160
+ content: z2.string(),
161
+ description: z2.string().optional(),
162
+ format: z2.enum(["md", "adoc"]).default("md"),
163
+ category: z2.string().default("root"),
164
+ tags: z2.array(z2.string()).default([]),
165
+ publish_at: z2.coerce.date().nullable().optional(),
166
+ project_ids: z2.array(z2.string()).optional()
167
+ });
168
+ var PostUpdateSchema = z2.object({
169
+ slug: z2.string().regex(SlugPattern, "Slug must be lowercase alphanumeric with hyphens").optional(),
170
+ title: z2.string().min(1).optional(),
171
+ content: z2.string().optional(),
172
+ description: z2.string().optional(),
173
+ format: z2.enum(["md", "adoc"]).optional(),
174
+ category: z2.string().optional(),
175
+ tags: z2.array(z2.string()).optional(),
176
+ archived: z2.boolean().optional(),
177
+ publish_at: z2.coerce.date().nullable().optional(),
178
+ project_ids: z2.array(z2.string()).optional()
179
+ });
180
+ var PostListParamsSchema = z2.object({
181
+ category: z2.string().optional(),
182
+ tag: z2.string().optional(),
183
+ project: z2.string().optional(),
184
+ status: z2.enum(["published", "scheduled", "draft", "all"]).default("all"),
185
+ archived: z2.boolean().default(false),
186
+ limit: z2.coerce.number().min(1).max(100).default(10),
187
+ offset: z2.coerce.number().min(0).default(0),
188
+ sort: z2.enum(["created", "updated", "published"]).default("updated")
189
+ });
190
+ var PostsResponseSchema = z2.object({
191
+ posts: z2.array(PostSchema),
192
+ total_posts: z2.number(),
193
+ total_pages: z2.number(),
194
+ per_page: z2.number(),
195
+ current_page: z2.number()
196
+ });
197
+ var isPublished = (post) => post.publish_at !== null && post.publish_at <= /* @__PURE__ */ new Date();
198
+ var isScheduled = (post) => post.publish_at !== null && post.publish_at > /* @__PURE__ */ new Date();
199
+ var isDraft = (post) => post.publish_at === null;
200
+ var postStatus = (post) => {
201
+ if (isDraft(post))
202
+ return "draft";
203
+ if (isScheduled(post))
204
+ return "scheduled";
205
+ return "published";
206
+ };
207
+ var CategoryCreateSchema = z2.object({
208
+ name: z2.string().min(1),
209
+ parent: z2.string().default("root")
210
+ });
211
+ var AccessKeyCreateSchema = z2.object({
212
+ name: z2.string().min(1),
213
+ note: z2.string().optional()
214
+ });
215
+ var AccessKeyUpdateSchema = z2.object({
216
+ name: z2.string().min(1).optional(),
217
+ note: z2.string().optional(),
218
+ enabled: z2.boolean().optional()
219
+ });
220
+ var IntegrationUpsertSchema = z2.object({
221
+ source: z2.string().min(1),
222
+ location: z2.string().min(1),
223
+ data: z2.record(z2.unknown()).optional()
224
+ });
225
+
226
+ export {
227
+ PostContentSchema,
228
+ postsStoreDefinition,
229
+ postStoreId,
230
+ corpusPath,
231
+ VersionInfoSchema,
232
+ mapCorpusError,
233
+ parsePostContent,
234
+ serializePostContent,
235
+ PostRowSchema,
236
+ PostRowInsertSchema,
237
+ CategorySchema,
238
+ CategoryInsertSchema,
239
+ TagSchema,
240
+ TagInsertSchema,
241
+ AccessKeyRowSchema,
242
+ AccessKeySchema,
243
+ AccessKeyInsertSchema,
244
+ IntegrationSchema,
245
+ IntegrationInsertSchema,
246
+ FetchLinkSchema,
247
+ FetchLinkInsertSchema,
248
+ PostSchema,
249
+ PostCreateSchema,
250
+ PostUpdateSchema,
251
+ PostListParamsSchema,
252
+ PostsResponseSchema,
253
+ isPublished,
254
+ isScheduled,
255
+ isDraft,
256
+ postStatus,
257
+ CategoryCreateSchema,
258
+ AccessKeyCreateSchema,
259
+ AccessKeyUpdateSchema,
260
+ IntegrationUpsertSchema
261
+ };
@@ -189,16 +189,12 @@ var tag = sqliteTable("tag", {
189
189
  title: text("title").notNull(),
190
190
  color: text("color"),
191
191
  render: int("render", { mode: "boolean" }).notNull().default(true)
192
- }, (table) => ({
193
- tag_unique: unique("tag_unique").on(table.owner_id, table.title)
194
- }));
192
+ }, (table) => [unique("tag_unique").on(table.owner_id, table.title)]);
195
193
  var task_tag = sqliteTable("task_tag", {
196
194
  task_id: text("task_id").notNull().references(() => task.id),
197
195
  tag_id: text("tag_id").notNull().references(() => tag.id),
198
196
  ...timestamps()
199
- }, (table) => ({
200
- task_tag_unique: primaryKey({ columns: [table.task_id, table.tag_id] })
201
- }));
197
+ }, (table) => [primaryKey({ columns: [table.task_id, table.tag_id] })]);
202
198
  var commit_detail = sqliteTable("commit_detail", {
203
199
  sha: text("sha").primaryKey(),
204
200
  message: text("message").notNull(),
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { G as PostListParams, T as PostsResponse, x as Post, D as PostCreate, Q as PostUpdate, Z as VersionInfo, y as PostContent, C as Category, k as CategoryCreate, A as AccessKey } from './types.d-B3vp62jJ.js';
2
2
  import { ai as Profile, u as CreateProfileInput, aw as UpdateProfileInput, aj as ProfileFilter, c as AddFilterInput, aq as Timeline, A as Account, ae as PlatformSettings } from './types.d-BcKx3ryl.js';
3
- import { a as ApiKey, l as Project, Z as UpsertProject, G as GetConfigResult, S as SaveConfigRequest, M as Milestone, d as Goal, z as TaskWithDetails, $ as UpsertTodo, _ as UpsertTag, H as HistoryAction, v as TagWithTypedColor, D as DashboardResponse, j as PipelineRun, k as PipelineStageEvent, g as PipelineGrant, i as PipelinePackage, P as PipelineAnalysisTemplate, h as PipelineOidcTrust } from './types.d-BvfRohlZ.js';
4
- export { m as ProjectConfig, w as Task } from './types.d-BvfRohlZ.js';
3
+ import { a as ApiKey, l as Project, Z as UpsertProject, G as GetConfigResult, S as SaveConfigRequest, B as TodoUpdate, H as HistoryAction, M as Milestone, d as Goal, z as TaskWithDetails, $ as UpsertTodo, _ as UpsertTag, v as TagWithTypedColor, D as DashboardResponse, j as PipelineRun, k as PipelineStageEvent, g as PipelineGrant, i as PipelinePackage, P as PipelineAnalysisTemplate, h as PipelineOidcTrust } from './types.d-yIorr_SU.js';
4
+ export { m as ProjectConfig, w as Task } from './types.d-yIorr_SU.js';
5
5
  import { Result } from '@f0rbit/corpus';
6
6
  export { Result, err, ok } from '@f0rbit/corpus';
7
7
  import { S as StageEventKind } from './schema.d-BeVFWenc.js';
@@ -65,6 +65,43 @@ type AccessKeyUpdate = {
65
65
  note?: string;
66
66
  enabled?: boolean;
67
67
  };
68
+ type SessionUser = {
69
+ id: string;
70
+ name: string | null;
71
+ email?: string | null;
72
+ github_id: number | null;
73
+ image_url?: string | null;
74
+ task_view: "list" | "grid";
75
+ };
76
+ type SessionInfo = {
77
+ id: string;
78
+ };
79
+ type ScanStatusUpdate = {
80
+ id: number;
81
+ actions: Record<string, string[]>;
82
+ titles: Record<string, string>;
83
+ approved: boolean;
84
+ };
85
+ type GithubRepo = {
86
+ name: string;
87
+ full_name: string;
88
+ private: boolean;
89
+ default_branch: string;
90
+ };
91
+ type GithubBranch = {
92
+ name: string;
93
+ commit: {
94
+ sha: string;
95
+ message?: string;
96
+ };
97
+ };
98
+ type MediaGithubRepo = {
99
+ full_name: string;
100
+ name: string;
101
+ owner: string;
102
+ is_private: boolean;
103
+ pushed_at: string | null;
104
+ };
68
105
  /**
69
106
  * Authentication mode for the API client
70
107
  */
@@ -75,8 +112,8 @@ type AuthMode = "session" | "key" | "cookie";
75
112
  */
76
113
  declare class ApiClient {
77
114
  private readonly clients;
78
- private _api_key;
79
- private _auth_mode;
115
+ private readonly api_key_field;
116
+ private readonly auth_mode_field;
80
117
  constructor(options: {
81
118
  base_url?: string;
82
119
  api_key?: string;
@@ -92,8 +129,8 @@ declare class ApiClient {
92
129
  readonly auth: {
93
130
  session: () => Promise<ApiResult<{
94
131
  authenticated: boolean;
95
- user: any;
96
- session: any;
132
+ user: SessionUser | null;
133
+ session: SessionInfo | null;
97
134
  scope?: string;
98
135
  }>>;
99
136
  keys: {
@@ -178,16 +215,16 @@ declare class ApiClient {
178
215
  /**
179
216
  * Get pending scan updates for a project
180
217
  */
181
- updates: (project_id: string) => Promise<ApiResult<any[]>>;
218
+ updates: (project_id: string) => Promise<ApiResult<TodoUpdate[]>>;
182
219
  /**
183
220
  * Process scan results
184
221
  */
185
- update: (project_id: string, data: any) => Promise<ApiResult<void>>;
222
+ update: (project_id: string, data: ScanStatusUpdate) => Promise<ApiResult<void>>;
186
223
  };
187
224
  /**
188
225
  * Get project history
189
226
  */
190
- history: (project_id: string) => Promise<ApiResult<any[]>>;
227
+ history: (project_id: string) => Promise<ApiResult<HistoryAction[]>>;
191
228
  /**
192
229
  * Legacy methods (keeping for compatibility)
193
230
  */
@@ -223,19 +260,19 @@ declare class ApiClient {
223
260
  create: (data: {
224
261
  project_id: string;
225
262
  name: string;
226
- description?: string;
227
- target_time?: string;
228
- target_version?: string;
229
- finished_at?: string;
263
+ description?: string | null;
264
+ target_time?: string | null;
265
+ target_version?: string | null;
266
+ finished_at?: string | null;
230
267
  }) => Promise<ApiResult<Milestone>>;
231
268
  /**
232
269
  * Update milestone
233
270
  */
234
271
  update: (id: string, data: {
235
272
  name?: string;
236
- description?: string;
237
- target_time?: string;
238
- target_version?: string;
273
+ description?: string | null;
274
+ target_time?: string | null;
275
+ target_version?: string | null;
239
276
  finished_at?: string | null;
240
277
  }) => Promise<ApiResult<Milestone>>;
241
278
  /**
@@ -268,17 +305,17 @@ declare class ApiClient {
268
305
  create: (data: {
269
306
  milestone_id: string;
270
307
  name: string;
271
- description?: string;
272
- target_time?: string;
273
- finished_at?: string;
308
+ description?: string | null;
309
+ target_time?: string | null;
310
+ finished_at?: string | null;
274
311
  }) => Promise<ApiResult<Goal>>;
275
312
  /**
276
313
  * Update goal
277
314
  */
278
315
  update: (id: string, data: {
279
316
  name?: string;
280
- description?: string;
281
- target_time?: string;
317
+ description?: string | null;
318
+ target_time?: string | null;
282
319
  finished_at?: string | null;
283
320
  }) => Promise<ApiResult<Goal>>;
284
321
  /**
@@ -329,7 +366,7 @@ declare class ApiClient {
329
366
  /**
330
367
  * Save tags for tasks
331
368
  */
332
- saveTags: (data: any) => Promise<ApiResult<void>>;
369
+ saveTags: (data: UpsertTag[]) => Promise<ApiResult<void>>;
333
370
  /**
334
371
  * Delete task (soft delete)
335
372
  */
@@ -360,11 +397,11 @@ declare class ApiClient {
360
397
  /**
361
398
  * List repositories for authenticated user
362
399
  */
363
- repos: () => Promise<ApiResult<any[]>>;
400
+ repos: () => Promise<ApiResult<GithubRepo[]>>;
364
401
  /**
365
402
  * List branches for a GitHub repository
366
403
  */
367
- branches: (owner: string, repo: string) => Promise<ApiResult<any[]>>;
404
+ branches: (owner: string, repo: string) => Promise<ApiResult<GithubBranch[]>>;
368
405
  };
369
406
  readonly blog: {
370
407
  posts: {
@@ -450,15 +487,17 @@ declare class ApiClient {
450
487
  delete: (account_id: string) => Promise<ApiResult<{
451
488
  success: boolean;
452
489
  }>>;
453
- refresh: (account_id: string) => Promise<ApiResult<any>>;
454
- refreshAll: () => Promise<ApiResult<any>>;
490
+ refresh: (account_id: string) => Promise<ApiResult<unknown>>;
491
+ refreshAll: () => Promise<ApiResult<unknown>>;
455
492
  updateStatus: (account_id: string, is_active: boolean) => Promise<ApiResult<Account>>;
456
493
  settings: {
457
494
  get: (account_id: string) => Promise<ApiResult<PlatformSettings>>;
458
- update: (account_id: string, settings: Record<string, unknown>) => Promise<ApiResult<any>>;
495
+ update: (account_id: string, settings: Record<string, unknown>) => Promise<ApiResult<{
496
+ updated: boolean;
497
+ }>>;
459
498
  };
460
- repos: (account_id: string) => Promise<ApiResult<any[]>>;
461
- subreddits: (account_id: string) => Promise<ApiResult<any[]>>;
499
+ repos: (account_id: string) => Promise<ApiResult<MediaGithubRepo[]>>;
500
+ subreddits: (account_id: string) => Promise<ApiResult<string[]>>;
462
501
  };
463
502
  credentials: {
464
503
  check: (platform: string, profile_id: string) => Promise<ApiResult<{
@@ -485,7 +524,7 @@ declare class ApiClient {
485
524
  from?: string;
486
525
  to?: string;
487
526
  }) => Promise<ApiResult<Timeline>>;
488
- getRaw: (user_id: string, platform: string, account_id: string) => Promise<ApiResult<any>>;
527
+ getRaw: (user_id: string, platform: string, account_id: string) => Promise<ApiResult<unknown>>;
489
528
  };
490
529
  };
491
530
  /**
@@ -496,21 +535,25 @@ declare class ApiClient {
496
535
  limit?: number;
497
536
  since?: string;
498
537
  }) => Promise<ApiResult<{
499
- sessions: any[];
538
+ sessions: unknown[];
500
539
  }>>;
501
540
  };
502
541
  readonly user: {
503
542
  /**
504
543
  * Get user activity history
505
544
  */
506
- history: () => Promise<ApiResult<any[]>>;
545
+ history: () => Promise<ApiResult<HistoryAction[]>>;
507
546
  /**
508
547
  * Update user preferences
509
548
  */
510
549
  preferences: (data: {
511
550
  id: string;
512
551
  task_view: string;
513
- }) => Promise<ApiResult<any>>;
552
+ }) => Promise<ApiResult<{
553
+ id: string;
554
+ name: string | null;
555
+ task_view: string;
556
+ }>>;
514
557
  };
515
558
  /**
516
559
  * Get request history for debugging
@@ -529,7 +572,7 @@ declare class ApiClient {
529
572
  from: number;
530
573
  to: number;
531
574
  };
532
- }) => Promise<ApiResult<any>>;
575
+ }) => Promise<ApiResult<unknown>>;
533
576
  /**
534
577
  * List events for a project
535
578
  */
@@ -542,7 +585,7 @@ declare class ApiClient {
542
585
  search?: string;
543
586
  limit?: number;
544
587
  cursor?: string;
545
- }) => Promise<ApiResult<any>>;
588
+ }) => Promise<ApiResult<unknown>>;
546
589
  /**
547
590
  * List error issues for a project
548
591
  */
@@ -553,7 +596,7 @@ declare class ApiClient {
553
596
  to: number;
554
597
  };
555
598
  group_by_fingerprint?: boolean;
556
- }) => Promise<ApiResult<any>>;
599
+ }) => Promise<ApiResult<unknown>>;
557
600
  /**
558
601
  * List logs for a project
559
602
  */
@@ -565,7 +608,7 @@ declare class ApiClient {
565
608
  };
566
609
  level?: string;
567
610
  search?: string;
568
- }) => Promise<ApiResult<any>>;
611
+ }) => Promise<ApiResult<unknown>>;
569
612
  /**
570
613
  * Get latency metrics for a project
571
614
  */
@@ -577,7 +620,7 @@ declare class ApiClient {
577
620
  };
578
621
  route?: string;
579
622
  percentiles?: number[];
580
- }) => Promise<ApiResult<any>>;
623
+ }) => Promise<ApiResult<unknown>>;
581
624
  /**
582
625
  * Subscription management
583
626
  */
@@ -587,15 +630,15 @@ declare class ApiClient {
587
630
  */
588
631
  list: (input: {
589
632
  project_id: string;
590
- }) => Promise<ApiResult<any[]>>;
633
+ }) => Promise<ApiResult<unknown[]>>;
591
634
  /**
592
635
  * Create a subscription
593
636
  */
594
637
  create: (input: {
595
638
  project_id: string;
596
639
  name: string;
597
- filter: any;
598
- channel: any;
640
+ filter: Record<string, unknown>;
641
+ channel: Record<string, unknown>;
599
642
  cooldown_seconds?: number;
600
643
  }) => Promise<ApiResult<{
601
644
  id: string;
@@ -603,16 +646,16 @@ declare class ApiClient {
603
646
  /**
604
647
  * Get a subscription by ID
605
648
  */
606
- get: (id: string) => Promise<ApiResult<any>>;
649
+ get: (id: string) => Promise<ApiResult<unknown>>;
607
650
  /**
608
651
  * Update a subscription
609
652
  */
610
653
  update: (id: string, patch: Partial<{
611
654
  name: string;
612
- filter: any;
613
- channel: any;
655
+ filter: Record<string, unknown>;
656
+ channel: Record<string, unknown>;
614
657
  cooldown_seconds: number;
615
- }>) => Promise<ApiResult<any>>;
658
+ }>) => Promise<ApiResult<unknown>>;
616
659
  /**
617
660
  * Delete a subscription
618
661
  */
@@ -629,7 +672,7 @@ declare class ApiClient {
629
672
  */
630
673
  list: (input: {
631
674
  project_id: string;
632
- }) => Promise<ApiResult<any[]>>;
675
+ }) => Promise<ApiResult<unknown[]>>;
633
676
  /**
634
677
  * Create a new ingest key (returns plaintext only once)
635
678
  */
@@ -969,11 +1012,11 @@ declare function parseZodErrors(errorMessage: string): string;
969
1012
  */
970
1013
  declare function getUserFriendlyErrorMessage(error: unknown): string;
971
1014
 
972
- interface ToolDefinition<TInput = any, TOutput = any> {
1015
+ interface ToolDefinition {
973
1016
  name: string;
974
1017
  description: string;
975
- inputSchema: z.ZodType<TInput>;
976
- execute: (client: ApiClient, input: TInput) => Promise<TOutput>;
1018
+ inputSchema: z.ZodTypeAny;
1019
+ execute: (client: ApiClient, input: unknown) => Promise<unknown>;
977
1020
  }
978
1021
  declare const tools: Record<string, ToolDefinition>;
979
1022
  declare const toolNames: string[];