@wildix/wilma-tools-client 1.0.1

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 (130) hide show
  1. package/dist-cjs/WilmaTools.js +55 -0
  2. package/dist-cjs/WilmaToolsClient.js +51 -0
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  5. package/dist-cjs/commands/CreateConnectorCommand.js +20 -0
  6. package/dist-cjs/commands/CreateToolCommand.js +20 -0
  7. package/dist-cjs/commands/DeleteConnectorCommand.js +20 -0
  8. package/dist-cjs/commands/DeleteToolCommand.js +20 -0
  9. package/dist-cjs/commands/DescribeCapabilitiesCommand.js +20 -0
  10. package/dist-cjs/commands/DescribeConnectorsCommand.js +20 -0
  11. package/dist-cjs/commands/DescribeToolsCommand.js +20 -0
  12. package/dist-cjs/commands/DiscoverToolsCommand.js +20 -0
  13. package/dist-cjs/commands/ExecuteConnectorCommand.js +20 -0
  14. package/dist-cjs/commands/ExecuteToolCommand.js +20 -0
  15. package/dist-cjs/commands/GetConnectorCommand.js +20 -0
  16. package/dist-cjs/commands/GetConnectorDefinitionCommand.js +20 -0
  17. package/dist-cjs/commands/GetToolCommand.js +20 -0
  18. package/dist-cjs/commands/ListConnectorDefinitionsCommand.js +20 -0
  19. package/dist-cjs/commands/ListConnectorsCommand.js +20 -0
  20. package/dist-cjs/commands/ListToolsCommand.js +20 -0
  21. package/dist-cjs/commands/ResolveConnectorConfigurationCommand.js +20 -0
  22. package/dist-cjs/commands/UpdateConnectorCommand.js +20 -0
  23. package/dist-cjs/commands/UpdateToolCommand.js +20 -0
  24. package/dist-cjs/commands/index.js +22 -0
  25. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  26. package/dist-cjs/endpoint/bdd.js +28 -0
  27. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  28. package/dist-cjs/extensionConfiguration.js +2 -0
  29. package/dist-cjs/index.js +14 -0
  30. package/dist-cjs/models/WilmaToolsServiceException.js +12 -0
  31. package/dist-cjs/models/enums.js +12 -0
  32. package/dist-cjs/models/errors.js +116 -0
  33. package/dist-cjs/models/models_0.js +2 -0
  34. package/dist-cjs/pagination/Interfaces.js +2 -0
  35. package/dist-cjs/pagination/ListConnectorDefinitionsPaginator.js +7 -0
  36. package/dist-cjs/pagination/ListConnectorsPaginator.js +7 -0
  37. package/dist-cjs/pagination/index.js +6 -0
  38. package/dist-cjs/runtimeConfig.browser.js +32 -0
  39. package/dist-cjs/runtimeConfig.js +41 -0
  40. package/dist-cjs/runtimeConfig.native.js +15 -0
  41. package/dist-cjs/runtimeConfig.shared.js +51 -0
  42. package/dist-cjs/runtimeExtensions.js +12 -0
  43. package/dist-cjs/schemas/schemas_0.js +690 -0
  44. package/dist-es/WilmaTools.js +51 -0
  45. package/dist-es/WilmaToolsClient.js +47 -0
  46. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  47. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  48. package/dist-es/commands/CreateConnectorCommand.js +16 -0
  49. package/dist-es/commands/CreateToolCommand.js +16 -0
  50. package/dist-es/commands/DeleteConnectorCommand.js +16 -0
  51. package/dist-es/commands/DeleteToolCommand.js +16 -0
  52. package/dist-es/commands/DescribeCapabilitiesCommand.js +16 -0
  53. package/dist-es/commands/DescribeConnectorsCommand.js +16 -0
  54. package/dist-es/commands/DescribeToolsCommand.js +16 -0
  55. package/dist-es/commands/DiscoverToolsCommand.js +16 -0
  56. package/dist-es/commands/ExecuteConnectorCommand.js +16 -0
  57. package/dist-es/commands/ExecuteToolCommand.js +16 -0
  58. package/dist-es/commands/GetConnectorCommand.js +16 -0
  59. package/dist-es/commands/GetConnectorDefinitionCommand.js +16 -0
  60. package/dist-es/commands/GetToolCommand.js +16 -0
  61. package/dist-es/commands/ListConnectorDefinitionsCommand.js +16 -0
  62. package/dist-es/commands/ListConnectorsCommand.js +16 -0
  63. package/dist-es/commands/ListToolsCommand.js +16 -0
  64. package/dist-es/commands/ResolveConnectorConfigurationCommand.js +16 -0
  65. package/dist-es/commands/UpdateConnectorCommand.js +16 -0
  66. package/dist-es/commands/UpdateToolCommand.js +16 -0
  67. package/dist-es/commands/index.js +19 -0
  68. package/dist-es/endpoint/EndpointParameters.js +12 -0
  69. package/dist-es/endpoint/bdd.js +25 -0
  70. package/dist-es/endpoint/endpointResolver.js +12 -0
  71. package/dist-es/extensionConfiguration.js +1 -0
  72. package/dist-es/index.js +9 -0
  73. package/dist-es/models/WilmaToolsServiceException.js +8 -0
  74. package/dist-es/models/enums.js +9 -0
  75. package/dist-es/models/errors.js +105 -0
  76. package/dist-es/models/models_0.js +1 -0
  77. package/dist-es/pagination/Interfaces.js +1 -0
  78. package/dist-es/pagination/ListConnectorDefinitionsPaginator.js +4 -0
  79. package/dist-es/pagination/ListConnectorsPaginator.js +4 -0
  80. package/dist-es/pagination/index.js +3 -0
  81. package/dist-es/runtimeConfig.browser.js +27 -0
  82. package/dist-es/runtimeConfig.js +36 -0
  83. package/dist-es/runtimeConfig.native.js +11 -0
  84. package/dist-es/runtimeConfig.shared.js +47 -0
  85. package/dist-es/runtimeExtensions.js +8 -0
  86. package/dist-es/schemas/schemas_0.js +686 -0
  87. package/dist-types/WilmaTools.d.ts +168 -0
  88. package/dist-types/WilmaToolsClient.d.ts +189 -0
  89. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  90. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  91. package/dist-types/commands/CreateConnectorCommand.d.ts +138 -0
  92. package/dist-types/commands/CreateToolCommand.d.ts +178 -0
  93. package/dist-types/commands/DeleteConnectorCommand.d.ts +87 -0
  94. package/dist-types/commands/DeleteToolCommand.d.ts +87 -0
  95. package/dist-types/commands/DescribeCapabilitiesCommand.d.ts +111 -0
  96. package/dist-types/commands/DescribeConnectorsCommand.d.ts +100 -0
  97. package/dist-types/commands/DescribeToolsCommand.d.ts +98 -0
  98. package/dist-types/commands/DiscoverToolsCommand.d.ts +103 -0
  99. package/dist-types/commands/ExecuteConnectorCommand.d.ts +96 -0
  100. package/dist-types/commands/ExecuteToolCommand.d.ts +94 -0
  101. package/dist-types/commands/GetConnectorCommand.d.ts +116 -0
  102. package/dist-types/commands/GetConnectorDefinitionCommand.d.ts +150 -0
  103. package/dist-types/commands/GetToolCommand.d.ts +136 -0
  104. package/dist-types/commands/ListConnectorDefinitionsCommand.d.ts +154 -0
  105. package/dist-types/commands/ListConnectorsCommand.d.ts +120 -0
  106. package/dist-types/commands/ListToolsCommand.d.ts +137 -0
  107. package/dist-types/commands/ResolveConnectorConfigurationCommand.d.ts +106 -0
  108. package/dist-types/commands/UpdateConnectorCommand.d.ts +143 -0
  109. package/dist-types/commands/UpdateToolCommand.d.ts +183 -0
  110. package/dist-types/commands/index.d.ts +19 -0
  111. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  112. package/dist-types/endpoint/bdd.d.ts +2 -0
  113. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  114. package/dist-types/extensionConfiguration.d.ts +8 -0
  115. package/dist-types/index.d.ts +25 -0
  116. package/dist-types/models/WilmaToolsServiceException.d.ts +14 -0
  117. package/dist-types/models/enums.d.ts +46 -0
  118. package/dist-types/models/errors.d.ts +108 -0
  119. package/dist-types/models/models_0.d.ts +1602 -0
  120. package/dist-types/pagination/Interfaces.d.ts +8 -0
  121. package/dist-types/pagination/ListConnectorDefinitionsPaginator.d.ts +7 -0
  122. package/dist-types/pagination/ListConnectorsPaginator.d.ts +7 -0
  123. package/dist-types/pagination/index.d.ts +3 -0
  124. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  125. package/dist-types/runtimeConfig.d.ts +55 -0
  126. package/dist-types/runtimeConfig.native.d.ts +54 -0
  127. package/dist-types/runtimeConfig.shared.d.ts +32 -0
  128. package/dist-types/runtimeExtensions.d.ts +17 -0
  129. package/dist-types/schemas/schemas_0.d.ts +104 -0
  130. package/package.json +57 -0
