@wildix/wilma-agents-client 1.0.1 → 1.0.2

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 (72) hide show
  1. package/dist-cjs/WilmaAgents.js +12 -20
  2. package/dist-cjs/commands/{DeleteGuardrailCommand.js → CreateAgentDeploymentCommand.js} +6 -6
  3. package/dist-cjs/commands/{ExecuteAgentCommand.js → DeleteAgentDeploymentCommand.js} +6 -6
  4. package/dist-cjs/commands/{CreateGuardrailCommand.js → GetAgentDeploymentCommand.js} +6 -6
  5. package/dist-cjs/commands/{DeleteAgentAliasCommand.js → ListAgentDeploymentsCommand.js} +6 -6
  6. package/dist-cjs/commands/RestoreAgentVersionToDraftCommand.js +20 -0
  7. package/dist-cjs/commands/UpdateAgentDeploymentCommand.js +20 -0
  8. package/dist-cjs/commands/index.js +6 -10
  9. package/dist-cjs/models/enums.js +36 -81
  10. package/dist-cjs/models/errors.js +51 -36
  11. package/dist-cjs/schemas/schemas_0.js +358 -539
  12. package/dist-es/WilmaAgents.js +12 -20
  13. package/dist-es/commands/{DeleteAgentAliasCommand.js → CreateAgentDeploymentCommand.js} +5 -5
  14. package/dist-es/commands/{ExecuteAgentCommand.js → DeleteAgentDeploymentCommand.js} +5 -5
  15. package/dist-es/commands/{CreateGuardrailCommand.js → GetAgentDeploymentCommand.js} +5 -5
  16. package/dist-es/commands/{DeleteGuardrailCommand.js → ListAgentDeploymentsCommand.js} +5 -5
  17. package/dist-es/commands/RestoreAgentVersionToDraftCommand.js +16 -0
  18. package/dist-es/commands/UpdateAgentDeploymentCommand.js +16 -0
  19. package/dist-es/commands/index.js +6 -10
  20. package/dist-es/models/enums.js +35 -80
  21. package/dist-es/models/errors.js +42 -28
  22. package/dist-es/schemas/schemas_0.js +356 -536
  23. package/dist-types/WilmaAgents.d.ts +42 -71
  24. package/dist-types/WilmaAgentsClient.d.ts +16 -19
  25. package/dist-types/commands/CompareAgentVersionsCommand.d.ts +5 -5
  26. package/dist-types/commands/CreateAgentApiKeyCommand.d.ts +1 -3
  27. package/dist-types/commands/CreateAgentCommand.d.ts +451 -324
  28. package/dist-types/commands/CreateAgentDeploymentCommand.d.ts +116 -0
  29. package/dist-types/commands/DeleteAgentApiKeyCommand.d.ts +1 -3
  30. package/dist-types/commands/DeleteAgentCommand.d.ts +5 -4
  31. package/dist-types/commands/DeleteAgentDeploymentCommand.d.ts +83 -0
  32. package/dist-types/commands/GetAgentCommand.d.ts +237 -170
  33. package/dist-types/commands/GetAgentDeploymentCommand.d.ts +106 -0
  34. package/dist-types/commands/GetAgentVersionCommand.d.ts +219 -158
  35. package/dist-types/commands/ListAgentApiKeysCommand.d.ts +1 -3
  36. package/dist-types/commands/ListAgentDeploymentsCommand.d.ts +105 -0
  37. package/dist-types/commands/ListAgentVersionsCommand.d.ts +8 -7
  38. package/dist-types/commands/ListAgentsCommand.d.ts +241 -174
  39. package/dist-types/commands/ListAgentsNamesCommand.d.ts +6 -8
  40. package/dist-types/commands/PublishAgentVersionCommand.d.ts +221 -159
  41. package/dist-types/commands/RestoreAgentVersionToDraftCommand.d.ts +460 -0
  42. package/dist-types/commands/UpdateAgentCommand.d.ts +451 -324
  43. package/dist-types/commands/UpdateAgentDeploymentCommand.d.ts +120 -0
  44. package/dist-types/commands/index.d.ts +6 -10
  45. package/dist-types/index.d.ts +8 -7
  46. package/dist-types/models/enums.d.ts +126 -161
  47. package/dist-types/models/errors.d.ts +35 -22
  48. package/dist-types/models/models_0.d.ts +695 -741
  49. package/dist-types/schemas/schemas_0.d.ts +41 -61
  50. package/package.json +2 -2
  51. package/dist-cjs/commands/GetGuardrailCommand.js +0 -20
  52. package/dist-cjs/commands/ListAgentAliasesCommand.js +0 -20
  53. package/dist-cjs/commands/ListAuditRecordsCommand.js +0 -20
  54. package/dist-cjs/commands/ListGuardrailsCommand.js +0 -20
  55. package/dist-cjs/commands/PutAgentAliasCommand.js +0 -20
  56. package/dist-cjs/commands/UpdateGuardrailCommand.js +0 -20
  57. package/dist-es/commands/GetGuardrailCommand.js +0 -16
  58. package/dist-es/commands/ListAgentAliasesCommand.js +0 -16
  59. package/dist-es/commands/ListAuditRecordsCommand.js +0 -16
  60. package/dist-es/commands/ListGuardrailsCommand.js +0 -16
  61. package/dist-es/commands/PutAgentAliasCommand.js +0 -16
  62. package/dist-es/commands/UpdateGuardrailCommand.js +0 -16
  63. package/dist-types/commands/CreateGuardrailCommand.d.ts +0 -172
  64. package/dist-types/commands/DeleteAgentAliasCommand.d.ts +0 -82
  65. package/dist-types/commands/DeleteGuardrailCommand.d.ts +0 -80
  66. package/dist-types/commands/ExecuteAgentCommand.d.ts +0 -112
  67. package/dist-types/commands/GetGuardrailCommand.d.ts +0 -135
  68. package/dist-types/commands/ListAgentAliasesCommand.d.ts +0 -99
  69. package/dist-types/commands/ListAuditRecordsCommand.d.ts +0 -109
  70. package/dist-types/commands/ListGuardrailsCommand.d.ts +0 -137
  71. package/dist-types/commands/PutAgentAliasCommand.d.ts +0 -107
  72. package/dist-types/commands/UpdateGuardrailCommand.d.ts +0 -175
