@lobu/client 9.2.0 → 9.3.0

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.
Files changed (89) hide show
  1. package/dist/client.d.ts +12 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +23 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/errors.d.ts +7 -0
  6. package/dist/errors.d.ts.map +1 -0
  7. package/dist/errors.js +19 -0
  8. package/dist/errors.js.map +1 -0
  9. package/dist/generated/client/client.gen.d.ts +3 -0
  10. package/dist/generated/client/client.gen.d.ts.map +1 -0
  11. package/dist/generated/client/client.gen.js +205 -0
  12. package/dist/generated/client/client.gen.js.map +1 -0
  13. package/dist/generated/client/index.d.ts +9 -0
  14. package/dist/generated/client/index.d.ts.map +1 -0
  15. package/dist/generated/client/index.js +7 -0
  16. package/dist/generated/client/index.js.map +1 -0
  17. package/dist/generated/client/types.gen.d.ts +125 -0
  18. package/dist/generated/client/types.gen.d.ts.map +1 -0
  19. package/dist/generated/client/types.gen.js +3 -0
  20. package/dist/generated/client/types.gen.js.map +1 -0
  21. package/dist/generated/client/utils.gen.d.ts +34 -0
  22. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  23. package/dist/generated/client/utils.gen.js +232 -0
  24. package/dist/generated/client/utils.gen.js.map +1 -0
  25. package/dist/generated/client.gen.d.ts +13 -0
  26. package/dist/generated/client.gen.d.ts.map +1 -0
  27. package/dist/generated/client.gen.js +6 -0
  28. package/dist/generated/client.gen.js.map +1 -0
  29. package/dist/generated/core/auth.gen.d.ts +19 -0
  30. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  31. package/dist/generated/core/auth.gen.js +15 -0
  32. package/dist/generated/core/auth.gen.js.map +1 -0
  33. package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
  34. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  35. package/dist/generated/core/bodySerializer.gen.js +58 -0
  36. package/dist/generated/core/bodySerializer.gen.js.map +1 -0
  37. package/dist/generated/core/params.gen.d.ts +44 -0
  38. package/dist/generated/core/params.gen.d.ts.map +1 -0
  39. package/dist/generated/core/params.gen.js +101 -0
  40. package/dist/generated/core/params.gen.js.map +1 -0
  41. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  42. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  43. package/dist/generated/core/pathSerializer.gen.js +115 -0
  44. package/dist/generated/core/pathSerializer.gen.js.map +1 -0
  45. package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
  46. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  47. package/dist/generated/core/queryKeySerializer.gen.js +100 -0
  48. package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
  49. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  50. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  51. package/dist/generated/core/serverSentEvents.gen.js +136 -0
  52. package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
  53. package/dist/generated/core/types.gen.d.ts +79 -0
  54. package/dist/generated/core/types.gen.d.ts.map +1 -0
  55. package/dist/generated/core/types.gen.js +3 -0
  56. package/dist/generated/core/types.gen.js.map +1 -0
  57. package/dist/generated/core/utils.gen.d.ts +20 -0
  58. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  59. package/dist/generated/core/utils.gen.js +88 -0
  60. package/dist/generated/core/utils.gen.js.map +1 -0
  61. package/dist/generated/index.d.ts +3 -0
  62. package/dist/generated/index.d.ts.map +1 -0
  63. package/dist/generated/index.js +3 -0
  64. package/dist/generated/index.js.map +1 -0
  65. package/dist/generated/sdk.gen.d.ts +140 -0
  66. package/dist/generated/sdk.gen.d.ts.map +1 -0
  67. package/dist/generated/sdk.gen.js +284 -0
  68. package/dist/generated/sdk.gen.js.map +1 -0
  69. package/dist/generated/types.gen.d.ts +1064 -0
  70. package/dist/generated/types.gen.d.ts.map +1 -0
  71. package/dist/generated/types.gen.js +3 -0
  72. package/dist/generated/types.gen.js.map +1 -0
  73. package/dist/index.d.ts +6 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +5 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/rest.d.ts +20 -0
  78. package/dist/rest.d.ts.map +1 -0
  79. package/dist/rest.js +162 -0
  80. package/dist/rest.js.map +1 -0
  81. package/dist/session.d.ts +23 -0
  82. package/dist/session.d.ts.map +1 -0
  83. package/dist/session.js +32 -0
  84. package/dist/session.js.map +1 -0
  85. package/dist/types.d.ts +73 -0
  86. package/dist/types.d.ts.map +1 -0
  87. package/dist/types.js +2 -0
  88. package/dist/types.js.map +1 -0
  89. package/package.json +1 -1
