chatbot-nc 2.0.13 → 2.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.
- package/dist/cjs/aws/index.d.ts +1 -0
- package/dist/cjs/aws/services/AWSConnectParticipant.d.ts +2 -1
- package/dist/cjs/aws/services/AWSConnectParticipant.js +19 -0
- package/dist/cjs/aws/services/AWSConnectParticipant.js.map +1 -1
- package/dist/esm/aws/index.d.ts +1 -0
- package/dist/esm/aws/services/AWSConnectParticipant.d.ts +2 -1
- package/dist/esm/aws/services/AWSConnectParticipant.js +20 -1
- package/dist/esm/aws/services/AWSConnectParticipant.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare const AWS: {
|
|
|
92
92
|
};
|
|
93
93
|
ConnectParticipant: {
|
|
94
94
|
createParticipant: (param: import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandOutput>;
|
|
95
|
+
disconnectParticipant: (param: import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandOutput>;
|
|
95
96
|
sendMessage: (params: import("@aws-sdk/client-connectparticipant").SendMessageCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendMessageCommandOutput | null>;
|
|
96
97
|
sendEvent: (params: import("@aws-sdk/client-connectparticipant").SendEventCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendEventCommandOutput | null>;
|
|
97
98
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CreateParticipantConnectionCommandInput, SendMessageCommandInput, SendEventCommandInput } from "@aws-sdk/client-connectparticipant";
|
|
1
|
+
import { CreateParticipantConnectionCommandInput, SendMessageCommandInput, SendEventCommandInput, DisconnectParticipantCommandInput } from "@aws-sdk/client-connectparticipant";
|
|
2
2
|
export declare const ConnectParticipant: {
|
|
3
3
|
createParticipant: (param: CreateParticipantConnectionCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandOutput>;
|
|
4
|
+
disconnectParticipant: (param: DisconnectParticipantCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandOutput>;
|
|
4
5
|
sendMessage: (params: SendMessageCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendMessageCommandOutput | null>;
|
|
5
6
|
sendEvent: (params: SendEventCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendEventCommandOutput | null>;
|
|
6
7
|
};
|
|
@@ -33,6 +33,24 @@ const createParticipant = (param) => __awaiter(void 0, void 0, void 0, function*
|
|
|
33
33
|
throw error;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param param
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
const disconnectParticipant = (param) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
console.log('adding item to db');
|
|
43
|
+
try {
|
|
44
|
+
const command = new client_connectparticipant_1.DisconnectParticipantCommand(param);
|
|
45
|
+
const response = yield client.send(command);
|
|
46
|
+
console.log("Disconnect participant result", response);
|
|
47
|
+
return response;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
console.log(error);
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
36
54
|
/**
|
|
37
55
|
*
|
|
38
56
|
* @param params
|
|
@@ -71,6 +89,7 @@ const sendEvent = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
71
89
|
});
|
|
72
90
|
exports.ConnectParticipant = {
|
|
73
91
|
createParticipant,
|
|
92
|
+
disconnectParticipant,
|
|
74
93
|
sendMessage,
|
|
75
94
|
sendEvent
|
|
76
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSConnectParticipant.js","sourceRoot":"","sources":["../../../../aws/services/AWSConnectParticipant.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"AWSConnectParticipant.js","sourceRoot":"","sources":["../../../../aws/services/AWSConnectParticipant.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAAiT;AAEjT,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC;AAEhE,MAAM,MAAM,GAAG,IAAI,oDAAwB,CAAC;IACxC,MAAM,EAAE,SAAS;CACpB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,CAAO,KAA8C,EAAE,EAAE;IAC/E,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,IAAI;QACA,MAAM,OAAO,GAAG,IAAI,8DAAkC,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAAC;QACpD,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAClB,MAAM,KAAK,CAAC;KACf;AACL,CAAC,CAAA,CAAA;AAED;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAO,KAAwC,EAAE,EAAE;IAC7E,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,IAAI;QACA,MAAM,OAAO,GAAG,IAAI,wDAA4B,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC;QACvD,OAAO,QAAQ,CAAC;KAEnB;IAAC,OAAO,KAAK,EAAE;QACZ,O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
};
|
|
93
93
|
ConnectParticipant: {
|
|
94
94
|
createParticipant: (param: import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandOutput>;
|
|
95
|
+
disconnectParticipant: (param: import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandOutput>;
|
|
95
96
|
sendMessage: (params: import("@aws-sdk/client-connectparticipant").SendMessageCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendMessageCommandOutput | null>;
|
|
96
97
|
sendEvent: (params: import("@aws-sdk/client-connectparticipant").SendEventCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendEventCommandOutput | null>;
|
|
97
98
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CreateParticipantConnectionCommandInput, SendMessageCommandInput, SendEventCommandInput } from "@aws-sdk/client-connectparticipant";
|
|
1
|
+
import { CreateParticipantConnectionCommandInput, SendMessageCommandInput, SendEventCommandInput, DisconnectParticipantCommandInput } from "@aws-sdk/client-connectparticipant";
|
|
2
2
|
export declare const ConnectParticipant: {
|
|
3
3
|
createParticipant: (param: CreateParticipantConnectionCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").CreateParticipantConnectionCommandOutput>;
|
|
4
|
+
disconnectParticipant: (param: DisconnectParticipantCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").DisconnectParticipantCommandOutput>;
|
|
4
5
|
sendMessage: (params: SendMessageCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendMessageCommandOutput | null>;
|
|
5
6
|
sendEvent: (params: SendEventCommandInput) => Promise<import("@aws-sdk/client-connectparticipant").SendEventCommandOutput | null>;
|
|
6
7
|
};
|
|
@@ -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 { ConnectParticipantClient, CreateParticipantConnectionCommand, SendMessageCommand, SendEventCommand } from "@aws-sdk/client-connectparticipant";
|
|
10
|
+
import { ConnectParticipantClient, CreateParticipantConnectionCommand, SendMessageCommand, SendEventCommand, DisconnectParticipantCommand } from "@aws-sdk/client-connectparticipant";
|
|
11
11
|
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
12
12
|
const client = new ConnectParticipantClient({
|
|
13
13
|
region: awsRegion,
|
|
@@ -30,6 +30,24 @@ const createParticipant = (param) => __awaiter(void 0, void 0, void 0, function*
|
|
|
30
30
|
throw error;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param param
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
const disconnectParticipant = (param) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
console.log('adding item to db');
|
|
40
|
+
try {
|
|
41
|
+
const command = new DisconnectParticipantCommand(param);
|
|
42
|
+
const response = yield client.send(command);
|
|
43
|
+
console.log("Disconnect participant result", response);
|
|
44
|
+
return response;
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.log(error);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
33
51
|
/**
|
|
34
52
|
*
|
|
35
53
|
* @param params
|
|
@@ -68,6 +86,7 @@ const sendEvent = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
68
86
|
});
|
|
69
87
|
export const ConnectParticipant = {
|
|
70
88
|
createParticipant,
|
|
89
|
+
disconnectParticipant,
|
|
71
90
|
sendMessage,
|
|
72
91
|
sendEvent
|
|
73
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSConnectParticipant.js","sourceRoot":"","sources":["../../../../aws/services/AWSConnectParticipant.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,wB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