chatbot-nc 1.0.54 → 1.0.55

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.
@@ -75,6 +75,7 @@ export declare const AWS: {
75
75
  };
76
76
  GatewayManagement: {
77
77
  sendToClient: (endpoint: string, params: import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandOutput | null>;
78
+ deleteConnection: (endpoint: string, params: import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").DeleteConnectionCommandOutput | null>;
78
79
  };
79
80
  Comprehend: {
80
81
  recognizeLanguage: (message: string) => Promise<import("@aws-sdk/client-comprehend").DetectDominantLanguageCommandOutput>;
@@ -1,4 +1,5 @@
1
1
  import { PostToConnectionCommandInput } from "@aws-sdk/client-apigatewaymanagementapi";
2
2
  export declare const GatewayManagement: {
3
3
  sendToClient: (endpoint: string, params: PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandOutput | null>;
4
+ deleteConnection: (endpoint: string, params: PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").DeleteConnectionCommandOutput | null>;
4
5
  };
@@ -31,7 +31,28 @@ const sendToClient = (endpoint, params) => __awaiter(void 0, void 0, void 0, fun
31
31
  return null;
32
32
  }
33
33
  });
34
+ /**
35
+ * This is used to delete the session
36
+ * @param endpoint //endpoint of websockect
37
+ * @param params //null
38
+ * @returns
39
+ */
40
+ const deleteConnection = (endpoint, params) => __awaiter(void 0, void 0, void 0, function* () {
41
+ try {
42
+ const client = new client_apigatewaymanagementapi_1.ApiGatewayManagementApiClient({
43
+ endpoint: endpoint
44
+ });
45
+ const command = new client_apigatewaymanagementapi_1.DeleteConnectionCommand(params);
46
+ const response = yield client.send(command);
47
+ return response;
48
+ }
49
+ catch (error) {
50
+ console.log(error);
51
+ return null;
52
+ }
53
+ });
34
54
  exports.GatewayManagement = {
35
- sendToClient
55
+ sendToClient,
56
+ deleteConnection
36
57
  };
37
58
  //# sourceMappingURL=AWSGatewayManagement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSGatewayManagement.js","sourceRoot":"","sources":["../../../../aws/services/AWSGatewayManagement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAA4I;AAE5I;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAO,QAAe,EAAC,MAAmC,EAAE,EAAE;IAC/E,IAAI;QACA,MAAM,MAAM,GAAG,IAAI,8DAA6B,CAAC;YAC9C,QAAQ,EAAE,QAAQ;SACpB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,wDAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;KACd;AACL,CAAC,CAAA,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC7B,YAAY;CACf,CAAA"}
1
+ {"version":3,"file":"AWSGatewayManagement.js","sourceRoot":"","sources":["../../../../aws/services/AWSGatewayManagement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAAoK;AAEpK;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAO,QAAe,EAAC,MAAmC,EAAE,EAAE;IAC/E,IAAI;QACA,MAAM,MAAM,GAAG,IAAI,8DAA6B,CAAC;YAC9C,QAAQ,EAAE,QAAQ;SACpB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,wDAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;KACd;AACL,CAAC,CAAA,CAAA;AAED;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAO,QAAe,EAAC,MAAmC,EAAE,EAAE;IACnF,IAAI;QACA,MAAM,MAAM,GAAG,IAAI,8DAA6B,CAAC;YAC9C,QAAQ,EAAE,QAAQ;SACpB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,wDAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;KACd;AACL,CAAC,CAAA,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC7B,YAAY;IACZ,gBAAgB;CACnB,CAAA"}
@@ -75,6 +75,7 @@ export declare const AWS: {
75
75
  };
76
76
  GatewayManagement: {
77
77
  sendToClient: (endpoint: string, params: import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandOutput | null>;
78
+ deleteConnection: (endpoint: string, params: import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").DeleteConnectionCommandOutput | null>;
78
79
  };
79
80
  Comprehend: {
80
81
  recognizeLanguage: (message: string) => Promise<import("@aws-sdk/client-comprehend").DetectDominantLanguageCommandOutput>;
@@ -1,4 +1,5 @@
1
1
  import { PostToConnectionCommandInput } from "@aws-sdk/client-apigatewaymanagementapi";
2
2
  export declare const GatewayManagement: {
3
3
  sendToClient: (endpoint: string, params: PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").PostToConnectionCommandOutput | null>;
4
+ deleteConnection: (endpoint: string, params: PostToConnectionCommandInput) => Promise<import("@aws-sdk/client-apigatewaymanagementapi").DeleteConnectionCommandOutput | null>;
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 { ApiGatewayManagementApiClient, PostToConnectionCommand } from "@aws-sdk/client-apigatewaymanagementapi";
10
+ import { ApiGatewayManagementApiClient, DeleteConnectionCommand, PostToConnectionCommand } from "@aws-sdk/client-apigatewaymanagementapi";
11
11
  /**
12
12
  * This is used to send reply back to client
13
13
  * @param endpoint //endpoint of websockect
@@ -28,7 +28,28 @@ const sendToClient = (endpoint, params) => __awaiter(void 0, void 0, void 0, fun
28
28
  return null;
29
29
  }
30
30
  });
31
+ /**
32
+ * This is used to delete the session
33
+ * @param endpoint //endpoint of websockect
34
+ * @param params //null
35
+ * @returns
36
+ */
37
+ const deleteConnection = (endpoint, params) => __awaiter(void 0, void 0, void 0, function* () {
38
+ try {
39
+ const client = new ApiGatewayManagementApiClient({
40
+ endpoint: endpoint
41
+ });
42
+ const command = new DeleteConnectionCommand(params);
43
+ const response = yield client.send(command);
44
+ return response;
45
+ }
46
+ catch (error) {
47
+ console.log(error);
48
+ return null;
49
+ }
50
+ });
31
51
  export const GatewayManagement = {
32
- sendToClient
52
+ sendToClient,
53
+ deleteConnection
33
54
  };
34
55
  //# sourceMappingURL=AWSGatewayManagement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSGatewayManagement.js","sourceRoot":"","sources":["../../../../aws/services/AWSGatewayManagement.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,6BAA6B,EAAC,uBAAuB,EAA+B,MAAM,yCAAyC,CAAC;AAE5I;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAO,QAAe,EAA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AAM,MAAM,GAAG,IAAI,6BAA6B,CAAC;YAC9C,QAAQ,EAAE,QAAQ;SACpB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;KACd;AACL,CAAC,CAAA,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,YAAY;IACZ,gBAAgB;CACnB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatbot-nc",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",