podchat-browser 11.2.4 → 11.3.1-snapshot.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.
- package/dist/podchat-11.2.3.js +55921 -55921
- package/dist/podchat-11.2.4.js +55921 -55921
- package/examples/index.html +86 -1
- package/package.json +2 -2
- package/src/call.module.js +746 -748
- package/src/chat.js +1 -0
- package/src/events.module.js +1 -0
package/examples/index.html
CHANGED
|
@@ -2314,6 +2314,42 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
2314
2314
|
</fieldset>
|
|
2315
2315
|
</form>
|
|
2316
2316
|
|
|
2317
|
+
<br>
|
|
2318
|
+
<hr>
|
|
2319
|
+
<br>
|
|
2320
|
+
|
|
2321
|
+
<form action="">
|
|
2322
|
+
<fieldset>
|
|
2323
|
+
<legend>Add assistant</legend>
|
|
2324
|
+
<div>
|
|
2325
|
+
<input type="text" id="addAssistantUserName">
|
|
2326
|
+
<input type="text" id="addAssistantIdType" value="TO_BE_USER_USERNAME">
|
|
2327
|
+
</div>
|
|
2328
|
+
<button id="addAssistant">Add</button>
|
|
2329
|
+
</fieldset>
|
|
2330
|
+
</form>
|
|
2331
|
+
<form action="">
|
|
2332
|
+
<fieldset>
|
|
2333
|
+
<legend>Deactivate assistant</legend>
|
|
2334
|
+
<div>
|
|
2335
|
+
<input type="text" id="deactivateAssistantUserName">
|
|
2336
|
+
<input type="text" id="deactivateAssistantIdType" value="TO_BE_USER_USERNAME">
|
|
2337
|
+
</div>
|
|
2338
|
+
<button id="deactivateAssistant">Deactivate</button>
|
|
2339
|
+
</fieldset>
|
|
2340
|
+
</form>
|
|
2341
|
+
<br>
|
|
2342
|
+
<hr>
|
|
2343
|
+
<br>
|
|
2344
|
+
|
|
2345
|
+
<form action="">
|
|
2346
|
+
<fieldset>
|
|
2347
|
+
<legend>Get current user roles</legend>
|
|
2348
|
+
<input type="text" id="getCurrentUserRolesThreadId">
|
|
2349
|
+
<button id="getCurrentUserRoles">Get Roels On Thread</button>
|
|
2350
|
+
</fieldset>
|
|
2351
|
+
</form>
|
|
2352
|
+
|
|
2317
2353
|
</body>
|
|
2318
2354
|
|
|
2319
2355
|
<script>
|
|
@@ -2812,7 +2848,7 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
2812
2848
|
hashCode: hashCode,
|
|
2813
2849
|
responseType: dataType
|
|
2814
2850
|
}, function (result) {
|
|
2815
|
-
console.log(result);
|
|
2851
|
+
console.log("chatAgent.getFileFromPodspace:result::", result);
|
|
2816
2852
|
if (!result.hasError) {
|
|
2817
2853
|
if (result.type == 'link') {
|
|
2818
2854
|
var fileOutput = document.createElement('a');
|
|
@@ -2994,8 +3030,57 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
2994
3030
|
}, result => {
|
|
2995
3031
|
console.log(result);
|
|
2996
3032
|
})
|
|
3033
|
+
});
|
|
3034
|
+
|
|
3035
|
+
document.getElementById("addAssistant").addEventListener("click", function (event){
|
|
3036
|
+
event.preventDefault();
|
|
3037
|
+
|
|
3038
|
+
var idType = document.getElementById("addAssistantIdType").value
|
|
3039
|
+
, userId = document.getElementById("addAssistantUserName").value;
|
|
3040
|
+
|
|
3041
|
+
chatAgent.registerAssistant({
|
|
3042
|
+
assistants: [
|
|
3043
|
+
{
|
|
3044
|
+
contactType: 'default',
|
|
3045
|
+
roleTypes: ['destinated_recording', "DESTINATED_RECORD", 'read_thread', 'edit_thread', 'add_rule_to_user'],
|
|
3046
|
+
assistant: {
|
|
3047
|
+
id: userId,
|
|
3048
|
+
idType: idType
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
]
|
|
3052
|
+
}, function (result) {
|
|
3053
|
+
console.log("[HTML][addAssistant][result]", result)
|
|
3054
|
+
});
|
|
2997
3055
|
})
|
|
2998
3056
|
|
|
3057
|
+
document.getElementById("deactivateAssistant").addEventListener("click", function (event){
|
|
3058
|
+
event.preventDefault();
|
|
3059
|
+
|
|
3060
|
+
var idType = document.getElementById("deactivateAssistantIdType").value
|
|
3061
|
+
, userId = document.getElementById("deactivateAssistantUserName").value;
|
|
3062
|
+
|
|
3063
|
+
chatAgent.deactivateAssistant({
|
|
3064
|
+
assistants: [{
|
|
3065
|
+
assistant: {
|
|
3066
|
+
id: userId,
|
|
3067
|
+
idType: idType
|
|
3068
|
+
}
|
|
3069
|
+
}]
|
|
3070
|
+
}, function (result) {
|
|
3071
|
+
console.log(result);
|
|
3072
|
+
});
|
|
3073
|
+
})
|
|
3074
|
+
document.getElementById("getCurrentUserRoles").addEventListener("click", function (event){
|
|
3075
|
+
event.preventDefault();
|
|
3076
|
+
var threadId = document.getElementById("getCurrentUserRolesThreadId").value
|
|
3077
|
+
chatAgent.getCurrentUserRoles({
|
|
3078
|
+
threadId: threadId
|
|
3079
|
+
}, function(result) {
|
|
3080
|
+
console.log(result);
|
|
3081
|
+
});
|
|
3082
|
+
});
|
|
3083
|
+
|
|
2999
3084
|
</script>
|
|
3000
3085
|
|
|
3001
3086
|
</html>
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podchat-browser",
|
|
3
|
-
"version": "11.2
|
|
3
|
+
"version": "11.3.1-snapshot.2",
|
|
4
4
|
"description": "Javascript SDK to use POD's Chat Service - Browser Only",
|
|
5
5
|
"main": "./src/chat.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "mocha --reporter spec --exit",
|
|
8
|
-
"bundle": "browserify browser-bundling.js -o ./dist/podchat-11.
|
|
8
|
+
"bundle": "browserify browser-bundling.js -o ./dist/podchat-11.3.1.js",
|
|
9
9
|
"publish:snapshot": "npm run version:snapshot && npm publish --tag snapshot",
|
|
10
10
|
"version:snapshot": "npm version prerelease --preid snapshot",
|
|
11
11
|
"publish:release": "npm run version:release && npm publish",
|