@azure/communication-chat 1.3.2-beta.3 → 1.4.0-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.2-beta.3"
142
+ packageVersion: "1.4.0-beta.1"
143
143
  });
144
144
 
145
145
  /*
@@ -211,6 +211,12 @@ const CommunicationIdentifierModel = {
211
211
  name: "Composite",
212
212
  className: "CommunicationIdentifierModel",
213
213
  modelProperties: {
214
+ kind: {
215
+ serializedName: "kind",
216
+ type: {
217
+ name: "String"
218
+ }
219
+ },
214
220
  rawId: {
215
221
  serializedName: "rawId",
216
222
  type: {
@@ -624,6 +630,13 @@ const ChatParticipant = {
624
630
  type: {
625
631
  name: "DateTime"
626
632
  }
633
+ },
634
+ metadata: {
635
+ serializedName: "metadata",
636
+ type: {
637
+ name: "Dictionary",
638
+ value: { type: { name: "String" } }
639
+ }
627
640
  }
628
641
  }
629
642
  }
@@ -790,6 +803,13 @@ const CreateChatThreadRequest = {
790
803
  }
791
804
  }
792
805
  }
806
+ },
807
+ metadata: {
808
+ serializedName: "metadata",
809
+ type: {
810
+ name: "Dictionary",
811
+ value: { type: { name: "String" } }
812
+ }
793
813
  }
794
814
  }
795
815
  }
@@ -860,6 +880,13 @@ const ChatThreadProperties = {
860
880
  type: {
861
881
  name: "DateTime"
862
882
  }
883
+ },
884
+ metadata: {
885
+ serializedName: "metadata",
886
+ type: {
887
+ name: "Dictionary",
888
+ value: { type: { name: "String" } }
889
+ }
863
890
  }
864
891
  }
865
892
  }
@@ -937,6 +964,13 @@ const UpdateChatThreadRequest = {
937
964
  type: {
938
965
  name: "String"
939
966
  }
967
+ },
968
+ metadata: {
969
+ serializedName: "metadata",
970
+ type: {
971
+ name: "Dictionary",
972
+ value: { type: { name: "String" } }
973
+ }
940
974
  }
941
975
  }
942
976
  }
@@ -2047,7 +2081,7 @@ class ChatApiClient extends coreClient__namespace.ServiceClient {
2047
2081
  const defaults = {
2048
2082
  requestContentType: "application/json; charset=utf-8"
2049
2083
  };
2050
- const packageDetails = `azsdk-js-communication-chat/1.3.2-beta.3`;
2084
+ const packageDetails = `azsdk-js-communication-chat/1.4.0-beta.1`;
2051
2085
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2052
2086
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2053
2087
  : `${packageDetails}`;
@@ -2150,6 +2184,15 @@ class ChatThreadClient {
2150
2184
  await this.client.chatThread.updateChatThreadProperties(this.threadId, { topic: topic }, updatedOptions);
2151
2185
  });
2152
2186
  }
2187
+ /**
2188
+ * Updates a thread's properties.
2189
+ * @param options - Operation options.
2190
+ */
2191
+ updateProperties(options = {}) {
2192
+ return tracingClient.withSpan("ChatThreadClient-UpdateProperties", options, async (updatedOptions) => {
2193
+ await this.client.chatThread.updateChatThreadProperties(this.threadId, options, updatedOptions);
2194
+ });
2195
+ }
2153
2196
  /**
2154
2197
  * Sends a chat message to a thread identified by threadId.
2155
2198
  * Returns the id of the created message.
@@ -2569,6 +2612,7 @@ class ChatClient {
2569
2612
  const result = await this.client.chat.createChatThread({
2570
2613
  topic: request.topic,
2571
2614
  participants: (_b = options.participants) === null || _b === void 0 ? void 0 : _b.map((participant) => mapToChatParticipantRestModel(participant)),
2615
+ metadata: options.metadata,
2572
2616
  }, updatedRestModelOptions);
2573
2617
  return mapToCreateChatThreadResultSdkModel(result);
2574
2618
  });