@@ -0,0 +1,1064 @@
1
+ export type ClientOptions = {
2
+ baseUrl: "http://localhost:8787" | (string & {});
3
+ };
4
+ export type GetApiV1AgentsData = {
5
+ body?: never;
6
+ path?: never;
7
+ query?: never;
8
+ url: "/api/v1/agents";
9
+ };
10
+ export type GetApiV1AgentsResponses = {
11
+ /**
12
+ * OK
13
+ */
14
+ 200: unknown;
15
+ };
16
+ export type PostApiV1AgentsData = {
17
+ body?: {
18
+ provider?: string;
19
+ model?: string;
20
+ agentId?: string;
21
+ userId?: string;
22
+ thread?: string;
23
+ forceNew?: boolean;
24
+ dryRun?: boolean;
25
+ intent?: {
26
+ kind: "watcher_run";
27
+ runId: number;
28
+ watcherId: number;
29
+ };
30
+ networkConfig?: {
31
+ allowedDomains?: Array<string>;
32
+ deniedDomains?: Array<string>;
33
+ };
34
+ mcpServers?: {
35
+ [key: string]: {
36
+ url?: string;
37
+ type?: "sse" | "streamable-http" | "stdio";
38
+ command?: string;
39
+ args?: Array<string>;
40
+ env?: {
41
+ [key: string]: string;
42
+ };
43
+ headers?: {
44
+ [key: string]: string;
45
+ };
46
+ description?: string;
47
+ };
48
+ };
49
+ nix?: {
50
+ flakeUrl?: string;
51
+ packages?: Array<string>;
52
+ };
53
+ };
54
+ path?: never;
55
+ query?: never;
56
+ url: "/api/v1/agents";
57
+ };
58
+ export type PostApiV1AgentsErrors = {
59
+ /**
60
+ * Invalid request
61
+ */
62
+ 400: {
63
+ success: boolean;
64
+ error: string;
65
+ details?: string;
66
+ };
67
+ /**
68
+ * Unauthorized
69
+ */
70
+ 401: {
71
+ success: boolean;
72
+ error: string;
73
+ details?: string;
74
+ };
75
+ };
76
+ export type PostApiV1AgentsError = PostApiV1AgentsErrors[keyof PostApiV1AgentsErrors];
77
+ export type PostApiV1AgentsResponses = {
78
+ /**
79
+ * Agent created
80
+ */
81
+ 201: {
82
+ success: boolean;
83
+ agentId: string;
84
+ token: string;
85
+ expiresAt: number;
86
+ sseUrl: string;
87
+ messagesUrl: string;
88
+ };
89
+ };
90
+ export type PostApiV1AgentsResponse = PostApiV1AgentsResponses[keyof PostApiV1AgentsResponses];
91
+ export type DeleteApiV1AgentsByAgentIdData = {
92
+ body?: never;
93
+ path: {
94
+ agentId: string;
95
+ };
96
+ query?: never;
97
+ url: "/api/v1/agents/{agentId}";
98
+ };
99
+ export type DeleteApiV1AgentsByAgentIdErrors = {
100
+ /**
101
+ * Unauthorized
102
+ */
103
+ 401: {
104
+ success: boolean;
105
+ error: string;
106
+ details?: string;
107
+ };
108
+ /**
109
+ * Not found
110
+ */
111
+ 404: {
112
+ success: boolean;
113
+ error: string;
114
+ details?: string;
115
+ };
116
+ };
117
+ export type DeleteApiV1AgentsByAgentIdError = DeleteApiV1AgentsByAgentIdErrors[keyof DeleteApiV1AgentsByAgentIdErrors];
118
+ export type DeleteApiV1AgentsByAgentIdResponses = {
119
+ /**
120
+ * Agent deleted
121
+ */
122
+ 200: {
123
+ success: boolean;
124
+ message?: string;
125
+ agentId?: string;
126
+ };
127
+ };
128
+ export type DeleteApiV1AgentsByAgentIdResponse = DeleteApiV1AgentsByAgentIdResponses[keyof DeleteApiV1AgentsByAgentIdResponses];
129
+ export type GetApiV1AgentsByAgentIdData = {
130
+ body?: never;
131
+ path: {
132
+ agentId: string;
133
+ };
134
+ query?: never;
135
+ url: "/api/v1/agents/{agentId}";
136
+ };
137
+ export type GetApiV1AgentsByAgentIdErrors = {
138
+ /**
139
+ * Unauthorized
140
+ */
141
+ 401: {
142
+ success: boolean;
143
+ error: string;
144
+ details?: string;
145
+ };
146
+ /**
147
+ * Not found
148
+ */
149
+ 404: {
150
+ success: boolean;
151
+ error: string;
152
+ details?: string;
153
+ };
154
+ };
155
+ export type GetApiV1AgentsByAgentIdError = GetApiV1AgentsByAgentIdErrors[keyof GetApiV1AgentsByAgentIdErrors];
156
+ export type GetApiV1AgentsByAgentIdResponses = {
157
+ /**
158
+ * Agent status
159
+ */
160
+ 200: {
161
+ success: boolean;
162
+ agent: {
163
+ agentId: string;
164
+ userId: string;
165
+ status: string;
166
+ createdAt: number;
167
+ lastActivity: number;
168
+ hasActiveConnection: boolean;
169
+ };
170
+ };
171
+ };
172
+ export type GetApiV1AgentsByAgentIdResponse = GetApiV1AgentsByAgentIdResponses[keyof GetApiV1AgentsByAgentIdResponses];
173
+ export type PatchApiV1AgentsByAgentIdData = {
174
+ body?: never;
175
+ path: {
176
+ agentId: string;
177
+ };
178
+ query?: never;
179
+ url: "/api/v1/agents/{agentId}";
180
+ };
181
+ export type PatchApiV1AgentsByAgentIdResponses = {
182
+ /**
183
+ * OK
184
+ */
185
+ 200: unknown;
186
+ };
187
+ export type GetApiV1AgentsByAgentIdEventsData = {
188
+ body?: never;
189
+ path: {
190
+ agentId: string;
191
+ };
192
+ query?: never;
193
+ url: "/api/v1/agents/{agentId}/events";
194
+ };
195
+ export type GetApiV1AgentsByAgentIdEventsErrors = {
196
+ /**
197
+ * Unauthorized
198
+ */
199
+ 401: {
200
+ success: boolean;
201
+ error: string;
202
+ details?: string;
203
+ };
204
+ /**
205
+ * Too many connections
206
+ */
207
+ 429: {
208
+ success: boolean;
209
+ error: string;
210
+ details?: string;
211
+ };
212
+ };
213
+ export type GetApiV1AgentsByAgentIdEventsError = GetApiV1AgentsByAgentIdEventsErrors[keyof GetApiV1AgentsByAgentIdEventsErrors];
214
+ export type GetApiV1AgentsByAgentIdEventsResponses = {
215
+ /**
216
+ * SSE stream
217
+ */
218
+ 200: string;
219
+ };
220
+ export type GetApiV1AgentsByAgentIdEventsResponse = GetApiV1AgentsByAgentIdEventsResponses[keyof GetApiV1AgentsByAgentIdEventsResponses];
221
+ export type PostApiV1AgentsByAgentIdMessagesData = {
222
+ body?: {
223
+ /**
224
+ * Message content
225
+ */
226
+ content?: string;
227
+ /**
228
+ * Message content (alias for content)
229
+ */
230
+ message?: string;
231
+ messageId?: string;
232
+ /**
233
+ * Target platform (api, slack, telegram)
234
+ */
235
+ platform?: string;
236
+ /**
237
+ * Slack-specific routing info (required when platform=slack)
238
+ */
239
+ slack?: {
240
+ /**
241
+ * Slack channel ID
242
+ */
243
+ channel: string;
244
+ /**
245
+ * Thread timestamp for replies
246
+ */
247
+ thread?: string;
248
+ /**
249
+ * Slack team ID
250
+ */
251
+ team?: string;
252
+ };
253
+ [key: string]: unknown | string | {
254
+ /**
255
+ * Slack channel ID
256
+ */
257
+ channel: string;
258
+ /**
259
+ * Thread timestamp for replies
260
+ */
261
+ thread?: string;
262
+ /**
263
+ * Slack team ID
264
+ */
265
+ team?: string;
266
+ } | undefined;
267
+ };
268
+ path: {
269
+ agentId: string;
270
+ };
271
+ query?: never;
272
+ url: "/api/v1/agents/{agentId}/messages";
273
+ };
274
+ export type PostApiV1AgentsByAgentIdMessagesErrors = {
275
+ /**
276
+ * Invalid request
277
+ */
278
+ 400: {
279
+ success: boolean;
280
+ error: string;
281
+ details?: string;
282
+ };
283
+ /**
284
+ * Unauthorized
285
+ */
286
+ 401: {
287
+ success: boolean;
288
+ error: string;
289
+ details?: string;
290
+ };
291
+ /**
292
+ * Forbidden - worker tokens cannot route to platforms
293
+ */
294
+ 403: {
295
+ success: boolean;
296
+ error: string;
297
+ details?: string;
298
+ };
299
+ /**
300
+ * Agent not found
301
+ */
302
+ 404: {
303
+ success: boolean;
304
+ error: string;
305
+ details?: string;
306
+ };
307
+ };
308
+ export type PostApiV1AgentsByAgentIdMessagesError = PostApiV1AgentsByAgentIdMessagesErrors[keyof PostApiV1AgentsByAgentIdMessagesErrors];
309
+ export type PostApiV1AgentsByAgentIdMessagesResponses = {
310
+ /**
311
+ * Message queued
312
+ */
313
+ 200: {
314
+ success: boolean;
315
+ messageId: string;
316
+ agentId?: string;
317
+ jobId?: string;
318
+ eventsUrl?: string;
319
+ queued: boolean;
320
+ traceparent?: string;
321
+ };
322
+ };
323
+ export type PostApiV1AgentsByAgentIdMessagesResponse = PostApiV1AgentsByAgentIdMessagesResponses[keyof PostApiV1AgentsByAgentIdMessagesResponses];
324
+ export type GetApiV1AgentsByAgentIdConfigData = {
325
+ body?: never;
326
+ path?: never;
327
+ query?: {
328
+ token?: string;
329
+ };
330
+ url: "/api/v1/agents/{agentId}/config";
331
+ };
332
+ export type GetApiV1AgentsByAgentIdConfigErrors = {
333
+ /**
334
+ * Unauthorized
335
+ */
336
+ 401: {
337
+ error: string;
338
+ };
339
+ };
340
+ export type GetApiV1AgentsByAgentIdConfigError = GetApiV1AgentsByAgentIdConfigErrors[keyof GetApiV1AgentsByAgentIdConfigErrors];
341
+ export type GetApiV1AgentsByAgentIdConfigResponses = {
342
+ /**
343
+ * Configuration
344
+ */
345
+ 200: unknown;
346
+ };
347
+ export type PostApiV1AuthByProviderCodeData = {
348
+ body?: {
349
+ code: string;
350
+ };
351
+ path: {
352
+ provider: string;
353
+ };
354
+ query?: {
355
+ token?: string;
356
+ };
357
+ url: "/api/v1/auth/{provider}/code";
358
+ };
359
+ export type PostApiV1AuthByProviderCodeErrors = {
360
+ /**
361
+ * Invalid
362
+ */
363
+ 400: {
364
+ error: string;
365
+ };
366
+ /**
367
+ * Unauthorized
368
+ */
369
+ 401: {
370
+ error: string;
371
+ };
372
+ };
373
+ export type PostApiV1AuthByProviderCodeError = PostApiV1AuthByProviderCodeErrors[keyof PostApiV1AuthByProviderCodeErrors];
374
+ export type PostApiV1AuthByProviderCodeResponses = {
375
+ /**
376
+ * Exchanged
377
+ */
378
+ 200: {
379
+ success: boolean;
380
+ };
381
+ };
382
+ export type PostApiV1AuthByProviderCodeResponse = PostApiV1AuthByProviderCodeResponses[keyof PostApiV1AuthByProviderCodeResponses];
383
+ export type GetApiV1ConnectionsData = {
384
+ body?: never;
385
+ path?: never;
386
+ query?: {
387
+ platform?: "telegram" | "slack" | "discord" | "whatsapp" | "teams" | "gchat";
388
+ agentId?: string;
389
+ };
390
+ url: "/api/v1/connections";
391
+ };
392
+ export type GetApiV1ConnectionsErrors = {
393
+ /**
394
+ * Unauthorized
395
+ */
396
+ 401: {
397
+ error: string;
398
+ };
399
+ /**
400
+ * Forbidden
401
+ */
402
+ 403: {
403
+ error: string;
404
+ };
405
+ };
406
+ export type GetApiV1ConnectionsError = GetApiV1ConnectionsErrors[keyof GetApiV1ConnectionsErrors];
407
+ export type GetApiV1ConnectionsResponses = {
408
+ /**
409
+ * Connections
410
+ */
411
+ 200: {
412
+ connections: Array<{
413
+ id: string;
414
+ platform: "telegram" | "slack" | "discord" | "whatsapp" | "teams" | "gchat";
415
+ agentId?: string;
416
+ config: {
417
+ platform: "telegram";
418
+ /**
419
+ * Telegram bot token from BotFather. Falls back to TELEGRAM_BOT_TOKEN env var.
420
+ */
421
+ botToken?: string;
422
+ /**
423
+ * Runtime mode: auto (default), webhook, or polling.
424
+ */
425
+ mode?: "auto" | "webhook" | "polling";
426
+ /**
427
+ * Webhook secret token for x-telegram-bot-api-secret-token verification.
428
+ */
429
+ secretToken?: string;
430
+ /**
431
+ * Override bot username.
432
+ */
433
+ userName?: string;
434
+ /**
435
+ * Custom Telegram API base URL.
436
+ */
437
+ apiBaseUrl?: string;
438
+ } | {
439
+ platform: "slack";
440
+ /**
441
+ * Bot token (xoxb-...). Required for single-workspace mode.
442
+ */
443
+ botToken?: string;
444
+ /**
445
+ * Bot user ID (fetched automatically if omitted).
446
+ */
447
+ botUserId?: string;
448
+ /**
449
+ * Signing secret for webhook verification.
450
+ */
451
+ signingSecret?: string;
452
+ /**
453
+ * Slack app client ID (required for OAuth / multi-workspace).
454
+ */
455
+ clientId?: string;
456
+ /**
457
+ * Slack app client secret (required for OAuth / multi-workspace).
458
+ */
459
+ clientSecret?: string;
460
+ /**
461
+ * Base64-encoded 32-byte AES-256-GCM key for encrypting stored bot tokens.
462
+ */
463
+ encryptionKey?: string;
464
+ /**
465
+ * State key prefix for workspace installations (default: slack:installation).
466
+ */
467
+ installationKeyPrefix?: string;
468
+ /**
469
+ * Override bot username.
470
+ */
471
+ userName?: string;
472
+ } | {
473
+ platform: "discord";
474
+ /**
475
+ * Discord bot token.
476
+ */
477
+ botToken?: string;
478
+ /**
479
+ * Discord application ID.
480
+ */
481
+ applicationId?: string;
482
+ /**
483
+ * Application public key for webhook signature verification.
484
+ */
485
+ publicKey?: string;
486
+ /**
487
+ * Role IDs that trigger mention handlers (in addition to direct mentions).
488
+ */
489
+ mentionRoleIds?: Array<string>;
490
+ /**
491
+ * Override bot username.
492
+ */
493
+ userName?: string;
494
+ } | {
495
+ platform: "whatsapp";
496
+ /**
497
+ * System User access token for WhatsApp Cloud API.
498
+ */
499
+ accessToken?: string;
500
+ /**
501
+ * WhatsApp Business phone number ID.
502
+ */
503
+ phoneNumberId?: string;
504
+ /**
505
+ * Meta App Secret for webhook HMAC-SHA256 signature verification.
506
+ */
507
+ appSecret?: string;
508
+ /**
509
+ * Verify token for webhook challenge-response.
510
+ */
511
+ verifyToken?: string;
512
+ /**
513
+ * Meta Graph API version (default: v21.0).
514
+ */
515
+ apiVersion?: string;
516
+ /**
517
+ * Bot display name.
518
+ */
519
+ userName?: string;
520
+ } | {
521
+ platform: "teams";
522
+ /**
523
+ * Microsoft App ID.
524
+ */
525
+ appId?: string;
526
+ /**
527
+ * Microsoft App Password.
528
+ */
529
+ appPassword?: string;
530
+ /**
531
+ * Microsoft App Tenant ID.
532
+ */
533
+ appTenantId?: string;
534
+ /**
535
+ * Microsoft App Type.
536
+ */
537
+ appType?: "MultiTenant" | "SingleTenant";
538
+ /**
539
+ * Override bot username.
540
+ */
541
+ userName?: string;
542
+ } | {
543
+ platform: "gchat";
544
+ /**
545
+ * Service account credentials JSON string. Defaults to GOOGLE_CHAT_CREDENTIALS env var.
546
+ */
547
+ credentials?: string;
548
+ /**
549
+ * Use Application Default Credentials (ADC) instead of service account JSON.
550
+ */
551
+ useApplicationDefaultCredentials?: boolean;
552
+ /**
553
+ * HTTP endpoint URL for button click actions. Required for HTTP endpoint apps.
554
+ */
555
+ endpointUrl?: string;
556
+ /**
557
+ * Google Cloud project number for verifying webhook JWTs. Defaults to GOOGLE_CHAT_PROJECT_NUMBER env var.
558
+ */
559
+ googleChatProjectNumber?: string;
560
+ /**
561
+ * User email for domain-wide delegation. Defaults to GOOGLE_CHAT_IMPERSONATE_USER env var.
562
+ */
563
+ impersonateUser?: string;
564
+ /**
565
+ * Expected audience for Pub/Sub push JWT verification. Defaults to GOOGLE_CHAT_PUBSUB_AUDIENCE env var.
566
+ */
567
+ pubsubAudience?: string;
568
+ /**
569
+ * Override bot username.
570
+ */
571
+ userName?: string;
572
+ };
573
+ settings: {
574
+ /**
575
+ * User IDs allowed to interact with this connection. Omit to allow all; empty array blocks all.
576
+ */
577
+ allowFrom?: Array<string>;
578
+ /**
579
+ * Whether group messages are allowed (default true).
580
+ */
581
+ allowGroups?: boolean;
582
+ /**
583
+ * Scopes that end users are allowed to customize. Empty = no restrictions.
584
+ */
585
+ userConfigScopes?: Array<"model" | "view-model" | "system-prompt" | "skills" | "permissions" | "packages">;
586
+ };
587
+ metadata: {
588
+ [key: string]: unknown;
589
+ };
590
+ status: "active" | "stopped" | "error";
591
+ errorMessage?: string;
592
+ createdAt: number;
593
+ updatedAt: number;
594
+ }>;
595
+ };
596
+ };
597
+ export type GetApiV1ConnectionsResponse = GetApiV1ConnectionsResponses[keyof GetApiV1ConnectionsResponses];
598
+ export type GetApiV1ConnectionsByIdData = {
599
+ body?: never;
600
+ path: {
601
+ id: string;
602
+ };
603
+ query?: never;
604
+ url: "/api/v1/connections/{id}";
605
+ };
606
+ export type GetApiV1ConnectionsByIdErrors = {
607
+ /**
608
+ * Unauthorized
609
+ */
610
+ 401: {
611
+ error: string;
612
+ };
613
+ /**
614
+ * Forbidden
615
+ */
616
+ 403: {
617
+ error: string;
618
+ };
619
+ /**
620
+ * Connection not found
621
+ */
622
+ 404: {
623
+ error: string;
624
+ };
625
+ };
626
+ export type GetApiV1ConnectionsByIdError = GetApiV1ConnectionsByIdErrors[keyof GetApiV1ConnectionsByIdErrors];
627
+ export type GetApiV1ConnectionsByIdResponses = {
628
+ /**
629
+ * Connection
630
+ */
631
+ 200: {
632
+ id: string;
633
+ platform: "telegram" | "slack" | "discord" | "whatsapp" | "teams" | "gchat";
634
+ agentId?: string;
635
+ config: {
636
+ platform: "telegram";
637
+ /**
638
+ * Telegram bot token from BotFather. Falls back to TELEGRAM_BOT_TOKEN env var.
639
+ */
640
+ botToken?: string;
641
+ /**
642
+ * Runtime mode: auto (default), webhook, or polling.
643
+ */
644
+ mode?: "auto" | "webhook" | "polling";
645
+ /**
646
+ * Webhook secret token for x-telegram-bot-api-secret-token verification.
647
+ */
648
+ secretToken?: string;
649
+ /**
650
+ * Override bot username.
651
+ */
652
+ userName?: string;
653
+ /**
654
+ * Custom Telegram API base URL.
655
+ */
656
+ apiBaseUrl?: string;
657
+ } | {
658
+ platform: "slack";
659
+ /**
660
+ * Bot token (xoxb-...). Required for single-workspace mode.
661
+ */
662
+ botToken?: string;
663
+ /**
664
+ * Bot user ID (fetched automatically if omitted).
665
+ */
666
+ botUserId?: string;
667
+ /**
668
+ * Signing secret for webhook verification.
669
+ */
670
+ signingSecret?: string;
671
+ /**
672
+ * Slack app client ID (required for OAuth / multi-workspace).
673
+ */
674
+ clientId?: string;
675
+ /**
676
+ * Slack app client secret (required for OAuth / multi-workspace).
677
+ */
678
+ clientSecret?: string;
679
+ /**
680
+ * Base64-encoded 32-byte AES-256-GCM key for encrypting stored bot tokens.
681
+ */
682
+ encryptionKey?: string;
683
+ /**
684
+ * State key prefix for workspace installations (default: slack:installation).
685
+ */
686
+ installationKeyPrefix?: string;
687
+ /**
688
+ * Override bot username.
689
+ */
690
+ userName?: string;
691
+ } | {
692
+ platform: "discord";
693
+ /**
694
+ * Discord bot token.
695
+ */
696
+ botToken?: string;
697
+ /**
698
+ * Discord application ID.
699
+ */
700
+ applicationId?: string;
701
+ /**
702
+ * Application public key for webhook signature verification.
703
+ */
704
+ publicKey?: string;
705
+ /**
706
+ * Role IDs that trigger mention handlers (in addition to direct mentions).
707
+ */
708
+ mentionRoleIds?: Array<string>;
709
+ /**
710
+ * Override bot username.
711
+ */
712
+ userName?: string;
713
+ } | {
714
+ platform: "whatsapp";
715
+ /**
716
+ * System User access token for WhatsApp Cloud API.
717
+ */
718
+ accessToken?: string;
719
+ /**
720
+ * WhatsApp Business phone number ID.
721
+ */
722
+ phoneNumberId?: string;
723
+ /**
724
+ * Meta App Secret for webhook HMAC-SHA256 signature verification.
725
+ */
726
+ appSecret?: string;
727
+ /**
728
+ * Verify token for webhook challenge-response.
729
+ */
730
+ verifyToken?: string;
731
+ /**
732
+ * Meta Graph API version (default: v21.0).
733
+ */
734
+ apiVersion?: string;
735
+ /**
736
+ * Bot display name.
737
+ */
738
+ userName?: string;
739
+ } | {
740
+ platform: "teams";
741
+ /**
742
+ * Microsoft App ID.
743
+ */
744
+ appId?: string;
745
+ /**
746
+ * Microsoft App Password.
747
+ */
748
+ appPassword?: string;
749
+ /**
750
+ * Microsoft App Tenant ID.
751
+ */
752
+ appTenantId?: string;
753
+ /**
754
+ * Microsoft App Type.
755
+ */
756
+ appType?: "MultiTenant" | "SingleTenant";
757
+ /**
758
+ * Override bot username.
759
+ */
760
+ userName?: string;
761
+ } | {
762
+ platform: "gchat";
763
+ /**
764
+ * Service account credentials JSON string. Defaults to GOOGLE_CHAT_CREDENTIALS env var.
765
+ */
766
+ credentials?: string;
767
+ /**
768
+ * Use Application Default Credentials (ADC) instead of service account JSON.
769
+ */
770
+ useApplicationDefaultCredentials?: boolean;
771
+ /**
772
+ * HTTP endpoint URL for button click actions. Required for HTTP endpoint apps.
773
+ */
774
+ endpointUrl?: string;
775
+ /**
776
+ * Google Cloud project number for verifying webhook JWTs. Defaults to GOOGLE_CHAT_PROJECT_NUMBER env var.
777
+ */
778
+ googleChatProjectNumber?: string;
779
+ /**
780
+ * User email for domain-wide delegation. Defaults to GOOGLE_CHAT_IMPERSONATE_USER env var.
781
+ */
782
+ impersonateUser?: string;
783
+ /**
784
+ * Expected audience for Pub/Sub push JWT verification. Defaults to GOOGLE_CHAT_PUBSUB_AUDIENCE env var.
785
+ */
786
+ pubsubAudience?: string;
787
+ /**
788
+ * Override bot username.
789
+ */
790
+ userName?: string;
791
+ };
792
+ settings: {
793
+ /**
794
+ * User IDs allowed to interact with this connection. Omit to allow all; empty array blocks all.
795
+ */
796
+ allowFrom?: Array<string>;
797
+ /**
798
+ * Whether group messages are allowed (default true).
799
+ */
800
+ allowGroups?: boolean;
801
+ /**
802
+ * Scopes that end users are allowed to customize. Empty = no restrictions.
803
+ */
804
+ userConfigScopes?: Array<"model" | "view-model" | "system-prompt" | "skills" | "permissions" | "packages">;
805
+ };
806
+ metadata: {
807
+ [key: string]: unknown;
808
+ };
809
+ status: "active" | "stopped" | "error";
810
+ errorMessage?: string;
811
+ createdAt: number;
812
+ updatedAt: number;
813
+ };
814
+ };
815
+ export type GetApiV1ConnectionsByIdResponse = GetApiV1ConnectionsByIdResponses[keyof GetApiV1ConnectionsByIdResponses];
816
+ export type GetApiBedrockHealthData = {
817
+ body?: never;
818
+ path?: never;
819
+ query?: never;
820
+ url: "/api/bedrock/health";
821
+ };
822
+ export type GetApiBedrockHealthResponses = {
823
+ /**
824
+ * OK
825
+ */
826
+ 200: unknown;
827
+ };
828
+ export type GetApiBedrockOpenaiAByAgentIdV1ModelsData = {
829
+ body?: never;
830
+ path: {
831
+ agentId: string;
832
+ };
833
+ query?: never;
834
+ url: "/api/bedrock/openai/a/{agentId}/v1/models";
835
+ };
836
+ export type GetApiBedrockOpenaiAByAgentIdV1ModelsResponses = {
837
+ /**
838
+ * OK
839
+ */
840
+ 200: unknown;
841
+ };
842
+ export type PostApiBedrockOpenaiAByAgentIdV1ChatCompletionsData = {
843
+ body?: never;
844
+ path: {
845
+ agentId: string;
846
+ };
847
+ query?: never;
848
+ url: "/api/bedrock/openai/a/{agentId}/v1/chat/completions";
849
+ };
850
+ export type PostApiBedrockOpenaiAByAgentIdV1ChatCompletionsResponses = {
851
+ /**
852
+ * OK
853
+ */
854
+ 200: unknown;
855
+ };
856
+ export type GetApiV1FilesByArtifactIdData = {
857
+ body?: never;
858
+ path: {
859
+ artifactId: string;
860
+ };
861
+ query?: never;
862
+ url: "/api/v1/files/{artifactId}";
863
+ };
864
+ export type GetApiV1FilesByArtifactIdResponses = {
865
+ /**
866
+ * OK
867
+ */
868
+ 200: unknown;
869
+ };
870
+ export type PostApiV1AgentsApproveData = {
871
+ body?: never;
872
+ path?: never;
873
+ query?: never;
874
+ url: "/api/v1/agents/approve";
875
+ };
876
+ export type PostApiV1AgentsApproveResponses = {
877
+ /**
878
+ * OK
879
+ */
880
+ 200: unknown;
881
+ };
882
+ export type GetConnectClaimData = {
883
+ body?: never;
884
+ path?: never;
885
+ query?: never;
886
+ url: "/connect/claim";
887
+ };
888
+ export type GetConnectClaimResponses = {
889
+ /**
890
+ * OK
891
+ */
892
+ 200: unknown;
893
+ };
894
+ export type GetApiV1AgentsByAgentIdHistoryStatusData = {
895
+ body?: never;
896
+ path: {
897
+ agentId: string;
898
+ };
899
+ query?: never;
900
+ url: "/api/v1/agents/{agentId}/history/status";
901
+ };
902
+ export type GetApiV1AgentsByAgentIdHistoryStatusResponses = {
903
+ /**
904
+ * OK
905
+ */
906
+ 200: unknown;
907
+ };
908
+ export type GetApiV1AgentsByAgentIdHistorySessionMessagesData = {
909
+ body?: never;
910
+ path: {
911
+ agentId: string;
912
+ };
913
+ query?: never;
914
+ url: "/api/v1/agents/{agentId}/history/session/messages";
915
+ };
916
+ export type GetApiV1AgentsByAgentIdHistorySessionMessagesResponses = {
917
+ /**
918
+ * OK
919
+ */
920
+ 200: unknown;
921
+ };
922
+ export type GetApiV1AgentsByAgentIdHistorySessionStatsData = {
923
+ body?: never;
924
+ path: {
925
+ agentId: string;
926
+ };
927
+ query?: never;
928
+ url: "/api/v1/agents/{agentId}/history/session/stats";
929
+ };
930
+ export type GetApiV1AgentsByAgentIdHistorySessionStatsResponses = {
931
+ /**
932
+ * OK
933
+ */
934
+ 200: unknown;
935
+ };
936
+ export type GetApiV1AgentsByAgentIdConfigProvidersCatalogData = {
937
+ body?: never;
938
+ path: {
939
+ agentId: string;
940
+ };
941
+ query?: never;
942
+ url: "/api/v1/agents/{agentId}/config/providers/catalog";
943
+ };
944
+ export type GetApiV1AgentsByAgentIdConfigProvidersCatalogResponses = {
945
+ /**
946
+ * OK
947
+ */
948
+ 200: unknown;
949
+ };
950
+ export type GetApiV1AgentsByAgentIdConfigGrantsData = {
951
+ body?: never;
952
+ path: {
953
+ agentId: string;
954
+ };
955
+ query?: never;
956
+ url: "/api/v1/agents/{agentId}/config/grants";
957
+ };
958
+ export type GetApiV1AgentsByAgentIdConfigGrantsResponses = {
959
+ /**
960
+ * OK
961
+ */
962
+ 200: unknown;
963
+ };
964
+ export type PostApiV1AuthByProviderSaveKeyData = {
965
+ body?: never;
966
+ path: {
967
+ provider: string;
968
+ };
969
+ query?: never;
970
+ url: "/api/v1/auth/{provider}/save-key";
971
+ };
972
+ export type PostApiV1AuthByProviderSaveKeyResponses = {
973
+ /**
974
+ * OK
975
+ */
976
+ 200: unknown;
977
+ };
978
+ export type PostApiV1AuthByProviderStartData = {
979
+ body?: never;
980
+ path: {
981
+ provider: string;
982
+ };
983
+ query?: never;
984
+ url: "/api/v1/auth/{provider}/start";
985
+ };
986
+ export type PostApiV1AuthByProviderStartResponses = {
987
+ /**
988
+ * OK
989
+ */
990
+ 200: unknown;
991
+ };
992
+ export type PostApiV1AuthByProviderPollData = {
993
+ body?: never;
994
+ path: {
995
+ provider: string;
996
+ };
997
+ query?: never;
998
+ url: "/api/v1/auth/{provider}/poll";
999
+ };
1000
+ export type PostApiV1AuthByProviderPollResponses = {
1001
+ /**
1002
+ * OK
1003
+ */
1004
+ 200: unknown;
1005
+ };
1006
+ export type PostApiV1AuthByProviderLogoutData = {
1007
+ body?: never;
1008
+ path: {
1009
+ provider: string;
1010
+ };
1011
+ query?: never;
1012
+ url: "/api/v1/auth/{provider}/logout";
1013
+ };
1014
+ export type PostApiV1AuthByProviderLogoutResponses = {
1015
+ /**
1016
+ * OK
1017
+ */
1018
+ 200: unknown;
1019
+ };
1020
+ export type GetApiV1AgentsByAgentIdChannelsData = {
1021
+ body?: never;
1022
+ path: {
1023
+ agentId: string;
1024
+ };
1025
+ query?: never;
1026
+ url: "/api/v1/agents/{agentId}/channels";
1027
+ };
1028
+ export type GetApiV1AgentsByAgentIdChannelsResponses = {
1029
+ /**
1030
+ * OK
1031
+ */
1032
+ 200: unknown;
1033
+ };
1034
+ export type PostApiV1AgentsByAgentIdChannelsData = {
1035
+ body?: never;
1036
+ path: {
1037
+ agentId: string;
1038
+ };
1039
+ query?: never;
1040
+ url: "/api/v1/agents/{agentId}/channels";
1041
+ };
1042
+ export type PostApiV1AgentsByAgentIdChannelsResponses = {
1043
+ /**
1044
+ * OK
1045
+ */
1046
+ 200: unknown;
1047
+ };
1048
+ export type DeleteApiV1AgentsByAgentIdChannelsByPlatformByChannelIdData = {
1049
+ body?: never;
1050
+ path: {
1051
+ agentId: string;
1052
+ platform: string;
1053
+ channelId: string;
1054
+ };
1055
+ query?: never;
1056
+ url: "/api/v1/agents/{agentId}/channels/{platform}/{channelId}";
1057
+ };
1058
+ export type DeleteApiV1AgentsByAgentIdChannelsByPlatformByChannelIdResponses = {
1059
+ /**
1060
+ * OK
1061
+ */
1062
+ 200: unknown;
1063
+ };
1064
+ //# sourceMappingURL=types.gen.d.ts.map