@@ -0,0 +1,1602 @@
1
+ import type { DocumentType as __DocumentType } from "@smithy/types";
2
+ import type { ConnectorAuthorizationMode, ConnectorToolAccess } from "./enums";
3
+ /**
4
+ * A reference to a connection, held by other services in place of the credential. Resolved to a
5
+ * short-lived token server-to-server via GetConnectionToken.
6
+ * @public
7
+ */
8
+ export interface ConnectionRef {
9
+ /**
10
+ * Unique identifier of a configured connection.
11
+ * @public
12
+ */
13
+ id: string;
14
+ }
15
+ /**
16
+ * Compact connector description used to build the model-facing connector meta-tool at agent
17
+ * load time. The service resolves the connector instance and its pinned definition
18
+ * internally from `companyId` + `id` — callers pass no definition key, version, or enabled
19
+ * tool list. The detailed action catalogue and usage guidance are obtained separately at
20
+ * runtime via the connector's reserved `help` action (`ExecuteConnector`); browsing the full
21
+ * definition for configuration/exploration stays on `GetConnectorDefinition`.
22
+ * @public
23
+ */
24
+ export interface ConnectorDescription {
25
+ /**
26
+ * Connector instance identifier.
27
+ * @public
28
+ */
29
+ id: string;
30
+ /**
31
+ * Connector name exposed to administrators and AI agents. Used as the meta-tool name.
32
+ * @public
33
+ */
34
+ name: string;
35
+ /**
36
+ * Connector description exposed to administrators and AI agents. Used as the meta-tool
37
+ * description, which points the model at the `help` action.
38
+ * @public
39
+ */
40
+ description: string;
41
+ }
42
+ /**
43
+ * @public
44
+ */
45
+ export interface ToolDescription {
46
+ /**
47
+ * Unique identifier of the tool
48
+ * @public
49
+ */
50
+ id: string;
51
+ /**
52
+ * Name of the tool, e.g.: 'send_email'
53
+ * @public
54
+ */
55
+ name: string;
56
+ /**
57
+ * Description of the tool for people and AI. Optional; can be overridden per agent via AgentTool.description.
58
+ * @public
59
+ */
60
+ description?: string | undefined;
61
+ /**
62
+ * JSON Schema (2020-12) of the tool arguments, matching Tool.input.schema. Absent for tools that take no arguments.
63
+ * @public
64
+ */
65
+ schema?: __DocumentType | undefined;
66
+ }
67
+ /**
68
+ * Description of one wilma-tools-backed capability, tagged by kind. Entries correspond
69
+ * positionally to the requested `CapabilityRefs`.
70
+ * @public
71
+ */
72
+ export type CapabilityDescription = CapabilityDescription.ConnectorMember | CapabilityDescription.ToolMember | CapabilityDescription.$UnknownMember;
73
+ /**
74
+ * @public
75
+ */
76
+ export declare namespace CapabilityDescription {
77
+ /**
78
+ * Description of a standalone tool, same shape returned by `DescribeTools`.
79
+ * @public
80
+ */
81
+ interface ToolMember {
82
+ tool: ToolDescription;
83
+ connector?: never;
84
+ $unknown?: never;
85
+ }
86
+ /**
87
+ * Description of a configured connector, same shape returned by `DescribeConnectors`.
88
+ * @public
89
+ */
90
+ interface ConnectorMember {
91
+ tool?: never;
92
+ connector: ConnectorDescription;
93
+ $unknown?: never;
94
+ }
95
+ /**
96
+ * @public
97
+ */
98
+ interface $UnknownMember {
99
+ tool?: never;
100
+ connector?: never;
101
+ $unknown: [string, any];
102
+ }
103
+ /**
104
+ * @deprecated unused in schema-serde mode.
105
+ *
106
+ */
107
+ interface Visitor<T> {
108
+ tool: (value: ToolDescription) => T;
109
+ connector: (value: ConnectorDescription) => T;
110
+ _: (name: string, value: any) => T;
111
+ }
112
+ }
113
+ /**
114
+ * Reference to one wilma-tools-backed agent capability to describe: either a standalone
115
+ * Tool or a configured Connector. Mirrors the `tool` / `connector` members of the
116
+ * wilma-agents `AgentCapability` union.
117
+ * @public
118
+ */
119
+ export type CapabilityRef = CapabilityRef.ConnectorMember | CapabilityRef.ToolMember | CapabilityRef.$UnknownMember;
120
+ /**
121
+ * @public
122
+ */
123
+ export declare namespace CapabilityRef {
124
+ /**
125
+ * Standalone tool identifier.
126
+ * @public
127
+ */
128
+ interface ToolMember {
129
+ tool: string;
130
+ connector?: never;
131
+ $unknown?: never;
132
+ }
133
+ /**
134
+ * Configured connector instance identifier.
135
+ * @public
136
+ */
137
+ interface ConnectorMember {
138
+ tool?: never;
139
+ connector: string;
140
+ $unknown?: never;
141
+ }
142
+ /**
143
+ * @public
144
+ */
145
+ interface $UnknownMember {
146
+ tool?: never;
147
+ connector?: never;
148
+ $unknown: [string, any];
149
+ }
150
+ /**
151
+ * @deprecated unused in schema-serde mode.
152
+ *
153
+ */
154
+ interface Visitor<T> {
155
+ tool: (value: string) => T;
156
+ connector: (value: string) => T;
157
+ _: (name: string, value: any) => T;
158
+ }
159
+ }
160
+ /**
161
+ * Company-managed connection resolved through wilma-secrets.
162
+ * @public
163
+ */
164
+ export interface ConnectorSharedAuthorization {
165
+ /**
166
+ * Reference to a SHARED connection in wilma-secrets. The credential itself stays in
167
+ * wilma-secrets; the connector holds only this reference.
168
+ * @public
169
+ */
170
+ connection: ConnectionRef;
171
+ }
172
+ /**
173
+ * Marker selecting per-user authorization. Carries no connection reference: at execution the
174
+ * runtime resolves the executing user's own credential for this connector's provider through
175
+ * wilma-secrets (GetUserConnectionToken by provider + user). Users connect the provider
176
+ * themselves from the app; no admin connection is created.
177
+ * @public
178
+ */
179
+ export interface ConnectorUserAuthorization {
180
+ }
181
+ /**
182
+ * Credential selection for a configured connector. Credentials remain in wilma-secrets.
183
+ * @public
184
+ */
185
+ export type ConnectorAuthorization = ConnectorAuthorization.SharedMember | ConnectorAuthorization.UserMember | ConnectorAuthorization.$UnknownMember;
186
+ /**
187
+ * @public
188
+ */
189
+ export declare namespace ConnectorAuthorization {
190
+ /**
191
+ * Use one company-managed connection (a wilma-secrets Connection).
192
+ * @public
193
+ */
194
+ interface SharedMember {
195
+ shared: ConnectorSharedAuthorization;
196
+ user?: never;
197
+ $unknown?: never;
198
+ }
199
+ /**
200
+ * Resolve the executing user's own credential for the provider (a wilma-secrets USER connection).
201
+ * @public
202
+ */
203
+ interface UserMember {
204
+ shared?: never;
205
+ user: ConnectorUserAuthorization;
206
+ $unknown?: never;
207
+ }
208
+ /**
209
+ * @public
210
+ */
211
+ interface $UnknownMember {
212
+ shared?: never;
213
+ user?: never;
214
+ $unknown: [string, any];
215
+ }
216
+ /**
217
+ * @deprecated unused in schema-serde mode.
218
+ *
219
+ */
220
+ interface Visitor<T> {
221
+ shared: (value: ConnectorSharedAuthorization) => T;
222
+ user: (value: ConnectorUserAuthorization) => T;
223
+ _: (name: string, value: any) => T;
224
+ }
225
+ }
226
+ /**
227
+ * Reference to one immutable connector definition.
228
+ * @public
229
+ */
230
+ export interface ConnectorDefinitionRef {
231
+ /**
232
+ * Stable definition identifier.
233
+ * @public
234
+ */
235
+ key: string;
236
+ /**
237
+ * Exact definition version.
238
+ * @public
239
+ */
240
+ version: string;
241
+ }
242
+ /**
243
+ * Marker: grant every tool, including DESTRUCTIVE.
244
+ * @public
245
+ */
246
+ export interface ConnectorGrantAll {
247
+ }
248
+ /**
249
+ * Marker: grant every READ tool.
250
+ * @public
251
+ */
252
+ export interface ConnectorGrantRead {
253
+ }
254
+ /**
255
+ * Marker: grant every READ and WRITE tool.
256
+ * @public
257
+ */
258
+ export interface ConnectorGrantReadWrite {
259
+ }
260
+ /**
261
+ * Coarse, low-verbosity permission grant for a configured connector. The service computes the
262
+ * effective, server-enforced tool set by filtering the pinned definition's tools with this
263
+ * grant (using each tool's authoritative `ConnectorToolAccess`), and requests only the scopes
264
+ * the grant implies at connection time.
265
+ *
266
+ * The three coarse members carry no data (empty structures); `tools` is the advanced escape
267
+ * hatch that names tools explicitly.
268
+ * @public
269
+ */
270
+ export type ConnectorToolGrant = ConnectorToolGrant.AllMember | ConnectorToolGrant.ReadMember | ConnectorToolGrant.ReadWriteMember | ConnectorToolGrant.ToolsMember | ConnectorToolGrant.$UnknownMember;
271
+ /**
272
+ * @public
273
+ */
274
+ export declare namespace ConnectorToolGrant {
275
+ /**
276
+ * "Allow read" — every READ tool. The common default.
277
+ * @public
278
+ */
279
+ interface ReadMember {
280
+ read: ConnectorGrantRead;
281
+ readWrite?: never;
282
+ all?: never;
283
+ tools?: never;
284
+ $unknown?: never;
285
+ }
286
+ /**
287
+ * "Allow write" — every READ and WRITE tool; DESTRUCTIVE tools excluded.
288
+ * @public
289
+ */
290
+ interface ReadWriteMember {
291
+ read?: never;
292
+ readWrite: ConnectorGrantReadWrite;
293
+ all?: never;
294
+ tools?: never;
295
+ $unknown?: never;
296
+ }
297
+ /**
298
+ * "Full access" — every tool, including DESTRUCTIVE.
299
+ * @public
300
+ */
301
+ interface AllMember {
302
+ read?: never;
303
+ readWrite?: never;
304
+ all: ConnectorGrantAll;
305
+ tools?: never;
306
+ $unknown?: never;
307
+ }
308
+ /**
309
+ * Advanced: an explicit allowlist of tool ids, regardless of access class.
310
+ * @public
311
+ */
312
+ interface ToolsMember {
313
+ read?: never;
314
+ readWrite?: never;
315
+ all?: never;
316
+ tools: string[];
317
+ $unknown?: never;
318
+ }
319
+ /**
320
+ * @public
321
+ */
322
+ interface $UnknownMember {
323
+ read?: never;
324
+ readWrite?: never;
325
+ all?: never;
326
+ tools?: never;
327
+ $unknown: [string, any];
328
+ }
329
+ /**
330
+ * @deprecated unused in schema-serde mode.
331
+ *
332
+ */
333
+ interface Visitor<T> {
334
+ read: (value: ConnectorGrantRead) => T;
335
+ readWrite: (value: ConnectorGrantReadWrite) => T;
336
+ all: (value: ConnectorGrantAll) => T;
337
+ tools: (value: string[]) => T;
338
+ _: (name: string, value: any) => T;
339
+ }
340
+ }
341
+ /**
342
+ * Company-owned configured connector.
343
+ * @public
344
+ */
345
+ export interface Connector {
346
+ /**
347
+ * Immutable definition used to validate configuration and execute tools.
348
+ * @public
349
+ */
350
+ definition: ConnectorDefinitionRef;
351
+ /**
352
+ * Values validated against the definition configuration schema.
353
+ * @public
354
+ */
355
+ configuration: __DocumentType;
356
+ /**
357
+ * Credential selection, omitted when no authorization is required. The same wilma-secrets
358
+ * connection reference may be reused across multiple Tools and Connectors.
359
+ * @public
360
+ */
361
+ authorization?: ConnectorAuthorization | undefined;
362
+ /**
363
+ * Name exposed to administrators and AI agents.
364
+ * @public
365
+ */
366
+ name: string;
367
+ /**
368
+ * Description exposed to administrators and AI agents.
369
+ * @public
370
+ */
371
+ description: string;
372
+ /**
373
+ * Which tools are available to callers and agents. Use a coarse grant (`read` / `readWrite`
374
+ * / `all`) for most connectors; use `tools` for an explicit allowlist. Server-enforced for
375
+ * `ExecuteConnector`.
376
+ * @public
377
+ */
378
+ grant: ConnectorToolGrant;
379
+ /**
380
+ * Unique connector instance identifier.
381
+ * @public
382
+ */
383
+ id: string;
384
+ /**
385
+ * Company that owns this connector.
386
+ * @public
387
+ */
388
+ companyId: string;
389
+ /**
390
+ * Monotonic revision, incremented on every update. Pass it back on update for optimistic locking.
391
+ * @public
392
+ */
393
+ revision: number;
394
+ }
395
+ /**
396
+ * Authorization requirements declared by a connector definition.
397
+ *
398
+ * Scopes are NOT declared here. The set of OAuth scopes a connection needs is derived at
399
+ * runtime from the tools a `ConnectorToolGrant` actually enables — the union of their
400
+ * `authorizationScopes` — layered on the default scopes of the wilma-secrets
401
+ * `Provider`. This makes least-privilege automatic (a `read` grant requests only the read
402
+ * tools' scopes) and removes the definition-vs-granted duplication.
403
+ * @public
404
+ */
405
+ export interface ConnectorAuthorizationDefinition {
406
+ /**
407
+ * Provider key the connector authenticates against, e.g. `salesforce`.
408
+ * @public
409
+ */
410
+ provider: string;
411
+ /**
412
+ * Credential resolution modes supported by this connector.
413
+ * @public
414
+ */
415
+ modes: ConnectorAuthorizationMode[];
416
+ }
417
+ /**
418
+ * Configuration contract rendered by management clients and validated by the service.
419
+ * @public
420
+ */
421
+ export interface ConnectorConfigurationDefinition {
422
+ /**
423
+ * JSON Schema 2020-12 document describing persisted configuration.
424
+ * @public
425
+ */
426
+ schema: __DocumentType;
427
+ /**
428
+ * Presentation hints for a compatible JSON Schema form renderer.
429
+ * @public
430
+ */
431
+ uiSchema?: __DocumentType | undefined;
432
+ }
433
+ /**
434
+ * Display metadata for a connector catalog entry.
435
+ * @public
436
+ */
437
+ export interface ConnectorMetadata {
438
+ /**
439
+ * Human-readable connector name.
440
+ * @public
441
+ */
442
+ title: string;
443
+ /**
444
+ * Summary of the external system and supported use cases.
445
+ * @public
446
+ */
447
+ description: string;
448
+ /**
449
+ * Icon URL or renderer-known icon key.
450
+ * @public
451
+ */
452
+ icon?: string | undefined;
453
+ /**
454
+ * Catalog category used for discovery and filtering.
455
+ * @public
456
+ */
457
+ category?: string | undefined;
458
+ /**
459
+ * Link to external connector documentation.
460
+ * @public
461
+ */
462
+ documentationUrl?: string | undefined;
463
+ }
464
+ /**
465
+ * A named, on-demand help document. Reference documents implement progressive disclosure for
466
+ * rich connectors: the `help` index lists each reference's `name` + `summary`, and the model
467
+ * loads a document's `content` only when it decides it needs it (`\{"help": \{"reference": "..."\}\}`).
468
+ * This keeps a 100-tool connector from dumping every schema and guide into the context at once.
469
+ * @public
470
+ */
471
+ export interface ConnectorReference {
472
+ /**
473
+ * Load key, unique within the definition.
474
+ * @public
475
+ */
476
+ name: string;
477
+ /**
478
+ * Human-readable title.
479
+ * @public
480
+ */
481
+ title: string;
482
+ /**
483
+ * One-line summary shown in the `help` index so the model can decide whether to load it.
484
+ * @public
485
+ */
486
+ summary: string;
487
+ /**
488
+ * Full Markdown body, returned only when the model loads this reference by name.
489
+ * @public
490
+ */
491
+ content: string;
492
+ }
493
+ /**
494
+ * @public
495
+ */
496
+ export interface ToolInput {
497
+ /**
498
+ * JSON Schema (2020-12) describing the tool arguments. The model is offered this schema (minus any agent-predefined fields); ExecuteTool input is validated against it.
499
+ * @public
500
+ */
501
+ schema: __DocumentType;
502
+ }
503
+ /**
504
+ * Tool exposed by a connector definition.
505
+ * @public
506
+ */
507
+ export interface ConnectorTool {
508
+ /**
509
+ * Stable dispatch identifier used in `ExecuteConnector` input keys.
510
+ * @public
511
+ */
512
+ id: string;
513
+ /**
514
+ * Agent-facing tool name.
515
+ * @public
516
+ */
517
+ name: string;
518
+ /**
519
+ * One-line description used by people and AI agents to select the tool. Kept short — it
520
+ * appears in the `help` index for every enabled tool; extended guidance goes in `docs`.
521
+ * @public
522
+ */
523
+ description: string;
524
+ /**
525
+ * Authoritative access class. Required so the service can compute the effective tool set
526
+ * from a coarse `ConnectorToolGrant` and derive least-privilege scopes.
527
+ * @public
528
+ */
529
+ access: ConnectorToolAccess;
530
+ /**
531
+ * Whether repeating the call with identical arguments has no additional effect (retry-safe).
532
+ * The only behavioral hint kept: read/write/destructive come from `access`, and an
533
+ * "open world" flag carried no signal for connectors (which are external by definition).
534
+ * @public
535
+ */
536
+ idempotent?: boolean | undefined;
537
+ /**
538
+ * Optional grouping used to organize large catalogs in the `help` index and management UI
539
+ * (e.g. "Issues", "Pull requests"). Not an access control.
540
+ * @public
541
+ */
542
+ category?: string | undefined;
543
+ /**
544
+ * Tool arguments exposed to agents, using the same contract as `Tool.input`.
545
+ * @public
546
+ */
547
+ input: ToolInput;
548
+ /**
549
+ * Per-tool configuration contract, filled by an administrator when a Tool is created
550
+ * from this connector tool; values are stored on `ToolConnectorHandler.toolConfiguration`.
551
+ * Distinct from the definition-level `configuration`, which an administrator fills once
552
+ * when adding the connector itself (instance-wide concerns such as transport, credentials,
553
+ * or sender identity) — this contract covers what varies per created Tool (e.g. a webhook
554
+ * tool's URL and body template, an sms tool's message template). Omitted when the tool
555
+ * needs no per-tool configuration.
556
+ * @public
557
+ */
558
+ configuration?: ConnectorConfigurationDefinition | undefined;
559
+ /**
560
+ * Worked examples returned in this tool's `help` detail. Teach argument shape and common
561
+ * call patterns; not shown in the `help` index.
562
+ * @public
563
+ */
564
+ examples?: string[] | undefined;
565
+ /**
566
+ * Long-form Markdown usage notes returned in this tool's `help` detail (edge cases, field
567
+ * semantics, prerequisites such as "call `issues.list` first to get an id"). Loaded on
568
+ * demand, never in the index.
569
+ * @public
570
+ */
571
+ docs?: string | undefined;
572
+ /**
573
+ * Extra OAuth scopes this tool needs. The runtime unions these across the tools a grant
574
+ * enables to derive the connection's scope set; nothing is declared at the connector level.
575
+ * @public
576
+ */
577
+ authorizationScopes?: string[] | undefined;
578
+ }
579
+ /**
580
+ * Immutable server-owned connector definition.
581
+ *
582
+ * Both external integrations (e.g. `sentry`) and built-in tool providers (e.g. `email`,
583
+ * `webhook`, `search`, `chat`, `sms`, `calendar`) are published through this shape and served
584
+ * from the same catalog. Built-in definitions are derived from the service's code-first
585
+ * provider registry (a TypeScript module per provider colocating schemas and handler) and
586
+ * follow the same immutable versioning: a breaking change to a provider's configuration or
587
+ * input schema publishes a new version, and the handler keeps serving tools pinned to older
588
+ * versions.
589
+ * @public
590
+ */
591
+ export interface ConnectorDefinition {
592
+ /**
593
+ * Stable key and exact immutable version.
594
+ * @public
595
+ */
596
+ ref: ConnectorDefinitionRef;
597
+ /**
598
+ * Catalog display metadata.
599
+ * @public
600
+ */
601
+ metadata: ConnectorMetadata;
602
+ /**
603
+ * Connector instance configuration contract.
604
+ * @public
605
+ */
606
+ configuration: ConnectorConfigurationDefinition;
607
+ /**
608
+ * Authorization requirements, omitted when the connector needs no credentials.
609
+ * @public
610
+ */
611
+ authorization?: ConnectorAuthorizationDefinition | undefined;
612
+ /**
613
+ * Main help document (Markdown): the overview the model reads first via `\{"help": \{\}\}` —
614
+ * what the connector is for, how to work with it, and how its tools fit together. It should
615
+ * orient, not enumerate: the service appends the per-grant action index and the list of
616
+ * available reference documents automatically. Deep material belongs in `references`.
617
+ * @public
618
+ */
619
+ instructions?: string | undefined;
620
+ /**
621
+ * On-demand reference documents for progressive disclosure. Listed (name + summary) in the
622
+ * `help` index and loaded individually by name; keeps rich connectors from overwhelming the
623
+ * model's context.
624
+ * @public
625
+ */
626
+ references?: ConnectorReference[] | undefined;
627
+ /**
628
+ * Tools available in this definition version.
629
+ * @public
630
+ */
631
+ tools: ConnectorTool[];
632
+ /**
633
+ * Whether new instances should avoid this definition.
634
+ * @public
635
+ */
636
+ deprecated?: boolean | undefined;
637
+ /**
638
+ * Suggested replacement when this definition is deprecated.
639
+ * @public
640
+ */
641
+ replacedBy?: ConnectorDefinitionRef | undefined;
642
+ }
643
+ /**
644
+ * Result of executing a connector.
645
+ * @public
646
+ */
647
+ export interface ConnectorExecutionResult {
648
+ /**
649
+ * Structured tool output.
650
+ * @public
651
+ */
652
+ output: __DocumentType;
653
+ /**
654
+ * Identifier used to correlate logs and traces.
655
+ * @public
656
+ */
657
+ executionId: string;
658
+ /**
659
+ * Definition version used for validation and execution.
660
+ * @public
661
+ */
662
+ definitionVersion: string;
663
+ }
664
+ /**
665
+ * Fields supplied when a connector is created or replaced.
666
+ * @public
667
+ */
668
+ export interface CreateConnectorInput {
669
+ /**
670
+ * Immutable definition used to validate configuration and execute tools.
671
+ * @public
672
+ */
673
+ definition: ConnectorDefinitionRef;
674
+ /**
675
+ * Values validated against the definition configuration schema.
676
+ * @public
677
+ */
678
+ configuration: __DocumentType;
679
+ /**
680
+ * Credential selection, omitted when no authorization is required. The same wilma-secrets
681
+ * connection reference may be reused across multiple Tools and Connectors.
682
+ * @public
683
+ */
684
+ authorization?: ConnectorAuthorization | undefined;
685
+ /**
686
+ * Name exposed to administrators and AI agents.
687
+ * @public
688
+ */
689
+ name: string;
690
+ /**
691
+ * Description exposed to administrators and AI agents.
692
+ * @public
693
+ */
694
+ description: string;
695
+ /**
696
+ * Which tools are available to callers and agents. Use a coarse grant (`read` / `readWrite`
697
+ * / `all`) for most connectors; use `tools` for an explicit allowlist. Server-enforced for
698
+ * `ExecuteConnector`.
699
+ * @public
700
+ */
701
+ grant: ConnectorToolGrant;
702
+ /**
703
+ * The unique identifier of the tenant when a service token is used.
704
+ * @public
705
+ */
706
+ companyId?: string | undefined;
707
+ }
708
+ /**
709
+ * @public
710
+ */
711
+ export interface CreateConnectorOutput {
712
+ /**
713
+ * Created connector.
714
+ * @public
715
+ */
716
+ connector: Connector;
717
+ }
718
+ /**
719
+ * Handler for a connector-backed Tool created through `CreateTool`.
720
+ *
721
+ * Carries two configuration layers: `configuration` (from the mixin) holds the
722
+ * definition-level values an administrator supplies for the connector as a whole
723
+ * (transport, credentials, sender identity — validated against the definition
724
+ * `configuration.schema`), while `toolConfiguration` holds the values specific to this
725
+ * created Tool (validated against the pinned connector tool's `configuration.schema`).
726
+ *
727
+ * `Tool.input` follows copy-at-create semantics: when `input` is omitted on create, the
728
+ * service snapshots the pinned connector tool's input schema into the Tool; callers may
729
+ * instead provide — and later edit — a custom schema (e.g. remove a field from the input and
730
+ * supply it as a static value in `toolConfiguration`). The Tool owns its copy; definition
731
+ * changes never propagate to existing tools. Reshaping the input of a tool whose handler
732
+ * does not consume input through configuration templates fails at execution, not at write.
733
+ * @public
734
+ */
735
+ export interface ToolConnectorHandler {
736
+ /**
737
+ * Immutable definition used to validate configuration and execute tools.
738
+ * @public
739
+ */
740
+ definition: ConnectorDefinitionRef;
741
+ /**
742
+ * Values validated against the definition configuration schema.
743
+ * @public
744
+ */
745
+ configuration: __DocumentType;
746
+ /**
747
+ * Credential selection, omitted when no authorization is required. The same wilma-secrets
748
+ * connection reference may be reused across multiple Tools and Connectors.
749
+ * @public
750
+ */
751
+ authorization?: ConnectorAuthorization | undefined;
752
+ /**
753
+ * Connector tool from the pinned definition executed by this Tool.
754
+ * @public
755
+ */
756
+ toolId: string;
757
+ /**
758
+ * Values validated against the pinned connector tool's per-tool configuration schema
759
+ * (`ConnectorTool.configuration.schema`). Omitted when that tool declares no per-tool
760
+ * configuration contract.
761
+ * @public
762
+ */
763
+ toolConfiguration?: __DocumentType | undefined;
764
+ }
765
+ /**
766
+ * @public
767
+ */
768
+ export type ToolMcpAuthorization = ToolMcpAuthorization.ConnectionMember | ToolMcpAuthorization.CustomHeadersMember | ToolMcpAuthorization.$UnknownMember;
769
+ /**
770
+ * @public
771
+ */
772
+ export declare namespace ToolMcpAuthorization {
773
+ /**
774
+ * Reference to a reusable authorization in wilma-secrets (a Connection), shared across MCP servers and tools.
775
+ * @public
776
+ */
777
+ interface ConnectionMember {
778
+ connection: ConnectionRef;
779
+ customHeaders?: never;
780
+ $unknown?: never;
781
+ }
782
+ /**
783
+ * Custom headers authorization (use headers map for custom auth headers)
784
+ * @public
785
+ */
786
+ interface CustomHeadersMember {
787
+ connection?: never;
788
+ customHeaders: Record<string, string>;
789
+ $unknown?: never;
790
+ }
791
+ /**
792
+ * @public
793
+ */
794
+ interface $UnknownMember {
795
+ connection?: never;
796
+ customHeaders?: never;
797
+ $unknown: [string, any];
798
+ }
799
+ /**
800
+ * @deprecated unused in schema-serde mode.
801
+ *
802
+ */
803
+ interface Visitor<T> {
804
+ connection: (value: ConnectionRef) => T;
805
+ customHeaders: (value: Record<string, string>) => T;
806
+ _: (name: string, value: any) => T;
807
+ }
808
+ }
809
+ /**
810
+ * @public
811
+ */
812
+ export interface ToolMcpHandler {
813
+ /**
814
+ * MCP server endpoint URL
815
+ * @public
816
+ */
817
+ serverUrl: string;
818
+ /**
819
+ * Authorization configuration (API key, bearer token, or custom headers). Optional - MCP servers can be configured without authorization.
820
+ * @public
821
+ */
822
+ authorization?: ToolMcpAuthorization | undefined;
823
+ /**
824
+ * List of tools enabled for this MCP server.
825
+ * @public
826
+ */
827
+ tools: string[];
828
+ }
829
+ /**
830
+ * @public
831
+ */
832
+ export interface ToolMcpToolHandler {
833
+ /**
834
+ * ID of the Tool that represents the MCP server connection (the Tool with handler.mcp containing serverUrl and authorization)
835
+ * @public
836
+ */
837
+ mcpToolId: string;
838
+ /**
839
+ * Name of the tool on the MCP server. This matches the tool name returned from DiscoverTools operation.
840
+ * @public
841
+ */
842
+ mcpToolName: string;
843
+ }
844
+ /**
845
+ * Handler of the tool. Every tool executes through one of three mechanisms: a pinned connector definition (built-in providers such as email, webhook, search, chat, sms, calendar — and external integrations — share the same contract), an MCP server registration, or a single tool on a registered MCP server.
846
+ * @public
847
+ */
848
+ export type ToolHandler = ToolHandler.ConnectorMember | ToolHandler.McpMember | ToolHandler.McpToolMember | ToolHandler.$UnknownMember;
849
+ /**
850
+ * @public
851
+ */
852
+ export declare namespace ToolHandler {
853
+ /**
854
+ * Connector-backed Tool executing one tool from a pinned, immutable connector definition served by the connector catalog (ListConnectorDefinitions). Configuration is validated against the definition's configSchema on the backend; credentials referenced from the configuration are resolved server-to-server at execution time.
855
+ * @public
856
+ */
857
+ interface ConnectorMember {
858
+ connector: ToolConnectorHandler;
859
+ mcp?: never;
860
+ mcpTool?: never;
861
+ $unknown?: never;
862
+ }
863
+ /**
864
+ * MCP server registration: endpoint, authorization and the list of enabled tools.
865
+ * @public
866
+ */
867
+ interface McpMember {
868
+ connector?: never;
869
+ mcp: ToolMcpHandler;
870
+ mcpTool?: never;
871
+ $unknown?: never;
872
+ }
873
+ /**
874
+ * A single tool exposed by a registered MCP server.
875
+ * @public
876
+ */
877
+ interface McpToolMember {
878
+ connector?: never;
879
+ mcp?: never;
880
+ mcpTool: ToolMcpToolHandler;
881
+ $unknown?: never;
882
+ }
883
+ /**
884
+ * @public
885
+ */
886
+ interface $UnknownMember {
887
+ connector?: never;
888
+ mcp?: never;
889
+ mcpTool?: never;
890
+ $unknown: [string, any];
891
+ }
892
+ /**
893
+ * @deprecated unused in schema-serde mode.
894
+ *
895
+ */
896
+ interface Visitor<T> {
897
+ connector: (value: ToolConnectorHandler) => T;
898
+ mcp: (value: ToolMcpHandler) => T;
899
+ mcpTool: (value: ToolMcpToolHandler) => T;
900
+ _: (name: string, value: any) => T;
901
+ }
902
+ }
903
+ /**
904
+ * @public
905
+ */
906
+ export interface CreateToolInput {
907
+ /**
908
+ * The unique identifier of the tenant when a service token is used.
909
+ * @public
910
+ */
911
+ companyId?: string | undefined;
912
+ /**
913
+ * Name of the tool, e.g.: 'send_email'
914
+ * @public
915
+ */
916
+ name: string;
917
+ /**
918
+ * Category of the tool, e.g.: 'Support'
919
+ * @public
920
+ */
921
+ category: string;
922
+ /**
923
+ * Description of the tool, used by AI to understand the purpose of the tool. Optional.
924
+ * @public
925
+ */
926
+ description?: string | undefined;
927
+ /**
928
+ * Agent arguments (copy-at-create). For connector-backed tools, omit to copy the pinned connector tool's input schema into the created Tool, or provide a custom schema. The created Tool owns its copy; later definition changes never propagate.
929
+ * @public
930
+ */
931
+ input?: ToolInput | undefined;
932
+ /**
933
+ * Handler of the tool, used to execute the tool.
934
+ * @public
935
+ */
936
+ handler: ToolHandler;
937
+ }
938
+ /**
939
+ * @public
940
+ */
941
+ export interface Tool {
942
+ /**
943
+ * Unique identifier of the tool
944
+ * @public
945
+ */
946
+ id: string;
947
+ /**
948
+ * Company ID that owns this tool
949
+ * @public
950
+ */
951
+ companyId: string;
952
+ /**
953
+ * Name of the tool, e.g.: 'send_email'
954
+ * @public
955
+ */
956
+ name: string;
957
+ /**
958
+ * Category of the tool, e.g.: 'Support'
959
+ * @public
960
+ */
961
+ category: string;
962
+ /**
963
+ * Description of the tool for people and AI. Optional; can be overridden per agent via AgentTool.description.
964
+ * @public
965
+ */
966
+ description?: string | undefined;
967
+ /**
968
+ * Tool arguments owned by this tool (copy-at-create). For connector-backed tools the service snapshots the pinned connector tool's input schema here when the caller omits it; the caller may also supply or later edit a custom schema. Definition changes never propagate to existing tools. Absent only for tools that take no arguments (e.g. MCP server registrations).
969
+ * @public
970
+ */
971
+ input?: ToolInput | undefined;
972
+ /**
973
+ * Handler of the tool, used to execute the tool
974
+ * @public
975
+ */
976
+ handler: ToolHandler;
977
+ /**
978
+ * Monotonic revision, incremented on every update. Pass it back on update for optimistic locking.
979
+ * @public
980
+ */
981
+ revision: number;
982
+ }
983
+ /**
984
+ * @public
985
+ */
986
+ export interface CreateToolOutput {
987
+ tool: Tool;
988
+ }
989
+ /**
990
+ * @public
991
+ */
992
+ export interface DeleteConnectorInput {
993
+ /**
994
+ * The unique identifier of the tenant when a service token is used.
995
+ * @public
996
+ */
997
+ companyId?: string | undefined;
998
+ /**
999
+ * Connector instance identifier.
1000
+ * @public
1001
+ */
1002
+ connectorId: string;
1003
+ }
1004
+ /**
1005
+ * @public
1006
+ */
1007
+ export interface DeleteConnectorOutput {
1008
+ }
1009
+ /**
1010
+ * @public
1011
+ */
1012
+ export interface DeleteToolInput {
1013
+ /**
1014
+ * The unique identifier of the tenant when a service token is used.
1015
+ * @public
1016
+ */
1017
+ companyId?: string | undefined;
1018
+ /**
1019
+ * Unique identifier of the tool.
1020
+ * @public
1021
+ */
1022
+ toolId: string;
1023
+ }
1024
+ /**
1025
+ * @public
1026
+ */
1027
+ export interface DeleteToolOutput {
1028
+ }
1029
+ /**
1030
+ * @public
1031
+ */
1032
+ export interface DescribeCapabilitiesInput {
1033
+ /**
1034
+ * The unique identifier of the tenant when a service token is used.
1035
+ * @public
1036
+ */
1037
+ companyId?: string | undefined;
1038
+ /**
1039
+ * Tool and connector references to describe.
1040
+ * @public
1041
+ */
1042
+ capabilities: CapabilityRef[];
1043
+ }
1044
+ /**
1045
+ * @public
1046
+ */
1047
+ export interface DescribeCapabilitiesOutput {
1048
+ /**
1049
+ * Capability descriptions, corresponding positionally to the requested `capabilities`.
1050
+ * @public
1051
+ */
1052
+ descriptions: CapabilityDescription[];
1053
+ }
1054
+ /**
1055
+ * @public
1056
+ */
1057
+ export interface DescribeConnectorsInput {
1058
+ /**
1059
+ * The unique identifier of the tenant when a service token is used.
1060
+ * @public
1061
+ */
1062
+ companyId?: string | undefined;
1063
+ /**
1064
+ * Configured connector instance identifiers.
1065
+ * @public
1066
+ */
1067
+ ids: string[];
1068
+ }
1069
+ /**
1070
+ * @public
1071
+ */
1072
+ export interface DescribeConnectorsOutput {
1073
+ /**
1074
+ * Connector descriptions, one per requested id.
1075
+ * @public
1076
+ */
1077
+ descriptions: ConnectorDescription[];
1078
+ }
1079
+ /**
1080
+ * @public
1081
+ */
1082
+ export interface DescribeToolsInput {
1083
+ /**
1084
+ * The unique identifier of the tenant when a service token is used.
1085
+ * @public
1086
+ */
1087
+ companyId?: string | undefined;
1088
+ /**
1089
+ * List of tool IDs.
1090
+ * @public
1091
+ */
1092
+ ids: string[];
1093
+ }
1094
+ /**
1095
+ * @public
1096
+ */
1097
+ export interface DescribeToolsOutput {
1098
+ /**
1099
+ * List of tool descriptions.
1100
+ * @public
1101
+ */
1102
+ descriptions: ToolDescription[];
1103
+ }
1104
+ /**
1105
+ * @public
1106
+ */
1107
+ export interface DiscoveredTool {
1108
+ /**
1109
+ * Name of the tool on the MCP server
1110
+ * @public
1111
+ */
1112
+ name: string;
1113
+ /**
1114
+ * Description of the tool
1115
+ * @public
1116
+ */
1117
+ description: string;
1118
+ /**
1119
+ * JSON Schema for the tool's input parameters
1120
+ * @public
1121
+ */
1122
+ inputSchema: __DocumentType;
1123
+ }
1124
+ /**
1125
+ * @public
1126
+ */
1127
+ export interface DiscoverToolsInput {
1128
+ /**
1129
+ * The unique identifier of the tenant when a service token is used.
1130
+ * @public
1131
+ */
1132
+ companyId?: string | undefined;
1133
+ /**
1134
+ * MCP server endpoint URL
1135
+ * @public
1136
+ */
1137
+ serverUrl: string;
1138
+ /**
1139
+ * Authorization configuration (API key, bearer token, or custom headers)
1140
+ * @public
1141
+ */
1142
+ authorization?: ToolMcpAuthorization | undefined;
1143
+ }
1144
+ /**
1145
+ * @public
1146
+ */
1147
+ export interface DiscoverToolsOutput {
1148
+ /**
1149
+ * List of discovered tools from the MCP server
1150
+ * @public
1151
+ */
1152
+ tools: DiscoveredTool[];
1153
+ }
1154
+ /**
1155
+ * @public
1156
+ */
1157
+ export interface ExecuteConnectorInput {
1158
+ /**
1159
+ * The unique identifier of the tenant when a service token is used.
1160
+ * @public
1161
+ */
1162
+ companyId?: string | undefined;
1163
+ /**
1164
+ * Connector instance identifier.
1165
+ * @public
1166
+ */
1167
+ connectorId: string;
1168
+ /**
1169
+ * Invocation payload from the model or agent. For multi-tool connectors this
1170
+ * is typically an object with exactly one connector tool id key and argument object.
1171
+ *
1172
+ * `help` is a reserved, progressive-disclosure action producing guidance in `result.output`
1173
+ * (nothing external is dispatched; a definition must not declare a tool with id `help`):
1174
+ * - `\{"help": \{\}\}` — the INDEX: the connector's `instructions` overview, the enabled
1175
+ * actions grouped by `category` (id, name, one-line description, access) filtered by the
1176
+ * grant, and the list of reference documents (name + summary). Deliberately omits input
1177
+ * schemas, examples, and long docs so a rich connector stays light on first read.
1178
+ * - `\{"help": \{"action": "<toolId>"\}\}` — DETAIL for one action: full input schema,
1179
+ * `examples`, and `docs`.
1180
+ * - `\{"help": \{"reference": "<name>"\}\}` — the full body of one reference document.
1181
+ * - `\{"help": \{"category": "<name>"\}\}` — details for every action in a category.
1182
+ * The model reads the index first, then loads only the action or reference it needs.
1183
+ * @public
1184
+ */
1185
+ input: __DocumentType;
1186
+ /**
1187
+ * Service executing the connector, such as `chatbots` or `voicebots`.
1188
+ * @public
1189
+ */
1190
+ service?: string | undefined;
1191
+ /**
1192
+ * User identity required by user-authorized connectors.
1193
+ * @public
1194
+ */
1195
+ user?: string | undefined;
1196
+ }
1197
+ /**
1198
+ * @public
1199
+ */
1200
+ export interface ExecuteConnectorOutput {
1201
+ /**
1202
+ * Structured tool result and execution metadata.
1203
+ * @public
1204
+ */
1205
+ result: ConnectorExecutionResult;
1206
+ }
1207
+ /**
1208
+ * @public
1209
+ */
1210
+ export interface ExecuteToolInput {
1211
+ /**
1212
+ * The unique identifier of the tenant when a service token is used.
1213
+ * @public
1214
+ */
1215
+ companyId?: string | undefined;
1216
+ /**
1217
+ * Unique identifier of the tool.
1218
+ * @public
1219
+ */
1220
+ id: string;
1221
+ /**
1222
+ * Input of the tool, used to pass data to the tool.
1223
+ * @public
1224
+ */
1225
+ input: __DocumentType;
1226
+ /**
1227
+ * Optional parameter, by which service the tool is executed, e.g. chatbots.
1228
+ * @public
1229
+ */
1230
+ service?: string | undefined;
1231
+ /**
1232
+ * Optional parameter, for which user the tool is executed, e.g. john.doe@example.com.
1233
+ * @public
1234
+ */
1235
+ user?: string | undefined;
1236
+ }
1237
+ /**
1238
+ * @public
1239
+ */
1240
+ export interface ToolExecutionResult {
1241
+ /**
1242
+ * Output of the tool execution
1243
+ * @public
1244
+ */
1245
+ output: __DocumentType;
1246
+ }
1247
+ /**
1248
+ * @public
1249
+ */
1250
+ export interface ExecuteToolOutput {
1251
+ /**
1252
+ * Result of the tool execution.
1253
+ * @public
1254
+ */
1255
+ result: ToolExecutionResult;
1256
+ }
1257
+ /**
1258
+ * @public
1259
+ */
1260
+ export interface GetConnectorInput {
1261
+ /**
1262
+ * The unique identifier of the tenant when a service token is used.
1263
+ * @public
1264
+ */
1265
+ companyId?: string | undefined;
1266
+ /**
1267
+ * Connector instance identifier.
1268
+ * @public
1269
+ */
1270
+ connectorId: string;
1271
+ }
1272
+ /**
1273
+ * @public
1274
+ */
1275
+ export interface GetConnectorOutput {
1276
+ /**
1277
+ * Requested connector.
1278
+ * @public
1279
+ */
1280
+ connector: Connector;
1281
+ }
1282
+ /**
1283
+ * @public
1284
+ */
1285
+ export interface GetConnectorDefinitionInput {
1286
+ /**
1287
+ * The unique identifier of the tenant when a service token is used.
1288
+ * @public
1289
+ */
1290
+ companyId?: string | undefined;
1291
+ /**
1292
+ * Stable connector definition key.
1293
+ * @public
1294
+ */
1295
+ key: string;
1296
+ /**
1297
+ * Exact immutable definition version.
1298
+ * @public
1299
+ */
1300
+ version: string;
1301
+ }
1302
+ /**
1303
+ * @public
1304
+ */
1305
+ export interface GetConnectorDefinitionOutput {
1306
+ /**
1307
+ * Requested connector definition.
1308
+ * @public
1309
+ */
1310
+ definition: ConnectorDefinition;
1311
+ }
1312
+ /**
1313
+ * @public
1314
+ */
1315
+ export interface GetToolInput {
1316
+ /**
1317
+ * The unique identifier of the tenant when a service token is used.
1318
+ * @public
1319
+ */
1320
+ companyId?: string | undefined;
1321
+ /**
1322
+ * Unique identifier of the tool.
1323
+ * @public
1324
+ */
1325
+ toolId: string;
1326
+ }
1327
+ /**
1328
+ * @public
1329
+ */
1330
+ export interface GetToolOutput {
1331
+ /**
1332
+ * Tool object with configuration.
1333
+ * @public
1334
+ */
1335
+ tool: Tool;
1336
+ }
1337
+ /**
1338
+ * @public
1339
+ */
1340
+ export interface ListConnectorDefinitionsInput {
1341
+ /**
1342
+ * The unique identifier of the tenant when a service token is used.
1343
+ * @public
1344
+ */
1345
+ companyId?: string | undefined;
1346
+ /**
1347
+ * Case-insensitive filter applied to connector titles, keys, and descriptions.
1348
+ * @public
1349
+ */
1350
+ query?: string | undefined;
1351
+ /**
1352
+ * Maximum number of definitions to return.
1353
+ * @public
1354
+ */
1355
+ pageSize?: number | undefined;
1356
+ /**
1357
+ * Token returned by the previous request.
1358
+ * @public
1359
+ */
1360
+ nextToken?: string | undefined;
1361
+ }
1362
+ /**
1363
+ * @public
1364
+ */
1365
+ export interface ListConnectorDefinitionsOutput {
1366
+ /**
1367
+ * Connector definitions in the current page.
1368
+ * @public
1369
+ */
1370
+ definitions: ConnectorDefinition[];
1371
+ /**
1372
+ * Token for the next page, omitted when no more results exist.
1373
+ * @public
1374
+ */
1375
+ nextToken?: string | undefined;
1376
+ }
1377
+ /**
1378
+ * @public
1379
+ */
1380
+ export interface ListConnectorsInput {
1381
+ /**
1382
+ * The unique identifier of the tenant when a service token is used.
1383
+ * @public
1384
+ */
1385
+ companyId?: string | undefined;
1386
+ /**
1387
+ * Maximum number of connectors to return.
1388
+ * @public
1389
+ */
1390
+ pageSize?: number | undefined;
1391
+ /**
1392
+ * Token returned by the previous request.
1393
+ * @public
1394
+ */
1395
+ nextToken?: string | undefined;
1396
+ }
1397
+ /**
1398
+ * @public
1399
+ */
1400
+ export interface ListConnectorsOutput {
1401
+ /**
1402
+ * Connectors in the current page.
1403
+ * @public
1404
+ */
1405
+ connectors: Connector[];
1406
+ /**
1407
+ * Token for the next page, omitted when no more results exist.
1408
+ * @public
1409
+ */
1410
+ nextToken?: string | undefined;
1411
+ }
1412
+ /**
1413
+ * @public
1414
+ */
1415
+ export interface ListToolsInput {
1416
+ /**
1417
+ * The unique identifier of the tenant when a service token is used.
1418
+ * @public
1419
+ */
1420
+ companyId?: string | undefined;
1421
+ }
1422
+ /**
1423
+ * @public
1424
+ */
1425
+ export interface ListToolsOutput {
1426
+ /**
1427
+ * List of tools.
1428
+ * @public
1429
+ */
1430
+ tools: Tool[];
1431
+ }
1432
+ /**
1433
+ * @public
1434
+ */
1435
+ export interface ResolveConnectorConfigurationInput {
1436
+ /**
1437
+ * The unique identifier of the tenant when a service token is used.
1438
+ * @public
1439
+ */
1440
+ companyId?: string | undefined;
1441
+ /**
1442
+ * Stable connector definition key.
1443
+ * @public
1444
+ */
1445
+ key: string;
1446
+ /**
1447
+ * Exact immutable definition version.
1448
+ * @public
1449
+ */
1450
+ version: string;
1451
+ /**
1452
+ * When set, resolve the per-tool configuration contract of this connector tool
1453
+ * (`ConnectorTool.configuration`) instead of the definition-level configuration.
1454
+ * @public
1455
+ */
1456
+ toolId?: string | undefined;
1457
+ /**
1458
+ * Current partial form values.
1459
+ * @public
1460
+ */
1461
+ values: __DocumentType;
1462
+ /**
1463
+ * Credentials used to resolve account-dependent options.
1464
+ * @public
1465
+ */
1466
+ authorization?: ConnectorAuthorization | undefined;
1467
+ /**
1468
+ * Executing user when user authorization is selected.
1469
+ * @public
1470
+ */
1471
+ user?: string | undefined;
1472
+ }
1473
+ /**
1474
+ * @public
1475
+ */
1476
+ export interface ResolveConnectorConfigurationOutput {
1477
+ /**
1478
+ * Configuration contract resolved for the current values and account.
1479
+ * @public
1480
+ */
1481
+ configuration: ConnectorConfigurationDefinition;
1482
+ }
1483
+ /**
1484
+ * Fields supplied when a connector is created or replaced.
1485
+ * @public
1486
+ */
1487
+ export interface UpdateConnectorInput {
1488
+ /**
1489
+ * Immutable definition used to validate configuration and execute tools.
1490
+ * @public
1491
+ */
1492
+ definition: ConnectorDefinitionRef;
1493
+ /**
1494
+ * Values validated against the definition configuration schema.
1495
+ * @public
1496
+ */
1497
+ configuration: __DocumentType;
1498
+ /**
1499
+ * Credential selection, omitted when no authorization is required. The same wilma-secrets
1500
+ * connection reference may be reused across multiple Tools and Connectors.
1501
+ * @public
1502
+ */
1503
+ authorization?: ConnectorAuthorization | undefined;
1504
+ /**
1505
+ * Name exposed to administrators and AI agents.
1506
+ * @public
1507
+ */
1508
+ name: string;
1509
+ /**
1510
+ * Description exposed to administrators and AI agents.
1511
+ * @public
1512
+ */
1513
+ description: string;
1514
+ /**
1515
+ * Which tools are available to callers and agents. Use a coarse grant (`read` / `readWrite`
1516
+ * / `all`) for most connectors; use `tools` for an explicit allowlist. Server-enforced for
1517
+ * `ExecuteConnector`.
1518
+ * @public
1519
+ */
1520
+ grant: ConnectorToolGrant;
1521
+ /**
1522
+ * The unique identifier of the tenant when a service token is used.
1523
+ * @public
1524
+ */
1525
+ companyId?: string | undefined;
1526
+ /**
1527
+ * Connector instance identifier.
1528
+ * @public
1529
+ */
1530
+ connectorId: string;
1531
+ /**
1532
+ * Connector revision this update is based on (optimistic locking). When it does not match the
1533
+ * current revision, RevisionConflictException is returned.
1534
+ * @public
1535
+ */
1536
+ revision: number;
1537
+ }
1538
+ /**
1539
+ * @public
1540
+ */
1541
+ export interface UpdateConnectorOutput {
1542
+ /**
1543
+ * Updated connector.
1544
+ * @public
1545
+ */
1546
+ connector: Connector;
1547
+ }
1548
+ /**
1549
+ * @public
1550
+ */
1551
+ export interface UpdateToolInput {
1552
+ /**
1553
+ * The unique identifier of the tenant when a service token is used.
1554
+ * @public
1555
+ */
1556
+ companyId?: string | undefined;
1557
+ /**
1558
+ * Unique identifier of the tool.
1559
+ * @public
1560
+ */
1561
+ toolId: string;
1562
+ /**
1563
+ * Tool revision this update is based on (optimistic locking). When it does not match the current revision, RevisionConflictException is returned.
1564
+ * @public
1565
+ */
1566
+ revision: number;
1567
+ /**
1568
+ * Name of the tool, e.g.: 'send_email'
1569
+ * @public
1570
+ */
1571
+ name: string;
1572
+ /**
1573
+ * Category of the tool, e.g.: 'Support'
1574
+ * @public
1575
+ */
1576
+ category: string;
1577
+ /**
1578
+ * Description of the tool, used by AI to understand the purpose of the tool. Optional.
1579
+ * @public
1580
+ */
1581
+ description?: string | undefined;
1582
+ /**
1583
+ * Agent arguments (copy semantics). For connector-backed tools, omit to re-copy the pinned connector tool's input schema, or provide a custom schema to keep or change the tool's own copy.
1584
+ * @public
1585
+ */
1586
+ input?: ToolInput | undefined;
1587
+ /**
1588
+ * Handler of the tool, used to execute the tool.
1589
+ * @public
1590
+ */
1591
+ handler: ToolHandler;
1592
+ }
1593
+ /**
1594
+ * @public
1595
+ */
1596
+ export interface UpdateToolOutput {
1597
+ /**
1598
+ * Updated tool object with configuration.
1599
+ * @public
1600
+ */
1601
+ tool: Tool;
1602
+ }