@azure/communication-call-automation 1.1.0-beta.3 → 1.1.0
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/index.js +476 -147
- package/dist/index.js.map +1 -1
- package/dist-esm/src/callAutomationClient.js +4 -4
- package/dist-esm/src/callAutomationClient.js.map +1 -1
- package/dist-esm/src/callAutomationEventParser.js +6 -0
- package/dist-esm/src/callAutomationEventParser.js.map +1 -1
- package/dist-esm/src/callConnection.js +43 -9
- package/dist-esm/src/callConnection.js.map +1 -1
- package/dist-esm/src/callMedia.js +44 -31
- package/dist-esm/src/callMedia.js.map +1 -1
- package/dist-esm/src/generated/src/callAutomationApiClient.js +2 -2
- package/dist-esm/src/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +267 -32
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +6 -2
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/callConnection.js +36 -9
- package/dist-esm/src/generated/src/operations/callConnection.js.map +1 -1
- package/dist-esm/src/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist-esm/src/models/constants.js +1 -1
- package/dist-esm/src/models/constants.js.map +1 -1
- package/dist-esm/src/models/events.js.map +1 -1
- package/dist-esm/src/models/models.js.map +1 -1
- package/dist-esm/src/models/options.js.map +1 -1
- package/dist-esm/src/models/responses.js.map +1 -1
- package/package.json +19 -13
- package/types/communication-call-automation.d.ts +217 -60
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var tslib = require('tslib');
|
|
6
4
|
var coreAuth = require('@azure/core-auth');
|
|
7
5
|
var communicationCommon = require('@azure/communication-common');
|
|
@@ -11,8 +9,7 @@ var coreClient = require('@azure/core-client');
|
|
|
11
9
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
12
10
|
var fs = require('fs');
|
|
13
11
|
|
|
14
|
-
function
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
16
13
|
var n = Object.create(null);
|
|
17
14
|
if (e) {
|
|
18
15
|
Object.keys(e).forEach(function (k) {
|
|
@@ -25,14 +22,15 @@ function _interopNamespace(e) {
|
|
|
25
22
|
}
|
|
26
23
|
});
|
|
27
24
|
}
|
|
28
|
-
n
|
|
25
|
+
n.default = e;
|
|
29
26
|
return Object.freeze(n);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
var coreClient__namespace = /*#__PURE__*/
|
|
33
|
-
var fs__namespace = /*#__PURE__*/
|
|
29
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
|
|
30
|
+
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
34
31
|
|
|
35
32
|
// Copyright (c) Microsoft Corporation.
|
|
33
|
+
// Licensed under the MIT license.
|
|
36
34
|
/**
|
|
37
35
|
* The \@azure/logger configuration for this package.
|
|
38
36
|
*/
|
|
@@ -290,10 +288,11 @@ const CreateCallRequest = {
|
|
|
290
288
|
name: "String"
|
|
291
289
|
}
|
|
292
290
|
},
|
|
293
|
-
|
|
294
|
-
serializedName: "
|
|
291
|
+
callIntelligenceOptions: {
|
|
292
|
+
serializedName: "callIntelligenceOptions",
|
|
295
293
|
type: {
|
|
296
|
-
name: "
|
|
294
|
+
name: "Composite",
|
|
295
|
+
className: "CallIntelligenceOptionsInternal"
|
|
297
296
|
}
|
|
298
297
|
}
|
|
299
298
|
}
|
|
@@ -397,6 +396,20 @@ const MicrosoftTeamsUserIdentifierModel = {
|
|
|
397
396
|
}
|
|
398
397
|
}
|
|
399
398
|
};
|
|
399
|
+
const CallIntelligenceOptionsInternal = {
|
|
400
|
+
type: {
|
|
401
|
+
name: "Composite",
|
|
402
|
+
className: "CallIntelligenceOptionsInternal",
|
|
403
|
+
modelProperties: {
|
|
404
|
+
cognitiveServicesEndpoint: {
|
|
405
|
+
serializedName: "cognitiveServicesEndpoint",
|
|
406
|
+
type: {
|
|
407
|
+
name: "String"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
};
|
|
400
413
|
const CallConnectionPropertiesInternal = {
|
|
401
414
|
type: {
|
|
402
415
|
name: "Composite",
|
|
@@ -563,10 +576,11 @@ const AnswerCallRequest = {
|
|
|
563
576
|
name: "String"
|
|
564
577
|
}
|
|
565
578
|
},
|
|
566
|
-
|
|
567
|
-
serializedName: "
|
|
579
|
+
callIntelligenceOptions: {
|
|
580
|
+
serializedName: "callIntelligenceOptions",
|
|
568
581
|
type: {
|
|
569
|
-
name: "
|
|
582
|
+
name: "Composite",
|
|
583
|
+
className: "CallIntelligenceOptionsInternal"
|
|
570
584
|
}
|
|
571
585
|
},
|
|
572
586
|
answeredBy: {
|
|
@@ -639,6 +653,48 @@ const TransferToParticipantRequest = {
|
|
|
639
653
|
type: {
|
|
640
654
|
name: "String"
|
|
641
655
|
}
|
|
656
|
+
},
|
|
657
|
+
transferee: {
|
|
658
|
+
serializedName: "transferee",
|
|
659
|
+
type: {
|
|
660
|
+
name: "Composite",
|
|
661
|
+
className: "CommunicationIdentifierModel"
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
operationCallbackUri: {
|
|
665
|
+
serializedName: "operationCallbackUri",
|
|
666
|
+
type: {
|
|
667
|
+
name: "String"
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
customCallingContext: {
|
|
671
|
+
serializedName: "customCallingContext",
|
|
672
|
+
type: {
|
|
673
|
+
name: "Composite",
|
|
674
|
+
className: "CustomCallingContextInternal"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
const CustomCallingContextInternal = {
|
|
681
|
+
type: {
|
|
682
|
+
name: "Composite",
|
|
683
|
+
className: "CustomCallingContextInternal",
|
|
684
|
+
modelProperties: {
|
|
685
|
+
voipHeaders: {
|
|
686
|
+
serializedName: "voipHeaders",
|
|
687
|
+
type: {
|
|
688
|
+
name: "Dictionary",
|
|
689
|
+
value: { type: { name: "String" } }
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
sipHeaders: {
|
|
693
|
+
serializedName: "sipHeaders",
|
|
694
|
+
type: {
|
|
695
|
+
name: "Dictionary",
|
|
696
|
+
value: { type: { name: "String" } }
|
|
697
|
+
}
|
|
642
698
|
}
|
|
643
699
|
}
|
|
644
700
|
}
|
|
@@ -699,6 +755,12 @@ const PlayRequest = {
|
|
|
699
755
|
type: {
|
|
700
756
|
name: "String"
|
|
701
757
|
}
|
|
758
|
+
},
|
|
759
|
+
operationCallbackUri: {
|
|
760
|
+
serializedName: "operationCallbackUri",
|
|
761
|
+
type: {
|
|
762
|
+
name: "String"
|
|
763
|
+
}
|
|
702
764
|
}
|
|
703
765
|
}
|
|
704
766
|
}
|
|
@@ -872,6 +934,12 @@ const RecognizeRequest = {
|
|
|
872
934
|
type: {
|
|
873
935
|
name: "String"
|
|
874
936
|
}
|
|
937
|
+
},
|
|
938
|
+
operationCallbackUri: {
|
|
939
|
+
serializedName: "operationCallbackUri",
|
|
940
|
+
type: {
|
|
941
|
+
name: "String"
|
|
942
|
+
}
|
|
875
943
|
}
|
|
876
944
|
}
|
|
877
945
|
}
|
|
@@ -1044,6 +1112,12 @@ const ContinuousDtmfRecognitionRequest = {
|
|
|
1044
1112
|
type: {
|
|
1045
1113
|
name: "String"
|
|
1046
1114
|
}
|
|
1115
|
+
},
|
|
1116
|
+
operationCallbackUri: {
|
|
1117
|
+
serializedName: "operationCallbackUri",
|
|
1118
|
+
type: {
|
|
1119
|
+
name: "String"
|
|
1120
|
+
}
|
|
1047
1121
|
}
|
|
1048
1122
|
}
|
|
1049
1123
|
}
|
|
@@ -1077,6 +1151,12 @@ const SendDtmfTonesRequest = {
|
|
|
1077
1151
|
type: {
|
|
1078
1152
|
name: "String"
|
|
1079
1153
|
}
|
|
1154
|
+
},
|
|
1155
|
+
operationCallbackUri: {
|
|
1156
|
+
serializedName: "operationCallbackUri",
|
|
1157
|
+
type: {
|
|
1158
|
+
name: "String"
|
|
1159
|
+
}
|
|
1080
1160
|
}
|
|
1081
1161
|
}
|
|
1082
1162
|
}
|
|
@@ -1183,6 +1263,19 @@ const AddParticipantRequest = {
|
|
|
1183
1263
|
type: {
|
|
1184
1264
|
name: "String"
|
|
1185
1265
|
}
|
|
1266
|
+
},
|
|
1267
|
+
operationCallbackUri: {
|
|
1268
|
+
serializedName: "operationCallbackUri",
|
|
1269
|
+
type: {
|
|
1270
|
+
name: "String"
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
customCallingContext: {
|
|
1274
|
+
serializedName: "customCallingContext",
|
|
1275
|
+
type: {
|
|
1276
|
+
name: "Composite",
|
|
1277
|
+
className: "CustomCallingContextInternal"
|
|
1278
|
+
}
|
|
1186
1279
|
}
|
|
1187
1280
|
}
|
|
1188
1281
|
}
|
|
@@ -1204,6 +1297,12 @@ const AddParticipantResponse = {
|
|
|
1204
1297
|
type: {
|
|
1205
1298
|
name: "String"
|
|
1206
1299
|
}
|
|
1300
|
+
},
|
|
1301
|
+
invitationId: {
|
|
1302
|
+
serializedName: "invitationId",
|
|
1303
|
+
type: {
|
|
1304
|
+
name: "String"
|
|
1305
|
+
}
|
|
1207
1306
|
}
|
|
1208
1307
|
}
|
|
1209
1308
|
}
|
|
@@ -1225,6 +1324,12 @@ const RemoveParticipantRequest = {
|
|
|
1225
1324
|
type: {
|
|
1226
1325
|
name: "String"
|
|
1227
1326
|
}
|
|
1327
|
+
},
|
|
1328
|
+
operationCallbackUri: {
|
|
1329
|
+
serializedName: "operationCallbackUri",
|
|
1330
|
+
type: {
|
|
1331
|
+
name: "String"
|
|
1332
|
+
}
|
|
1228
1333
|
}
|
|
1229
1334
|
}
|
|
1230
1335
|
}
|
|
@@ -1284,6 +1389,53 @@ const MuteParticipantsResult = {
|
|
|
1284
1389
|
}
|
|
1285
1390
|
}
|
|
1286
1391
|
};
|
|
1392
|
+
const CancelAddParticipantRequest = {
|
|
1393
|
+
type: {
|
|
1394
|
+
name: "Composite",
|
|
1395
|
+
className: "CancelAddParticipantRequest",
|
|
1396
|
+
modelProperties: {
|
|
1397
|
+
invitationId: {
|
|
1398
|
+
serializedName: "invitationId",
|
|
1399
|
+
required: true,
|
|
1400
|
+
type: {
|
|
1401
|
+
name: "String"
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
operationContext: {
|
|
1405
|
+
serializedName: "operationContext",
|
|
1406
|
+
type: {
|
|
1407
|
+
name: "String"
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
operationCallbackUri: {
|
|
1411
|
+
serializedName: "operationCallbackUri",
|
|
1412
|
+
type: {
|
|
1413
|
+
name: "String"
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
};
|
|
1419
|
+
const CancelAddParticipantResponse = {
|
|
1420
|
+
type: {
|
|
1421
|
+
name: "Composite",
|
|
1422
|
+
className: "CancelAddParticipantResponse",
|
|
1423
|
+
modelProperties: {
|
|
1424
|
+
invitationId: {
|
|
1425
|
+
serializedName: "invitationId",
|
|
1426
|
+
type: {
|
|
1427
|
+
name: "String"
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
operationContext: {
|
|
1431
|
+
serializedName: "operationContext",
|
|
1432
|
+
type: {
|
|
1433
|
+
name: "String"
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1287
1439
|
const StartCallRecordingRequest = {
|
|
1288
1440
|
type: {
|
|
1289
1441
|
name: "Composite",
|
|
@@ -1635,6 +1787,20 @@ const CallTransferAccepted = {
|
|
|
1635
1787
|
name: "Composite",
|
|
1636
1788
|
className: "ResultInformation"
|
|
1637
1789
|
}
|
|
1790
|
+
},
|
|
1791
|
+
transferTarget: {
|
|
1792
|
+
serializedName: "transferTarget",
|
|
1793
|
+
type: {
|
|
1794
|
+
name: "Composite",
|
|
1795
|
+
className: "CommunicationIdentifierModel"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
transferee: {
|
|
1799
|
+
serializedName: "transferee",
|
|
1800
|
+
type: {
|
|
1801
|
+
name: "Composite",
|
|
1802
|
+
className: "CommunicationIdentifierModel"
|
|
1803
|
+
}
|
|
1638
1804
|
}
|
|
1639
1805
|
}
|
|
1640
1806
|
}
|
|
@@ -1814,6 +1980,89 @@ const RemoveParticipantFailed = {
|
|
|
1814
1980
|
}
|
|
1815
1981
|
}
|
|
1816
1982
|
};
|
|
1983
|
+
const CancelAddParticipantSucceeded = {
|
|
1984
|
+
type: {
|
|
1985
|
+
name: "Composite",
|
|
1986
|
+
className: "CancelAddParticipantSucceeded",
|
|
1987
|
+
modelProperties: {
|
|
1988
|
+
callConnectionId: {
|
|
1989
|
+
serializedName: "callConnectionId",
|
|
1990
|
+
type: {
|
|
1991
|
+
name: "String"
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
serverCallId: {
|
|
1995
|
+
serializedName: "serverCallId",
|
|
1996
|
+
type: {
|
|
1997
|
+
name: "String"
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
correlationId: {
|
|
2001
|
+
serializedName: "correlationId",
|
|
2002
|
+
type: {
|
|
2003
|
+
name: "String"
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
2006
|
+
operationContext: {
|
|
2007
|
+
serializedName: "operationContext",
|
|
2008
|
+
type: {
|
|
2009
|
+
name: "String"
|
|
2010
|
+
}
|
|
2011
|
+
},
|
|
2012
|
+
invitationId: {
|
|
2013
|
+
serializedName: "invitationId",
|
|
2014
|
+
type: {
|
|
2015
|
+
name: "String"
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
};
|
|
2021
|
+
const CancelAddParticipantFailed = {
|
|
2022
|
+
type: {
|
|
2023
|
+
name: "Composite",
|
|
2024
|
+
className: "CancelAddParticipantFailed",
|
|
2025
|
+
modelProperties: {
|
|
2026
|
+
callConnectionId: {
|
|
2027
|
+
serializedName: "callConnectionId",
|
|
2028
|
+
type: {
|
|
2029
|
+
name: "String"
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
serverCallId: {
|
|
2033
|
+
serializedName: "serverCallId",
|
|
2034
|
+
type: {
|
|
2035
|
+
name: "String"
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
2038
|
+
correlationId: {
|
|
2039
|
+
serializedName: "correlationId",
|
|
2040
|
+
type: {
|
|
2041
|
+
name: "String"
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
operationContext: {
|
|
2045
|
+
serializedName: "operationContext",
|
|
2046
|
+
type: {
|
|
2047
|
+
name: "String"
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
resultInformation: {
|
|
2051
|
+
serializedName: "resultInformation",
|
|
2052
|
+
type: {
|
|
2053
|
+
name: "Composite",
|
|
2054
|
+
className: "ResultInformation"
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
2057
|
+
invitationId: {
|
|
2058
|
+
serializedName: "invitationId",
|
|
2059
|
+
type: {
|
|
2060
|
+
name: "String"
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
};
|
|
1817
2066
|
const RecordingStateChanged = {
|
|
1818
2067
|
type: {
|
|
1819
2068
|
name: "Composite",
|
|
@@ -2205,11 +2454,17 @@ const ContinuousDtmfRecognitionToneReceived = {
|
|
|
2205
2454
|
name: "Composite",
|
|
2206
2455
|
className: "ContinuousDtmfRecognitionToneReceived",
|
|
2207
2456
|
modelProperties: {
|
|
2208
|
-
|
|
2209
|
-
serializedName: "
|
|
2457
|
+
sequenceId: {
|
|
2458
|
+
serializedName: "sequenceId",
|
|
2459
|
+
readOnly: true,
|
|
2210
2460
|
type: {
|
|
2211
|
-
name: "
|
|
2212
|
-
|
|
2461
|
+
name: "Number"
|
|
2462
|
+
}
|
|
2463
|
+
},
|
|
2464
|
+
tone: {
|
|
2465
|
+
serializedName: "tone",
|
|
2466
|
+
type: {
|
|
2467
|
+
name: "String"
|
|
2213
2468
|
}
|
|
2214
2469
|
},
|
|
2215
2470
|
callConnectionId: {
|
|
@@ -2246,28 +2501,6 @@ const ContinuousDtmfRecognitionToneReceived = {
|
|
|
2246
2501
|
}
|
|
2247
2502
|
}
|
|
2248
2503
|
};
|
|
2249
|
-
const ToneInfo = {
|
|
2250
|
-
type: {
|
|
2251
|
-
name: "Composite",
|
|
2252
|
-
className: "ToneInfo",
|
|
2253
|
-
modelProperties: {
|
|
2254
|
-
sequenceId: {
|
|
2255
|
-
serializedName: "sequenceId",
|
|
2256
|
-
required: true,
|
|
2257
|
-
type: {
|
|
2258
|
-
name: "Number"
|
|
2259
|
-
}
|
|
2260
|
-
},
|
|
2261
|
-
tone: {
|
|
2262
|
-
serializedName: "tone",
|
|
2263
|
-
required: true,
|
|
2264
|
-
type: {
|
|
2265
|
-
name: "String"
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
};
|
|
2271
2504
|
const ContinuousDtmfRecognitionStopped = {
|
|
2272
2505
|
type: {
|
|
2273
2506
|
name: "Composite",
|
|
@@ -2388,71 +2621,76 @@ const SendDtmfTonesFailed = {
|
|
|
2388
2621
|
|
|
2389
2622
|
var Mappers = /*#__PURE__*/Object.freeze({
|
|
2390
2623
|
__proto__: null,
|
|
2391
|
-
|
|
2392
|
-
CommunicationIdentifierModel: CommunicationIdentifierModel,
|
|
2393
|
-
CommunicationUserIdentifierModel: CommunicationUserIdentifierModel,
|
|
2394
|
-
PhoneNumberIdentifierModel: PhoneNumberIdentifierModel,
|
|
2395
|
-
MicrosoftTeamsUserIdentifierModel: MicrosoftTeamsUserIdentifierModel,
|
|
2396
|
-
CallConnectionPropertiesInternal: CallConnectionPropertiesInternal,
|
|
2397
|
-
CommunicationErrorResponse: CommunicationErrorResponse,
|
|
2398
|
-
CommunicationError: CommunicationError,
|
|
2399
|
-
AnswerCallRequest: AnswerCallRequest,
|
|
2400
|
-
RedirectCallRequest: RedirectCallRequest,
|
|
2401
|
-
RejectCallRequest: RejectCallRequest,
|
|
2402
|
-
TransferToParticipantRequest: TransferToParticipantRequest,
|
|
2403
|
-
TransferCallResponse: TransferCallResponse,
|
|
2404
|
-
PlayRequest: PlayRequest,
|
|
2405
|
-
PlaySourceInternal: PlaySourceInternal,
|
|
2406
|
-
FileSourceInternal: FileSourceInternal,
|
|
2407
|
-
TextSourceInternal: TextSourceInternal,
|
|
2408
|
-
SsmlSourceInternal: SsmlSourceInternal,
|
|
2409
|
-
PlayOptionsInternal: PlayOptionsInternal,
|
|
2410
|
-
RecognizeRequest: RecognizeRequest,
|
|
2411
|
-
RecognizeOptions: RecognizeOptions,
|
|
2412
|
-
DtmfOptions: DtmfOptions,
|
|
2413
|
-
Choice: Choice,
|
|
2414
|
-
SpeechOptions: SpeechOptions,
|
|
2415
|
-
ContinuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest,
|
|
2416
|
-
SendDtmfTonesRequest: SendDtmfTonesRequest,
|
|
2417
|
-
SendDtmfTonesResult: SendDtmfTonesResult,
|
|
2418
|
-
GetParticipantsResponse: GetParticipantsResponse,
|
|
2419
|
-
CallParticipantInternal: CallParticipantInternal,
|
|
2624
|
+
AddParticipantFailed: AddParticipantFailed,
|
|
2420
2625
|
AddParticipantRequest: AddParticipantRequest,
|
|
2421
2626
|
AddParticipantResponse: AddParticipantResponse,
|
|
2422
|
-
RemoveParticipantRequest: RemoveParticipantRequest,
|
|
2423
|
-
RemoveParticipantResponse: RemoveParticipantResponse,
|
|
2424
|
-
MuteParticipantsRequest: MuteParticipantsRequest,
|
|
2425
|
-
MuteParticipantsResult: MuteParticipantsResult,
|
|
2426
|
-
StartCallRecordingRequest: StartCallRecordingRequest,
|
|
2427
|
-
CallLocator: CallLocator,
|
|
2428
|
-
ChannelAffinity: ChannelAffinity,
|
|
2429
|
-
RecordingStateResponse: RecordingStateResponse,
|
|
2430
|
-
AddParticipantFailed: AddParticipantFailed,
|
|
2431
|
-
ResultInformation: ResultInformation,
|
|
2432
2627
|
AddParticipantSucceeded: AddParticipantSucceeded,
|
|
2628
|
+
AnswerCallRequest: AnswerCallRequest,
|
|
2433
2629
|
CallConnected: CallConnected,
|
|
2630
|
+
CallConnectionPropertiesInternal: CallConnectionPropertiesInternal,
|
|
2434
2631
|
CallDisconnected: CallDisconnected,
|
|
2632
|
+
CallIntelligenceOptionsInternal: CallIntelligenceOptionsInternal,
|
|
2633
|
+
CallLocator: CallLocator,
|
|
2634
|
+
CallParticipantInternal: CallParticipantInternal,
|
|
2435
2635
|
CallTransferAccepted: CallTransferAccepted,
|
|
2436
2636
|
CallTransferFailed: CallTransferFailed,
|
|
2637
|
+
CancelAddParticipantFailed: CancelAddParticipantFailed,
|
|
2638
|
+
CancelAddParticipantRequest: CancelAddParticipantRequest,
|
|
2639
|
+
CancelAddParticipantResponse: CancelAddParticipantResponse,
|
|
2640
|
+
CancelAddParticipantSucceeded: CancelAddParticipantSucceeded,
|
|
2641
|
+
ChannelAffinity: ChannelAffinity,
|
|
2642
|
+
Choice: Choice,
|
|
2643
|
+
ChoiceResult: ChoiceResult,
|
|
2644
|
+
CommunicationError: CommunicationError,
|
|
2645
|
+
CommunicationErrorResponse: CommunicationErrorResponse,
|
|
2646
|
+
CommunicationIdentifierModel: CommunicationIdentifierModel,
|
|
2647
|
+
CommunicationUserIdentifierModel: CommunicationUserIdentifierModel,
|
|
2648
|
+
ContinuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest,
|
|
2649
|
+
ContinuousDtmfRecognitionStopped: ContinuousDtmfRecognitionStopped,
|
|
2650
|
+
ContinuousDtmfRecognitionToneFailed: ContinuousDtmfRecognitionToneFailed,
|
|
2651
|
+
ContinuousDtmfRecognitionToneReceived: ContinuousDtmfRecognitionToneReceived,
|
|
2652
|
+
CreateCallRequest: CreateCallRequest,
|
|
2653
|
+
CustomCallingContextInternal: CustomCallingContextInternal,
|
|
2654
|
+
DtmfOptions: DtmfOptions,
|
|
2655
|
+
DtmfResult: DtmfResult,
|
|
2656
|
+
FileSourceInternal: FileSourceInternal,
|
|
2657
|
+
GetParticipantsResponse: GetParticipantsResponse,
|
|
2658
|
+
MicrosoftTeamsUserIdentifierModel: MicrosoftTeamsUserIdentifierModel,
|
|
2659
|
+
MuteParticipantsRequest: MuteParticipantsRequest,
|
|
2660
|
+
MuteParticipantsResult: MuteParticipantsResult,
|
|
2437
2661
|
ParticipantsUpdated: ParticipantsUpdated,
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
RecordingStateChanged: RecordingStateChanged,
|
|
2662
|
+
PhoneNumberIdentifierModel: PhoneNumberIdentifierModel,
|
|
2663
|
+
PlayCanceled: PlayCanceled,
|
|
2441
2664
|
PlayCompleted: PlayCompleted,
|
|
2442
2665
|
PlayFailed: PlayFailed,
|
|
2443
|
-
|
|
2666
|
+
PlayOptionsInternal: PlayOptionsInternal,
|
|
2667
|
+
PlayRequest: PlayRequest,
|
|
2668
|
+
PlaySourceInternal: PlaySourceInternal,
|
|
2669
|
+
RecognizeCanceled: RecognizeCanceled,
|
|
2444
2670
|
RecognizeCompleted: RecognizeCompleted,
|
|
2445
|
-
DtmfResult: DtmfResult,
|
|
2446
|
-
ChoiceResult: ChoiceResult,
|
|
2447
|
-
SpeechResult: SpeechResult,
|
|
2448
2671
|
RecognizeFailed: RecognizeFailed,
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2672
|
+
RecognizeOptions: RecognizeOptions,
|
|
2673
|
+
RecognizeRequest: RecognizeRequest,
|
|
2674
|
+
RecordingStateChanged: RecordingStateChanged,
|
|
2675
|
+
RecordingStateResponse: RecordingStateResponse,
|
|
2676
|
+
RedirectCallRequest: RedirectCallRequest,
|
|
2677
|
+
RejectCallRequest: RejectCallRequest,
|
|
2678
|
+
RemoveParticipantFailed: RemoveParticipantFailed,
|
|
2679
|
+
RemoveParticipantRequest: RemoveParticipantRequest,
|
|
2680
|
+
RemoveParticipantResponse: RemoveParticipantResponse,
|
|
2681
|
+
RemoveParticipantSucceeded: RemoveParticipantSucceeded,
|
|
2682
|
+
ResultInformation: ResultInformation,
|
|
2454
2683
|
SendDtmfTonesCompleted: SendDtmfTonesCompleted,
|
|
2455
|
-
SendDtmfTonesFailed: SendDtmfTonesFailed
|
|
2684
|
+
SendDtmfTonesFailed: SendDtmfTonesFailed,
|
|
2685
|
+
SendDtmfTonesRequest: SendDtmfTonesRequest,
|
|
2686
|
+
SendDtmfTonesResult: SendDtmfTonesResult,
|
|
2687
|
+
SpeechOptions: SpeechOptions,
|
|
2688
|
+
SpeechResult: SpeechResult,
|
|
2689
|
+
SsmlSourceInternal: SsmlSourceInternal,
|
|
2690
|
+
StartCallRecordingRequest: StartCallRecordingRequest,
|
|
2691
|
+
TextSourceInternal: TextSourceInternal,
|
|
2692
|
+
TransferCallResponse: TransferCallResponse,
|
|
2693
|
+
TransferToParticipantRequest: TransferToParticipantRequest
|
|
2456
2694
|
});
|
|
2457
2695
|
|
|
2458
2696
|
/*
|
|
@@ -2502,7 +2740,7 @@ const endpoint = {
|
|
|
2502
2740
|
const apiVersion = {
|
|
2503
2741
|
parameterPath: "apiVersion",
|
|
2504
2742
|
mapper: {
|
|
2505
|
-
defaultValue: "2023-
|
|
2743
|
+
defaultValue: "2023-10-15",
|
|
2506
2744
|
isConstant: true,
|
|
2507
2745
|
serializedName: "api-version",
|
|
2508
2746
|
type: {
|
|
@@ -2566,6 +2804,10 @@ const muteParticipantsRequest = {
|
|
|
2566
2804
|
parameterPath: "muteParticipantsRequest",
|
|
2567
2805
|
mapper: MuteParticipantsRequest
|
|
2568
2806
|
};
|
|
2807
|
+
const cancelAddParticipantRequest = {
|
|
2808
|
+
parameterPath: "cancelAddParticipantRequest",
|
|
2809
|
+
mapper: CancelAddParticipantRequest
|
|
2810
|
+
};
|
|
2569
2811
|
const participantRawId = {
|
|
2570
2812
|
parameterPath: "participantRawId",
|
|
2571
2813
|
mapper: {
|
|
@@ -2681,16 +2923,11 @@ class CallConnectionImpl {
|
|
|
2681
2923
|
return tslib.__asyncGenerator(this, arguments, function* getParticipantsPagingAll_1() {
|
|
2682
2924
|
var _a, e_1, _b, _c;
|
|
2683
2925
|
try {
|
|
2684
|
-
for (var _d = true, _e = tslib.__asyncValues(this.getParticipantsPagingPage(callConnectionId, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
2926
|
+
for (var _d = true, _e = tslib.__asyncValues(this.getParticipantsPagingPage(callConnectionId, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
2685
2927
|
_c = _f.value;
|
|
2686
2928
|
_d = false;
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2690
|
-
}
|
|
2691
|
-
finally {
|
|
2692
|
-
_d = true;
|
|
2693
|
-
}
|
|
2929
|
+
const page = _c;
|
|
2930
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2694
2931
|
}
|
|
2695
2932
|
}
|
|
2696
2933
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -2771,6 +3008,15 @@ class CallConnectionImpl {
|
|
|
2771
3008
|
mute(callConnectionId, muteParticipantsRequest, options) {
|
|
2772
3009
|
return this.client.sendOperationRequest({ callConnectionId, muteParticipantsRequest, options }, muteOperationSpec);
|
|
2773
3010
|
}
|
|
3011
|
+
/**
|
|
3012
|
+
* Cancel add participant operation.
|
|
3013
|
+
* @param callConnectionId The call connection Id
|
|
3014
|
+
* @param cancelAddParticipantRequest Cancellation request.
|
|
3015
|
+
* @param options The options parameters.
|
|
3016
|
+
*/
|
|
3017
|
+
cancelAddParticipant(callConnectionId, cancelAddParticipantRequest, options) {
|
|
3018
|
+
return this.client.sendOperationRequest({ callConnectionId, cancelAddParticipantRequest, options }, cancelAddParticipantOperationSpec);
|
|
3019
|
+
}
|
|
2774
3020
|
/**
|
|
2775
3021
|
* Get participant from a call.
|
|
2776
3022
|
* @param callConnectionId The call connection Id
|
|
@@ -2929,7 +3175,7 @@ const muteOperationSpec = {
|
|
|
2929
3175
|
path: "/calling/callConnections/{callConnectionId}/participants:mute",
|
|
2930
3176
|
httpMethod: "POST",
|
|
2931
3177
|
responses: {
|
|
2932
|
-
|
|
3178
|
+
200: {
|
|
2933
3179
|
bodyMapper: MuteParticipantsResult
|
|
2934
3180
|
},
|
|
2935
3181
|
default: {
|
|
@@ -2948,6 +3194,29 @@ const muteOperationSpec = {
|
|
|
2948
3194
|
mediaType: "json",
|
|
2949
3195
|
serializer: serializer$4
|
|
2950
3196
|
};
|
|
3197
|
+
const cancelAddParticipantOperationSpec = {
|
|
3198
|
+
path: "/calling/callConnections/{callConnectionId}/participants:cancelAddParticipant",
|
|
3199
|
+
httpMethod: "POST",
|
|
3200
|
+
responses: {
|
|
3201
|
+
202: {
|
|
3202
|
+
bodyMapper: CancelAddParticipantResponse
|
|
3203
|
+
},
|
|
3204
|
+
default: {
|
|
3205
|
+
bodyMapper: CommunicationErrorResponse
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
requestBody: cancelAddParticipantRequest,
|
|
3209
|
+
queryParameters: [apiVersion],
|
|
3210
|
+
urlParameters: [endpoint, callConnectionId],
|
|
3211
|
+
headerParameters: [
|
|
3212
|
+
contentType,
|
|
3213
|
+
accept,
|
|
3214
|
+
repeatabilityRequestID,
|
|
3215
|
+
repeatabilityFirstSent
|
|
3216
|
+
],
|
|
3217
|
+
mediaType: "json",
|
|
3218
|
+
serializer: serializer$4
|
|
3219
|
+
};
|
|
2951
3220
|
const getParticipantOperationSpec = {
|
|
2952
3221
|
path: "/calling/callConnections/{callConnectionId}/participants/{participantRawId}",
|
|
2953
3222
|
httpMethod: "GET",
|
|
@@ -3328,7 +3597,7 @@ class CallAutomationApiClient extends coreClient__namespace.ServiceClient {
|
|
|
3328
3597
|
const defaults = {
|
|
3329
3598
|
requestContentType: "application/json; charset=utf-8"
|
|
3330
3599
|
};
|
|
3331
|
-
const packageDetails = `azsdk-js-communication-call-automation/1.1.0
|
|
3600
|
+
const packageDetails = `azsdk-js-communication-call-automation/1.1.0`;
|
|
3332
3601
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
3333
3602
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
3334
3603
|
: `${packageDetails}`;
|
|
@@ -3339,7 +3608,7 @@ class CallAutomationApiClient extends coreClient__namespace.ServiceClient {
|
|
|
3339
3608
|
// Parameter assignments
|
|
3340
3609
|
this.endpoint = endpoint;
|
|
3341
3610
|
// Assigning values to Constant parameters
|
|
3342
|
-
this.apiVersion = options.apiVersion || "2023-
|
|
3611
|
+
this.apiVersion = options.apiVersion || "2023-10-15";
|
|
3343
3612
|
this.callConnection = new CallConnectionImpl(this);
|
|
3344
3613
|
this.callMedia = new CallMediaImpl(this);
|
|
3345
3614
|
this.callRecording = new CallRecordingImpl(this);
|
|
@@ -3495,6 +3764,7 @@ const rejectCallOperationSpec = {
|
|
|
3495
3764
|
};
|
|
3496
3765
|
|
|
3497
3766
|
// Copyright (c) Microsoft Corporation.
|
|
3767
|
+
// Licensed under the MIT license.
|
|
3498
3768
|
/**
|
|
3499
3769
|
* CallMedia class represents call media related APIs.
|
|
3500
3770
|
*/
|
|
@@ -3547,45 +3817,47 @@ class CallMedia {
|
|
|
3547
3817
|
/**
|
|
3548
3818
|
* Play audio to a specific participant.
|
|
3549
3819
|
*
|
|
3550
|
-
* @param playSources - A PlaySource representing the sources to play.
|
|
3820
|
+
* @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.
|
|
3551
3821
|
* @param playTo - The targets to play to.
|
|
3552
|
-
* @param
|
|
3822
|
+
* @param options - Additional attributes for play.
|
|
3553
3823
|
*/
|
|
3554
|
-
async play(playSources, playTo,
|
|
3824
|
+
async play(playSources, playTo, options = { loop: false }) {
|
|
3555
3825
|
const playRequest = {
|
|
3556
3826
|
playSources: playSources.map((source) => this.createPlaySourceInternal(source)),
|
|
3557
3827
|
playTo: playTo.map((identifier) => communicationCommon.serializeCommunicationIdentifier(identifier)),
|
|
3558
3828
|
playOptions: {
|
|
3559
3829
|
loop: false,
|
|
3560
3830
|
},
|
|
3561
|
-
operationContext:
|
|
3831
|
+
operationContext: options.operationContext,
|
|
3832
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
3562
3833
|
};
|
|
3563
|
-
if (
|
|
3834
|
+
if (options.loop !== undefined) {
|
|
3564
3835
|
playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined
|
|
3565
|
-
playRequest.playOptions.loop =
|
|
3836
|
+
playRequest.playOptions.loop = options.loop;
|
|
3566
3837
|
}
|
|
3567
|
-
return this.callMedia.play(this.callConnectionId, playRequest,
|
|
3838
|
+
return this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
3568
3839
|
}
|
|
3569
3840
|
/**
|
|
3570
3841
|
* Play to all participants.
|
|
3571
3842
|
*
|
|
3572
|
-
* @param playSources - A PlaySource representing the sources to play.
|
|
3573
|
-
* @param
|
|
3843
|
+
* @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.
|
|
3844
|
+
* @param options - Additional attributes for play.
|
|
3574
3845
|
*/
|
|
3575
|
-
async playToAll(playSources,
|
|
3846
|
+
async playToAll(playSources, options = { loop: false }) {
|
|
3576
3847
|
const playRequest = {
|
|
3577
3848
|
playSources: playSources.map((source) => this.createPlaySourceInternal(source)),
|
|
3578
3849
|
playTo: [],
|
|
3579
3850
|
playOptions: {
|
|
3580
3851
|
loop: false,
|
|
3581
3852
|
},
|
|
3582
|
-
operationContext:
|
|
3853
|
+
operationContext: options.operationContext,
|
|
3854
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
3583
3855
|
};
|
|
3584
|
-
if (
|
|
3856
|
+
if (options.loop !== undefined) {
|
|
3585
3857
|
playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined
|
|
3586
|
-
playRequest.playOptions.loop =
|
|
3858
|
+
playRequest.playOptions.loop = options.loop;
|
|
3587
3859
|
}
|
|
3588
|
-
return this.callMedia.play(this.callConnectionId, playRequest,
|
|
3860
|
+
return this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
3589
3861
|
}
|
|
3590
3862
|
createRecognizeRequest(targetParticipant, recognizeOptions) {
|
|
3591
3863
|
if (recognizeOptions.kind === "callMediaRecognizeDtmfOptions") {
|
|
@@ -3612,6 +3884,7 @@ class CallMedia {
|
|
|
3612
3884
|
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
3613
3885
|
recognizeOptions: recognizeOptionsInternal,
|
|
3614
3886
|
operationContext: recognizeOptions.operationContext,
|
|
3887
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl,
|
|
3615
3888
|
};
|
|
3616
3889
|
}
|
|
3617
3890
|
else if (recognizeOptions.kind === "callMediaRecognizeChoiceOptions") {
|
|
@@ -3633,6 +3906,7 @@ class CallMedia {
|
|
|
3633
3906
|
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
3634
3907
|
recognizeOptions: recognizeOptionsInternal,
|
|
3635
3908
|
operationContext: recognizeOptions.operationContext,
|
|
3909
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl,
|
|
3636
3910
|
};
|
|
3637
3911
|
}
|
|
3638
3912
|
else if (recognizeOptions.kind === "callMediaRecognizeSpeechOptions") {
|
|
@@ -3659,6 +3933,7 @@ class CallMedia {
|
|
|
3659
3933
|
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
3660
3934
|
recognizeOptions: recognizeOptionsInternal,
|
|
3661
3935
|
operationContext: recognizeOptions.operationContext,
|
|
3936
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl,
|
|
3662
3937
|
};
|
|
3663
3938
|
}
|
|
3664
3939
|
else if (recognizeOptions.kind === "callMediaRecognizeSpeechOrDtmfOptions") {
|
|
@@ -3693,17 +3968,23 @@ class CallMedia {
|
|
|
3693
3968
|
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
3694
3969
|
recognizeOptions: recognizeOptionsInternal,
|
|
3695
3970
|
operationContext: recognizeOptions.operationContext,
|
|
3971
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl,
|
|
3696
3972
|
};
|
|
3697
3973
|
}
|
|
3698
3974
|
throw new Error("Invalid recognizeOptions");
|
|
3699
3975
|
}
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3976
|
+
async startRecognizing(targetParticipant, maxTonesOrOptions, options) {
|
|
3977
|
+
if (typeof maxTonesOrOptions === "number" && options) {
|
|
3978
|
+
// Old function signature logic
|
|
3979
|
+
console.warn("Deprecated function signature used. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options.");
|
|
3980
|
+
options.maxTonesToCollect = maxTonesOrOptions;
|
|
3981
|
+
return this.callMedia.recognize(this.callConnectionId, this.createRecognizeRequest(targetParticipant, options), {});
|
|
3982
|
+
}
|
|
3983
|
+
else if (typeof maxTonesOrOptions !== "number" && !options) {
|
|
3984
|
+
// New function signature logic
|
|
3985
|
+
return this.callMedia.recognize(this.callConnectionId, this.createRecognizeRequest(targetParticipant, maxTonesOrOptions), {});
|
|
3986
|
+
}
|
|
3987
|
+
throw new Error("Invalid params");
|
|
3707
3988
|
}
|
|
3708
3989
|
/**
|
|
3709
3990
|
* Cancels all the queued media operations.
|
|
@@ -3714,24 +3995,25 @@ class CallMedia {
|
|
|
3714
3995
|
/**
|
|
3715
3996
|
* Start continuous Dtmf recognition by subscribing to tones.
|
|
3716
3997
|
* @param targetParticipant - Target participant.
|
|
3717
|
-
* @param
|
|
3998
|
+
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
3718
3999
|
* */
|
|
3719
|
-
async startContinuousDtmfRecognition(targetParticipant,
|
|
4000
|
+
async startContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
3720
4001
|
const continuousDtmfRecognitionRequest = {
|
|
3721
4002
|
targetParticipant: communicationCommon.serializeCommunicationIdentifier(targetParticipant),
|
|
3722
|
-
operationContext:
|
|
4003
|
+
operationContext: options.operationContext,
|
|
3723
4004
|
};
|
|
3724
4005
|
return this.callMedia.startContinuousDtmfRecognition(this.callConnectionId, continuousDtmfRecognitionRequest, {});
|
|
3725
4006
|
}
|
|
3726
4007
|
/**
|
|
3727
4008
|
* Stop continuous Dtmf recognition by unsubscribing to tones.
|
|
3728
4009
|
* @param targetParticipant - Target participant.
|
|
3729
|
-
* @param
|
|
4010
|
+
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
3730
4011
|
* */
|
|
3731
|
-
async stopContinuousDtmfRecognition(targetParticipant,
|
|
4012
|
+
async stopContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
3732
4013
|
const continuousDtmfRecognitionRequest = {
|
|
3733
4014
|
targetParticipant: communicationCommon.serializeCommunicationIdentifier(targetParticipant),
|
|
3734
|
-
operationContext:
|
|
4015
|
+
operationContext: options.operationContext,
|
|
4016
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
3735
4017
|
};
|
|
3736
4018
|
return this.callMedia.stopContinuousDtmfRecognition(this.callConnectionId, continuousDtmfRecognitionRequest, {});
|
|
3737
4019
|
}
|
|
@@ -3739,15 +4021,16 @@ class CallMedia {
|
|
|
3739
4021
|
* Send Dtmf tones.
|
|
3740
4022
|
* @param tones - List of tones to be sent to target participant.
|
|
3741
4023
|
* @param targetParticipant - Target participant.
|
|
3742
|
-
* @param
|
|
4024
|
+
* @param options - Additional attributes for send Dtmf tones.
|
|
3743
4025
|
* */
|
|
3744
|
-
async sendDtmfTones(tones, targetParticipant,
|
|
4026
|
+
async sendDtmfTones(tones, targetParticipant, options = {}) {
|
|
3745
4027
|
const sendDtmfTonesRequest = {
|
|
3746
4028
|
tones: tones,
|
|
3747
4029
|
targetParticipant: communicationCommon.serializeCommunicationIdentifier(targetParticipant),
|
|
3748
|
-
operationContext:
|
|
4030
|
+
operationContext: options.operationContext,
|
|
4031
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
3749
4032
|
};
|
|
3750
|
-
const optionsInternal = Object.assign(Object.assign({},
|
|
4033
|
+
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: uuid.v4() });
|
|
3751
4034
|
const result = await this.callMedia.sendDtmfTones(this.callConnectionId, sendDtmfTonesRequest, optionsInternal);
|
|
3752
4035
|
const sendDtmfTonesResult = Object.assign({}, result);
|
|
3753
4036
|
return sendDtmfTonesResult;
|
|
@@ -3755,6 +4038,7 @@ class CallMedia {
|
|
|
3755
4038
|
}
|
|
3756
4039
|
|
|
3757
4040
|
// Copyright (c) Microsoft Corporation.
|
|
4041
|
+
// Licensed under the MIT license.
|
|
3758
4042
|
function extractKind(identifierModel) {
|
|
3759
4043
|
if (identifierModel.communicationUser !== undefined) {
|
|
3760
4044
|
return KnownCommunicationIdentifierModelKind.CommunicationUser;
|
|
@@ -3864,6 +4148,7 @@ function communicationUserIdentifierConverter(identifier) {
|
|
|
3864
4148
|
}
|
|
3865
4149
|
|
|
3866
4150
|
// Copyright (c) Microsoft Corporation.
|
|
4151
|
+
// Licensed under the MIT license.
|
|
3867
4152
|
/**
|
|
3868
4153
|
* CallConnection class represents call connection based APIs.
|
|
3869
4154
|
*/
|
|
@@ -3935,17 +4220,12 @@ class CallConnection {
|
|
|
3935
4220
|
const participants = [];
|
|
3936
4221
|
const pages = result === null || result === void 0 ? void 0 : result.byPage();
|
|
3937
4222
|
try {
|
|
3938
|
-
for (var _d = true, pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = await pages_1.next(), _a = pages_1_1.done, !_a;) {
|
|
4223
|
+
for (var _d = true, pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = await pages_1.next(), _a = pages_1_1.done, !_a; _d = true) {
|
|
3939
4224
|
_c = pages_1_1.value;
|
|
3940
4225
|
_d = false;
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
participants.push(callParticipantConverter(participant));
|
|
3945
|
-
}
|
|
3946
|
-
}
|
|
3947
|
-
finally {
|
|
3948
|
-
_d = true;
|
|
4226
|
+
const page = _c;
|
|
4227
|
+
for (const participant of page) {
|
|
4228
|
+
participants.push(callParticipantConverter(participant));
|
|
3949
4229
|
}
|
|
3950
4230
|
}
|
|
3951
4231
|
}
|
|
@@ -3959,6 +4239,24 @@ class CallConnection {
|
|
|
3959
4239
|
const listParticipantResponse = Object.assign(Object.assign({}, result), { values: participants });
|
|
3960
4240
|
return listParticipantResponse;
|
|
3961
4241
|
}
|
|
4242
|
+
createCustomCallingContextInternal(customCallingContext) {
|
|
4243
|
+
const sipHeaders = {};
|
|
4244
|
+
const voipHeaders = {};
|
|
4245
|
+
if (customCallingContext) {
|
|
4246
|
+
for (const header of customCallingContext) {
|
|
4247
|
+
if (header.kind === "sipuui") {
|
|
4248
|
+
sipHeaders[`User-To-User`] = header.value;
|
|
4249
|
+
}
|
|
4250
|
+
else if (header.kind === "sipx") {
|
|
4251
|
+
sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
|
|
4252
|
+
}
|
|
4253
|
+
else if (header.kind === "voip") {
|
|
4254
|
+
voipHeaders[`${header.key}`] = header.value;
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };
|
|
4259
|
+
}
|
|
3962
4260
|
/**
|
|
3963
4261
|
* Add a participant to the call
|
|
3964
4262
|
*
|
|
@@ -3972,6 +4270,8 @@ class CallConnection {
|
|
|
3972
4270
|
sourceDisplayName: targetParticipant.sourceDisplayName,
|
|
3973
4271
|
invitationTimeoutInSeconds: options.invitationTimeoutInSeconds,
|
|
3974
4272
|
operationContext: options.operationContext,
|
|
4273
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
4274
|
+
customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
|
|
3975
4275
|
};
|
|
3976
4276
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: uuid.v4() });
|
|
3977
4277
|
const result = await this.callConnection.addParticipant(this.callConnectionId, addParticipantRequest, optionsInternal);
|
|
@@ -3989,6 +4289,9 @@ class CallConnection {
|
|
|
3989
4289
|
const transferToParticipantRequest = {
|
|
3990
4290
|
targetParticipant: communicationIdentifierModelConverter(targetParticipant),
|
|
3991
4291
|
operationContext: options.operationContext,
|
|
4292
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
4293
|
+
transferee: options.transferee && communicationIdentifierModelConverter(options.transferee),
|
|
4294
|
+
customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext),
|
|
3992
4295
|
};
|
|
3993
4296
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: uuid.v4() });
|
|
3994
4297
|
const result = await this.callConnection.transferToParticipant(this.callConnectionId, transferToParticipantRequest, optionsInternal);
|
|
@@ -4004,6 +4307,7 @@ class CallConnection {
|
|
|
4004
4307
|
const removeParticipantRequest = {
|
|
4005
4308
|
participantToRemove: communicationIdentifierModelConverter(participant),
|
|
4006
4309
|
operationContext: options.operationContext,
|
|
4310
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
4007
4311
|
};
|
|
4008
4312
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: uuid.v4() });
|
|
4009
4313
|
const result = await this.callConnection.removeParticipant(this.callConnectionId, removeParticipantRequest, optionsInternal);
|
|
@@ -4026,9 +4330,25 @@ class CallConnection {
|
|
|
4026
4330
|
const muteParticipantResult = Object.assign({}, result);
|
|
4027
4331
|
return muteParticipantResult;
|
|
4028
4332
|
}
|
|
4333
|
+
/** Cancel add participant operation.
|
|
4334
|
+
*
|
|
4335
|
+
* @param invitationId - Invitation ID used to cancel the add participant request.
|
|
4336
|
+
* @param options - Additional attributes for cancel add participant operation.
|
|
4337
|
+
*/
|
|
4338
|
+
async cancelAddParticipantOperation(invitationId, options = {}) {
|
|
4339
|
+
const { operationContext, operationCallbackUrl: operationCallbackUri } = options, operationOptions = tslib.__rest(options, ["operationContext", "operationCallbackUrl"]);
|
|
4340
|
+
const cancelAddParticipantRequest = {
|
|
4341
|
+
invitationId,
|
|
4342
|
+
operationContext: options.operationContext,
|
|
4343
|
+
operationCallbackUri,
|
|
4344
|
+
};
|
|
4345
|
+
const optionsInternal = Object.assign(Object.assign({}, operationOptions), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: uuid.v4() });
|
|
4346
|
+
return this.callConnection.cancelAddParticipant(this.callConnectionId, cancelAddParticipantRequest, optionsInternal);
|
|
4347
|
+
}
|
|
4029
4348
|
}
|
|
4030
4349
|
|
|
4031
4350
|
// Copyright (c) Microsoft Corporation.
|
|
4351
|
+
// Licensed under the MIT license.
|
|
4032
4352
|
/** Class containing ContentDownloading operations. */
|
|
4033
4353
|
class ContentDownloaderImpl {
|
|
4034
4354
|
/**
|
|
@@ -4131,6 +4451,7 @@ class ContentDownloaderImpl {
|
|
|
4131
4451
|
}
|
|
4132
4452
|
|
|
4133
4453
|
// Copyright (c) Microsoft Corporation.
|
|
4454
|
+
// Licensed under the MIT license.
|
|
4134
4455
|
/**
|
|
4135
4456
|
* CallRecording class represents call recording related APIs.
|
|
4136
4457
|
*/
|
|
@@ -4369,7 +4690,7 @@ class CallAutomationClient {
|
|
|
4369
4690
|
targets: [communicationIdentifierModelConverter(targetParticipant.targetParticipant)],
|
|
4370
4691
|
callbackUri: callbackUrl,
|
|
4371
4692
|
operationContext: options.operationContext,
|
|
4372
|
-
|
|
4693
|
+
callIntelligenceOptions: options.callIntelligenceOptions,
|
|
4373
4694
|
sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(targetParticipant.sourceCallIdNumber),
|
|
4374
4695
|
sourceDisplayName: targetParticipant.sourceDisplayName,
|
|
4375
4696
|
};
|
|
@@ -4387,7 +4708,7 @@ class CallAutomationClient {
|
|
|
4387
4708
|
targets: targetParticipants.map((target) => communicationIdentifierModelConverter(target)),
|
|
4388
4709
|
callbackUri: callbackUrl,
|
|
4389
4710
|
operationContext: options.operationContext,
|
|
4390
|
-
|
|
4711
|
+
callIntelligenceOptions: options.callIntelligenceOptions,
|
|
4391
4712
|
sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),
|
|
4392
4713
|
sourceDisplayName: options.sourceDisplayName,
|
|
4393
4714
|
};
|
|
@@ -4400,10 +4721,10 @@ class CallAutomationClient {
|
|
|
4400
4721
|
* @param options - Additional request options contains answerCall api options.
|
|
4401
4722
|
*/
|
|
4402
4723
|
async answerCall(incomingCallContext, callbackUrl, options = {}) {
|
|
4403
|
-
const {
|
|
4724
|
+
const { callIntelligenceOptions, operationContext } = options, operationOptions = tslib.__rest(options, ["callIntelligenceOptions", "operationContext"]);
|
|
4404
4725
|
const request = {
|
|
4405
4726
|
incomingCallContext,
|
|
4406
|
-
|
|
4727
|
+
callIntelligenceOptions,
|
|
4407
4728
|
operationContext,
|
|
4408
4729
|
callbackUri: callbackUrl,
|
|
4409
4730
|
answeredBy: this.sourceIdentity,
|
|
@@ -4531,6 +4852,7 @@ const CloudEventMapper = {
|
|
|
4531
4852
|
};
|
|
4532
4853
|
|
|
4533
4854
|
// Copyright (c) Microsoft Corporation.
|
|
4855
|
+
// Licensed under the MIT license.
|
|
4534
4856
|
const serializer = coreClient.createSerializer();
|
|
4535
4857
|
/**
|
|
4536
4858
|
* Helper function for parsing Acs callback events.
|
|
@@ -4619,6 +4941,12 @@ function parseCallAutomationEvent(encodedEvents) {
|
|
|
4619
4941
|
case "Microsoft.Communication.SendDtmfTonesFailed":
|
|
4620
4942
|
callbackEvent = { kind: "SendDtmfTonesFailed" };
|
|
4621
4943
|
break;
|
|
4944
|
+
case "Microsoft.Communication.CancelAddParticipantSucceeded":
|
|
4945
|
+
callbackEvent = { kind: "CancelAddParticipantSucceeded" };
|
|
4946
|
+
break;
|
|
4947
|
+
case "Microsoft.Communication.CancelAddParticipantFailed":
|
|
4948
|
+
callbackEvent = { kind: "CancelAddParticipantFailed" };
|
|
4949
|
+
break;
|
|
4622
4950
|
default:
|
|
4623
4951
|
throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);
|
|
4624
4952
|
}
|
|
@@ -4653,6 +4981,7 @@ function participantsParserForEvent(data) {
|
|
|
4653
4981
|
}
|
|
4654
4982
|
|
|
4655
4983
|
// Copyright (c) Microsoft Corporation.
|
|
4984
|
+
// Licensed under the MIT license.
|
|
4656
4985
|
/** Defines values for VoiceKind that the service accepts. */
|
|
4657
4986
|
exports.VoiceKind = void 0;
|
|
4658
4987
|
(function (VoiceKind) {
|