@rainfall-devkit/sdk 0.1.3 → 0.1.4

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,818 @@
1
+ /**
2
+ * Core types for the Rainfall SDK
3
+ */
4
+ interface RainfallConfig {
5
+ apiKey: string;
6
+ baseUrl?: string;
7
+ timeout?: number;
8
+ retries?: number;
9
+ retryDelay?: number;
10
+ }
11
+ interface RequestOptions {
12
+ timeout?: number;
13
+ retries?: number;
14
+ retryDelay?: number;
15
+ }
16
+ interface ApiResponse<T = unknown> {
17
+ success: boolean;
18
+ data?: T;
19
+ error?: ApiError;
20
+ }
21
+ interface ApiError {
22
+ code: string;
23
+ message: string;
24
+ details?: Record<string, unknown>;
25
+ }
26
+ interface RateLimitInfo {
27
+ limit: number;
28
+ remaining: number;
29
+ resetAt: Date;
30
+ }
31
+ interface ToolSchema {
32
+ name: string;
33
+ description: string;
34
+ category: string;
35
+ parameters: unknown;
36
+ output: unknown;
37
+ metadata: Record<string, unknown>;
38
+ }
39
+ declare namespace Integrations {
40
+ interface GitHub {
41
+ issues: {
42
+ create(params: {
43
+ owner: string;
44
+ repo: string;
45
+ title: string;
46
+ body?: string;
47
+ }): Promise<unknown>;
48
+ list(params: {
49
+ owner: string;
50
+ repo: string;
51
+ state?: 'open' | 'closed' | 'all';
52
+ }): Promise<unknown>;
53
+ get(params: {
54
+ owner: string;
55
+ repo: string;
56
+ issue_number: number;
57
+ }): Promise<unknown>;
58
+ update(params: {
59
+ owner: string;
60
+ repo: string;
61
+ issue_number: number;
62
+ title?: string;
63
+ body?: string;
64
+ state?: 'open' | 'closed';
65
+ }): Promise<unknown>;
66
+ addComment(params: {
67
+ owner: string;
68
+ repo: string;
69
+ issue_number: number;
70
+ body: string;
71
+ }): Promise<unknown>;
72
+ };
73
+ repos: {
74
+ get(params: {
75
+ owner: string;
76
+ repo: string;
77
+ }): Promise<unknown>;
78
+ listBranches(params: {
79
+ owner: string;
80
+ repo: string;
81
+ }): Promise<unknown>;
82
+ };
83
+ pullRequests: {
84
+ list(params: {
85
+ owner: string;
86
+ repo: string;
87
+ state?: 'open' | 'closed' | 'all';
88
+ }): Promise<unknown>;
89
+ get(params: {
90
+ owner: string;
91
+ repo: string;
92
+ pullNumber: number;
93
+ }): Promise<unknown>;
94
+ };
95
+ }
96
+ interface Notion {
97
+ pages: {
98
+ create(params: {
99
+ parent: unknown;
100
+ properties: unknown;
101
+ children?: unknown[];
102
+ }): Promise<unknown>;
103
+ retrieve(params: {
104
+ pageId: string;
105
+ }): Promise<unknown>;
106
+ update(params: {
107
+ pageId: string;
108
+ properties: unknown;
109
+ }): Promise<unknown>;
110
+ };
111
+ databases: {
112
+ query(params: {
113
+ databaseId: string;
114
+ filter?: unknown;
115
+ sorts?: unknown[];
116
+ }): Promise<unknown>;
117
+ retrieve(params: {
118
+ databaseId: string;
119
+ }): Promise<unknown>;
120
+ };
121
+ blocks: {
122
+ appendChildren(params: {
123
+ blockId: string;
124
+ children: unknown[];
125
+ }): Promise<unknown>;
126
+ retrieveChildren(params: {
127
+ blockId: string;
128
+ }): Promise<unknown>;
129
+ };
130
+ }
131
+ interface Linear {
132
+ issues: {
133
+ create(params: {
134
+ title: string;
135
+ description?: string;
136
+ teamId?: string;
137
+ assigneeId?: string;
138
+ priority?: number;
139
+ labels?: string[];
140
+ }): Promise<unknown>;
141
+ list(params?: {
142
+ filter?: unknown;
143
+ orderBy?: string;
144
+ }): Promise<unknown>;
145
+ get(params: {
146
+ issueId: string;
147
+ }): Promise<unknown>;
148
+ update(params: {
149
+ issueId: string;
150
+ title?: string;
151
+ description?: string;
152
+ state?: string;
153
+ }): Promise<unknown>;
154
+ archive(params: {
155
+ issueId: string;
156
+ }): Promise<unknown>;
157
+ };
158
+ teams: {
159
+ list(): Promise<unknown>;
160
+ };
161
+ }
162
+ interface Slack {
163
+ messages: {
164
+ send(params: {
165
+ channelId: string;
166
+ text: string;
167
+ blocks?: unknown[];
168
+ }): Promise<unknown>;
169
+ list(params: {
170
+ channelId: string;
171
+ limit?: number;
172
+ }): Promise<unknown>;
173
+ };
174
+ channels: {
175
+ list(): Promise<unknown>;
176
+ };
177
+ users: {
178
+ list(): Promise<unknown>;
179
+ };
180
+ reactions: {
181
+ add(params: {
182
+ channelId: string;
183
+ timestamp: string;
184
+ reaction: string;
185
+ }): Promise<unknown>;
186
+ };
187
+ }
188
+ interface Figma {
189
+ files: {
190
+ get(params: {
191
+ fileKey: string;
192
+ }): Promise<unknown>;
193
+ getNodes(params: {
194
+ fileKey: string;
195
+ nodeIds: string[];
196
+ }): Promise<unknown>;
197
+ getImages(params: {
198
+ fileKey: string;
199
+ nodeIds: string[];
200
+ format?: 'png' | 'svg' | 'pdf';
201
+ }): Promise<unknown>;
202
+ getComments(params: {
203
+ fileKey: string;
204
+ }): Promise<unknown>;
205
+ postComment(params: {
206
+ fileKey: string;
207
+ message: string;
208
+ nodeId?: string;
209
+ }): Promise<unknown>;
210
+ };
211
+ projects: {
212
+ list(params: {
213
+ teamId: string;
214
+ }): Promise<unknown>;
215
+ getFiles(params: {
216
+ projectId: string;
217
+ }): Promise<unknown>;
218
+ };
219
+ }
220
+ interface Stripe {
221
+ customers: {
222
+ create(params: {
223
+ email: string;
224
+ name?: string;
225
+ metadata?: Record<string, string>;
226
+ }): Promise<unknown>;
227
+ retrieve(params: {
228
+ customerId: string;
229
+ }): Promise<unknown>;
230
+ update(params: {
231
+ customerId: string;
232
+ metadata?: Record<string, string>;
233
+ }): Promise<unknown>;
234
+ listPaymentMethods(params: {
235
+ customerId: string;
236
+ }): Promise<unknown>;
237
+ };
238
+ paymentIntents: {
239
+ create(params: {
240
+ amount: number;
241
+ currency: string;
242
+ customer?: string;
243
+ }): Promise<unknown>;
244
+ retrieve(params: {
245
+ paymentIntentId: string;
246
+ }): Promise<unknown>;
247
+ confirm(params: {
248
+ paymentIntentId: string;
249
+ }): Promise<unknown>;
250
+ };
251
+ subscriptions: {
252
+ create(params: {
253
+ customer: string;
254
+ items: unknown[];
255
+ }): Promise<unknown>;
256
+ retrieve(params: {
257
+ subscriptionId: string;
258
+ }): Promise<unknown>;
259
+ cancel(params: {
260
+ subscriptionId: string;
261
+ }): Promise<unknown>;
262
+ };
263
+ }
264
+ }
265
+ declare namespace Memory {
266
+ interface MemoryClient {
267
+ create(params: {
268
+ content: string;
269
+ keywords?: string[];
270
+ metadata?: Record<string, unknown>;
271
+ }): Promise<unknown>;
272
+ get(params: {
273
+ memoryId: string;
274
+ }): Promise<unknown>;
275
+ recall(params: {
276
+ query: string;
277
+ topK?: number;
278
+ threshold?: number;
279
+ }): Promise<unknown>;
280
+ list(params?: {
281
+ limit?: number;
282
+ offset?: number;
283
+ }): Promise<unknown>;
284
+ update(params: {
285
+ memoryId: string;
286
+ content?: string;
287
+ metadata?: Record<string, unknown>;
288
+ }): Promise<unknown>;
289
+ delete(params: {
290
+ memoryId: string;
291
+ }): Promise<unknown>;
292
+ }
293
+ }
294
+ declare namespace Articles {
295
+ interface ArticlesClient {
296
+ search(params: {
297
+ query: string;
298
+ limit?: number;
299
+ }): Promise<unknown>;
300
+ create(params: {
301
+ title: string;
302
+ content: string;
303
+ topics?: string[];
304
+ metadata?: Record<string, unknown>;
305
+ }): Promise<unknown>;
306
+ createFromUrl(params: {
307
+ url: string;
308
+ }): Promise<unknown>;
309
+ fetch(params: {
310
+ articleId: string;
311
+ }): Promise<unknown>;
312
+ recent(params?: {
313
+ limit?: number;
314
+ }): Promise<unknown>;
315
+ relevant(params: {
316
+ query: string;
317
+ limit?: number;
318
+ }): Promise<unknown>;
319
+ summarize(params: {
320
+ articleId?: string;
321
+ text?: string;
322
+ length?: 'short' | 'medium' | 'long';
323
+ }): Promise<unknown>;
324
+ extractTopics(params: {
325
+ text: string;
326
+ }): Promise<unknown>;
327
+ }
328
+ }
329
+ declare namespace Web {
330
+ interface WebClient {
331
+ search: {
332
+ exa(params: {
333
+ query: string;
334
+ numResults?: number;
335
+ includeDomains?: string[];
336
+ excludeDomains?: string[];
337
+ }): Promise<unknown>;
338
+ perplexity(params: {
339
+ query: string;
340
+ }): Promise<unknown>;
341
+ };
342
+ fetch(params: {
343
+ url: string;
344
+ headers?: Record<string, string>;
345
+ }): Promise<unknown>;
346
+ htmlToMarkdown(params: {
347
+ html: string;
348
+ baseUrl?: string;
349
+ }): Promise<unknown>;
350
+ extractHtml(params: {
351
+ html: string;
352
+ selector: string;
353
+ }): Promise<unknown>;
354
+ }
355
+ }
356
+ declare namespace AI {
357
+ interface AIClient {
358
+ embeddings: {
359
+ document(params: {
360
+ text: string;
361
+ }): Promise<unknown>;
362
+ query(params: {
363
+ text: string;
364
+ }): Promise<unknown>;
365
+ image(params: {
366
+ imageBase64: string;
367
+ }): Promise<unknown>;
368
+ };
369
+ image: {
370
+ generate(params: {
371
+ prompt: string;
372
+ size?: '256x256' | '512x512' | '1024x1024';
373
+ }): Promise<unknown>;
374
+ };
375
+ ocr(params: {
376
+ imageBase64: string;
377
+ }): Promise<unknown>;
378
+ vision(params: {
379
+ imageBase64: string;
380
+ prompt?: string;
381
+ }): Promise<unknown>;
382
+ chat(params: {
383
+ messages: Array<{
384
+ role: 'user' | 'assistant' | 'system';
385
+ content: string;
386
+ }>;
387
+ model?: string;
388
+ }): Promise<unknown>;
389
+ complete(params: {
390
+ prompt: string;
391
+ suffix?: string;
392
+ }): Promise<unknown>;
393
+ classify(params: {
394
+ text: string;
395
+ labels: string[];
396
+ }): Promise<unknown>;
397
+ segment(params: {
398
+ text: string;
399
+ maxLength?: number;
400
+ }): Promise<unknown[]>;
401
+ }
402
+ }
403
+ declare namespace Data {
404
+ interface DataClient {
405
+ csv: {
406
+ query(params: {
407
+ sql: string;
408
+ csvData?: string;
409
+ fileId?: string;
410
+ }): Promise<unknown>;
411
+ convert(params: {
412
+ data: string;
413
+ fromFormat: string;
414
+ toFormat: string;
415
+ }): Promise<unknown>;
416
+ };
417
+ scripts: {
418
+ create(params: {
419
+ name: string;
420
+ code: string;
421
+ language?: string;
422
+ }): Promise<unknown>;
423
+ execute(params: {
424
+ name: string;
425
+ params?: Record<string, unknown>;
426
+ }): Promise<unknown>;
427
+ list(): Promise<unknown>;
428
+ update(params: {
429
+ name: string;
430
+ code: string;
431
+ }): Promise<unknown>;
432
+ delete(params: {
433
+ name: string;
434
+ }): Promise<unknown>;
435
+ };
436
+ similarity: {
437
+ search(params: {
438
+ query: number[];
439
+ embeddings: number[][];
440
+ topK?: number;
441
+ }): Promise<unknown>;
442
+ duckDbSearch(params: {
443
+ query: number[];
444
+ tableName: string;
445
+ }): Promise<unknown>;
446
+ };
447
+ }
448
+ }
449
+ declare namespace Utils {
450
+ interface UtilsClient {
451
+ mermaid(params: {
452
+ diagram: string;
453
+ }): Promise<unknown>;
454
+ documentConvert(params: {
455
+ document: string;
456
+ mimeType: string;
457
+ format: string;
458
+ }): Promise<unknown>;
459
+ regex: {
460
+ match(params: {
461
+ text: string;
462
+ pattern: string;
463
+ flags?: string;
464
+ }): Promise<unknown>;
465
+ replace(params: {
466
+ text: string;
467
+ pattern: string;
468
+ replacement: string;
469
+ flags?: string;
470
+ }): Promise<unknown>;
471
+ };
472
+ jsonExtract(params: {
473
+ text: string;
474
+ }): Promise<unknown>;
475
+ digest(params: {
476
+ data: string;
477
+ }): Promise<string>;
478
+ monteCarlo(params: {
479
+ iterations?: number;
480
+ formula: string;
481
+ variables?: Record<string, {
482
+ mean: number;
483
+ stdDev: number;
484
+ }>;
485
+ }): Promise<unknown>;
486
+ }
487
+ }
488
+
489
+ /**
490
+ * Core HTTP client for Rainfall SDK
491
+ */
492
+
493
+ declare class RainfallClient {
494
+ private readonly apiKey;
495
+ private readonly baseUrl;
496
+ private readonly defaultTimeout;
497
+ private readonly defaultRetries;
498
+ private readonly defaultRetryDelay;
499
+ private lastRateLimitInfo?;
500
+ private subscriberId?;
501
+ constructor(config: RainfallConfig);
502
+ /**
503
+ * Get the last rate limit info from the API
504
+ */
505
+ getRateLimitInfo(): RateLimitInfo | undefined;
506
+ /**
507
+ * Make an authenticated request to the Rainfall API
508
+ */
509
+ request<T = unknown>(path: string, options?: {
510
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
511
+ body?: unknown;
512
+ headers?: Record<string, string>;
513
+ }, requestOptions?: RequestOptions): Promise<T>;
514
+ /**
515
+ * Execute a tool/node by ID
516
+ */
517
+ executeTool<T = unknown>(toolId: string, params?: Record<string, unknown>, options?: RequestOptions): Promise<T>;
518
+ /**
519
+ * List all available tools
520
+ */
521
+ listTools(): Promise<Array<{
522
+ id: string;
523
+ name: string;
524
+ description: string;
525
+ category: string;
526
+ }>>;
527
+ /**
528
+ * Get tool schema/parameters
529
+ */
530
+ getToolSchema(toolId: string): Promise<ToolSchema>;
531
+ /**
532
+ * Get subscriber info
533
+ */
534
+ getMe(): Promise<{
535
+ id: string;
536
+ name: string;
537
+ email?: string;
538
+ plan?: string;
539
+ billingStatus?: string;
540
+ usage: {
541
+ callsThisMonth: number;
542
+ callsLimit: number;
543
+ };
544
+ }>;
545
+ /**
546
+ * Ensure we have a subscriber ID, fetching it if necessary
547
+ */
548
+ private ensureSubscriberId;
549
+ private sleep;
550
+ }
551
+
552
+ /**
553
+ * Integrations namespace for Rainfall SDK
554
+ * GitHub, Notion, Linear, Slack, Figma, Stripe
555
+ */
556
+
557
+ declare class IntegrationsNamespace {
558
+ private client;
559
+ constructor(client: RainfallClient);
560
+ get github(): Integrations.GitHub;
561
+ get notion(): Integrations.Notion;
562
+ get linear(): Integrations.Linear;
563
+ get slack(): Integrations.Slack;
564
+ get figma(): Integrations.Figma;
565
+ get stripe(): Integrations.Stripe;
566
+ }
567
+
568
+ declare class Rainfall {
569
+ private readonly client;
570
+ private _integrations?;
571
+ private _memory?;
572
+ private _articles?;
573
+ private _web?;
574
+ private _ai?;
575
+ private _data?;
576
+ private _utils?;
577
+ constructor(config: RainfallConfig);
578
+ /**
579
+ * Integrations namespace - GitHub, Notion, Linear, Slack, Figma, Stripe
580
+ *
581
+ * @example
582
+ * ```typescript
583
+ * // GitHub
584
+ * await rainfall.integrations.github.issues.create({
585
+ * owner: 'facebook',
586
+ * repo: 'react',
587
+ * title: 'Bug report'
588
+ * });
589
+ *
590
+ * // Slack
591
+ * await rainfall.integrations.slack.messages.send({
592
+ * channelId: 'C123456',
593
+ * text: 'Hello team!'
594
+ * });
595
+ *
596
+ * // Linear
597
+ * const issues = await rainfall.integrations.linear.issues.list();
598
+ * ```
599
+ */
600
+ get integrations(): IntegrationsNamespace;
601
+ /**
602
+ * Memory namespace - Semantic memory storage and retrieval
603
+ *
604
+ * @example
605
+ * ```typescript
606
+ * // Store a memory
607
+ * await rainfall.memory.create({
608
+ * content: 'User prefers dark mode',
609
+ * keywords: ['preference', 'ui']
610
+ * });
611
+ *
612
+ * // Recall similar memories
613
+ * const memories = await rainfall.memory.recall({
614
+ * query: 'user preferences',
615
+ * topK: 5
616
+ * });
617
+ * ```
618
+ */
619
+ get memory(): Memory.MemoryClient;
620
+ /**
621
+ * Articles namespace - News aggregation and article management
622
+ *
623
+ * @example
624
+ * ```typescript
625
+ * // Search news
626
+ * const articles = await rainfall.articles.search({
627
+ * query: 'artificial intelligence'
628
+ * });
629
+ *
630
+ * // Create from URL
631
+ * const article = await rainfall.articles.createFromUrl({
632
+ * url: 'https://example.com/article'
633
+ * });
634
+ *
635
+ * // Summarize
636
+ * const summary = await rainfall.articles.summarize({
637
+ * text: article.content
638
+ * });
639
+ * ```
640
+ */
641
+ get articles(): Articles.ArticlesClient;
642
+ /**
643
+ * Web namespace - Web search, scraping, and content extraction
644
+ *
645
+ * @example
646
+ * ```typescript
647
+ * // Search with Exa
648
+ * const results = await rainfall.web.search.exa({
649
+ * query: 'latest AI research'
650
+ * });
651
+ *
652
+ * // Fetch and convert
653
+ * const html = await rainfall.web.fetch({ url: 'https://example.com' });
654
+ * const markdown = await rainfall.web.htmlToMarkdown({ html });
655
+ *
656
+ * // Extract specific elements
657
+ * const links = await rainfall.web.extractHtml({
658
+ * html,
659
+ * selector: 'a[href]'
660
+ * });
661
+ * ```
662
+ */
663
+ get web(): Web.WebClient;
664
+ /**
665
+ * AI namespace - Embeddings, image generation, OCR, vision, chat
666
+ *
667
+ * @example
668
+ * ```typescript
669
+ * // Generate embeddings
670
+ * const embedding = await rainfall.ai.embeddings.document({
671
+ * text: 'Hello world'
672
+ * });
673
+ *
674
+ * // Generate image
675
+ * const image = await rainfall.ai.image.generate({
676
+ * prompt: 'A serene mountain landscape'
677
+ * });
678
+ *
679
+ * // OCR
680
+ * const text = await rainfall.ai.ocr({ imageBase64: '...' });
681
+ *
682
+ * // Chat
683
+ * const response = await rainfall.ai.chat({
684
+ * messages: [{ role: 'user', content: 'Hello!' }]
685
+ * });
686
+ * ```
687
+ */
688
+ get ai(): AI.AIClient;
689
+ /**
690
+ * Data namespace - CSV processing, scripts, similarity search
691
+ *
692
+ * @example
693
+ * ```typescript
694
+ * // Query CSV with SQL
695
+ * const results = await rainfall.data.csv.query({
696
+ * sql: 'SELECT * FROM data WHERE value > 100'
697
+ * });
698
+ *
699
+ * // Execute saved script
700
+ * const result = await rainfall.data.scripts.execute({
701
+ * name: 'my-script',
702
+ * params: { input: 'data' }
703
+ * });
704
+ * ```
705
+ */
706
+ get data(): Data.DataClient;
707
+ /**
708
+ * Utils namespace - Mermaid diagrams, document conversion, regex, JSON extraction
709
+ *
710
+ * @example
711
+ * ```typescript
712
+ * // Generate diagram
713
+ * const diagram = await rainfall.utils.mermaid({
714
+ * diagram: 'graph TD; A-->B;'
715
+ * });
716
+ *
717
+ * // Convert document
718
+ * const pdf = await rainfall.utils.documentConvert({
719
+ * document: markdownContent,
720
+ * mimeType: 'text/markdown',
721
+ * format: 'pdf'
722
+ * });
723
+ *
724
+ * // Extract JSON from text
725
+ * const json = await rainfall.utils.jsonExtract({
726
+ * text: 'Here is some data: {"key": "value"}'
727
+ * });
728
+ * ```
729
+ */
730
+ get utils(): Utils.UtilsClient;
731
+ /**
732
+ * Get the underlying HTTP client for advanced usage
733
+ */
734
+ getClient(): RainfallClient;
735
+ /**
736
+ * List all available tools
737
+ */
738
+ listTools(): Promise<{
739
+ id: string;
740
+ name: string;
741
+ description: string;
742
+ category: string;
743
+ }[]>;
744
+ /**
745
+ * Get schema for a specific tool
746
+ */
747
+ getToolSchema(toolId: string): Promise<ToolSchema>;
748
+ /**
749
+ * Execute any tool by ID (low-level access)
750
+ */
751
+ executeTool<T = unknown>(toolId: string, params?: Record<string, unknown>): Promise<T>;
752
+ /**
753
+ * Get current subscriber info and usage
754
+ */
755
+ getMe(): Promise<{
756
+ id: string;
757
+ name: string;
758
+ email?: string;
759
+ plan?: string;
760
+ billingStatus?: string;
761
+ usage: {
762
+ callsThisMonth: number;
763
+ callsLimit: number;
764
+ };
765
+ }>;
766
+ /**
767
+ * Get current rate limit info
768
+ */
769
+ getRateLimitInfo(): RateLimitInfo | undefined;
770
+ }
771
+
772
+ /**
773
+ * Error classes for Rainfall SDK
774
+ */
775
+ declare class RainfallError extends Error {
776
+ readonly code: string;
777
+ readonly statusCode?: number | undefined;
778
+ readonly details?: Record<string, unknown> | undefined;
779
+ constructor(message: string, code: string, statusCode?: number | undefined, details?: Record<string, unknown> | undefined);
780
+ toJSON(): {
781
+ name: string;
782
+ code: string;
783
+ message: string;
784
+ statusCode: number | undefined;
785
+ details: Record<string, unknown> | undefined;
786
+ };
787
+ }
788
+ declare class AuthenticationError extends RainfallError {
789
+ constructor(message?: string, details?: Record<string, unknown>);
790
+ }
791
+ declare class RateLimitError extends RainfallError {
792
+ readonly retryAfter: number;
793
+ readonly limit: number;
794
+ readonly remaining: number;
795
+ readonly resetAt: Date;
796
+ constructor(message?: string, retryAfter?: number, limit?: number, remaining?: number, resetAt?: Date);
797
+ }
798
+ declare class ValidationError extends RainfallError {
799
+ constructor(message: string, details?: Record<string, unknown>);
800
+ }
801
+ declare class NotFoundError extends RainfallError {
802
+ constructor(resource: string, identifier?: string);
803
+ }
804
+ declare class ServerError extends RainfallError {
805
+ constructor(message?: string, statusCode?: number);
806
+ }
807
+ declare class TimeoutError extends RainfallError {
808
+ constructor(timeoutMs: number);
809
+ }
810
+ declare class NetworkError extends RainfallError {
811
+ constructor(message?: string, details?: Record<string, unknown>);
812
+ }
813
+ declare class ToolNotFoundError extends RainfallError {
814
+ constructor(toolId: string);
815
+ }
816
+ declare function parseErrorResponse(response: Response, data: unknown): RainfallError;
817
+
818
+ export { AI as A, Data as D, Integrations as I, Memory as M, NetworkError as N, Rainfall as R, ServerError as S, TimeoutError as T, Utils as U, ValidationError as V, Web as W, type ApiError as a, type ApiResponse as b, Articles as c, AuthenticationError as d, NotFoundError as e, RainfallClient as f, type RainfallConfig as g, RainfallError as h, RateLimitError as i, type RateLimitInfo as j, type RequestOptions as k, ToolNotFoundError as l, type ToolSchema as m, parseErrorResponse as p };