@@ -0,0 +1,116 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { CreateAgentDeploymentInput, CreateAgentDeploymentOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, WilmaAgentsClientResolvedConfig } from "../WilmaAgentsClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CreateAgentDeploymentCommand}.
14
+ */
15
+ export interface CreateAgentDeploymentCommandInput extends CreateAgentDeploymentInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CreateAgentDeploymentCommand}.
21
+ */
22
+ export interface CreateAgentDeploymentCommandOutput extends CreateAgentDeploymentOutput, __MetadataBearer {
23
+ }
24
+ declare const CreateAgentDeploymentCommand_base: {
25
+ new (input: CreateAgentDeploymentCommandInput): import("@smithy/core/client").CommandImpl<CreateAgentDeploymentCommandInput, CreateAgentDeploymentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: CreateAgentDeploymentCommandInput): import("@smithy/core/client").CommandImpl<CreateAgentDeploymentCommandInput, CreateAgentDeploymentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Creates a named deployment routing new sessions to published agent versions. Route percentages must total 100.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WilmaAgentsClient, CreateAgentDeploymentCommand } from "@wildix/wilma-agents-client"; // ES Modules import
35
+ * // const { WilmaAgentsClient, CreateAgentDeploymentCommand } = require("@wildix/wilma-agents-client"); // CommonJS import
36
+ * // import type { WilmaAgentsClientConfig } from "@wildix/wilma-agents-client";
37
+ * const config = {}; // type is WilmaAgentsClientConfig
38
+ * const client = new WilmaAgentsClient(config);
39
+ * const input = { // CreateAgentDeploymentInput
40
+ * company: "STRING_VALUE",
41
+ * agentId: "STRING_VALUE", // required
42
+ * name: "STRING_VALUE", // required
43
+ * description: "STRING_VALUE",
44
+ * status: "active" || "paused", // required
45
+ * routing: [ // AgentDeploymentRoutesList // required
46
+ * { // AgentDeploymentRoute
47
+ * version: "STRING_VALUE", // required
48
+ * percentage: Number("int"), // required
49
+ * },
50
+ * ],
51
+ * };
52
+ * const command = new CreateAgentDeploymentCommand(input);
53
+ * const response = await client.send(command);
54
+ * // { // CreateAgentDeploymentOutput
55
+ * // deployment: { // AgentDeployment
56
+ * // createdAt: "STRING_VALUE", // required
57
+ * // createdBy: { // Actor
58
+ * // type: "user" || "api_key" || "service", // required
59
+ * // id: "STRING_VALUE", // required
60
+ * // name: "STRING_VALUE",
61
+ * // },
62
+ * // updatedAt: "STRING_VALUE",
63
+ * // updatedBy: {
64
+ * // type: "user" || "api_key" || "service", // required
65
+ * // id: "STRING_VALUE", // required
66
+ * // name: "STRING_VALUE",
67
+ * // },
68
+ * // agentId: "STRING_VALUE", // required
69
+ * // name: "STRING_VALUE", // required
70
+ * // description: "STRING_VALUE",
71
+ * // status: "active" || "paused", // required
72
+ * // routing: [ // AgentDeploymentRoutesList // required
73
+ * // { // AgentDeploymentRoute
74
+ * // version: "STRING_VALUE", // required
75
+ * // percentage: Number("int"), // required
76
+ * // },
77
+ * // ],
78
+ * // revision: Number("int"), // required
79
+ * // },
80
+ * // };
81
+ *
82
+ * ```
83
+ *
84
+ * @param CreateAgentDeploymentCommandInput - {@link CreateAgentDeploymentCommandInput}
85
+ * @returns {@link CreateAgentDeploymentCommandOutput}
86
+ * @see {@link CreateAgentDeploymentCommandInput} for command's `input` shape.
87
+ * @see {@link CreateAgentDeploymentCommandOutput} for command's `response` shape.
88
+ * @see {@link WilmaAgentsClientResolvedConfig | config} for WilmaAgentsClient's `config` shape.
89
+ *
90
+ * @throws {@link AgentNotFoundException} (client fault)
91
+ *
92
+ * @throws {@link AgentVersionNotFoundException} (client fault)
93
+ *
94
+ * @throws {@link AgentDeploymentNonUniqueNameException} (client fault)
95
+ *
96
+ * @throws {@link ValidationException} (client fault)
97
+ *
98
+ * @throws {@link WilmaAgentsServiceException}
99
+ * <p>Base exception class for all service exceptions from WilmaAgents service.</p>
100
+ *
101
+ *
102
+ * @public
103
+ */
104
+ export declare class CreateAgentDeploymentCommand extends CreateAgentDeploymentCommand_base {
105
+ /** @internal type navigation helper, not in runtime. */
106
+ protected static __types: {
107
+ api: {
108
+ input: CreateAgentDeploymentInput;
109
+ output: CreateAgentDeploymentOutput;
110
+ };
111
+ sdk: {
112
+ input: CreateAgentDeploymentCommandInput;
113
+ output: CreateAgentDeploymentCommandOutput;
114
+ };
115
+ };
116
+ }
@@ -24,9 +24,7 @@ export interface DeleteAgentApiKeyCommandOutput extends DeleteAgentApiKeyOutput,
24
24
  declare const DeleteAgentApiKeyCommand_base: {
25
25
  new (input: DeleteAgentApiKeyCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentApiKeyCommandInput, DeleteAgentApiKeyCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (input: DeleteAgentApiKeyCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentApiKeyCommandInput, DeleteAgentApiKeyCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Revokes an API key.
@@ -24,12 +24,10 @@ export interface DeleteAgentCommandOutput extends DeleteAgentOutput, __MetadataB
24
24
  declare const DeleteAgentCommand_base: {
25
25
  new (input: DeleteAgentCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentCommandInput, DeleteAgentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (input: DeleteAgentCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentCommandInput, DeleteAgentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
- * Deletes an agent, its versions, API keys and channel deployments.
30
+ * Deletes an agent, its draft, versions, deployments and API keys. Fails with AgentInUseException while the agent has active sessions or is referenced by other agents.
33
31
  * @example
34
32
  * Use a bare-bones client and the command you need to make an API call.
35
33
  * ```javascript
