chatbot-agentic 1.0.12 → 1.0.14

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.
@@ -15,6 +15,7 @@ export declare const AWS: {
15
15
  };
16
16
  AgentRuntime: {
17
17
  invokeAgent: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
18
+ invokeFlow: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandOutput>;
18
19
  };
19
20
  BedrockRuntime: {
20
21
  invokeModel: (data: import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandInput) => Promise<import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandOutput>;
@@ -32,4 +33,11 @@ export declare const AWS: {
32
33
  getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
33
34
  documentTextDetection: (data: import("@aws-sdk/client-textract").DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
34
35
  };
36
+ Flow: {
37
+ createFlow: (data: import("@aws-sdk/client-bedrock-agent").CreateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").CreateFlowCommandOutput>;
38
+ updateFlow: (data: import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandOutput>;
39
+ validateFlow: (data: import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandOutput>;
40
+ prepareFlow: (data: import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandOutput>;
41
+ getFlow: (data: import("@aws-sdk/client-bedrock-agent").GetFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").GetFlowCommandOutput>;
42
+ };
35
43
  };
@@ -6,11 +6,13 @@ const AWSBedrockAgentRuntime_1 = require("./services/AWSBedrockAgentRuntime");
6
6
  const AWSBedrockRuntime_1 = require("./services/AWSBedrockRuntime");
7
7
  const AWSRekognition_1 = require("./services/AWSRekognition");
8
8
  const AWSTextTract_1 = require("./services/AWSTextTract");
9
+ const AWSBedrockFlow_1 = require("./services/AWSBedrockFlow");
9
10
  exports.AWS = {
10
11
  Agent: AWSBedrockAgent_1.Agent,
11
12
  AgentRuntime: AWSBedrockAgentRuntime_1.AgentRuntime,
12
13
  BedrockRuntime: AWSBedrockRuntime_1.BedrockRuntime,
13
14
  Rekognition: AWSRekognition_1.Rekognition,
14
- Textract: AWSTextTract_1.Textract
15
+ Textract: AWSTextTract_1.Textract,
16
+ Flow: AWSBedrockFlow_1.Flow
15
17
  };
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":";;;AAAA,gEAAmD;AACnD,8EAAiE;AACjE,oEAA8D;AAC9D,8DAAwD;AACxD,0DAAmD;AAItC,QAAA,GAAG,GAAG;IACf,KAAK,EAAL,uBAAK;IACL,YAAY,EAAZ,qCAAY;IACZ,cAAc,EAAd,kCAAc;IACd,WAAW,EAAX,4BAAW;IACX,QAAQ,EAAR,uBAAQ;CACX,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":";;;AAAA,gEAAmD;AACnD,8EAAiE;AACjE,oEAA8D;AAC9D,8DAAwD;AACxD,0DAAmD;AACnD,8DAAiD;AAGpC,QAAA,GAAG,GAAG;IACf,KAAK,EAAL,uBAAK;IACL,YAAY,EAAZ,qCAAY;IACZ,cAAc,EAAd,kCAAc;IACd,WAAW,EAAX,4BAAW;IACX,QAAQ,EAAR,uBAAQ;IACR,IAAI,EAAJ,qBAAI;CACP,CAAA"}
@@ -1,4 +1,5 @@
1
- import { InvokeAgentCommandInput } from "@aws-sdk/client-bedrock-agent-runtime";
1
+ import { InvokeAgentCommandInput, InvokeFlowCommandInput } from "@aws-sdk/client-bedrock-agent-runtime";
2
2
  export declare const AgentRuntime: {
3
3
  invokeAgent: (data: InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
4
+ invokeFlow: (data: InvokeFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandOutput>;
4
5
  };
@@ -21,7 +21,24 @@ const invokeAgent = async (data) => {
21
21
  throw error;
22
22
  }
23
23
  };
24
+ /**
25
+ * This is used to invoke flow
26
+ * @param command
27
+ * @returns
28
+ */
29
+ const invokeFlow = async (data) => {
30
+ try {
31
+ const command = new client_bedrock_agent_runtime_1.InvokeFlowCommand(data);
32
+ const response = await client.send(command);
33
+ return response;
34
+ }
35
+ catch (error) {
36
+ console.info(`error occured while fetching invoke flow`);
37
+ throw error;
38
+ }
39
+ };
24
40
  exports.AgentRuntime = {
25
- invokeAgent
41
+ invokeAgent,
42
+ invokeFlow
26
43
  };
27
44
  //# sourceMappingURL=AWSBedrockAgentRuntime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSBedrockAgentRuntime.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockAgentRuntime.ts"],"names":[],"mappings":";;;AAAA,wFAA+H;AAE/H,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,GAAG,IAAI,wDAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpE;;;;GAIG;A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AM,UAAU,GAAG,KAAK,EAAE,IAA4B,EAAE,EAAE;IACxD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,gDAAiB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QACzD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAIY,QAAA,YAAY,GAAG;IAC1B,WAAW;IACX,UAAU;CACX,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { UpdateFlowCommandInput, CreateFlowCommandInput, ValidateFlowDefinitionCommandInput, PrepareFlowCommandInput, GetFlowCommandInput } from "@aws-sdk/client-bedrock-agent";
2
+ export declare const Flow: {
3
+ createFlow: (data: CreateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").CreateFlowCommandOutput>;
4
+ updateFlow: (data: UpdateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandOutput>;
5
+ validateFlow: (data: ValidateFlowDefinitionCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandOutput>;
6
+ prepareFlow: (data: PrepareFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandOutput>;
7
+ getFlow: (data: GetFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").GetFlowCommandOutput>;
8
+ };
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Flow = void 0;
4
+ const client_bedrock_agent_1 = require("@aws-sdk/client-bedrock-agent");
5
+ const environment = (process.env.NODE_ENVIRONMENT || 'Test');
6
+ const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
7
+ const client = new client_bedrock_agent_1.BedrockAgentClient({ region: awsRegion });
8
+ /**
9
+ * This is used to add the workflow
10
+ * @param data
11
+ * @returns
12
+ */
13
+ const createFlow = async (data) => {
14
+ try {
15
+ const command = new client_bedrock_agent_1.CreateFlowCommand(data);
16
+ const response = await client.send(command);
17
+ return response;
18
+ }
19
+ catch (error) {
20
+ console.info(`error occured while create agent alias`);
21
+ throw error;
22
+ }
23
+ };
24
+ /**
25
+ * This is used to update the workflow
26
+ * @param data
27
+ * @returns
28
+ */
29
+ const updateFlow = async (data) => {
30
+ try {
31
+ const command = new client_bedrock_agent_1.UpdateFlowCommand(data);
32
+ const response = await client.send(command);
33
+ return response;
34
+ }
35
+ catch (error) {
36
+ console.info(`error occured while update flow`);
37
+ throw error;
38
+ }
39
+ };
40
+ /**
41
+ * This is used to prepare workflow
42
+ * @param data
43
+ * @returns
44
+ */
45
+ const prepareFlow = async (data) => {
46
+ try {
47
+ const command = new client_bedrock_agent_1.PrepareFlowCommand(data);
48
+ const response = await client.send(command);
49
+ return response;
50
+ }
51
+ catch (error) {
52
+ console.info(`error occured while prepare flow`);
53
+ throw error;
54
+ }
55
+ };
56
+ /**
57
+ * This is used to get flow details
58
+ * @param data
59
+ * @returns
60
+ */
61
+ const getFlow = async (data) => {
62
+ try {
63
+ const command = new client_bedrock_agent_1.GetFlowCommand(data);
64
+ const response = await client.send(command);
65
+ return response;
66
+ }
67
+ catch (error) {
68
+ console.info(`error occured while prepare flow`);
69
+ throw error;
70
+ }
71
+ };
72
+ /**
73
+ * This is used to validate the workflow
74
+ * @param data
75
+ * @returns
76
+ */
77
+ const validateFlow = async (data) => {
78
+ try {
79
+ const command = new client_bedrock_agent_1.ValidateFlowDefinitionCommand(data);
80
+ const response = await client.send(command);
81
+ return response;
82
+ }
83
+ catch (error) {
84
+ console.info(`error occured while validate flow`);
85
+ throw error;
86
+ }
87
+ };
88
+ exports.Flow = {
89
+ createFlow,
90
+ updateFlow,
91
+ validateFlow,
92
+ prepareFlow,
93
+ getFl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WAAW;IACX,OAAO;CACV,CAAA"}
@@ -15,6 +15,7 @@ export declare const AWS: {
15
15
  };
16
16
  AgentRuntime: {
17
17
  invokeAgent: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
18
+ invokeFlow: (data: import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandOutput>;
18
19
  };
19
20
  BedrockRuntime: {
20
21
  invokeModel: (data: import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandInput) => Promise<import("@aws-sdk/client-bedrock-runtime").InvokeModelCommandOutput>;
@@ -32,4 +33,11 @@ export declare const AWS: {
32
33
  getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
33
34
  documentTextDetection: (data: import("@aws-sdk/client-textract").DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
34
35
  };
36
+ Flow: {
37
+ createFlow: (data: import("@aws-sdk/client-bedrock-agent").CreateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").CreateFlowCommandOutput>;
38
+ updateFlow: (data: import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandOutput>;
39
+ validateFlow: (data: import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandOutput>;
40
+ prepareFlow: (data: import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandOutput>;
41
+ getFlow: (data: import("@aws-sdk/client-bedrock-agent").GetFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").GetFlowCommandOutput>;
42
+ };
35
43
  };
@@ -3,11 +3,13 @@ import { AgentRuntime } from "./services/AWSBedrockAgentRuntime";
3
3
  import { BedrockRuntime } from "./services/AWSBedrockRuntime";
4
4
  import { Rekognition } from "./services/AWSRekognition";
5
5
  import { Textract } from "./services/AWSTextTract";
6
+ import { Flow } from "./services/AWSBedrockFlow";
6
7
  export const AWS = {
7
8
  Agent,
8
9
  AgentRuntime,
9
10
  BedrockRuntime,
10
11
  Rekognition,
11
- Textract
12
+ Textract,
13
+ Flow
12
14
  };
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,KAAK;IACL,YAAY;IACZ,cAAc;IACd,WAAW;IACX,QAAQ;CACX,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGjD,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,KAAK;IACL,YAAY;IACZ,cAAc;IACd,WAAW;IACX,QAAQ;IACR,IAAI;CACP,CAAA"}
@@ -1,4 +1,5 @@
1
- import { InvokeAgentCommandInput } from "@aws-sdk/client-bedrock-agent-runtime";
1
+ import { InvokeAgentCommandInput, InvokeFlowCommandInput } from "@aws-sdk/client-bedrock-agent-runtime";
2
2
  export declare const AgentRuntime: {
3
3
  invokeAgent: (data: InvokeAgentCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeAgentCommandOutput>;
4
+ invokeFlow: (data: InvokeFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent-runtime").InvokeFlowCommandOutput>;
4
5
  };
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { BedrockAgentRuntimeClient, InvokeAgentCommand } from "@aws-sdk/client-bedrock-agent-runtime";
10
+ import { BedrockAgentRuntimeClient, InvokeAgentCommand, InvokeFlowCommand } from "@aws-sdk/client-bedrock-agent-runtime";
11
11
  const environment = (process.env.NODE_ENVIRONMENT || 'Test');
12
12
  const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
13
13
  const client = new BedrockAgentRuntimeClient({ region: awsRegion });
@@ -27,7 +27,24 @@ const invokeAgent = (data) => __awaiter(void 0, void 0, void 0, function* () {
27
27
  throw error;
28
28
  }
29
29
  });
30
+ /**
31
+ * This is used to invoke flow
32
+ * @param command
33
+ * @returns
34
+ */
35
+ const invokeFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
36
+ try {
37
+ const command = new InvokeFlowCommand(data);
38
+ const response = yield client.send(command);
39
+ return response;
40
+ }
41
+ catch (error) {
42
+ console.info(`error occured while fetching invoke flow`);
43
+ throw error;
44
+ }
45
+ });
30
46
  export const AgentRuntime = {
31
- invokeAgent
47
+ invokeAgent,
48
+ invokeFlow
32
49
  };
33
50
  //# sourceMappingURL=AWSBedrockAgentRuntime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSBedrockAgentRuntime.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockAgentRuntime.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAA2B,MAAM,uCAAuC,CAAC;AAE/H,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAO,IAA6B,EAAE,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC1D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAGD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW;CACZ,CAAA"}
1
+ {"version":3,"file":"AWSBedrockAgentRuntime.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockAgentRuntime.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAA2B,iBAAiB,EAA0B,MAAM,uCAAuC,CAAC;AAE1K,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAO,IAA6B,EAAE,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC1D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAGD;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAO,IAA4B,EAAE,EAAE;IACxD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QACzD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAID,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW;IACX,UAAU;CACX,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { UpdateFlowCommandInput, CreateFlowCommandInput, ValidateFlowDefinitionCommandInput, PrepareFlowCommandInput, GetFlowCommandInput } from "@aws-sdk/client-bedrock-agent";
2
+ export declare const Flow: {
3
+ createFlow: (data: CreateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").CreateFlowCommandOutput>;
4
+ updateFlow: (data: UpdateFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").UpdateFlowCommandOutput>;
5
+ validateFlow: (data: ValidateFlowDefinitionCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").ValidateFlowDefinitionCommandOutput>;
6
+ prepareFlow: (data: PrepareFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").PrepareFlowCommandOutput>;
7
+ getFlow: (data: GetFlowCommandInput) => Promise<import("@aws-sdk/client-bedrock-agent").GetFlowCommandOutput>;
8
+ };
@@ -0,0 +1,101 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BedrockAgentClient, CreateFlowCommand, UpdateFlowCommand, ValidateFlowDefinitionCommand, PrepareFlowCommand, GetFlowCommand } from "@aws-sdk/client-bedrock-agent";
11
+ const environment = (process.env.NODE_ENVIRONMENT || 'Test');
12
+ const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
13
+ const client = new BedrockAgentClient({ region: awsRegion });
14
+ /**
15
+ * This is used to add the workflow
16
+ * @param data
17
+ * @returns
18
+ */
19
+ const createFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
20
+ try {
21
+ const command = new CreateFlowCommand(data);
22
+ const response = yield client.send(command);
23
+ return response;
24
+ }
25
+ catch (error) {
26
+ console.info(`error occured while create agent alias`);
27
+ throw error;
28
+ }
29
+ });
30
+ /**
31
+ * This is used to update the workflow
32
+ * @param data
33
+ * @returns
34
+ */
35
+ const updateFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
36
+ try {
37
+ const command = new UpdateFlowCommand(data);
38
+ const response = yield client.send(command);
39
+ return response;
40
+ }
41
+ catch (error) {
42
+ console.info(`error occured while update flow`);
43
+ throw error;
44
+ }
45
+ });
46
+ /**
47
+ * This is used to prepare workflow
48
+ * @param data
49
+ * @returns
50
+ */
51
+ const prepareFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
52
+ try {
53
+ const command = new PrepareFlowCommand(data);
54
+ const response = yield client.send(command);
55
+ return response;
56
+ }
57
+ catch (error) {
58
+ console.info(`error occured while prepare flow`);
59
+ throw error;
60
+ }
61
+ });
62
+ /**
63
+ * This is used to get flow details
64
+ * @param data
65
+ * @returns
66
+ */
67
+ const getFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
68
+ try {
69
+ const command = new GetFlowCommand(data);
70
+ const response = yield client.send(command);
71
+ return response;
72
+ }
73
+ catch (error) {
74
+ console.info(`error occured while prepare flow`);
75
+ throw error;
76
+ }
77
+ });
78
+ /**
79
+ * This is used to validate the workflow
80
+ * @param data
81
+ * @returns
82
+ */
83
+ const validateFlow = (data) => __awaiter(void 0, void 0, void 0, function* () {
84
+ try {
85
+ const command = new ValidateFlowDefinitionCommand(data);
86
+ const response = yield client.send(command);
87
+ return response;
88
+ }
89
+ catch (error) {
90
+ console.info(`error occured while validate flow`);
91
+ throw error;
92
+ }
93
+ });
94
+ export const Flow = {
95
+ createFlow,
96
+ updateFlow,
97
+ validateFlow,
98
+ prepareFlow,
99
+ getFlow
100
+ };
101
+ //# sourceMappingURL=AWSBedrockFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AWSBedrockFlow.js","sourceRoot":"","sources":["../../../../aws/services/AWSBedrockFlow.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAkD,iBAAiB,EAAE,iBAAiB,EAAE,6BAA6B,EAAsC,kBAAkB,EAA2B,cAAc,EAAuB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"",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",