@azure/communication-chat 1.3.2-beta.2 → 1.3.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/index.js +74 -89
- package/dist/index.js.map +1 -1
- package/dist-esm/src/chatClient.js +12 -6
- package/dist-esm/src/chatClient.js.map +1 -1
- package/dist-esm/src/chatThreadClient.js +36 -15
- package/dist-esm/src/chatThreadClient.js.map +1 -1
- package/dist-esm/src/generated/src/chatApiClient.js +3 -3
- package/dist-esm/src/generated/src/chatApiClient.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 +0 -60
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +1 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/chat.js +5 -0
- package/dist-esm/src/generated/src/operations/chat.js.map +1 -1
- package/dist-esm/src/generated/src/operations/chatThread.js +15 -0
- package/dist-esm/src/generated/src/operations/chatThread.js.map +1 -1
- package/dist-esm/src/generated/src/tracing.js +1 -1
- package/dist-esm/src/generated/src/tracing.js.map +1 -1
- package/dist-esm/src/models/models.js.map +1 -1
- package/dist-esm/src/signaling/signalingClient.browser.js +1 -2
- package/dist-esm/src/signaling/signalingClient.browser.js.map +1 -1
- package/dist-esm/src/signaling/signalingClient.js +1 -2
- package/dist-esm/src/signaling/signalingClient.js.map +1 -1
- package/package.json +7 -6
- package/types/communication-chat.d.ts +0 -21
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ const mapToReadReceiptSdkModel = (readReceipt) => {
|
|
|
139
139
|
const tracingClient = coreTracing.createTracingClient({
|
|
140
140
|
namespace: "Azure.Communication",
|
|
141
141
|
packageName: "@azure/communication-chat",
|
|
142
|
-
packageVersion: "1.3.2
|
|
142
|
+
packageVersion: "1.3.2"
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
/*
|
|
@@ -579,18 +579,6 @@ const ChatMessageContent = {
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
},
|
|
582
|
-
attachments: {
|
|
583
|
-
serializedName: "attachments",
|
|
584
|
-
type: {
|
|
585
|
-
name: "Sequence",
|
|
586
|
-
element: {
|
|
587
|
-
type: {
|
|
588
|
-
name: "Composite",
|
|
589
|
-
className: "ChatAttachment"
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
582
|
initiatorCommunicationIdentifier: {
|
|
595
583
|
serializedName: "initiatorCommunicationIdentifier",
|
|
596
584
|
type: {
|
|
@@ -628,54 +616,6 @@ const ChatParticipant = {
|
|
|
628
616
|
}
|
|
629
617
|
}
|
|
630
618
|
};
|
|
631
|
-
const ChatAttachment = {
|
|
632
|
-
type: {
|
|
633
|
-
name: "Composite",
|
|
634
|
-
className: "ChatAttachment",
|
|
635
|
-
modelProperties: {
|
|
636
|
-
id: {
|
|
637
|
-
serializedName: "id",
|
|
638
|
-
required: true,
|
|
639
|
-
type: {
|
|
640
|
-
name: "String"
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
attachmentType: {
|
|
644
|
-
serializedName: "attachmentType",
|
|
645
|
-
required: true,
|
|
646
|
-
type: {
|
|
647
|
-
name: "Enum",
|
|
648
|
-
allowedValues: ["teamsInlineImage", "teamsImage", "file"]
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
contentType: {
|
|
652
|
-
serializedName: "contentType",
|
|
653
|
-
type: {
|
|
654
|
-
name: "String"
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
name: {
|
|
658
|
-
serializedName: "name",
|
|
659
|
-
type: {
|
|
660
|
-
name: "String"
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
url: {
|
|
664
|
-
serializedName: "url",
|
|
665
|
-
required: true,
|
|
666
|
-
type: {
|
|
667
|
-
name: "String"
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
previewUrl: {
|
|
671
|
-
serializedName: "previewUrl",
|
|
672
|
-
type: {
|
|
673
|
-
name: "String"
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
};
|
|
679
619
|
const UpdateChatMessageRequest = {
|
|
680
620
|
type: {
|
|
681
621
|
name: "Composite",
|
|
@@ -973,7 +913,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
973
913
|
ChatMessage: ChatMessage,
|
|
974
914
|
ChatMessageContent: ChatMessageContent,
|
|
975
915
|
ChatParticipant: ChatParticipant,
|
|
976
|
-
ChatAttachment: ChatAttachment,
|
|
977
916
|
UpdateChatMessageRequest: UpdateChatMessageRequest,
|
|
978
917
|
ChatParticipantsCollection: ChatParticipantsCollection,
|
|
979
918
|
AddChatParticipantsRequest: AddChatParticipantsRequest,
|
|
@@ -1047,7 +986,7 @@ const skip = {
|
|
|
1047
986
|
const apiVersion = {
|
|
1048
987
|
parameterPath: "apiVersion",
|
|
1049
988
|
mapper: {
|
|
1050
|
-
defaultValue: "
|
|
989
|
+
defaultValue: "2021-09-07",
|
|
1051
990
|
isConstant: true,
|
|
1052
991
|
serializedName: "api-version",
|
|
1053
992
|
type: {
|
|
@@ -1767,6 +1706,11 @@ const listChatReadReceiptsNextOperationSpec = {
|
|
|
1767
1706
|
isError: true
|
|
1768
1707
|
}
|
|
1769
1708
|
},
|
|
1709
|
+
queryParameters: [
|
|
1710
|
+
maxPageSize,
|
|
1711
|
+
skip,
|
|
1712
|
+
apiVersion
|
|
1713
|
+
],
|
|
1770
1714
|
urlParameters: [
|
|
1771
1715
|
endpoint,
|
|
1772
1716
|
chatThreadId,
|
|
@@ -1799,6 +1743,11 @@ const listChatMessagesNextOperationSpec = {
|
|
|
1799
1743
|
isError: true
|
|
1800
1744
|
}
|
|
1801
1745
|
},
|
|
1746
|
+
queryParameters: [
|
|
1747
|
+
maxPageSize,
|
|
1748
|
+
apiVersion,
|
|
1749
|
+
startTime
|
|
1750
|
+
],
|
|
1802
1751
|
urlParameters: [
|
|
1803
1752
|
endpoint,
|
|
1804
1753
|
chatThreadId,
|
|
@@ -1831,6 +1780,11 @@ const listChatParticipantsNextOperationSpec = {
|
|
|
1831
1780
|
isError: true
|
|
1832
1781
|
}
|
|
1833
1782
|
},
|
|
1783
|
+
queryParameters: [
|
|
1784
|
+
maxPageSize,
|
|
1785
|
+
skip,
|
|
1786
|
+
apiVersion
|
|
1787
|
+
],
|
|
1834
1788
|
urlParameters: [
|
|
1835
1789
|
endpoint,
|
|
1836
1790
|
chatThreadId,
|
|
@@ -2017,6 +1971,11 @@ const listChatThreadsNextOperationSpec = {
|
|
|
2017
1971
|
isError: true
|
|
2018
1972
|
}
|
|
2019
1973
|
},
|
|
1974
|
+
queryParameters: [
|
|
1975
|
+
maxPageSize,
|
|
1976
|
+
apiVersion,
|
|
1977
|
+
startTime
|
|
1978
|
+
],
|
|
2020
1979
|
urlParameters: [endpoint, nextLink],
|
|
2021
1980
|
headerParameters: [accept],
|
|
2022
1981
|
serializer
|
|
@@ -2047,18 +2006,18 @@ class ChatApiClient extends coreClient__namespace.ServiceClient {
|
|
|
2047
2006
|
const defaults = {
|
|
2048
2007
|
requestContentType: "application/json; charset=utf-8"
|
|
2049
2008
|
};
|
|
2050
|
-
const packageDetails = `azsdk-js-communication-chat/1.3.2
|
|
2009
|
+
const packageDetails = `azsdk-js-communication-chat/1.3.2`;
|
|
2051
2010
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2052
2011
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2053
2012
|
: `${packageDetails}`;
|
|
2054
2013
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2055
2014
|
userAgentPrefix
|
|
2056
|
-
},
|
|
2015
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
|
|
2057
2016
|
super(optionsWithDefaults);
|
|
2058
2017
|
// Parameter assignments
|
|
2059
2018
|
this.endpoint = endpoint;
|
|
2060
2019
|
// Assigning values to Constant parameters
|
|
2061
|
-
this.apiVersion = options.apiVersion || "
|
|
2020
|
+
this.apiVersion = options.apiVersion || "2021-09-07";
|
|
2062
2021
|
this.chatThread = new ChatThreadImpl(this);
|
|
2063
2022
|
this.chat = new ChatImpl(this);
|
|
2064
2023
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
@@ -2199,17 +2158,24 @@ class ChatThreadClient {
|
|
|
2199
2158
|
}
|
|
2200
2159
|
listMessagesAll(options) {
|
|
2201
2160
|
return tslib.__asyncGenerator(this, arguments, function* listMessagesAll_1() {
|
|
2202
|
-
var e_1,
|
|
2161
|
+
var _a, e_1, _b, _c;
|
|
2203
2162
|
try {
|
|
2204
|
-
for (var
|
|
2205
|
-
|
|
2206
|
-
|
|
2163
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listMessagesPage({}, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
2164
|
+
_c = _f.value;
|
|
2165
|
+
_d = false;
|
|
2166
|
+
try {
|
|
2167
|
+
const page = _c;
|
|
2168
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2169
|
+
}
|
|
2170
|
+
finally {
|
|
2171
|
+
_d = true;
|
|
2172
|
+
}
|
|
2207
2173
|
}
|
|
2208
2174
|
}
|
|
2209
2175
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2210
2176
|
finally {
|
|
2211
2177
|
try {
|
|
2212
|
-
if (
|
|
2178
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
2213
2179
|
}
|
|
2214
2180
|
finally { if (e_1) throw e_1.error; }
|
|
2215
2181
|
}
|
|
@@ -2301,17 +2267,24 @@ class ChatThreadClient {
|
|
|
2301
2267
|
}
|
|
2302
2268
|
listParticipantsAll(options) {
|
|
2303
2269
|
return tslib.__asyncGenerator(this, arguments, function* listParticipantsAll_1() {
|
|
2304
|
-
var e_2,
|
|
2270
|
+
var _a, e_2, _b, _c;
|
|
2305
2271
|
try {
|
|
2306
|
-
for (var
|
|
2307
|
-
|
|
2308
|
-
|
|
2272
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listParticipantsPage({}, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
2273
|
+
_c = _f.value;
|
|
2274
|
+
_d = false;
|
|
2275
|
+
try {
|
|
2276
|
+
const page = _c;
|
|
2277
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2278
|
+
}
|
|
2279
|
+
finally {
|
|
2280
|
+
_d = true;
|
|
2281
|
+
}
|
|
2309
2282
|
}
|
|
2310
2283
|
}
|
|
2311
2284
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2312
2285
|
finally {
|
|
2313
2286
|
try {
|
|
2314
|
-
if (
|
|
2287
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
2315
2288
|
}
|
|
2316
2289
|
finally { if (e_2) throw e_2.error; }
|
|
2317
2290
|
}
|
|
@@ -2411,17 +2384,24 @@ class ChatThreadClient {
|
|
|
2411
2384
|
}
|
|
2412
2385
|
listReadReceiptsAll(options) {
|
|
2413
2386
|
return tslib.__asyncGenerator(this, arguments, function* listReadReceiptsAll_1() {
|
|
2414
|
-
var e_3,
|
|
2387
|
+
var _a, e_3, _b, _c;
|
|
2415
2388
|
try {
|
|
2416
|
-
for (var
|
|
2417
|
-
|
|
2418
|
-
|
|
2389
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listReadReceiptsPage({}, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
2390
|
+
_c = _f.value;
|
|
2391
|
+
_d = false;
|
|
2392
|
+
try {
|
|
2393
|
+
const page = _c;
|
|
2394
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2395
|
+
}
|
|
2396
|
+
finally {
|
|
2397
|
+
_d = true;
|
|
2398
|
+
}
|
|
2419
2399
|
}
|
|
2420
2400
|
}
|
|
2421
2401
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
2422
2402
|
finally {
|
|
2423
2403
|
try {
|
|
2424
|
-
if (
|
|
2404
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
2425
2405
|
}
|
|
2426
2406
|
finally { if (e_3) throw e_3.error; }
|
|
2427
2407
|
}
|
|
@@ -2484,12 +2464,11 @@ function generateUuid() {
|
|
|
2484
2464
|
|
|
2485
2465
|
// Copyright (c) Microsoft Corporation.
|
|
2486
2466
|
const getSignalingClient = (credential, logger, options) => {
|
|
2487
|
-
var _a
|
|
2467
|
+
var _a;
|
|
2488
2468
|
if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
|
|
2489
2469
|
// In React Native
|
|
2490
2470
|
return new communicationSignaling.CommunicationSignalingClient(credential, logger, {
|
|
2491
2471
|
environment: (_a = options === null || options === void 0 ? void 0 : options.environment) !== null && _a !== void 0 ? _a : undefined,
|
|
2492
|
-
resourceEndpoint: (_b = options === null || options === void 0 ? void 0 : options.resourceEndpoint) !== null && _b !== void 0 ? _b : undefined,
|
|
2493
2472
|
});
|
|
2494
2473
|
}
|
|
2495
2474
|
// In node js
|
|
@@ -2523,7 +2502,6 @@ class ChatClient {
|
|
|
2523
2502
|
this.client = new ChatApiClient(this.endpoint, Object.assign({ endpoint: this.endpoint }, internalPipelineOptions));
|
|
2524
2503
|
const authPolicy = createCommunicationTokenCredentialPolicy(this.tokenCredential);
|
|
2525
2504
|
this.client.pipeline.addPolicy(authPolicy);
|
|
2526
|
-
options.signalingClientOptions = Object.assign(Object.assign({}, options.signalingClientOptions), { resourceEndpoint: this.endpoint });
|
|
2527
2505
|
this.signalingClient = getSignalingClient(credential, logger, options.signalingClientOptions);
|
|
2528
2506
|
}
|
|
2529
2507
|
/**
|
|
@@ -2575,17 +2553,24 @@ class ChatClient {
|
|
|
2575
2553
|
}
|
|
2576
2554
|
listChatThreadsAll(options) {
|
|
2577
2555
|
return tslib.__asyncGenerator(this, arguments, function* listChatThreadsAll_1() {
|
|
2578
|
-
var e_1,
|
|
2556
|
+
var _a, e_1, _b, _c;
|
|
2579
2557
|
try {
|
|
2580
|
-
for (var
|
|
2581
|
-
|
|
2582
|
-
|
|
2558
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listChatThreadsPage({}, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
2559
|
+
_c = _f.value;
|
|
2560
|
+
_d = false;
|
|
2561
|
+
try {
|
|
2562
|
+
const page = _c;
|
|
2563
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2564
|
+
}
|
|
2565
|
+
finally {
|
|
2566
|
+
_d = true;
|
|
2567
|
+
}
|
|
2583
2568
|
}
|
|
2584
2569
|
}
|
|
2585
2570
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2586
2571
|
finally {
|
|
2587
2572
|
try {
|
|
2588
|
-
if (
|
|
2573
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
2589
2574
|
}
|
|
2590
2575
|
finally { if (e_1) throw e_1.error; }
|
|
2591
2576
|
}
|