@azure/communication-chat 1.6.0-beta.6 → 1.6.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.
Files changed (194) hide show
  1. package/dist/browser/chatClient.d.ts +1 -25
  2. package/dist/browser/chatClient.d.ts.map +1 -1
  3. package/dist/browser/chatClient.js +3 -8
  4. package/dist/browser/chatClient.js.map +1 -1
  5. package/dist/browser/chatThreadClient.d.ts +2 -31
  6. package/dist/browser/chatThreadClient.d.ts.map +1 -1
  7. package/dist/browser/chatThreadClient.js +5 -77
  8. package/dist/browser/chatThreadClient.js.map +1 -1
  9. package/dist/browser/generated/src/chatApiClient.js +2 -2
  10. package/dist/browser/generated/src/chatApiClient.js.map +1 -1
  11. package/dist/browser/generated/src/models/index.d.ts +23 -105
  12. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  13. package/dist/browser/generated/src/models/index.js +8 -8
  14. package/dist/browser/generated/src/models/index.js.map +1 -1
  15. package/dist/browser/generated/src/models/mappers.d.ts +1 -7
  16. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  17. package/dist/browser/generated/src/models/mappers.js +31 -199
  18. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  19. package/dist/browser/generated/src/models/parameters.d.ts +0 -7
  20. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  21. package/dist/browser/generated/src/models/parameters.js +1 -73
  22. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  23. package/dist/browser/generated/src/operations/chatThread.d.ts +1 -24
  24. package/dist/browser/generated/src/operations/chatThread.d.ts.map +1 -1
  25. package/dist/browser/generated/src/operations/chatThread.js +0 -98
  26. package/dist/browser/generated/src/operations/chatThread.js.map +1 -1
  27. package/dist/browser/generated/src/operationsInterfaces/chatThread.d.ts +1 -24
  28. package/dist/browser/generated/src/operationsInterfaces/chatThread.d.ts.map +1 -1
  29. package/dist/browser/generated/src/operationsInterfaces/chatThread.js.map +1 -1
  30. package/dist/browser/generated/src/tracing.js +1 -1
  31. package/dist/browser/generated/src/tracing.js.map +1 -1
  32. package/dist/browser/models/events.d.ts +3 -3
  33. package/dist/browser/models/events.d.ts.map +1 -1
  34. package/dist/browser/models/events.js.map +1 -1
  35. package/dist/browser/models/mappers.d.ts +3 -27
  36. package/dist/browser/models/mappers.d.ts.map +1 -1
  37. package/dist/browser/models/mappers.js +2 -61
  38. package/dist/browser/models/mappers.js.map +1 -1
  39. package/dist/browser/models/models.d.ts +13 -38
  40. package/dist/browser/models/models.d.ts.map +1 -1
  41. package/dist/browser/models/models.js.map +1 -1
  42. package/dist/browser/models/options.d.ts +1 -20
  43. package/dist/browser/models/options.d.ts.map +1 -1
  44. package/dist/browser/models/options.js.map +1 -1
  45. package/dist/commonjs/chatClient.d.ts +1 -25
  46. package/dist/commonjs/chatClient.d.ts.map +1 -1
  47. package/dist/commonjs/chatClient.js +3 -8
  48. package/dist/commonjs/chatClient.js.map +1 -1
  49. package/dist/commonjs/chatThreadClient.d.ts +2 -31
  50. package/dist/commonjs/chatThreadClient.d.ts.map +1 -1
  51. package/dist/commonjs/chatThreadClient.js +3 -75
  52. package/dist/commonjs/chatThreadClient.js.map +1 -1
  53. package/dist/commonjs/generated/src/chatApiClient.js +2 -2
  54. package/dist/commonjs/generated/src/chatApiClient.js.map +1 -1
  55. package/dist/commonjs/generated/src/models/index.d.ts +23 -105
  56. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  57. package/dist/commonjs/generated/src/models/index.js +9 -9
  58. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  59. package/dist/commonjs/generated/src/models/mappers.d.ts +1 -7
  60. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  61. package/dist/commonjs/generated/src/models/mappers.js +32 -200
  62. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  63. package/dist/commonjs/generated/src/models/parameters.d.ts +0 -7
  64. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  65. package/dist/commonjs/generated/src/models/parameters.js +2 -74
  66. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  67. package/dist/commonjs/generated/src/operations/chatThread.d.ts +1 -24
  68. package/dist/commonjs/generated/src/operations/chatThread.d.ts.map +1 -1
  69. package/dist/commonjs/generated/src/operations/chatThread.js +0 -98
  70. package/dist/commonjs/generated/src/operations/chatThread.js.map +1 -1
  71. package/dist/commonjs/generated/src/operationsInterfaces/chatThread.d.ts +1 -24
  72. package/dist/commonjs/generated/src/operationsInterfaces/chatThread.d.ts.map +1 -1
  73. package/dist/commonjs/generated/src/operationsInterfaces/chatThread.js.map +1 -1
  74. package/dist/commonjs/generated/src/tracing.js +1 -1
  75. package/dist/commonjs/generated/src/tracing.js.map +1 -1
  76. package/dist/commonjs/models/events.d.ts +3 -3
  77. package/dist/commonjs/models/events.d.ts.map +1 -1
  78. package/dist/commonjs/models/events.js.map +1 -1
  79. package/dist/commonjs/models/mappers.d.ts +3 -27
  80. package/dist/commonjs/models/mappers.d.ts.map +1 -1
  81. package/dist/commonjs/models/mappers.js +3 -67
  82. package/dist/commonjs/models/mappers.js.map +1 -1
  83. package/dist/commonjs/models/models.d.ts +13 -38
  84. package/dist/commonjs/models/models.d.ts.map +1 -1
  85. package/dist/commonjs/models/models.js.map +1 -1
  86. package/dist/commonjs/models/options.d.ts +1 -20
  87. package/dist/commonjs/models/options.d.ts.map +1 -1
  88. package/dist/commonjs/models/options.js.map +1 -1
  89. package/dist/commonjs/tsdoc-metadata.json +1 -1
  90. package/dist/esm/chatClient.d.ts +1 -25
  91. package/dist/esm/chatClient.d.ts.map +1 -1
  92. package/dist/esm/chatClient.js +3 -8
  93. package/dist/esm/chatClient.js.map +1 -1
  94. package/dist/esm/chatThreadClient.d.ts +2 -31
  95. package/dist/esm/chatThreadClient.d.ts.map +1 -1
  96. package/dist/esm/chatThreadClient.js +5 -77
  97. package/dist/esm/chatThreadClient.js.map +1 -1
  98. package/dist/esm/generated/src/chatApiClient.js +2 -2
  99. package/dist/esm/generated/src/chatApiClient.js.map +1 -1
  100. package/dist/esm/generated/src/models/index.d.ts +23 -105
  101. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  102. package/dist/esm/generated/src/models/index.js +8 -8
  103. package/dist/esm/generated/src/models/index.js.map +1 -1
  104. package/dist/esm/generated/src/models/mappers.d.ts +1 -7
  105. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  106. package/dist/esm/generated/src/models/mappers.js +31 -199
  107. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  108. package/dist/esm/generated/src/models/parameters.d.ts +0 -7
  109. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  110. package/dist/esm/generated/src/models/parameters.js +1 -73
  111. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  112. package/dist/esm/generated/src/operations/chatThread.d.ts +1 -24
  113. package/dist/esm/generated/src/operations/chatThread.d.ts.map +1 -1
  114. package/dist/esm/generated/src/operations/chatThread.js +0 -98
  115. package/dist/esm/generated/src/operations/chatThread.js.map +1 -1
  116. package/dist/esm/generated/src/operationsInterfaces/chatThread.d.ts +1 -24
  117. package/dist/esm/generated/src/operationsInterfaces/chatThread.d.ts.map +1 -1
  118. package/dist/esm/generated/src/operationsInterfaces/chatThread.js.map +1 -1
  119. package/dist/esm/generated/src/tracing.js +1 -1
  120. package/dist/esm/generated/src/tracing.js.map +1 -1
  121. package/dist/esm/models/events.d.ts +3 -3
  122. package/dist/esm/models/events.d.ts.map +1 -1
  123. package/dist/esm/models/events.js.map +1 -1
  124. package/dist/esm/models/mappers.d.ts +3 -27
  125. package/dist/esm/models/mappers.d.ts.map +1 -1
  126. package/dist/esm/models/mappers.js +2 -61
  127. package/dist/esm/models/mappers.js.map +1 -1
  128. package/dist/esm/models/models.d.ts +13 -38
  129. package/dist/esm/models/models.d.ts.map +1 -1
  130. package/dist/esm/models/models.js.map +1 -1
  131. package/dist/esm/models/options.d.ts +1 -20
  132. package/dist/esm/models/options.d.ts.map +1 -1
  133. package/dist/esm/models/options.js.map +1 -1
  134. package/dist/react-native/chatClient.d.ts +1 -25
  135. package/dist/react-native/chatClient.d.ts.map +1 -1
  136. package/dist/react-native/chatClient.js +3 -8
  137. package/dist/react-native/chatClient.js.map +1 -1
  138. package/dist/react-native/chatThreadClient.d.ts +2 -31
  139. package/dist/react-native/chatThreadClient.d.ts.map +1 -1
  140. package/dist/react-native/chatThreadClient.js +5 -77
  141. package/dist/react-native/chatThreadClient.js.map +1 -1
  142. package/dist/react-native/generated/src/chatApiClient.js +2 -2
  143. package/dist/react-native/generated/src/chatApiClient.js.map +1 -1
  144. package/dist/react-native/generated/src/models/index.d.ts +23 -105
  145. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  146. package/dist/react-native/generated/src/models/index.js +8 -8
  147. package/dist/react-native/generated/src/models/index.js.map +1 -1
  148. package/dist/react-native/generated/src/models/mappers.d.ts +1 -7
  149. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  150. package/dist/react-native/generated/src/models/mappers.js +31 -199
  151. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  152. package/dist/react-native/generated/src/models/parameters.d.ts +0 -7
  153. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  154. package/dist/react-native/generated/src/models/parameters.js +1 -73
  155. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  156. package/dist/react-native/generated/src/operations/chatThread.d.ts +1 -24
  157. package/dist/react-native/generated/src/operations/chatThread.d.ts.map +1 -1
  158. package/dist/react-native/generated/src/operations/chatThread.js +0 -98
  159. package/dist/react-native/generated/src/operations/chatThread.js.map +1 -1
  160. package/dist/react-native/generated/src/operationsInterfaces/chatThread.d.ts +1 -24
  161. package/dist/react-native/generated/src/operationsInterfaces/chatThread.d.ts.map +1 -1
  162. package/dist/react-native/generated/src/operationsInterfaces/chatThread.js.map +1 -1
  163. package/dist/react-native/generated/src/tracing.js +1 -1
  164. package/dist/react-native/generated/src/tracing.js.map +1 -1
  165. package/dist/react-native/models/events.d.ts +3 -3
  166. package/dist/react-native/models/events.d.ts.map +1 -1
  167. package/dist/react-native/models/events.js.map +1 -1
  168. package/dist/react-native/models/mappers.d.ts +3 -27
  169. package/dist/react-native/models/mappers.d.ts.map +1 -1
  170. package/dist/react-native/models/mappers.js +2 -61
  171. package/dist/react-native/models/mappers.js.map +1 -1
  172. package/dist/react-native/models/models.d.ts +13 -38
  173. package/dist/react-native/models/models.d.ts.map +1 -1
  174. package/dist/react-native/models/models.js.map +1 -1
  175. package/dist/react-native/models/options.d.ts +1 -20
  176. package/dist/react-native/models/options.d.ts.map +1 -1
  177. package/dist/react-native/models/options.js.map +1 -1
  178. package/package.json +7 -7
  179. package/dist/browser/xhrHttpClient.d.ts +0 -17
  180. package/dist/browser/xhrHttpClient.d.ts.map +0 -1
  181. package/dist/browser/xhrHttpClient.js +0 -186
  182. package/dist/browser/xhrHttpClient.js.map +0 -1
  183. package/dist/commonjs/xhrHttpClient.d.ts +0 -17
  184. package/dist/commonjs/xhrHttpClient.d.ts.map +0 -1
  185. package/dist/commonjs/xhrHttpClient.js +0 -191
  186. package/dist/commonjs/xhrHttpClient.js.map +0 -1
  187. package/dist/esm/xhrHttpClient.d.ts +0 -17
  188. package/dist/esm/xhrHttpClient.d.ts.map +0 -1
  189. package/dist/esm/xhrHttpClient.js +0 -186
  190. package/dist/esm/xhrHttpClient.js.map +0 -1
  191. package/dist/react-native/xhrHttpClient.d.ts +0 -17
  192. package/dist/react-native/xhrHttpClient.d.ts.map +0 -1
  193. package/dist/react-native/xhrHttpClient.js +0 -186
  194. package/dist/react-native/xhrHttpClient.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,SAAS,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,EACV,uBAAuB,EACv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AO,MAAM,wBAAwB,GACnC,SAAS,SAAS,CAAC,kBAAkB,KACpC,kBAgBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,SAAS,CAAC,WAAW,KAAG,WAgB7E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,GACzC,wBAAwB,SAAS,CAAC,sBAAsB,KACvD,WAAW,EAEb,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,iBAAiB,SAAS,CAAC,wBAAwB,KAClD,mBAUF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,GAC5C,YAAY,SAAS,CAAC,oBAAoB,KACzC,oBAoBF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mCAAmC,GAC9C,QAAQ,SAAS,CAAC,sBAAsB,KACvC,sBAUF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,SAAS,CAAC,sBAAsB,KAC5C,sBAQF,CAAC"}
