@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,814 @@
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
+ email: string;
537
+ plan: string;
538
+ usage: {
539
+ callsThisMonth: number;
540
+ callsLimit: number;
541
+ };
542
+ }>;
543
+ /**
544
+ * Ensure we have a subscriber ID, fetching it if necessary
545
+ */
546
+ private ensureSubscriberId;
547
+ private sleep;
548
+ }
549
+
550
+ /**
551
+ * Integrations namespace for Rainfall SDK
552
+ * GitHub, Notion, Linear, Slack, Figma, Stripe
553
+ */
554
+
555
+ declare class IntegrationsNamespace {
556
+ private client;
557
+ constructor(client: RainfallClient);
558
+ get github(): Integrations.GitHub;
559
+ get notion(): Integrations.Notion;
560
+ get linear(): Integrations.Linear;
561
+ get slack(): Integrations.Slack;
562
+ get figma(): Integrations.Figma;
563
+ get stripe(): Integrations.Stripe;
564
+ }
565
+
566
+ declare class Rainfall {
567
+ private readonly client;
568
+ private _integrations?;
569
+ private _memory?;
570
+ private _articles?;
571
+ private _web?;
572
+ private _ai?;
573
+ private _data?;
574
+ private _utils?;
575
+ constructor(config: RainfallConfig);
576
+ /**
577
+ * Integrations namespace - GitHub, Notion, Linear, Slack, Figma, Stripe
578
+ *
579
+ * @example
580
+ * ```typescript
581
+ * // GitHub
582
+ * await rainfall.integrations.github.issues.create({
583
+ * owner: 'facebook',
584
+ * repo: 'react',
585
+ * title: 'Bug report'
586
+ * });
587
+ *
588
+ * // Slack
589
+ * await rainfall.integrations.slack.messages.send({
590
+ * channelId: 'C123456',
591
+ * text: 'Hello team!'
592
+ * });
593
+ *
594
+ * // Linear
595
+ * const issues = await rainfall.integrations.linear.issues.list();
596
+ * ```
597
+ */
598
+ get integrations(): IntegrationsNamespace;
599
+ /**
600
+ * Memory namespace - Semantic memory storage and retrieval
601
+ *
602
+ * @example
603
+ * ```typescript
604
+ * // Store a memory
605
+ * await rainfall.memory.create({
606
+ * content: 'User prefers dark mode',
607
+ * keywords: ['preference', 'ui']
608
+ * });
609
+ *
610
+ * // Recall similar memories
611
+ * const memories = await rainfall.memory.recall({
612
+ * query: 'user preferences',
613
+ * topK: 5
614
+ * });
615
+ * ```
616
+ */
617
+ get memory(): Memory.MemoryClient;
618
+ /**
619
+ * Articles namespace - News aggregation and article management
620
+ *
621
+ * @example
622
+ * ```typescript
623
+ * // Search news
624
+ * const articles = await rainfall.articles.search({
625
+ * query: 'artificial intelligence'
626
+ * });
627
+ *
628
+ * // Create from URL
629
+ * const article = await rainfall.articles.createFromUrl({
630
+ * url: 'https://example.com/article'
631
+ * });
632
+ *
633
+ * // Summarize
634
+ * const summary = await rainfall.articles.summarize({
635
+ * text: article.content
636
+ * });
637
+ * ```
638
+ */
639
+ get articles(): Articles.ArticlesClient;
640
+ /**
641
+ * Web namespace - Web search, scraping, and content extraction
642
+ *
643
+ * @example
644
+ * ```typescript
645
+ * // Search with Exa
646
+ * const results = await rainfall.web.search.exa({
647
+ * query: 'latest AI research'
648
+ * });
649
+ *
650
+ * // Fetch and convert
651
+ * const html = await rainfall.web.fetch({ url: 'https://example.com' });
652
+ * const markdown = await rainfall.web.htmlToMarkdown({ html });
653
+ *
654
+ * // Extract specific elements
655
+ * const links = await rainfall.web.extractHtml({
656
+ * html,
657
+ * selector: 'a[href]'
658
+ * });
659
+ * ```
660
+ */
661
+ get web(): Web.WebClient;
662
+ /**
663
+ * AI namespace - Embeddings, image generation, OCR, vision, chat
664
+ *
665
+ * @example
666
+ * ```typescript
667
+ * // Generate embeddings
668
+ * const embedding = await rainfall.ai.embeddings.document({
669
+ * text: 'Hello world'
670
+ * });
671
+ *
672
+ * // Generate image
673
+ * const image = await rainfall.ai.image.generate({
674
+ * prompt: 'A serene mountain landscape'
675
+ * });
676
+ *
677
+ * // OCR
678
+ * const text = await rainfall.ai.ocr({ imageBase64: '...' });
679
+ *
680
+ * // Chat
681
+ * const response = await rainfall.ai.chat({
682
+ * messages: [{ role: 'user', content: 'Hello!' }]
683
+ * });
684
+ * ```
685
+ */
686
+ get ai(): AI.AIClient;
687
+ /**
688
+ * Data namespace - CSV processing, scripts, similarity search
689
+ *
690
+ * @example
691
+ * ```typescript
692
+ * // Query CSV with SQL
693
+ * const results = await rainfall.data.csv.query({
694
+ * sql: 'SELECT * FROM data WHERE value > 100'
695
+ * });
696
+ *
697
+ * // Execute saved script
698
+ * const result = await rainfall.data.scripts.execute({
699
+ * name: 'my-script',
700
+ * params: { input: 'data' }
701
+ * });
702
+ * ```
703
+ */
704
+ get data(): Data.DataClient;
705
+ /**
706
+ * Utils namespace - Mermaid diagrams, document conversion, regex, JSON extraction
707
+ *
708
+ * @example
709
+ * ```typescript
710
+ * // Generate diagram
711
+ * const diagram = await rainfall.utils.mermaid({
712
+ * diagram: 'graph TD; A-->B;'
713
+ * });
714
+ *
715
+ * // Convert document
716
+ * const pdf = await rainfall.utils.documentConvert({
717
+ * document: markdownContent,
718
+ * mimeType: 'text/markdown',
719
+ * format: 'pdf'
720
+ * });
721
+ *
722
+ * // Extract JSON from text
723
+ * const json = await rainfall.utils.jsonExtract({
724
+ * text: 'Here is some data: {"key": "value"}'
725
+ * });
726
+ * ```
727
+ */
728
+ get utils(): Utils.UtilsClient;
729
+ /**
730
+ * Get the underlying HTTP client for advanced usage
731
+ */
732
+ getClient(): RainfallClient;
733
+ /**
734
+ * List all available tools
735
+ */
736
+ listTools(): Promise<{
737
+ id: string;
738
+ name: string;
739
+ description: string;
740
+ category: string;
741
+ }[]>;
742
+ /**
743
+ * Get schema for a specific tool
744
+ */
745
+ getToolSchema(toolId: string): Promise<ToolSchema>;
746
+ /**
747
+ * Execute any tool by ID (low-level access)
748
+ */
749
+ executeTool<T = unknown>(toolId: string, params?: Record<string, unknown>): Promise<T>;
750
+ /**
751
+ * Get current subscriber info and usage
752
+ */
753
+ getMe(): Promise<{
754
+ id: string;
755
+ email: string;
756
+ plan: string;
757
+ usage: {
758
+ callsThisMonth: number;
759
+ callsLimit: number;
760
+ };
761
+ }>;
762
+ /**
763
+ * Get current rate limit info
764
+ */
765
+ getRateLimitInfo(): RateLimitInfo | undefined;
766
+ }
767
+
768
+ /**
769
+ * Error classes for Rainfall SDK
770
+ */
771
+ declare class RainfallError extends Error {
772
+ readonly code: string;
773
+ readonly statusCode?: number | undefined;
774
+ readonly details?: Record<string, unknown> | undefined;
775
+ constructor(message: string, code: string, statusCode?: number | undefined, details?: Record<string, unknown> | undefined);
776
+ toJSON(): {
777
+ name: string;
778
+ code: string;
779
+ message: string;
780
+ statusCode: number | undefined;
781
+ details: Record<string, unknown> | undefined;
782
+ };
783
+ }
784
+ declare class AuthenticationError extends RainfallError {
785
+ constructor(message?: string, details?: Record<string, unknown>);
786
+ }
787
+ declare class RateLimitError extends RainfallError {
788
+ readonly retryAfter: number;
789
+ readonly limit: number;
790
+ readonly remaining: number;
791
+ readonly resetAt: Date;
792
+ constructor(message?: string, retryAfter?: number, limit?: number, remaining?: number, resetAt?: Date);
793
+ }
794
+ declare class ValidationError extends RainfallError {
795
+ constructor(message: string, details?: Record<string, unknown>);
796
+ }
797
+ declare class NotFoundError extends RainfallError {
798
+ constructor(resource: string, identifier?: string);
799
+ }
800
+ declare class ServerError extends RainfallError {
801
+ constructor(message?: string, statusCode?: number);
802
+ }
803
+ declare class TimeoutError extends RainfallError {
804
+ constructor(timeoutMs: number);
805
+ }
806
+ declare class NetworkError extends RainfallError {
807
+ constructor(message?: string, details?: Record<string, unknown>);
808
+ }
809
+ declare class ToolNotFoundError extends RainfallError {
810
+ constructor(toolId: string);
811
+ }
812
+ declare function parseErrorResponse(response: Response, data: unknown): RainfallError;
813
+
814
+ 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 };