@@ -54,6 +52,9 @@ declare const DeleteAgentCommand_base: {
54
52
  * @see {@link DeleteAgentCommandOutput} for command's `response` shape.
55
53
  * @see {@link WilmaAgentsClientResolvedConfig | config} for WilmaAgentsClient's `config` shape.
56
54
  *
55
+ * @throws {@link AgentInUseException} (client fault)
56
+ * The agent cannot be deleted because it has active sessions or is referenced by other agents (delegation, handover or agent-call capabilities). Recent invocations can be inspected via the wilma-traces QueryUsage operation filtered by agent.id.
57
+ *
57
58
  * @throws {@link ValidationException} (client fault)
58
59
  *
59
60
  * @throws {@link WilmaAgentsServiceException}
@@ -0,0 +1,83 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { DeleteAgentDeploymentInput, DeleteAgentDeploymentOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, WilmaAgentsClientResolvedConfig } from "../WilmaAgentsClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DeleteAgentDeploymentCommand}.
14
+ */
15
+ export interface DeleteAgentDeploymentCommandInput extends DeleteAgentDeploymentInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DeleteAgentDeploymentCommand}.
21
+ */
22
+ export interface DeleteAgentDeploymentCommandOutput extends DeleteAgentDeploymentOutput, __MetadataBearer {
23
+ }
24
+ declare const DeleteAgentDeploymentCommand_base: {
25
+ new (input: DeleteAgentDeploymentCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentDeploymentCommandInput, DeleteAgentDeploymentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: DeleteAgentDeploymentCommandInput): import("@smithy/core/client").CommandImpl<DeleteAgentDeploymentCommandInput, DeleteAgentDeploymentCommandOutput, WilmaAgentsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Deletes a deployment that is not required as the 'production' deployment for an enabled channel and is not referenced by another agent.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WilmaAgentsClient, DeleteAgentDeploymentCommand } from "@wildix/wilma-agents-client"; // ES Modules import
35
+ * // const { WilmaAgentsClient, DeleteAgentDeploymentCommand } = require("@wildix/wilma-agents-client"); // CommonJS import
36
+ * // import type { WilmaAgentsClientConfig } from "@wildix/wilma-agents-client";
37
+ * const config = {}; // type is WilmaAgentsClientConfig
38
+ * const client = new WilmaAgentsClient(config);
39
+ * const input = { // DeleteAgentDeploymentInput
40
+ * company: "STRING_VALUE",
41
+ * agentId: "STRING_VALUE", // required
42
+ * deploymentName: "STRING_VALUE", // required
43
+ * };
44
+ * const command = new DeleteAgentDeploymentCommand(input);
45
+ * const response = await client.send(command);
46
+ * // {};
47
+ *
48
+ * ```
49
+ *
50
+ * @param DeleteAgentDeploymentCommandInput - {@link DeleteAgentDeploymentCommandInput}
51
+ * @returns {@link DeleteAgentDeploymentCommandOutput}
52
+ * @see {@link DeleteAgentDeploymentCommandInput} for command's `input` shape.
53
+ * @see {@link DeleteAgentDeploymentCommandOutput} for command's `response` shape.
54
+ * @see {@link WilmaAgentsClientResolvedConfig | config} for WilmaAgentsClient's `config` shape.
55
+ *
56
+ * @throws {@link AgentNotFoundException} (client fault)
57
+ *
58
+ * @throws {@link AgentDeploymentNotFoundException} (client fault)
59
+ *
60
+ * @throws {@link AgentDeploymentInUseException} (client fault)
61
+ * The deployment cannot be deleted because it is the agent's required 'production' deployment or is referenced by another agent capability.
62
+ *
63
+ * @throws {@link ValidationException} (client fault)
64
+ *
65
+ * @throws {@link WilmaAgentsServiceException}
66
+ * <p>Base exception class for all service exceptions from WilmaAgents service.</p>
67
+ *
68
+ *
69
+ * @public
70
+ */
71
+ export declare class DeleteAgentDeploymentCommand extends DeleteAgentDeploymentCommand_base {
72
+ /** @internal type navigation helper, not in runtime. */
73
+ protected static __types: {
74
+ api: {
75
+ input: DeleteAgentDeploymentInput;
76
+ output: {};
77
+ };
78
+ sdk: {
79
+ input: DeleteAgentDeploymentCommandInput;
80
+ output: DeleteAgentDeploymentCommandOutput;
81
+ };
82
+ };
83
+ }