@@ -24,41 +24,6 @@ export const mapToAddChatParticipantsRequestRestModel = (addParticipantsRequest)
24
24
  participants: (_a = addParticipantsRequest.participants) === null || _a === void 0 ? void 0 : _a.map((participant) => mapToChatParticipantRestModel(participant)),
25
25
  };
26
26
  };
27
- /**
28
- * @internal
29
- * Mapping chat attachment SDK model to chat attachment REST model
30
- */
31
- export const mapToChatAttachmentRestModel = (chatAttachment) => {
32
- const { attachmentType } = chatAttachment, rest = __rest(chatAttachment, ["attachmentType"]);
33
- if (attachmentType === "unknown") {
34
- throw new Error("'unknown' attachmentType not supported");
35
- }
36
- return Object.assign(Object.assign({}, rest), { attachmentType: attachmentType });
37
- };
38
- /**
39
- * @internal
40
- * Mapping send message request and options to send chat message request REST model
41
- */
42
- export const mapToSendChatMessageRequestRestModel = (sendMessageRequest, sendMessageOptions) => {
43
- const { attachments } = sendMessageOptions, restOptions = __rest(sendMessageOptions, ["attachments"]);
44
- let request = Object.assign(Object.assign({}, sendMessageRequest), restOptions);
45
- if (attachments) {
46
- request = Object.assign(Object.assign({}, request), { attachments: attachments === null || attachments === void 0 ? void 0 : attachments.map((attachment) => mapToChatAttachmentRestModel(attachment)) });
47
- }
48
- return request;
49
- };
50
- /**
51
- * @internal
52
- * Mapping update message options to update chat message request REST model
53
- */
54
- export const mapToUpdateChatMessageRequestRestModel = (updateMessageOptions) => {
55
- const { attachments } = updateMessageOptions, restOptions = __rest(updateMessageOptions, ["attachments"]);
56
- let request = Object.assign({}, restOptions);
57
- if (attachments) {
58
- request = Object.assign(Object.assign({}, request), { attachments: attachments === null || attachments === void 0 ? void 0 : attachments.map((attachment) => mapToChatAttachmentRestModel(attachment)) });
59
- }
60
- return request;
61
- };
62
27
  /**
63
28
  * @internal
64
29
  * Mapping chat participant REST model to chat participant SDK model
@@ -67,19 +32,11 @@ export const mapToChatParticipantSdkModel = (chatParticipant) => {
67
32
  const { communicationIdentifier } = chatParticipant, rest = __rest(chatParticipant, ["communicationIdentifier"]);
68
33
  return Object.assign(Object.assign({}, rest), { id: deserializeCommunicationIdentifier(communicationIdentifier) });
69
34
  };
70
- /**
71
- * @internal
72
- * Mapping chat attachment REST model to chat attachment SDK model
73
- */
74
- export const mapToChatAttachmentSdkModel = (chatAttachment) => {
75
- const { attachmentType } = chatAttachment, rest = __rest(chatAttachment, ["attachmentType"]);
76
- return Object.assign(Object.assign({}, rest), { attachmentType: attachmentType });
77
- };
78
35
  /**
79
36
  * @internal
80
37
  */
