chatbot-nc 1.0.54 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/aws/index.d.ts +1 -0
- package/dist/cjs/aws/services/AWSGatewayManagement.d.ts +2 -1
- package/dist/cjs/aws/services/AWSGatewayManagement.js +22 -1
- package/dist/cjs/aws/services/AWSGatewayManagement.js.map +1 -1
- package/dist/esm/aws/index.d.ts +1 -0
- package/dist/esm/aws/services/AWSGatewayManagement.d.ts +2 -1
- package/dist/esm/aws/services/AWSGatewayManagement.js +23 -2
- package/dist/esm/aws/services/AWSGatewayManagement.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -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").DeleteConnectionCommandInput) => 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
|
-
import { PostToConnectionCommandInput } from "@aws-sdk/client-apigatewaymanagementapi";
|
|
1
|
+
import { DeleteConnectionCommandInput, 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: DeleteConnectionCommandInput) => 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,
|
|
1
|
+
{"version":3,"file":"AWSGatewayManagement.js","sourceRoot":"","sources":["../../../../aws/services/AWSGatewayManagement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4FAAiM;AAEjM;;;;;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"}
|
package/dist/esm/aws/index.d.ts
CHANGED
|
@@ -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").DeleteConnectionCommandInput) => 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
|
-
import { PostToConnectionCommandInput } from "@aws-sdk/client-apigatewaymanagementapi";
|
|
1
|
+
import { DeleteConnectionCommandInput, 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: DeleteConnectionCommandInput) => 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;
|
|
1
|
+
{"version":3,"file":"AWSGatewayManagement.js","sourceRoot":"","sources":["../../../../aws/services/AWSGatewayManagement.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,6BAA6B,EAAC,uBAAuB,EAA8B,uBAAuB,EAA+B,MAAM,yCAAyC,CAAC;AAEjM;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAO,QAAe,EAAC,MAAmC,EAAE,EAAE;IAC/E,IAAI;QACA,MAAM,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;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAO,QAAe,EAAC,MAAmC,EAAE,EAAE;IACnF,IAAI;QACA,MAAM,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"}
|