@azure/communication-chat 1.3.1 → 1.3.2-beta.1

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 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.1"
142
+ packageVersion: "1.3.2-beta.1"
143
143
  });
144
144
 
145
145
  /*
@@ -579,6 +579,18 @@ 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
+ },
582
594
  initiatorCommunicationIdentifier: {
583
595
  serializedName: "initiatorCommunicationIdentifier",
584
596
  type: {
@@ -616,6 +628,54 @@ const ChatParticipant = {
616
628
  }
617
629
  }
618
630
  };
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
+ defaultValue: "teamsInlineImage",
645
+ isConstant: true,
646
+ serializedName: "attachmentType",
647
+ type: {
648
+ name: "String"
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
+ };
619
679
  const UpdateChatMessageRequest = {
620
680
  type: {
621
681
  name: "Composite",
@@ -913,6 +973,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
913
973
  ChatMessage: ChatMessage,
914
974
  ChatMessageContent: ChatMessageContent,
915
975
  ChatParticipant: ChatParticipant,
976
+ ChatAttachment: ChatAttachment,
916
977
  UpdateChatMessageRequest: UpdateChatMessageRequest,
917
978
  ChatParticipantsCollection: ChatParticipantsCollection,
918
979
  AddChatParticipantsRequest: AddChatParticipantsRequest,
@@ -986,7 +1047,7 @@ const skip = {
986
1047
  const apiVersion = {
987
1048
  parameterPath: "apiVersion",
988
1049
  mapper: {
989
- defaultValue: "2021-09-07",
1050
+ defaultValue: "2023-04-01-preview",
990
1051
  isConstant: true,
991
1052
  serializedName: "api-version",
992
1053
  type: {
@@ -1706,11 +1767,6 @@ const listChatReadReceiptsNextOperationSpec = {
1706
1767
  isError: true
1707
1768
  }
1708
1769
  },
1709
- queryParameters: [
1710
- maxPageSize,
1711
- skip,
1712
- apiVersion
1713
- ],
1714
1770
  urlParameters: [
1715
1771
  endpoint,
1716
1772
  chatThreadId,
@@ -1743,11 +1799,6 @@ const listChatMessagesNextOperationSpec = {
1743
1799
  isError: true
1744
1800
  }
1745
1801
  },
1746
- queryParameters: [
1747
- maxPageSize,
1748
- apiVersion,
1749
- startTime
1750
- ],
1751
1802
  urlParameters: [
1752
1803
  endpoint,
1753
1804
  chatThreadId,
@@ -1780,11 +1831,6 @@ const listChatParticipantsNextOperationSpec = {
1780
1831
  isError: true
1781
1832
  }
1782
1833
  },
1783
- queryParameters: [
1784
- maxPageSize,
1785
- skip,
1786
- apiVersion
1787
- ],
1788
1834
  urlParameters: [
1789
1835
  endpoint,
1790
1836
  chatThreadId,
@@ -1971,11 +2017,6 @@ const listChatThreadsNextOperationSpec = {
1971
2017
  isError: true
1972
2018
  }
1973
2019
  },
1974
- queryParameters: [
1975
- maxPageSize,
1976
- apiVersion,
1977
- startTime
1978
- ],
1979
2020
  urlParameters: [endpoint, nextLink],
1980
2021
  headerParameters: [accept],
1981
2022
  serializer
@@ -2006,18 +2047,18 @@ class ChatApiClient extends coreClient__namespace.ServiceClient {
2006
2047
  const defaults = {
2007
2048
  requestContentType: "application/json; charset=utf-8"
2008
2049
  };
2009
- const packageDetails = `azsdk-js-communication-chat/1.3.1`;
2050
+ const packageDetails = `azsdk-js-communication-chat/1.3.2-beta.1`;
2010
2051
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2011
2052
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2012
2053
  : `${packageDetails}`;
2013
2054
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2014
2055
  userAgentPrefix
2015
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
2056
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
2016
2057
  super(optionsWithDefaults);
2017
2058
  // Parameter assignments
2018
2059
  this.endpoint = endpoint;
2019
2060
  // Assigning values to Constant parameters
2020
- this.apiVersion = options.apiVersion || "2021-09-07";
2061
+ this.apiVersion = options.apiVersion || "2023-04-01-preview";
2021
2062
  this.chatThread = new ChatThreadImpl(this);
2022
2063
  this.chat = new ChatImpl(this);
2023
2064
  this.addCustomApiVersionPolicy(options.apiVersion);
@@ -2443,11 +2484,12 @@ function generateUuid() {
2443
2484
 
2444
2485
  // Copyright (c) Microsoft Corporation.
2445
2486
  const getSignalingClient = (credential, logger, options) => {
2446
- var _a;
2487
+ var _a, _b;
2447
2488
  if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
2448
2489
  // In React Native
2449
2490
  return new communicationSignaling.CommunicationSignalingClient(credential, logger, {
2450
2491
  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,
2451
2493
  });
2452
2494
  }
2453
2495
  // In node js
@@ -2481,6 +2523,7 @@ class ChatClient {
2481
2523
  this.client = new ChatApiClient(this.endpoint, Object.assign({ endpoint: this.endpoint }, internalPipelineOptions));
2482
2524
  const authPolicy = createCommunicationTokenCredentialPolicy(this.tokenCredential);
2483
2525
  this.client.pipeline.addPolicy(authPolicy);
2526
+ options.signalingClientOptions = Object.assign(Object.assign({}, options.signalingClientOptions), { resourceEndpoint: this.endpoint });
2484
2527
  this.signalingClient = getSignalingClient(credential, logger, options.signalingClientOptions);
2485
2528
  }
2486
2529
  /**