@arbium/enterprise-agent-connect-client 0.1.2-dev.d2aa5ca → 0.2.1-dev.7b4e802

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type AppLive } from "./steps.js";
2
- import type { Agent, CheckOutcome, Connection, Connector, EventSubscriptionInput, EventTriggerInput, Limits, SiteAccess, TeamsTriggerInput } from "./types.js";
2
+ import type { Agent, Body, CheckOutcome, Connection, Connector, EventSubscriptionInput, EventTriggerInput, Limits, SiteAccess, TeamsTriggerInput } from "./types.js";
3
3
  export * from "./steps.js";
4
4
  export type * from "./types.js";
5
5
  /** A refusal the admin should read (4xx with an `error`): bad input, a failed connection
@@ -115,6 +115,7 @@ export declare function createClient(options: ClientOptions): {
115
115
  field: string;
116
116
  value: string;
117
117
  };
118
+ capabilities?: string[];
118
119
  }[];
119
120
  afterConnect: {
120
121
  title: string;
@@ -144,6 +145,7 @@ export declare function createClient(options: ClientOptions): {
144
145
  field: string;
145
146
  value: string;
146
147
  };
148
+ capabilities?: string[];
147
149
  }[];
148
150
  fields: {
149
151
  id: string;
@@ -161,6 +163,568 @@ export declare function createClient(options: ClientOptions): {
161
163
  field: string;
162
164
  value: string;
163
165
  };
166
+ optional: boolean;
167
+ }[];
168
+ capabilities: {
169
+ id: string;
170
+ label: string;
171
+ description: string;
172
+ required: boolean;
173
+ destructive: boolean;
174
+ costs?: boolean;
175
+ scopes: string[];
176
+ roles?: string[];
177
+ permissions: string[];
178
+ fill?: {
179
+ [key: string]: string;
180
+ };
181
+ note?: string;
182
+ forbidden?: string;
183
+ claudeKey?: boolean;
184
+ tools: string[];
185
+ }[];
186
+ limits: {
187
+ id: string;
188
+ label: string;
189
+ help: string;
190
+ kind: "list" | "text" | "map";
191
+ required: boolean;
192
+ pattern?: string;
193
+ keys?: string;
194
+ }[];
195
+ siteAccess?: {
196
+ grant: {
197
+ title: string;
198
+ body: string;
199
+ link?: {
200
+ label: string;
201
+ href: string;
202
+ };
203
+ copy?: string[];
204
+ shell?: "bash" | "powershell";
205
+ permissions?: boolean;
206
+ certificate?: boolean;
207
+ click?: string[];
208
+ clickUnavailable?: true;
209
+ siteRole?: "read" | "write";
210
+ agentCheck?: boolean;
211
+ confirm?: string;
212
+ live?: string;
213
+ settings?: {
214
+ id: string;
215
+ label: string;
216
+ help?: string;
217
+ placeholder?: string;
218
+ pattern: string;
219
+ }[];
220
+ option?: {
221
+ field: string;
222
+ value: string;
223
+ };
224
+ }[];
225
+ request: string;
226
+ write: string[];
227
+ };
228
+ agentAccess?: {
229
+ limit: string;
230
+ label: string;
231
+ path: string & (unknown & unknown);
232
+ granted: string;
233
+ notGranted: string;
234
+ notFound: string;
235
+ probes: {
236
+ [key: string]: {
237
+ method: "GET" | "POST" | "PATCH";
238
+ path: string & (unknown & unknown);
239
+ body?: unknown;
240
+ allowed: number[];
241
+ };
242
+ };
243
+ missing?: string;
244
+ };
245
+ verify: {
246
+ method: "GET" | "POST";
247
+ path: string;
248
+ label: string;
249
+ show: string;
250
+ name?: string;
251
+ match?: {
252
+ [key: string]: string | number | boolean;
253
+ };
254
+ body?: {
255
+ [key: string]: unknown;
256
+ };
257
+ ifEmpty?: string;
258
+ } | {
259
+ label: string;
260
+ check: string;
261
+ ifEmpty?: string;
262
+ };
263
+ discover?: {
264
+ method: "GET" | "POST";
265
+ path: string;
266
+ label: string;
267
+ show: string;
268
+ name?: string;
269
+ match?: {
270
+ [key: string]: string | number | boolean;
271
+ };
272
+ body?: {
273
+ [key: string]: unknown;
274
+ };
275
+ ifEmpty?: string;
276
+ } | {
277
+ label: string;
278
+ check: string;
279
+ ifEmpty?: string;
280
+ };
281
+ revoke: string;
282
+ http?: {
283
+ baseUrl: string;
284
+ allowedHosts?: string[];
285
+ auth: {
286
+ type: "header";
287
+ header: string;
288
+ value: string;
289
+ prefix?: string;
290
+ } | {
291
+ type: "bearer";
292
+ token: string;
293
+ } | {
294
+ type: "basic";
295
+ username: string;
296
+ password: string;
297
+ } | {
298
+ type: "oauth2";
299
+ tokenUrl: string;
300
+ clientId: string;
301
+ clientSecret: string;
302
+ scope?: string;
303
+ clientAuth?: "body" | "basic";
304
+ audience?: string;
305
+ } | {
306
+ type: "query";
307
+ param: string;
308
+ value: string;
309
+ };
310
+ headers: {
311
+ [key: string]: string;
312
+ };
313
+ fieldHeaders: {
314
+ [key: string]: string;
315
+ };
316
+ tools: {
317
+ name: string;
318
+ description: string;
319
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
320
+ path: string;
321
+ params: {
322
+ [key: string]: {
323
+ type: "string" | "number" | "integer" | "boolean" | "array";
324
+ description: string;
325
+ in: "path" | "query" | "body";
326
+ name?: string;
327
+ required: boolean;
328
+ default?: (string | number | boolean) | (string | number | boolean)[];
329
+ enum?: (string | number | boolean)[];
330
+ items?: "string" | "number" | "integer" | "boolean";
331
+ join?: string;
332
+ limit?: string;
333
+ };
334
+ };
335
+ destructive: boolean;
336
+ answerLimits: {
337
+ field: string;
338
+ limit: string;
339
+ }[];
340
+ result?: {
341
+ items?: string;
342
+ fields?: string[];
343
+ };
344
+ paging?: {
345
+ param: string;
346
+ body: string;
347
+ } | {
348
+ param: string;
349
+ header: string;
350
+ } | {
351
+ param: string;
352
+ link: true;
353
+ };
354
+ }[];
355
+ allowInsecureHttp: boolean;
356
+ };
357
+ soap?: {
358
+ endpoint: string;
359
+ version: "1.1" | "1.2";
360
+ namespaces: {
361
+ [key: string]: string;
362
+ };
363
+ auth?: {
364
+ type: "header";
365
+ header: string;
366
+ value: string;
367
+ prefix?: string;
368
+ } | {
369
+ type: "bearer";
370
+ token: string;
371
+ } | {
372
+ type: "basic";
373
+ username: string;
374
+ password: string;
375
+ };
376
+ wsSecurity?: {
377
+ username: string;
378
+ password: string;
379
+ digest: boolean;
380
+ };
381
+ verify?: {
382
+ tool: string;
383
+ args: {
384
+ [key: string]: string | number | boolean;
385
+ };
386
+ show: string;
387
+ };
388
+ tools: {
389
+ name: string;
390
+ description: string;
391
+ operation: string;
392
+ soapAction?: string;
393
+ body: string;
394
+ params: {
395
+ [key: string]: {
396
+ type: "string" | "number" | "integer" | "boolean";
397
+ description: string;
398
+ required: boolean;
399
+ limit?: string;
400
+ };
401
+ };
402
+ result?: string;
403
+ fields?: string[];
404
+ readOnly: boolean;
405
+ destructive: boolean;
406
+ answerLimits: {
407
+ field: string;
408
+ limit: string;
409
+ }[];
410
+ }[];
411
+ allowInsecureHttp: boolean;
412
+ };
413
+ odata?: {
414
+ serviceRoot: string;
415
+ allowedHosts?: string[];
416
+ version: "2" | "4";
417
+ auth: {
418
+ type: "header";
419
+ header: string;
420
+ value: string;
421
+ prefix?: string;
422
+ } | {
423
+ type: "bearer";
424
+ token: string;
425
+ } | {
426
+ type: "basic";
427
+ username: string;
428
+ password: string;
429
+ } | {
430
+ type: "oauth2";
431
+ tokenUrl: string;
432
+ clientId: string;
433
+ clientSecret: string;
434
+ scope?: string;
435
+ clientAuth?: "body" | "basic";
436
+ audience?: string;
437
+ } | {
438
+ type: "query";
439
+ param: string;
440
+ value: string;
441
+ };
442
+ headers: {
443
+ [key: string]: string;
444
+ };
445
+ csrf: boolean;
446
+ paging: "skip" | "server";
447
+ tools: {
448
+ name: string;
449
+ description: string;
450
+ kind: "list" | "get" | "create" | "update" | "function" | "action";
451
+ entitySet?: string;
452
+ function?: string;
453
+ key: {
454
+ [key: string]: {
455
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
456
+ description: string;
457
+ property?: string;
458
+ required?: boolean;
459
+ limit?: string;
460
+ };
461
+ };
462
+ filters: {
463
+ [key: string]: {
464
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
465
+ description: string;
466
+ property?: string;
467
+ required?: boolean;
468
+ limit?: string;
469
+ op: "eq" | "ne" | "gt" | "ge" | "lt" | "le" | "contains" | "startswith";
470
+ };
471
+ };
472
+ fields: {
473
+ [key: string]: {
474
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
475
+ description: string;
476
+ property?: string;
477
+ required?: boolean;
478
+ limit?: string;
479
+ };
480
+ };
481
+ params: {
482
+ [key: string]: {
483
+ type: "string" | "integer" | "number" | "decimal" | "boolean" | "guid" | "datetime" | "datetimeoffset";
484
+ description: string;
485
+ property?: string;
486
+ required?: boolean;
487
+ limit?: string;
488
+ };
489
+ };
490
+ select: string[];
491
+ orderBy?: string;
492
+ top: number;
493
+ destructive: boolean;
494
+ answerLimits: {
495
+ field: string;
496
+ limit: string;
497
+ }[];
498
+ }[];
499
+ allowInsecureHttp: boolean;
500
+ };
501
+ sql?: {
502
+ engine: "postgres" | "sqlserver" | "mysql" | "oracle";
503
+ host: string;
504
+ port?: number;
505
+ database: string;
506
+ auth: {
507
+ user: string;
508
+ password: string;
509
+ };
510
+ tls: "verify" | "insecure" | "off";
511
+ timeoutSeconds: number;
512
+ maxRows: number;
513
+ tools: {
514
+ name: string;
515
+ description: string;
516
+ sql: string;
517
+ params: {
518
+ [key: string]: {
519
+ type: "string" | "number" | "integer" | "boolean";
520
+ description: string;
521
+ required: boolean;
522
+ limit?: string;
523
+ };
524
+ };
525
+ write: boolean;
526
+ destructive: boolean;
527
+ answerLimits: {
528
+ column: string;
529
+ limit: string;
530
+ }[];
531
+ }[];
532
+ };
533
+ events?: {
534
+ types: {
535
+ id: string;
536
+ label: string;
537
+ }[];
538
+ fields: {
539
+ [key: string]: string;
540
+ };
541
+ limits: {
542
+ [key: string]: string;
543
+ };
544
+ webhook?: {
545
+ verify: {
546
+ type: "hmac-sha256";
547
+ header: string;
548
+ prefix: string;
549
+ } | {
550
+ type: "token";
551
+ header: string;
552
+ } | {
553
+ type: "none";
554
+ };
555
+ allowInsecure: boolean;
556
+ type: {
557
+ field: string;
558
+ } | {
559
+ header: string;
560
+ };
561
+ deliveryId?: {
562
+ field: string;
563
+ } | {
564
+ header: string;
565
+ };
566
+ timestamp?: {
567
+ at: {
568
+ field: string;
569
+ } | {
570
+ header: string;
571
+ };
572
+ unit: "s" | "ms" | "iso";
573
+ toleranceSeconds: number;
574
+ };
575
+ setup: {
576
+ title: string;
577
+ body: string;
578
+ link?: {
579
+ label: string;
580
+ href: string;
581
+ };
582
+ copy?: string[];
583
+ shell?: "bash" | "powershell";
584
+ permissions?: boolean;
585
+ certificate?: boolean;
586
+ click?: string[];
587
+ clickUnavailable?: true;
588
+ siteRole?: "read" | "write";
589
+ agentCheck?: boolean;
590
+ confirm?: string;
591
+ live?: string;
592
+ settings?: {
593
+ id: string;
594
+ label: string;
595
+ help?: string;
596
+ placeholder?: string;
597
+ pattern: string;
598
+ }[];
599
+ option?: {
600
+ field: string;
601
+ value: string;
602
+ };
603
+ }[];
604
+ register?: {
605
+ method: "GET" | "POST" | "PUT";
606
+ path: string;
607
+ body?: unknown;
608
+ location: string;
609
+ };
610
+ };
611
+ self?: {
612
+ request: {
613
+ method: "GET" | "POST" | "PUT";
614
+ path: string;
615
+ body?: unknown;
616
+ };
617
+ id: string;
618
+ fields: string[];
619
+ };
620
+ poll?: {
621
+ request: {
622
+ method: "GET" | "POST" | "PUT";
623
+ path: string;
624
+ body?: unknown;
625
+ };
626
+ filter?: string;
627
+ items: string;
628
+ wrap?: string;
629
+ cursor: string;
630
+ deliveryId: string[];
631
+ types: {
632
+ type: string;
633
+ since?: string;
634
+ }[];
635
+ };
636
+ };
637
+ }[]>;
638
+ /** The deployment's apps and the organization's own internal apps. */
639
+ orgConnectors: (o: string) => Promise<{
640
+ id: string;
641
+ name: string;
642
+ description: string;
643
+ logo: string;
644
+ identity: string;
645
+ signsInAs?: "agentBot";
646
+ provider?: string;
647
+ order?: number;
648
+ connectionKind: "guided";
649
+ accountKey: string;
650
+ scopes?: string[];
651
+ setup: {
652
+ title: string;
653
+ body: string;
654
+ link?: {
655
+ label: string;
656
+ href: string;
657
+ };
658
+ copy?: string[];
659
+ shell?: "bash" | "powershell";
660
+ permissions?: boolean;
661
+ certificate?: boolean;
662
+ click?: string[];
663
+ clickUnavailable?: true;
664
+ siteRole?: "read" | "write";
665
+ agentCheck?: boolean;
666
+ confirm?: string;
667
+ live?: string;
668
+ settings?: {
669
+ id: string;
670
+ label: string;
671
+ help?: string;
672
+ placeholder?: string;
673
+ pattern: string;
674
+ }[];
675
+ option?: {
676
+ field: string;
677
+ value: string;
678
+ };
679
+ capabilities?: string[];
680
+ }[];
681
+ afterConnect: {
682
+ title: string;
683
+ body: string;
684
+ link?: {
685
+ label: string;
686
+ href: string;
687
+ };
688
+ copy?: string[];
689
+ shell?: "bash" | "powershell";
690
+ permissions?: boolean;
691
+ certificate?: boolean;
692
+ click?: string[];
693
+ clickUnavailable?: true;
694
+ siteRole?: "read" | "write";
695
+ agentCheck?: boolean;
696
+ confirm?: string;
697
+ live?: string;
698
+ settings?: {
699
+ id: string;
700
+ label: string;
701
+ help?: string;
702
+ placeholder?: string;
703
+ pattern: string;
704
+ }[];
705
+ option?: {
706
+ field: string;
707
+ value: string;
708
+ };
709
+ capabilities?: string[];
710
+ }[];
711
+ fields: {
712
+ id: string;
713
+ label: string;
714
+ help?: string;
715
+ placeholder?: string;
716
+ secret: boolean;
717
+ options?: {
718
+ value: string;
719
+ label: string;
720
+ description: string;
721
+ scopes?: string[];
722
+ }[];
723
+ requires?: {
724
+ field: string;
725
+ value: string;
726
+ };
727
+ optional: boolean;
164
728
  }[];
165
729
  capabilities: {
166
730
  id: string;
@@ -244,6 +808,7 @@ export declare function createClient(options: ClientOptions): {
244
808
  path: string;
245
809
  label: string;
246
810
  show: string;
811
+ name?: string;
247
812
  match?: {
248
813
  [key: string]: string | number | boolean;
249
814
  };
@@ -261,6 +826,7 @@ export declare function createClient(options: ClientOptions): {
261
826
  path: string;
262
827
  label: string;
263
828
  show: string;
829
+ name?: string;
264
830
  match?: {
265
831
  [key: string]: string | number | boolean;
266
832
  };
@@ -276,6 +842,7 @@ export declare function createClient(options: ClientOptions): {
276
842
  revoke: string;
277
843
  http?: {
278
844
  baseUrl: string;
845
+ allowedHosts?: string[];
279
846
  auth: {
280
847
  type: "header";
281
848
  header: string;
@@ -294,6 +861,8 @@ export declare function createClient(options: ClientOptions): {
294
861
  clientId: string;
295
862
  clientSecret: string;
296
863
  scope?: string;
864
+ clientAuth?: "body" | "basic";
865
+ audience?: string;
297
866
  } | {
298
867
  type: "query";
299
868
  param: string;
@@ -302,6 +871,9 @@ export declare function createClient(options: ClientOptions): {
302
871
  headers: {
303
872
  [key: string]: string;
304
873
  };
874
+ fieldHeaders: {
875
+ [key: string]: string;
876
+ };
305
877
  tools: {
306
878
  name: string;
307
879
  description: string;
@@ -401,6 +973,7 @@ export declare function createClient(options: ClientOptions): {
401
973
  };
402
974
  odata?: {
403
975
  serviceRoot: string;
976
+ allowedHosts?: string[];
404
977
  version: "2" | "4";
405
978
  auth: {
406
979
  type: "header";
@@ -420,6 +993,8 @@ export declare function createClient(options: ClientOptions): {
420
993
  clientId: string;
421
994
  clientSecret: string;
422
995
  scope?: string;
996
+ clientAuth?: "body" | "basic";
997
+ audience?: string;
423
998
  } | {
424
999
  type: "query";
425
1000
  param: string;
@@ -616,11 +1191,50 @@ export declare function createClient(options: ClientOptions): {
616
1191
  deliveryId: string[];
617
1192
  types: {
618
1193
  type: string;
619
- same?: [string, string];
1194
+ since?: string;
620
1195
  }[];
621
1196
  };
622
1197
  };
623
1198
  }[]>;
1199
+ internalApps: (o: string) => Promise<{
1200
+ id: string;
1201
+ organizationId: string;
1202
+ definition: {
1203
+ [key: string]: unknown;
1204
+ };
1205
+ problem: string | null;
1206
+ createdBy: string;
1207
+ createdAt: string;
1208
+ updatedBy: string;
1209
+ updatedAt: string;
1210
+ }[]>;
1211
+ internalApp: (o: string, a: string) => Promise<{
1212
+ id: string;
1213
+ organizationId: string;
1214
+ definition: {
1215
+ [key: string]: unknown;
1216
+ };
1217
+ problem: string | null;
1218
+ createdBy: string;
1219
+ createdAt: string;
1220
+ updatedBy: string;
1221
+ updatedAt: string;
1222
+ } | null>;
1223
+ saveInternalApp: (o: string, a: string, definition: Record<string, unknown>, by: string) => Promise<{
1224
+ app: import("./schema.js").components["schemas"]["InternalApp"];
1225
+ connector: import("./schema.js").components["schemas"]["Connector"];
1226
+ created: boolean;
1227
+ disconnected: boolean;
1228
+ grantsRemoved: string[];
1229
+ }>;
1230
+ deleteInternalApp: (o: string, a: string, by: string) => Promise<void>;
1231
+ draftInternalApp: (body: Body<"draftInternalApp">) => Promise<{
1232
+ definition: {
1233
+ [key: string]: unknown;
1234
+ };
1235
+ notes: string[];
1236
+ problem: string | null;
1237
+ }>;
624
1238
  providers: () => Promise<{
625
1239
  id: string;
626
1240
  name: string;