81
38
  export const mapToChatContentSdkModel = (content) => {
82
- const { participants, attachments, initiatorCommunicationIdentifier } = content, otherChatContents = __rest(content, ["participants", "attachments", "initiatorCommunicationIdentifier"]);
39
+ const { participants, initiatorCommunicationIdentifier } = content, otherChatContents = __rest(content, ["participants", "initiatorCommunicationIdentifier"]);
83
40
  let result = Object.assign({}, otherChatContents);
84
41
  if (initiatorCommunicationIdentifier) {
85
42
  const initiator = deserializeCommunicationIdentifier(initiatorCommunicationIdentifier);
@@ -88,19 +45,6 @@ export const mapToChatContentSdkModel = (content) => {
88
45
  if (participants) {
89
46
  result = Object.assign(Object.assign({}, result), { participants: participants === null || participants === void 0 ? void 0 : participants.map((participant) => mapToChatParticipantSdkModel(participant)) });
90
47
  }
91
- if (attachments) {
92
- result = Object.assign(Object.assign({}, result), { attachments: attachments === null || attachments === void 0 ? void 0 : attachments.map((attachment) => mapToChatAttachmentSdkModel(attachment)) });
93
- }
94
- return result;
95
- };
96
- /**
97
- * @internal
98
- */
99
- export const mapToChatPolicyViolationSdkModel = (policyVolation) => {
100
- const { state } = policyVolation;
101
- const result = {
102
- result: state,
103
- };
104
48
  return result;
105
49
  };
106
50
  /**
@@ -108,7 +52,7 @@ export const mapToChatPolicyViolationSdkModel = (policyVolation) => {
108
52
  * Mapping chat message REST model to chat message SDK model
109
53
  */
110
54
  export const mapToChatMessageSdkModel = (chatMessage) => {
111
- const { content, senderCommunicationIdentifier, policyViolation } = chatMessage, otherChatMessage = __rest(chatMessage, ["content", "senderCommunicationIdentifier", "policyViolation"]);
55
+ const { content, senderCommunicationIdentifier } = chatMessage, otherChatMessage = __rest(chatMessage, ["content", "senderCommunicationIdentifier"]);
112
56
  let result = Object.assign({}, otherChatMessage);
113
57
  if (content) {
114
58
  result = Object.assign(Object.assign({}, result), { content: mapToChatContentSdkModel(content) });
@@ -117,9 +61,6 @@ export const mapToChatMessageSdkModel = (chatMessage) => {
117
61
  const sender = deserializeCommunicationIdentifier(senderCommunicationIdentifier);
118
62
  result = Object.assign(Object.assign({}, result), { sender });
119
63
  }
120
- if (policyViolation) {
121
- result = Object.assign(Object.assign({}, result), { policyViolation: mapToChatPolicyViolationSdkModel(policyViolation) });
122
- }
123
64
  return result;
124
65
  };
125
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EACL,kCAAkC,EAClC,gCAAgC,GACjC,MAA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AAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,UAA0C,EACpB,EAAE;IACxB,MAAM,EAAE,gCAAgC,EAAE,eAAe,KAAc,UAAU,EAAnB,IAAI,UAAK,UAAU,EAA3E,uDAA8D,CAAa,CAAC;IAClF,IAAI,MAAM,qBAA8B,IAAI,CAAE,CAAC;IAC/C,IAAI,gCAAgC,EAAE,CAAC;QACrC,MAAM,mCACD,MAAM,KACT,SAAS,EAAE,kCAAkC,CAC3C,gCAAqE,CACtE,GACF,CAAC;IACJ,CAAC;IAED,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,mCACD,MAAM,KACT,eAAe,EAAE,4BAA4B,CAAC,eAAe,CAAC,GAC/D,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,MAAwC,EAChB,EAAE;IAC1B,MAAM,EAAE,UAAU,KAAc,MAAM,EAAf,IAAI,UAAK,MAAM,EAAhC,cAAuB,CAAS,CAAC;IACvC,IAAI,UAAU,EAAE,CAAC;QACf,uCACK,IAAI,KACP,UAAU,EAAE,iCAAiC,CAAC,UAAU,CAAC,IACzD;IACJ,CAAC;SAAM,CAAC;QACN,yBAAY,IAAI,EAAG;IACrB,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,WAA6C,EACrB,EAAE;IAC1B,MAAM,EAAE,6BAA6B,KAAc,WAAW,EAApB,IAAI,UAAK,WAAW,EAAxD,iCAA0C,CAAc,CAAC;IAC/D,uCACK,IAAI,KACP,MAAM,EAAE,kCAAkC,CACxC,6BAAkE,CACnE,IACD;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SerializedCommunicationIdentifier } from \"@azure/communication-common\";\nimport {\n deserializeCommunicationIdentifier,\n serializeCommunicationIdentifier,\n} from \"@azure/communication-common\";\nimport type * as RestModel from \"../generated/src/models/index.js\";\nimport type { AddParticipantsRequest, SendMessageRequest } from \"./requests.js\";\nimport type {\n CreateChatThreadOptions,\n SendMessageOptions,\n UpdateMessageOptions,\n} from \"./options.js\";\nimport type {\n ChatAttachment,\n ChatMessage,\n ChatMessageContent,\n ChatMessageReadReceipt,\n ChatParticipant,\n ChatThreadProperties,\n CreateChatThreadResult,\n ChatRetentionPolicy,\n PolicyViolation,\n} from \"./models.js\";\n\nexport const mapToCreateChatThreadOptionsRestModel = (\n options: CreateChatThreadOptions,\n): RestModel.ChatCreateChatThreadOptionalParams => {\n const { participants, idempotencyToken, ...rest } = options;\n return {\n repeatabilityRequestId: idempotencyToken,\n ...rest,\n };\n};\n\n/**\n * @internal\n * Mapping chat participant customer model to chat participant REST model\n */\nexport const mapToChatParticipantRestModel = (\n chatParticipant: ChatParticipant,\n): RestModel.ChatParticipant => {\n const { id, ...rest } = chatParticipant;\n return {\n ...rest,\n communicationIdentifier: serializeCommunicationIdentifier(id),\n };\n};\n\n/**\n * @internal\n * Mapping add participants request to add chat participants request REST model\n */\nexport const mapToAddChatParticipantsRequestRestModel = (\n addParticipantsRequest: AddParticipantsRequest,\n): RestModel.AddChatParticipantsRequest => {\n return {\n participants: addParticipantsRequest.participants?.map((participant) =>\n mapToChatParticipantRestModel(participant),\n ),\n };\n};\n\n/**\n * @internal\n * Mapping chat attachment SDK model to chat attachment REST model\n */\nexport const mapToChatAttachmentRestModel = (\n chatAttachment: ChatAttachment,\n): RestModel.ChatAttachment => {\n const { attachmentType, ...rest } = chatAttachment;\n if (attachmentType === \"unknown\") {\n throw new Error(\"'unknown' attachmentType not supported\");\n }\n return {\n ...rest,\n attachmentType: attachmentType,\n };\n};\n\n/**\n * @internal\n * Mapping send message request and options to send chat message request REST model\n */\nexport const mapToSendChatMessageRequestRestModel = (\n sendMessageRequest: SendMessageRequest,\n sendMessageOptions: SendMessageOptions,\n): RestModel.SendChatMessageRequest => {\n const { attachments, ...restOptions } = sendMessageOptions;\n let request: RestModel.SendChatMessageRequest = { ...sendMessageRequest, ...restOptions };\n if (attachments) {\n request = {\n ...request,\n attachments: attachments?.map((attachment) => mapToChatAttachmentRestModel(attachment)),\n };\n }\n return request;\n};\n\n/**\n * @internal\n * Mapping update message options to update chat message request REST model\n */\nexport const mapToUpdateChatMessageRequestRestModel = (\n updateMessageOptions: UpdateMessageOptions,\n): RestModel.UpdateChatMessageRequest => {\n const { attachments, ...restOptions } = updateMessageOptions;\n let request: RestModel.UpdateChatMessageRequest = { ...restOptions };\n if (attachments) {\n request = {\n ...request,\n attachments: attachments?.map((attachment) => mapToChatAttachmentRestModel(attachment)),\n };\n }\n return request;\n};\n\n/**\n * @internal\n * Mapping chat participant REST model to chat participant SDK model\n */\nexport const mapToChatParticipantSdkModel = (\n chatParticipant: RestModel.ChatParticipant,\n): ChatParticipant => {\n const { communicationIdentifier, ...rest } = chatParticipant;\n return {\n ...rest,\n id: deserializeCommunicationIdentifier(\n communicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n};\n\n/**\n * @internal\n * Mapping chat attachment REST model to chat attachment SDK model\n */\nexport const mapToChatAttachmentSdkModel = (\n chatAttachment: RestModel.ChatAttachment,\n): ChatAttachment => {\n const { attachmentType, ...rest } = chatAttachment;\n return {\n ...rest,\n attachmentType: attachmentType,\n };\n};\n\n/**\n * @internal\n */\nexport const mapToChatContentSdkModel = (\n content: RestModel.ChatMessageContent,\n): ChatMessageContent => {\n const { participants, attachments, initiatorCommunicationIdentifier, ...otherChatContents } =\n content;\n let result: ChatMessageContent = { ...otherChatContents };\n if (initiatorCommunicationIdentifier) {\n const initiator = deserializeCommunicationIdentifier(\n initiatorCommunicationIdentifier as SerializedCommunicationIdentifier,\n );\n result = { ...result, initiator };\n }\n if (participants) {\n result = {\n ...result,\n participants: participants?.map((participant) => mapToChatParticipantSdkModel(participant)),\n };\n }\n if (attachments) {\n result = {\n ...result,\n attachments: attachments?.map((attachment) => mapToChatAttachmentSdkModel(attachment)),\n };\n }\n return result;\n};\n\n/**\n * @internal\n */\nexport const mapToChatPolicyViolationSdkModel = (\n policyVolation: RestModel.PolicyViolation,\n): PolicyViolation => {\n const { state } = policyVolation;\n const result: PolicyViolation = {\n result: state,\n };\n return result;\n};\n\n/**\n * @internal\n * Mapping chat message REST model to chat message SDK model\n */\nexport const mapToChatMessageSdkModel = (chatMessage: RestModel.ChatMessage): ChatMessage => {\n const { content, senderCommunicationIdentifier, policyViolation, ...otherChatMessage } =\n chatMessage;\n let result: ChatMessage = { ...otherChatMessage };\n if (content) {\n result = {\n ...result,\n content: mapToChatContentSdkModel(content),\n };\n }\n if (senderCommunicationIdentifier) {\n const sender = deserializeCommunicationIdentifier(\n senderCommunicationIdentifier as SerializedCommunicationIdentifier,\n );\n result = { ...result, sender };\n }\n if (policyViolation) {\n result = {\n ...result,\n policyViolation: mapToChatPolicyViolationSdkModel(policyViolation),\n };\n }\n return result;\n};\n\n/**\n * @internal\n * Mapping chat messages collection REST model to chat message SDK model array\n */\nexport const mapToChatMessagesSdkModelArray = (\n chatMessagesCollection: RestModel.ChatMessagesCollection,\n): ChatMessage[] => {\n return chatMessagesCollection.value?.map((chatMessage) => mapToChatMessageSdkModel(chatMessage));\n};\n\n/**\n * @internal\n * Mapping chat retention policy REST model to chat retention policy SDK model\n */\nexport const mapToRetentionPolicySdkModel = (\n retentionPolicy: RestModel.ChatRetentionPolicyUnion,\n): ChatRetentionPolicy => {\n if (retentionPolicy.kind === \"threadCreationDate\") {\n return retentionPolicy as RestModel.ThreadCreationDateRetentionPolicy;\n }\n if (retentionPolicy.kind === \"none\") {\n return retentionPolicy as RestModel.NoneRetentionPolicy;\n } else {\n throw new Error(`Retention Policy ${retentionPolicy.kind} is not supported`);\n }\n};\n\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToChatThreadPropertiesSdkModel = (\n chatThread: RestModel.ChatThreadProperties,\n): ChatThreadProperties => {\n const { createdByCommunicationIdentifier, retentionPolicy, ...rest } = chatThread;\n let result: ChatThreadProperties = { ...rest };\n if (createdByCommunicationIdentifier) {\n result = {\n ...result,\n createdBy: deserializeCommunicationIdentifier(\n createdByCommunicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n }\n\n if (retentionPolicy) {\n result = {\n ...result,\n retentionPolicy: mapToRetentionPolicySdkModel(retentionPolicy),\n };\n }\n\n return result;\n};\n\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToCreateChatThreadResultSdkModel = (\n result: RestModel.CreateChatThreadResult,\n): CreateChatThreadResult => {\n const { chatThread, ...rest } = result;\n if (chatThread) {\n return {\n ...rest,\n chatThread: mapToChatThreadPropertiesSdkModel(chatThread),\n };\n } else {\n return { ...rest };\n }\n};\n\n/**\n * @internal\n * Mapping read receipt REST model to read receipt SDK model\n */\nexport const mapToReadReceiptSdkModel = (\n readReceipt: RestModel.ChatMessageReadReceipt,\n): ChatMessageReadReceipt => {\n const { senderCommunicationIdentifier, ...rest } = readReceipt;\n return {\n ...rest,\n sender: deserializeCommunicationIdentifier(\n senderCommunicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n};\n"]}
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EACL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,6BAA6B,CAAC;AAcrC,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,OAAgC,EACc,EAAE;IAChD,MAAM,EAAE,YAAY,EAAE,gBAAgB,KAAc,OAAO,EAAhB,IAAI,UAAK,OAAO,EAArD,oCAA2C,CAAU,CAAC;IAC5D,uBACE,sBAAsB,EAAE,gBAAgB,IACrC,IAAI,EACP;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,eAAgC,EACL,EAAE;IAC7B,MAAM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EF;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,UAA0C,EACpB,EAAE;IACxB,MAAM,EAAE,gCAAgC,EAAE,eAAe,KAAc,UAAU,EAAnB,IAAI,UAAK,UAAU,EAA3E,uDAA8D,CAAa,CAAC;IAClF,IAAI,MAAM,qBAA8B,IAAI,CAAE,CAAC;IAC/C,IAAI,gCAAgC,EAAE,CAAC;QACrC,MAAM,mCACD,MAAM,KACT,SAAS,EAAE,kCAAkC,CAC3C,gCAAqE,CACtE,GACF,CAAC;IACJ,CAAC;IAED,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,mCACD,MAAM,KACT,eAAe,EAAE,4BAA4B,CAAC,eAAe,CAAC,GAC/D,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,MAAwC,EAChB,EAAE;IAC1B,MAAM,EAAE,UAAU,KAAc,MAAM,EAAf,IAAI,UAAK,MAAM,EAAhC,cAAuB,CAAS,CAAC;IACvC,IAAI,UAAU,EAAE,CAAC;QACf,uCACK,IAAI,KACP,UAAU,EAAE,iCAAiC,CAAC,UAAU,CAAC,IACzD;IACJ,CAAC;SAAM,CAAC;QACN,yBAAY,IAAI,EAAG;IACrB,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,WAA6C,EACrB,EAAE;IAC1B,MAAM,EAAE,6BAA6B,KAAc,WAAW,EAApB,IAAI,UAAK,WAAW,EAAxD,iCAA0C,CAAc,CAAC;IAC/D,uCACK,IAAI,KACP,MAAM,EAAE,kCAAkC,CACxC,6BAAkE,CACnE,IACD;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SerializedCommunicationIdentifier } from \"@azure/communication-common\";\nimport {\n deserializeCommunicationIdentifier,\n serializeCommunicationIdentifier,\n} from \"@azure/communication-common\";\nimport type * as RestModel from \"../generated/src/models/index.js\";\nimport type { AddParticipantsRequest } from \"./requests.js\";\nimport type { CreateChatThreadOptions } from \"./options.js\";\nimport type {\n ChatMessage,\n ChatMessageContent,\n ChatMessageReadReceipt,\n ChatParticipant,\n ChatRetentionPolicy,\n ChatThreadProperties,\n CreateChatThreadResult,\n} from \"./models.js\";\n\nexport const mapToCreateChatThreadOptionsRestModel = (\n options: CreateChatThreadOptions,\n): RestModel.ChatCreateChatThreadOptionalParams => {\n const { participants, idempotencyToken, ...rest } = options;\n return {\n repeatabilityRequestId: idempotencyToken,\n ...rest,\n };\n};\n\n/**\n * @internal\n * Mapping chat participant customer model to chat participant REST model\n */\nexport const mapToChatParticipantRestModel = (\n chatParticipant: ChatParticipant,\n): RestModel.ChatParticipant => {\n const { id, ...rest } = chatParticipant;\n return {\n ...rest,\n communicationIdentifier: serializeCommunicationIdentifier(id),\n };\n};\n\n/**\n * @internal\n * Mapping add participants request to add chat participants request REST model\n */\nexport const mapToAddChatParticipantsRequestRestModel = (\n addParticipantsRequest: AddParticipantsRequest,\n): RestModel.AddChatParticipantsRequest => {\n return {\n participants: addParticipantsRequest.participants?.map((participant) =>\n mapToChatParticipantRestModel(participant),\n ),\n };\n};\n\n/**\n * @internal\n * Mapping chat participant REST model to chat participant SDK model\n */\nexport const mapToChatParticipantSdkModel = (\n chatParticipant: RestModel.ChatParticipant,\n): ChatParticipant => {\n const { communicationIdentifier, ...rest } = chatParticipant;\n return {\n ...rest,\n id: deserializeCommunicationIdentifier(\n communicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n};\n\n/**\n * @internal\n */\nexport const mapToChatContentSdkModel = (\n content: RestModel.ChatMessageContent,\n): ChatMessageContent => {\n const { participants, initiatorCommunicationIdentifier, ...otherChatContents } = content;\n let result: ChatMessageContent = { ...otherChatContents };\n if (initiatorCommunicationIdentifier) {\n const initiator = deserializeCommunicationIdentifier(\n initiatorCommunicationIdentifier as SerializedCommunicationIdentifier,\n );\n result = { ...result, initiator };\n }\n if (participants) {\n result = {\n ...result,\n participants: participants?.map((participant) => mapToChatParticipantSdkModel(participant)),\n };\n }\n return result;\n};\n\n/**\n * @internal\n * Mapping chat message REST model to chat message SDK model\n */\nexport const mapToChatMessageSdkModel = (chatMessage: RestModel.ChatMessage): ChatMessage => {\n const { content, senderCommunicationIdentifier, ...otherChatMessage } = chatMessage;\n let result: ChatMessage = { ...otherChatMessage };\n if (content) {\n result = {\n ...result,\n content: mapToChatContentSdkModel(content),\n };\n }\n if (senderCommunicationIdentifier) {\n const sender = deserializeCommunicationIdentifier(\n senderCommunicationIdentifier as SerializedCommunicationIdentifier,\n );\n result = { ...result, sender };\n }\n return result;\n};\n\n/**\n * @internal\n * Mapping chat messages collection REST model to chat message SDK model array\n */\nexport const mapToChatMessagesSdkModelArray = (\n chatMessagesCollection: RestModel.ChatMessagesCollection,\n): ChatMessage[] => {\n return chatMessagesCollection.value?.map((chatMessage) => mapToChatMessageSdkModel(chatMessage));\n};\n\n/**\n * @internal\n * Mapping chat retention policy REST model to chat retention policy SDK model\n */\nexport const mapToRetentionPolicySdkModel = (\n retentionPolicy: RestModel.ChatRetentionPolicyUnion,\n): ChatRetentionPolicy => {\n if (retentionPolicy.kind === \"threadCreationDate\") {\n return retentionPolicy as RestModel.ThreadCreationDateRetentionPolicy;\n }\n\n if (retentionPolicy.kind === \"none\") {\n return retentionPolicy as RestModel.NoneRetentionPolicy;\n } else {\n throw new Error(`Retention Policy ${retentionPolicy.kind} is not supported`);\n }\n};\n\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToChatThreadPropertiesSdkModel = (\n chatThread: RestModel.ChatThreadProperties,\n): ChatThreadProperties => {\n const { createdByCommunicationIdentifier, retentionPolicy, ...rest } = chatThread;\n let result: ChatThreadProperties = { ...rest };\n if (createdByCommunicationIdentifier) {\n result = {\n ...result,\n createdBy: deserializeCommunicationIdentifier(\n createdByCommunicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n }\n\n if (retentionPolicy) {\n result = {\n ...result,\n retentionPolicy: mapToRetentionPolicySdkModel(retentionPolicy),\n };\n }\n\n return result;\n};\n\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToCreateChatThreadResultSdkModel = (\n result: RestModel.CreateChatThreadResult,\n): CreateChatThreadResult => {\n const { chatThread, ...rest } = result;\n if (chatThread) {\n return {\n ...rest,\n chatThread: mapToChatThreadPropertiesSdkModel(chatThread),\n };\n } else {\n return { ...rest };\n }\n};\n\n/**\n * @internal\n * Mapping read receipt REST model to read receipt SDK model\n */\nexport const mapToReadReceiptSdkModel = (\n readReceipt: RestModel.ChatMessageReadReceipt,\n): ChatMessageReadReceipt => {\n const { senderCommunicationIdentifier, ...rest } = readReceipt;\n return {\n ...rest,\n sender: deserializeCommunicationIdentifier(\n senderCommunicationIdentifier as SerializedCommunicationIdentifier,\n ),\n };\n};\n"]}
@@ -17,8 +17,6 @@ export interface ChatThreadProperties {
17
17
  metadata?: Record<string, string>;
18
18
  /** Data retention policy for auto deletion. */
19
19
  retentionPolicy?: ChatRetentionPolicy;
20
- /** Messaging policy for a chat thread. */
21
- messagingPolicy?: MessagingPolicy;
22
20
  }
23
21
  /** Thread retention policy based on thread creation date. */
24
22
  export interface ThreadCreationDateRetentionPolicy {
@@ -58,8 +56,6 @@ export interface ChatMessage {
58
56
  editedOn?: Date;
59
57
  /** metadata */
60
58
  metadata?: Record<string, string>;
61
- /** Policy Violation of a chat message. */
62
- policyViolation?: PolicyViolation;
63
59
  }
64
60
  /** Content of a chat message. */
65
61
  export interface ChatMessageContent {
@@ -69,23 +65,10 @@ export interface ChatMessageContent {
69
65
  topic?: string;
70
66
  /** Chat message content for messages of types participantAdded or participantRemoved. */
71
67
  participants?: ChatParticipant[];
72
- /** List of attachments for this message */
73
- attachments?: ChatAttachment[];
74
68
  /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */
75
69
  initiator?: CommunicationIdentifierKind;
76
- }
77
- /** An attachment in a chat message. */
78
- export interface ChatAttachment {
79
- /** Id of the attachment */
80
- id: string;
81
- /** The type of attachment. */
82
- attachmentType: ChatAttachmentType;
83
- /** The name of the attachment content. */
84
- name?: string;
85
- /** The URL where the attachment can be downloaded */
86
- url?: string;
87
- /** The URL where the preview of attachment can be downloaded */
88
- previewUrl?: string;
70
+ /** List of attachments for this message */
71
+ attachments?: ChatAttachment[];
89
72
  }
90
73
  /** A chat message read receipt indicates the time a chat message was read by a recipient. */
91
74
  export interface ChatMessageReadReceipt {
@@ -127,27 +110,19 @@ export interface ListPageSettings {
127
110
  */
128
111
  continuationToken?: string;
129
112
  }
130
- /** Result payload for uploading an image. */
131
- export interface UploadChatImageResult {
132
- /** Id of the image. */
113
+ /** Defines values for AttachmentType. */
114
+ export type ChatAttachmentType = "image" | "file" | "unknown";
115
+ /** An attachment in a chat message. */
116
+ export interface ChatAttachment {
117
+ /** Id of the attachment */
133
118
  id: string;
134
119
  /** The type of attachment. */
135
- attachmentType?: ChatAttachmentType;
136
- /** The name including file extension type of the attachment. */
120
+ attachmentType: ChatAttachmentType;
121
+ /** The name of the attachment content. */
137
122
  name?: string;
138
- }
139
- /** Type of Supported Attachments. */
140
- export type ChatAttachmentType = "image" | "file" | "unknown";
141
- /** Result of Policy Violation message. */
142
- export type PolicyViolationMessageResult = "contentBlocked" | "warning";
143
- /** Policy violation of a message (if applicable). */
144
- export interface PolicyViolation {
145
- /** Result of Policy Violation message. */
146
- result: PolicyViolationMessageResult;
147
- }
148
- /** Messaging policy of a chat thread. */
149
- export interface MessagingPolicy {
150
- /** Boolean to track whether or not messages is restricted to only text. */
151
- textOnlyChat?: boolean;
123
+ /** The URL where the attachment can be downloaded */
124
+ url?: string;
125
+ /** The URL where the preview of attachment can be downloaded */
126
+ previewUrl?: string;
152
127
  }
153
128
  //# sourceMappingURL=models.d.ts.map
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AAmB;IACnB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9D,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,8BAA8B;IAC9B,cAAc,EAAE,kBAAkB,CAAC;IACnC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CommunicationIdentifier,\n CommunicationIdentifierKind,\n} from \"@azure/communication-common\";\nimport type { ChatError, ChatMessageType } from \"../generated/src/index.js\";\n\nexport {\n AddChatParticipantsResult,\n ChatMessageType,\n ChatThreadItem,\n ChatError,\n SendChatMessageResult,\n} from \"../generated/src/models/index.js\";\n\n/** Chat thread. */\nexport interface ChatThreadProperties {\n /** Chat thread id. */\n id: string;\n /** Chat thread topic. */\n topic: string;\n /** The timestamp when the chat thread was created. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n createdOn: Date;\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n readonly createdBy?: CommunicationIdentifierKind;\n /** The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n deletedOn?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n /** Messaging policy for a chat thread. */\n messagingPolicy?: MessagingPolicy;\n}\n\n/** Thread retention policy based on thread creation date. */\nexport interface ThreadCreationDateRetentionPolicy {\n /** Polymorphic discriminator, which specifies the different types this object can be */\n kind: \"threadCreationDate\";\n /** Indicates how many days after the thread creation the thread will be deleted. */\n deleteThreadAfterDays: number;\n}\n\n/** No thread retention policy. */\nexport interface NoneRetentionPolicy {\n /** Polymorphic discriminator, which specifies the different types this object can be */\n kind: \"none\";\n}\n\n/** Data retention policy for auto deletion. */\nexport declare type ChatRetentionPolicy = ThreadCreationDateRetentionPolicy | NoneRetentionPolicy;\n\n/** Chat message. */\nexport interface ChatMessage {\n /** The id of the chat message. This id is server generated. */\n id: string;\n /** The chat message type. */\n type: ChatMessageType;\n /** Sequence of the chat message in the conversation. */\n sequenceId: string;\n /** Version of the chat message. */\n version: string;\n /** Content of a chat message. */\n content?: ChatMessageContent;\n /** The display name of the chat message sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n /** The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n createdOn: Date;\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n sender?: CommunicationIdentifierKind;\n /** The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n deletedOn?: Date;\n /** The last timestamp (if applicable) when the message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n editedOn?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n /** Policy Violation of a chat message. */\n policyViolation?: PolicyViolation;\n}\n\n/** Content of a chat message. */\nexport interface ChatMessageContent {\n /** Chat message content for messages of types text or html. */\n message?: string;\n /** Chat message content for messages of type topicUpdated. */\n topic?: string;\n /** Chat message content for messages of types participantAdded or participantRemoved. */\n participants?: ChatParticipant[];\n /** List of attachments for this message */\n attachments?: ChatAttachment[];\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n initiator?: CommunicationIdentifierKind;\n}\n\n/** An attachment in a chat message. */\nexport interface ChatAttachment {\n /** Id of the attachment */\n id: string;\n /** The type of attachment. */\n attachmentType: ChatAttachmentType;\n /** The name of the attachment content. */\n name?: string;\n /** The URL where the attachment can be downloaded */\n url?: string;\n /** The URL where the preview of attachment can be downloaded */\n previewUrl?: string;\n}\n\n/** A chat message read receipt indicates the time a chat message was read by a recipient. */\nexport interface ChatMessageReadReceipt {\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n sender: CommunicationIdentifierKind;\n /** Id of the chat message that has been read. This id is generated by the server. */\n chatMessageId: string;\n /** The time at which the message was read. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n readOn: Date;\n}\n\n/** A participant of the chat thread. */\nexport interface ChatParticipant {\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n id: CommunicationIdentifier;\n /** Display name for the chat participant. */\n displayName?: string;\n /** Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n shareHistoryTime?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n}\n\n/** Result of the create chat thread operation. */\nexport interface CreateChatThreadResult {\n /** Chat thread. */\n chatThread?: ChatThreadProperties;\n /**\n * The participants that failed to be added to the chat thread.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly invalidParticipants?: ChatError[];\n}\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/** Result payload for uploading an image. */\nexport interface UploadChatImageResult {\n /** Id of the image. */\n id: string;\n /** The type of attachment. */\n attachmentType?: ChatAttachmentType;\n /** The name including file extension type of the attachment. */\n name?: string;\n}\n\n/** Type of Supported Attachments. */\nexport type ChatAttachmentType = \"image\" | \"file\" | \"unknown\";\n\n/** Result of Policy Violation message. */\nexport type PolicyViolationMessageResult = \"contentBlocked\" | \"warning\";\n\n/** Policy violation of a message (if applicable). */\nexport interface PolicyViolation {\n /** Result of Policy Violation message. */\n result: PolicyViolationMessageResult;\n}\n\n/** Messaging policy of a chat thread. */\nexport interface MessagingPolicy {\n /** Boolean to track whether or not messages is restricted to only text. */\n textOnlyChat?: boolean;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CommunicationIdentifier,\n CommunicationIdentifierKind,\n} from \"@azure/communication-common\";\nimport type { ChatError, ChatMessageType } from \"../generated/src/index.js\";\n\nexport {\n AddChatParticipantsResult,\n ChatMessageType,\n ChatThreadItem,\n ChatError,\n SendChatMessageResult,\n} from \"../generated/src/models/index.js\";\n\n/** Chat thread. */\nexport interface ChatThreadProperties {\n /** Chat thread id. */\n id: string;\n /** Chat thread topic. */\n topic: string;\n /** The timestamp when the chat thread was created. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n createdOn: Date;\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n readonly createdBy?: CommunicationIdentifierKind;\n /** The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n deletedOn?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n}\n\n/** Thread retention policy based on thread creation date. */\nexport interface ThreadCreationDateRetentionPolicy {\n /** Polymorphic discriminator, which specifies the different types this object can be */\n kind: \"threadCreationDate\";\n /** Indicates how many days after the thread creation the thread will be deleted. */\n deleteThreadAfterDays: number;\n}\n\n/** No thread retention policy. */\nexport interface NoneRetentionPolicy {\n /** Polymorphic discriminator, which specifies the different types this object can be */\n kind: \"none\";\n}\n\n/** Data retention policy for auto deletion. */\nexport declare type ChatRetentionPolicy = ThreadCreationDateRetentionPolicy | NoneRetentionPolicy;\n\n/** Chat message. */\nexport interface ChatMessage {\n /** The id of the chat message. This id is server generated. */\n id: string;\n /** The chat message type. */\n type: ChatMessageType;\n /** Sequence of the chat message in the conversation. */\n sequenceId: string;\n /** Version of the chat message. */\n version: string;\n /** Content of a chat message. */\n content?: ChatMessageContent;\n /** The display name of the chat message sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n /** The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n createdOn: Date;\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n sender?: CommunicationIdentifierKind;\n /** The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n deletedOn?: Date;\n /** The last timestamp (if applicable) when the message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n editedOn?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n}\n\n/** Content of a chat message. */\nexport interface ChatMessageContent {\n /** Chat message content for messages of types text or html. */\n message?: string;\n /** Chat message content for messages of type topicUpdated. */\n topic?: string;\n /** Chat message content for messages of types participantAdded or participantRemoved. */\n participants?: ChatParticipant[];\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n initiator?: CommunicationIdentifierKind;\n /** List of attachments for this message */\n attachments?: ChatAttachment[];\n}\n\n/** A chat message read receipt indicates the time a chat message was read by a recipient. */\nexport interface ChatMessageReadReceipt {\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n sender: CommunicationIdentifierKind;\n /** Id of the chat message that has been read. This id is generated by the server. */\n chatMessageId: string;\n /** The time at which the message was read. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n readOn: Date;\n}\n\n/** A participant of the chat thread. */\nexport interface ChatParticipant {\n /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */\n id: CommunicationIdentifier;\n /** Display name for the chat participant. */\n displayName?: string;\n /** Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */\n shareHistoryTime?: Date;\n /** metadata */\n metadata?: Record<string, string>;\n}\n\n/** Result of the create chat thread operation. */\nexport interface CreateChatThreadResult {\n /** Chat thread. */\n chatThread?: ChatThreadProperties;\n /**\n * The participants that failed to be added to the chat thread.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly invalidParticipants?: ChatError[];\n}\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/** Defines values for AttachmentType. */\nexport type ChatAttachmentType = \"image\" | \"file\" | \"unknown\";\n\n/** An attachment in a chat message. */\nexport interface ChatAttachment {\n /** Id of the attachment */\n id: string;\n /** The type of attachment. */\n attachmentType: ChatAttachmentType;\n /** The name of the attachment content. */\n name?: string;\n /** The URL where the attachment can be downloaded */\n url?: string;\n /** The URL where the preview of attachment can be downloaded */\n previewUrl?: string;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { CommonClientOptions, OperationOptions } from "@azure/core-client";
2
2
  import type { ChatMessageType } from "../generated/src/models/index.js";
3
3
  import { ChatListChatThreadsOptionalParams as RestListChatThreadsOptions, ChatThreadListChatMessagesOptionalParams as RestListMessagesOptions, ChatThreadListChatParticipantsOptionalParams as RestListParticipantsOptions, ChatThreadListChatReadReceiptsOptionalParams as RestListReadReceiptsOptions } from "../generated/src/models/index.js";
4
- import type { ChatAttachment, ChatParticipant, ChatRetentionPolicy } from "./models.js";
4
+ import type { ChatParticipant, ChatRetentionPolicy } from "./models.js";
5
5
  export { RestListMessagesOptions, RestListChatThreadsOptions, RestListParticipantsOptions, RestListReadReceiptsOptions, };
6
6
  /**
7
7
  * Options to create chat client.
@@ -43,8 +43,6 @@ export interface SendMessageOptions extends OperationOptions {
43
43
  type?: ChatMessageType;
44
44
  /** Message metadata. */
45
45
  metadata?: Record<string, string>;
46
- /** Message attachments. */
47
- attachments?: ChatAttachment[];
48
46
  }
49
47
  /**
50
48
  * Options to update a chat message.
@@ -54,8 +52,6 @@ export interface UpdateMessageOptions extends OperationOptions {
54
52
  content?: string;
55
53
  /** Message metadata. */
56
54
  metadata?: Record<string, string>;
57
- /** Message attachments. */
58
- attachments?: ChatAttachment[];
59
55
  }
60
56
  /**
61
57
  * Options to list chat messages.
@@ -117,19 +113,4 @@ export type SendReadReceiptOptions = OperationOptions;
117
113
  * Options to list read receipts.
118
114
  */
119
115
  export type ListReadReceiptsOptions = RestListReadReceiptsOptions;
120
- /**
121
- * Options to upload a chat image.
122
- */
123
- export interface UploadImageOptions extends OperationOptions {
124
- /** Image blob size in bytes. */
125
- imageBytesLength?: number;
126
- }
127
- /**
128
- * Options to upload a chat image stream.
129
- */
130
- export type UploadImageStreamOptions = OperationOptions;
131
- /**
132
- * Options to delete a chat image.
133
- */
134
- export type DeleteImageOptions = OperationOptions;
135
116
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,iCAAiC,IAAI,0BAA0B,EAC/D,wCAAwC,IAAI,uBAAuB,EACnE,4CAA4C,IAAI,2BAA2B,EAC3E,4CAA4C,IAAI,2BAA2B,EAC5E,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAExF,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,GAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;CAAG;AAEjE;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;CAAG;AAErE;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;CAAG;AAE/D;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,gBAAgB;IACzE,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,yHAAyH;IACzH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,wBAAwB;IACxB,Q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sBAAsB,GAAG,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE,gIAAgI;IAChI,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { ChatMessageType } from \"../generated/src/models/index.js\";\nimport {\n ChatListChatThreadsOptionalParams as RestListChatThreadsOptions,\n ChatThreadListChatMessagesOptionalParams as RestListMessagesOptions,\n ChatThreadListChatParticipantsOptionalParams as RestListParticipantsOptions,\n ChatThreadListChatReadReceiptsOptionalParams as RestListReadReceiptsOptions,\n} from \"../generated/src/models/index.js\";\nimport type { ChatAttachment, ChatParticipant, ChatRetentionPolicy } from \"./models.js\";\n\nexport {\n RestListMessagesOptions,\n RestListChatThreadsOptions,\n RestListParticipantsOptions,\n RestListReadReceiptsOptions,\n};\n\n/**\n * Options to create chat client.\n */\nexport interface ChatClientOptions extends CommonClientOptions {}\n\n/**\n * Options to create chat thread client.\n */\nexport interface ChatThreadClientOptions extends ChatClientOptions {}\n\n/**\n * Options to update a chat thread.\n */\nexport interface UpdateTopicOptions extends OperationOptions {}\n\n/**\n * Options to update a chat thread.\n */\nexport interface UpdateChatThreadPropertiesOptions extends OperationOptions {\n /** Thread topic. */\n topic?: string;\n /** Thread metadata. */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n}\n\n/**\n * Options to get chat threads.\n */\nexport type ListChatThreadsOptions = RestListChatThreadsOptions;\n\n/**\n * Options to send a chat message.\n */\nexport interface SendMessageOptions extends OperationOptions {\n /** The display name of the chat message sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n /** The chat message type. */\n type?: ChatMessageType;\n /** Message metadata. */\n metadata?: Record<string, string>;\n /** Message attachments. */\n attachments?: ChatAttachment[];\n}\n\n/**\n * Options to update a chat message.\n */\nexport interface UpdateMessageOptions extends OperationOptions {\n /** Chat message content. */\n content?: string;\n /** Message metadata. */\n metadata?: Record<string, string>;\n /** Message attachments. */\n attachments?: ChatAttachment[];\n}\n\n/**\n * Options to list chat messages.\n */\nexport type ListMessagesOptions = RestListMessagesOptions;\n\n/**\n * Options to create a chat thread.\n */\nexport interface CreateChatThreadOptions extends OperationOptions {\n /** Participants to be added to the chat thread. */\n participants?: ChatParticipant[];\n /** If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Idempotency-Token and get back an appropriate response without the server executing the request multiple times. The value of the Idempotency-Token is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. */\n idempotencyToken?: string;\n /** metadata */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n}\n\n/**\n * Options to get a chat thread.\n */\nexport type GetPropertiesOptions = OperationOptions;\n\n/**\n * Options to delete a chat thread.\n */\nexport type DeleteChatThreadOptions = OperationOptions;\n\n/**\n * Options to get a chat message.\n */\nexport type GetMessageOptions = OperationOptions;\n\n/**\n * Options to delete a chat message.\n */\nexport type DeleteMessageOptions = OperationOptions;\n\n/**\n * Options to add a chat participant.\n */\nexport type AddParticipantsOptions = OperationOptions;\n\n/**\n * Options to list chat participants.\n */\nexport type ListParticipantsOptions = RestListParticipantsOptions;\n\n/**\n * Options to remove a chat participant.\n */\nexport type RemoveParticipantOptions = OperationOptions;\n\n/**\n * Options to send typing notifications.\n */\nexport interface SendTypingNotificationOptions extends OperationOptions {\n /** The display name of the typing notification sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n}\n\n/**\n * Options to send read receipt.\n */\nexport type SendReadReceiptOptions = OperationOptions;\n\n/**\n * Options to list read receipts.\n */\nexport type ListReadReceiptsOptions = RestListReadReceiptsOptions;\n\n/**\n * Options to upload a chat image.\n */\nexport interface UploadImageOptions extends OperationOptions {\n /** Image blob size in bytes. */\n imageBytesLength?: number;\n}\n\n/**\n * Options to upload a chat image stream.\n */\nexport type UploadImageStreamOptions = OperationOptions;\n\n/**\n * Options to delete a chat image.\n */\nexport type DeleteImageOptions = OperationOptions;\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { ChatMessageType } from \"../generated/src/models/index.js\";\nimport {\n ChatListChatThreadsOptionalParams as RestListChatThreadsOptions,\n ChatThreadListChatMessagesOptionalParams as RestListMessagesOptions,\n ChatThreadListChatParticipantsOptionalParams as RestListParticipantsOptions,\n ChatThreadListChatReadReceiptsOptionalParams as RestListReadReceiptsOptions,\n} from \"../generated/src/models/index.js\";\nimport type { ChatParticipant, ChatRetentionPolicy } from \"./models.js\";\n\nexport {\n RestListMessagesOptions,\n RestListChatThreadsOptions,\n RestListParticipantsOptions,\n RestListReadReceiptsOptions,\n};\n\n/**\n * Options to create chat client.\n */\nexport interface ChatClientOptions extends CommonClientOptions {}\n\n/**\n * Options to create chat thread client.\n */\nexport interface ChatThreadClientOptions extends ChatClientOptions {}\n\n/**\n * Options to update a chat thread.\n */\nexport interface UpdateTopicOptions extends OperationOptions {}\n\n/**\n * Options to update a chat thread.\n */\nexport interface UpdateChatThreadPropertiesOptions extends OperationOptions {\n /** Thread topic. */\n topic?: string;\n /** Thread metadata. */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n}\n\n/**\n * Options to get chat threads.\n */\nexport type ListChatThreadsOptions = RestListChatThreadsOptions;\n\n/**\n * Options to send a chat message.\n */\nexport interface SendMessageOptions extends OperationOptions {\n /** The display name of the chat message sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n /** The chat message type. */\n type?: ChatMessageType;\n /** Message metadata. */\n metadata?: Record<string, string>;\n}\n\n/**\n * Options to update a chat message.\n */\nexport interface UpdateMessageOptions extends OperationOptions {\n /** Chat message content. */\n content?: string;\n /** Message metadata. */\n metadata?: Record<string, string>;\n}\n\n/**\n * Options to list chat messages.\n */\nexport type ListMessagesOptions = RestListMessagesOptions;\n\n/**\n * Options to create a chat thread.\n */\nexport interface CreateChatThreadOptions extends OperationOptions {\n /** Participants to be added to the chat thread. */\n participants?: ChatParticipant[];\n /** If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Idempotency-Token and get back an appropriate response without the server executing the request multiple times. The value of the Idempotency-Token is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. */\n idempotencyToken?: string;\n /** metadata */\n metadata?: Record<string, string>;\n /** Data retention policy for auto deletion. */\n retentionPolicy?: ChatRetentionPolicy;\n}\n\n/**\n * Options to get a chat thread.\n */\nexport type GetPropertiesOptions = OperationOptions;\n\n/**\n * Options to delete a chat thread.\n */\nexport type DeleteChatThreadOptions = OperationOptions;\n\n/**\n * Options to get a chat message.\n */\nexport type GetMessageOptions = OperationOptions;\n\n/**\n * Options to delete a chat message.\n */\nexport type DeleteMessageOptions = OperationOptions;\n\n/**\n * Options to add a chat participant.\n */\nexport type AddParticipantsOptions = OperationOptions;\n\n/**\n * Options to list chat participants.\n */\nexport type ListParticipantsOptions = RestListParticipantsOptions;\n\n/**\n * Options to remove a chat participant.\n */\nexport type RemoveParticipantOptions = OperationOptions;\n\n/**\n * Options to send typing notifications.\n */\nexport interface SendTypingNotificationOptions extends OperationOptions {\n /** The display name of the typing notification sender. This property is used to populate sender name for push notifications. */\n senderDisplayName?: string;\n}\n\n/**\n * Options to send read receipt.\n */\nexport type SendReadReceiptOptions = OperationOptions;\n\n/**\n * Options to list read receipts.\n */\nexport type ListReadReceiptsOptions = RestListReadReceiptsOptions;\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ChatClientOptions, CreateChatThreadOptions, DeleteChatThreadOptions, ListChatThreadsOptions } from "./models/options.js";
2
- import type { ChatMessageDeletedEvent, ChatMessageEditedEvent, ChatMessageReceivedEvent, ChatThreadCreatedEvent, ChatThreadDeletedEvent, ChatThreadPropertiesUpdatedEvent, ParticipantsAddedEvent, ParticipantsRemovedEvent, ReadReceiptReceivedEvent, StreamingChatMessageChunkReceivedEvent, StreamingChatMessageStartEvent, TypingIndicatorReceivedEvent } from "./models/events.js";
2
+ import type { ChatMessageDeletedEvent, ChatMessageEditedEvent, ChatMessageReceivedEvent, ChatThreadCreatedEvent, ChatThreadDeletedEvent, ChatThreadPropertiesUpdatedEvent, ParticipantsAddedEvent, ParticipantsRemovedEvent, ReadReceiptReceivedEvent, TypingIndicatorReceivedEvent } from "./models/events.js";
3
3
  import type { ChatThreadItem, CreateChatThreadResult } from "./models/models.js";
4
4
  import { ChatThreadClient } from "./chatThreadClient.js";
5
5
  import type { CommunicationTokenCredential } from "@azure/communication-common";
@@ -124,18 +124,6 @@ export declare class ChatClient {
124
124
  * @param listener - The listener to handle the event.
125
125
  */
126
126
  on(event: "participantsRemoved", listener: (e: ParticipantsRemovedEvent) => void): void;
127
- /**
128
- * Subscribe function for streamingChatMessageStarted
129
- * @param event - The StreamingChatMessageStartEvent
130
- * @param listener - The listener to handle the event
131
- */
132
- on(event: "streamingChatMessageStarted", listener: (e: StreamingChatMessageStartEvent) => void): void;
133
- /**
134
- * Subscribe function for streamingChatMessageChunkReceived
135
- * @param event - The StreamingChatMessageChunkReceivedEvent
136
- * @param listener - The listener to handle the event
137
- */
138
- on(event: "streamingChatMessageChunkReceived", listener: (e: StreamingChatMessageChunkReceivedEvent) => void): void;
139
127
  /**
140
128
  * Subscribe function for realTimeNotificationConnected.
141
129
  * @param event - The realTimeNotificationConnected Event
@@ -208,18 +196,6 @@ export declare class ChatClient {
208
196
  * @param listener - The listener to handle the event.
209
197
  */
210
198
  off(event: "participantsRemoved", listener: (e: ParticipantsRemovedEvent) => void): void;
211
- /**
212
- * Unsubscribe function for streamingChatMessageStarted
213
- * @param event - The StreamingChatMessageStartEvent
214
- * @param listener - The listener to handle the event
215
- */
216
- off(event: "streamingChatMessageStarted", listener: (e: StreamingChatMessageStartEvent) => void): void;
217
- /**
218
- * Unsubscribe function for streamingChatMessageChunkReceived
219
- * @param event - The StreamingChatMessageChunkReceivedEvent
220
- * @param listener - The listener to handle the event
221
- */
222
- off(event: "streamingChatMessageChunkReceived", listener: (e: StreamingChatMessageChunkReceivedEvent) => void): void;
223
199
  private subscribeToSignalingEvents;
224
200
  }
225
201
  //# sourceMappingURL=chatClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatClient.d.ts","sourceRoot":"","sources":["../../src/chatClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAEV,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,gCAAgC,EAChC,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,sCAAsC,EACtC,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAoB,MAAM,oBAAoB,CAAC;AASnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM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AU/F,OAAO,CAAC,0BAA0B;CAqDnC"}
@@ -4,6 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ChatClient = void 0;
6
6
  const tslib_1 = require("tslib");
7
+ const communication_signaling_1 = require("@azure/communication-signaling");
7
8
  const mappers_js_1 = require("./models/mappers.js");
8
9
  const index_js_1 = require("./generated/src/index.js");
9
10
  const chatThreadClient_js_1 = require("./chatThreadClient.js");
@@ -201,10 +202,10 @@ class ChatClient {
201
202
  throw new Error("Realtime notifications are only supported in the browser.");
202
203
  }
203
204
  this.signalingClient.on("connectionChanged", (payload) => {
204
- if (payload === 2 /* ConnectionState.Connected */) {
205
+ if (payload === communication_signaling_1.ConnectionState.Connected) {
205
206
  this.emitter.emit("realTimeNotificationConnected");
206
207
  }
207
- else if (payload === 3 /* ConnectionState.Disconnected */) {
208
+ else if (payload === communication_signaling_1.ConnectionState.Disconnected) {
208
209
  this.emitter.emit("realTimeNotificationDisconnected");
209
210
  }
210
211
  });
@@ -238,12 +239,6 @@ class ChatClient {
238
239
  this.signalingClient.on("participantsRemoved", (payload) => {
239
240
  this.emitter.emit("participantsRemoved", payload);
240
241
  });
241
- this.signalingClient.on("streamingChatMessageStarted", (payload) => {
242
- this.emitter.emit("streamingChatMessageStarted", payload);
243
- });
244
- this.signalingClient.on("streamingChatMessageChunkReceived", (payload) => {
245
- this.emitter.emit("streamingChatMessageChunkReceived", payload);
246
- });
247
242
  }
248
243
  }
249
244
  exports.ChatClient = ChatClient;