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ACA,OAAOA,EAGP,MAAM,IAAIzb,MAAM,6BAA6Bwb,IACjD,ECdEK,EAAuBd,IACzB,IAToB,CAACA,IACrB,IAAI5P,EACJ,MAAMe,EAAM,IAAIsO,IAAIO,GACpB,SAAmC,QAAvB5P,EAAKe,EAAI4P,gBAA6B,IAAP3Q,OAAgB,EAASA,EAAGwQ,MAAM,oBAC5DtQ,IAAba,EAAI6O,MACS,KAAb7O,EAAI6O,YACc1P,IAAjBa,EAAI0O,UAA2C,KAAjB1O,EAAI0O,UAAoC,MAAjB1O,EAAI0O,SAAkB,EAG3EmB,CAAgBhB,GACjB,MAAM,IAAI/a,MAAM,wBAAwB+a,IAC5C,EAOSiB,EAAmBlP,IAC5B,MAAMmP,EAAiBnP,EACvB,OAAQmP,GAC0B,iBAAvBA,EAAef,UACM7P,IAA5B4Q,EAAejP,QAAuB,EAMjCkP,EAAuB,CAACC,EAAuBC,KACxD,GAAIJ,EAAgBI,KAAwB,OAAkBA,GAE1D,OADAP,EAAoBM,GACb,CAAEjQ,IAAKiQ,EAAuBrP,WAAYsP,GAEhD,CACD,MAAQ5V,SAAUuU,EAAI,WAAEjO,GAAeyO,EAAsBY,GAE7D,OADAN,EAAoBd,GACb,CAAE7O,IAAK6O,EAAMjO,aACxB,G","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/models/mappers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/tracing.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/models/mappers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/models/parameters.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/operations/chatThread.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/operations/chat.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/generated/src/chatApiClient.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/models/logger.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/credential/communicationTokenCredentialPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/chatThreadClient.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/chatClient.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/signaling/signalingClient.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-chat@1.3.2/node_modules/@azure/communication-chat/dist-esm/src/models/uuid.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/tokenParser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/autoRefreshTokenCredential.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/staticTokenCredential.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/azureCommunicationTokenCredential.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/identifierModelSerializer.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/identifierModels.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/encodeUtils.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/cryptoUtils.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/communicationAccessKeyCredentialPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/communicationAuthPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/connectionString.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-common@2.3.0/node_modules/@azure/communication-common/dist-esm/src/credential/clientArguments.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignal, abortSignal } from \"./AbortSignal\";\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nexport class AbortController {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals) {\n this._signal = new AbortSignal();\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n }\n else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n get signal() {\n return this._signal;\n }\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort() {\n abortSignal(this._signal);\n }\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n static timeout(ms) {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n//# sourceMappingURL=AbortController.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { __rest } from \"tslib\";\nimport { deserializeCommunicationIdentifier, serializeCommunicationIdentifier, } from \"@azure/communication-common\";\nexport const mapToCreateChatThreadOptionsRestModel = (options) => {\n const { participants, idempotencyToken } = options, rest = __rest(options, [\"participants\", \"idempotencyToken\"]);\n return Object.assign({ repeatabilityRequestId: idempotencyToken }, rest);\n};\n/**\n * @internal\n * Mapping chat participant customer model to chat participant REST model\n */\nexport const mapToChatParticipantRestModel = (chatParticipant) => {\n const { id } = chatParticipant, rest = __rest(chatParticipant, [\"id\"]);\n return Object.assign(Object.assign({}, rest), { communicationIdentifier: serializeCommunicationIdentifier(id) });\n};\n/**\n * @internal\n * Mapping add participants request to add chat participants request REST model\n */\nexport const mapToAddChatParticipantsRequestRestModel = (addParticipantsRequest) => {\n var _a;\n return {\n participants: (_a = addParticipantsRequest.participants) === null || _a === void 0 ? void 0 : _a.map((participant) => mapToChatParticipantRestModel(participant)),\n };\n};\n/**\n * @internal\n * Mapping chat participant REST model to chat participant SDK model\n */\nexport const mapToChatParticipantSdkModel = (chatParticipant) => {\n const { communicationIdentifier } = chatParticipant, rest = __rest(chatParticipant, [\"communicationIdentifier\"]);\n return Object.assign(Object.assign({}, rest), { id: deserializeCommunicationIdentifier(communicationIdentifier) });\n};\n/**\n * @internal\n */\nexport const mapToChatContentSdkModel = (content) => {\n const { participants, initiatorCommunicationIdentifier } = content, otherChatContents = __rest(content, [\"participants\", \"initiatorCommunicationIdentifier\"]);\n let result = Object.assign({}, otherChatContents);\n if (initiatorCommunicationIdentifier) {\n const initiator = deserializeCommunicationIdentifier(initiatorCommunicationIdentifier);\n result = Object.assign(Object.assign({}, result), { initiator });\n }\n if (participants) {\n result = Object.assign(Object.assign({}, result), { participants: participants === null || participants === void 0 ? void 0 : participants.map((participant) => mapToChatParticipantSdkModel(participant)) });\n }\n return result;\n};\n/**\n * @internal\n * Mapping chat message REST model to chat message SDK model\n */\nexport const mapToChatMessageSdkModel = (chatMessage) => {\n const { content, senderCommunicationIdentifier } = chatMessage, otherChatMessage = __rest(chatMessage, [\"content\", \"senderCommunicationIdentifier\"]);\n let result = Object.assign({}, otherChatMessage);\n if (content) {\n result = Object.assign(Object.assign({}, result), { content: mapToChatContentSdkModel(content) });\n }\n if (senderCommunicationIdentifier) {\n const sender = deserializeCommunicationIdentifier(senderCommunicationIdentifier);\n result = Object.assign(Object.assign({}, result), { sender });\n }\n return result;\n};\n/**\n * @internal\n * Mapping chat messages collection REST model to chat message SDK model array\n */\nexport const mapToChatMessagesSdkModelArray = (chatMessagesCollection) => {\n var _a;\n return (_a = chatMessagesCollection.value) === null || _a === void 0 ? void 0 : _a.map((chatMessage) => mapToChatMessageSdkModel(chatMessage));\n};\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToChatThreadPropertiesSdkModel = (chatThread) => {\n const { createdByCommunicationIdentifier } = chatThread, rest = __rest(chatThread, [\"createdByCommunicationIdentifier\"]);\n if (createdByCommunicationIdentifier) {\n return Object.assign(Object.assign({}, rest), { createdBy: deserializeCommunicationIdentifier(createdByCommunicationIdentifier) });\n }\n else {\n return Object.assign({}, rest);\n }\n};\n/**\n * @internal\n * Mapping chat thread REST model to chat thread SDK model\n */\nexport const mapToCreateChatThreadResultSdkModel = (result) => {\n const { chatThread } = result, rest = __rest(result, [\"chatThread\"]);\n if (chatThread) {\n return Object.assign(Object.assign({}, rest), { chatThread: mapToChatThreadPropertiesSdkModel(chatThread) });\n }\n else {\n return Object.assign({}, rest);\n }\n};\n/**\n * @internal\n * Mapping read receipt REST model to read receipt SDK model\n */\nexport const mapToReadReceiptSdkModel = (readReceipt) => {\n const { senderCommunicationIdentifier } = readReceipt, rest = __rest(readReceipt, [\"senderCommunicationIdentifier\"]);\n return Object.assign(Object.assign({}, rest), { sender: deserializeCommunicationIdentifier(senderCommunicationIdentifier) });\n};\n//# sourceMappingURL=mappers.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { createTracingClient } from \"@azure/core-tracing\";\nexport const tracingClient = createTracingClient({\n namespace: \"Azure.Communication\",\n packageName: \"@azure/communication-chat\",\n packageVersion: \"1.3.2\"\n});\n//# sourceMappingURL=tracing.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nexport const ChatMessageReadReceiptsCollection = {\n type: {\n name: \"Composite\",\n className: \"ChatMessageReadReceiptsCollection\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatMessageReadReceipt\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const ChatMessageReadReceipt = {\n type: {\n name: \"Composite\",\n className: \"ChatMessageReadReceipt\",\n modelProperties: {\n senderCommunicationIdentifier: {\n serializedName: \"senderCommunicationIdentifier\",\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\"\n }\n },\n chatMessageId: {\n serializedName: \"chatMessageId\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n readOn: {\n serializedName: \"readOn\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\nexport const CommunicationIdentifierModel = {\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\",\n modelProperties: {\n rawId: {\n serializedName: \"rawId\",\n type: {\n name: \"String\"\n }\n },\n communicationUser: {\n serializedName: \"communicationUser\",\n type: {\n name: \"Composite\",\n className: \"CommunicationUserIdentifierModel\"\n }\n },\n phoneNumber: {\n serializedName: \"phoneNumber\",\n type: {\n name: \"Composite\",\n className: \"PhoneNumberIdentifierModel\"\n }\n },\n microsoftTeamsUser: {\n serializedName: \"microsoftTeamsUser\",\n type: {\n name: \"Composite\",\n className: \"MicrosoftTeamsUserIdentifierModel\"\n }\n }\n }\n }\n};\nexport const CommunicationUserIdentifierModel = {\n type: {\n name: \"Composite\",\n className: \"CommunicationUserIdentifierModel\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const PhoneNumberIdentifierModel = {\n type: {\n name: \"Composite\",\n className: \"PhoneNumberIdentifierModel\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const MicrosoftTeamsUserIdentifierModel = {\n type: {\n name: \"Composite\",\n className: \"MicrosoftTeamsUserIdentifierModel\",\n modelProperties: {\n userId: {\n serializedName: \"userId\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n isAnonymous: {\n serializedName: \"isAnonymous\",\n type: {\n name: \"Boolean\"\n }\n },\n cloud: {\n serializedName: \"cloud\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const CommunicationErrorResponse = {\n type: {\n name: \"Composite\",\n className: \"CommunicationErrorResponse\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"ChatError\"\n }\n }\n }\n }\n};\nexport const ChatError = {\n type: {\n name: \"Composite\",\n className: \"ChatError\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n target: {\n serializedName: \"target\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatError\"\n }\n }\n }\n },\n innerError: {\n serializedName: \"innererror\",\n type: {\n name: \"Composite\",\n className: \"ChatError\"\n }\n }\n }\n }\n};\nexport const SendReadReceiptRequest = {\n type: {\n name: \"Composite\",\n className: \"SendReadReceiptRequest\",\n modelProperties: {\n chatMessageId: {\n serializedName: \"chatMessageId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const SendChatMessageRequest = {\n type: {\n name: \"Composite\",\n className: \"SendChatMessageRequest\",\n modelProperties: {\n content: {\n serializedName: \"content\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n senderDisplayName: {\n serializedName: \"senderDisplayName\",\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"text\",\n \"html\",\n \"topicUpdated\",\n \"participantAdded\",\n \"participantRemoved\"\n ]\n }\n },\n metadata: {\n serializedName: \"metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n }\n }\n }\n};\nexport const SendChatMessageResult = {\n type: {\n name: \"Composite\",\n className: \"SendChatMessageResult\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const ChatMessagesCollection = {\n type: {\n name: \"Composite\",\n className: \"ChatMessagesCollection\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatMessage\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const ChatMessage = {\n type: {\n name: \"Composite\",\n className: \"ChatMessage\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n required: true,\n type: {\n name: \"Enum\",\n allowedValues: [\n \"text\",\n \"html\",\n \"topicUpdated\",\n \"participantAdded\",\n \"participantRemoved\"\n ]\n }\n },\n sequenceId: {\n serializedName: \"sequenceId\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"version\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n content: {\n serializedName: \"content\",\n type: {\n name: \"Composite\",\n className: \"ChatMessageContent\"\n }\n },\n senderDisplayName: {\n serializedName: \"senderDisplayName\",\n type: {\n name: \"String\"\n }\n },\n createdOn: {\n serializedName: \"createdOn\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n },\n senderCommunicationIdentifier: {\n serializedName: \"senderCommunicationIdentifier\",\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\"\n }\n },\n deletedOn: {\n serializedName: \"deletedOn\",\n type: {\n name: \"DateTime\"\n }\n },\n editedOn: {\n serializedName: \"editedOn\",\n type: {\n name: \"DateTime\"\n }\n },\n metadata: {\n serializedName: \"metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n }\n }\n }\n};\nexport const ChatMessageContent = {\n type: {\n name: \"Composite\",\n className: \"ChatMessageContent\",\n modelProperties: {\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n },\n topic: {\n serializedName: \"topic\",\n type: {\n name: \"String\"\n }\n },\n participants: {\n serializedName: \"participants\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatParticipant\"\n }\n }\n }\n },\n initiatorCommunicationIdentifier: {\n serializedName: \"initiatorCommunicationIdentifier\",\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\"\n }\n }\n }\n }\n};\nexport const ChatParticipant = {\n type: {\n name: \"Composite\",\n className: \"ChatParticipant\",\n modelProperties: {\n communicationIdentifier: {\n serializedName: \"communicationIdentifier\",\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\"\n }\n },\n displayName: {\n serializedName: \"displayName\",\n type: {\n name: \"String\"\n }\n },\n shareHistoryTime: {\n serializedName: \"shareHistoryTime\",\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\nexport const UpdateChatMessageRequest = {\n type: {\n name: \"Composite\",\n className: \"UpdateChatMessageRequest\",\n modelProperties: {\n content: {\n serializedName: \"content\",\n type: {\n name: \"String\"\n }\n },\n metadata: {\n serializedName: \"metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n }\n }\n }\n};\nexport const ChatParticipantsCollection = {\n type: {\n name: \"Composite\",\n className: \"ChatParticipantsCollection\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatParticipant\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const AddChatParticipantsRequest = {\n type: {\n name: \"Composite\",\n className: \"AddChatParticipantsRequest\",\n modelProperties: {\n participants: {\n serializedName: \"participants\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatParticipant\"\n }\n }\n }\n }\n }\n }\n};\nexport const AddChatParticipantsResult = {\n type: {\n name: \"Composite\",\n className: \"AddChatParticipantsResult\",\n modelProperties: {\n invalidParticipants: {\n serializedName: \"invalidParticipants\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatError\"\n }\n }\n }\n }\n }\n }\n};\nexport const CreateChatThreadRequest = {\n type: {\n name: \"Composite\",\n className: \"CreateChatThreadRequest\",\n modelProperties: {\n topic: {\n serializedName: \"topic\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n participants: {\n serializedName: \"participants\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatParticipant\"\n }\n }\n }\n }\n }\n }\n};\nexport const CreateChatThreadResult = {\n type: {\n name: \"Composite\",\n className: \"CreateChatThreadResult\",\n modelProperties: {\n chatThread: {\n serializedName: \"chatThread\",\n type: {\n name: \"Composite\",\n className: \"ChatThreadProperties\"\n }\n },\n invalidParticipants: {\n serializedName: \"invalidParticipants\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatError\"\n }\n }\n }\n }\n }\n }\n};\nexport const ChatThreadProperties = {\n type: {\n name: \"Composite\",\n className: \"ChatThreadProperties\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n topic: {\n serializedName: \"topic\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n createdOn: {\n serializedName: \"createdOn\",\n required: true,\n type: {\n name: \"DateTime\"\n }\n },\n createdByCommunicationIdentifier: {\n serializedName: \"createdByCommunicationIdentifier\",\n type: {\n name: \"Composite\",\n className: \"CommunicationIdentifierModel\"\n }\n },\n deletedOn: {\n serializedName: \"deletedOn\",\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\nexport const ChatThreadsItemCollection = {\n type: {\n name: \"Composite\",\n className: \"ChatThreadsItemCollection\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ChatThreadItem\"\n }\n }\n }\n },\n nextLink: {\n serializedName: \"nextLink\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const ChatThreadItem = {\n type: {\n name: \"Composite\",\n className: \"ChatThreadItem\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n topic: {\n serializedName: \"topic\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n deletedOn: {\n serializedName: \"deletedOn\",\n type: {\n name: \"DateTime\"\n }\n },\n lastMessageReceivedOn: {\n serializedName: \"lastMessageReceivedOn\",\n readOnly: true,\n type: {\n name: \"DateTime\"\n }\n }\n }\n }\n};\nexport const UpdateChatThreadRequest = {\n type: {\n name: \"Composite\",\n className: \"UpdateChatThreadRequest\",\n modelProperties: {\n topic: {\n serializedName: \"topic\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nexport const SendTypingNotificationRequest = {\n type: {\n name: \"Composite\",\n className: \"SendTypingNotificationRequest\",\n modelProperties: {\n senderDisplayName: {\n serializedName: \"senderDisplayName\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n//# sourceMappingURL=mappers.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { SendReadReceiptRequest as SendReadReceiptRequestMapper, SendChatMessageRequest as SendChatMessageRequestMapper, UpdateChatMessageRequest as UpdateChatMessageRequestMapper, CommunicationIdentifierModel as CommunicationIdentifierModelMapper, AddChatParticipantsRequest as AddChatParticipantsRequestMapper, UpdateChatThreadRequest as UpdateChatThreadRequestMapper, SendTypingNotificationRequest as SendTypingNotificationRequestMapper, CreateChatThreadRequest as CreateChatThreadRequestMapper } from \"../models/mappers\";\nexport const accept = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const endpoint = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nexport const chatThreadId = {\n parameterPath: \"chatThreadId\",\n mapper: {\n serializedName: \"chatThreadId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const maxPageSize = {\n parameterPath: [\"options\", \"maxPageSize\"],\n mapper: {\n serializedName: \"maxPageSize\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const skip = {\n parameterPath: [\"options\", \"skip\"],\n mapper: {\n serializedName: \"skip\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const apiVersion = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2021-09-07\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentType = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sendReadReceiptRequest = {\n parameterPath: \"sendReadReceiptRequest\",\n mapper: SendReadReceiptRequestMapper\n};\nexport const sendChatMessageRequest = {\n parameterPath: \"sendChatMessageRequest\",\n mapper: SendChatMessageRequestMapper\n};\nexport const startTime = {\n parameterPath: [\"options\", \"startTime\"],\n mapper: {\n serializedName: \"startTime\",\n type: {\n name: \"DateTime\"\n }\n }\n};\nexport const chatMessageId = {\n parameterPath: \"chatMessageId\",\n mapper: {\n serializedName: \"chatMessageId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentType1 = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/merge-patch+json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const updateChatMessageRequest = {\n parameterPath: \"updateChatMessageRequest\",\n mapper: UpdateChatMessageRequestMapper\n};\nexport const participantCommunicationIdentifier = {\n parameterPath: \"participantCommunicationIdentifier\",\n mapper: CommunicationIdentifierModelMapper\n};\nexport const addChatParticipantsRequest = {\n parameterPath: \"addChatParticipantsRequest\",\n mapper: AddChatParticipantsRequestMapper\n};\nexport const updateChatThreadRequest = {\n parameterPath: \"updateChatThreadRequest\",\n mapper: UpdateChatThreadRequestMapper\n};\nexport const sendTypingNotificationRequest = {\n parameterPath: [\"options\", \"sendTypingNotificationRequest\"],\n mapper: SendTypingNotificationRequestMapper\n};\nexport const nextLink = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nexport const createChatThreadRequest = {\n parameterPath: \"createChatThreadRequest\",\n mapper: CreateChatThreadRequestMapper\n};\nexport const repeatabilityRequestId = {\n parameterPath: [\"options\", \"repeatabilityRequestId\"],\n mapper: {\n serializedName: \"repeatability-request-id\",\n type: {\n name: \"String\"\n }\n }\n};\n//# sourceMappingURL=parameters.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { tracingClient } from \"../tracing\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\n/** Class containing ChatThread operations. */\nexport class ChatThreadImpl {\n /**\n * Initialize a new instance of the class ChatThread class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * Gets chat message read receipts for a thread.\n * @param chatThreadId Thread id to get the chat message read receipts for.\n * @param options The options parameters.\n */\n async listChatReadReceipts(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatReadReceipts\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, listChatReadReceiptsOperationSpec);\n });\n }\n /**\n * Sends a read receipt event to a thread, on behalf of a user.\n * @param chatThreadId Thread id to send the read receipt event to.\n * @param sendReadReceiptRequest Read receipt details.\n * @param options The options parameters.\n */\n async sendChatReadReceipt(chatThreadId, sendReadReceiptRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.sendChatReadReceipt\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, sendReadReceiptRequest, options }, sendChatReadReceiptOperationSpec);\n });\n }\n /**\n * Sends a message to a thread.\n * @param chatThreadId The thread id to send the message to.\n * @param sendChatMessageRequest Details of the message to send.\n * @param options The options parameters.\n */\n async sendChatMessage(chatThreadId, sendChatMessageRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.sendChatMessage\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, sendChatMessageRequest, options }, sendChatMessageOperationSpec);\n });\n }\n /**\n * Gets a list of messages from a thread.\n * @param chatThreadId The thread id of the message.\n * @param options The options parameters.\n */\n async listChatMessages(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatMessages\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, listChatMessagesOperationSpec);\n });\n }\n /**\n * Gets a message by id.\n * @param chatThreadId The thread id to which the message was sent.\n * @param chatMessageId The message id.\n * @param options The options parameters.\n */\n async getChatMessage(chatThreadId, chatMessageId, options) {\n return tracingClient.withSpan(\"ChatApiClient.getChatMessage\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, chatMessageId, options }, getChatMessageOperationSpec);\n });\n }\n /**\n * Updates a message.\n * @param chatThreadId The thread id to which the message was sent.\n * @param chatMessageId The message id.\n * @param updateChatMessageRequest Details of the request to update the message.\n * @param options The options parameters.\n */\n async updateChatMessage(chatThreadId, chatMessageId, updateChatMessageRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.updateChatMessage\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, chatMessageId, updateChatMessageRequest, options }, updateChatMessageOperationSpec);\n });\n }\n /**\n * Deletes a message.\n * @param chatThreadId The thread id to which the message was sent.\n * @param chatMessageId The message id.\n * @param options The options parameters.\n */\n async deleteChatMessage(chatThreadId, chatMessageId, options) {\n return tracingClient.withSpan(\"ChatApiClient.deleteChatMessage\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, chatMessageId, options }, deleteChatMessageOperationSpec);\n });\n }\n /**\n * Gets the participants of a thread.\n * @param chatThreadId Thread id to get participants for.\n * @param options The options parameters.\n */\n async listChatParticipants(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatParticipants\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, listChatParticipantsOperationSpec);\n });\n }\n /**\n * Remove a participant from a thread.\n * @param chatThreadId Thread id to remove the participant from.\n * @param participantCommunicationIdentifier Id of the thread participant to remove from the thread.\n * @param options The options parameters.\n */\n async removeChatParticipant(chatThreadId, participantCommunicationIdentifier, options) {\n return tracingClient.withSpan(\"ChatApiClient.removeChatParticipant\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, participantCommunicationIdentifier, options }, removeChatParticipantOperationSpec);\n });\n }\n /**\n * Adds thread participants to a thread. If participants already exist, no change occurs.\n * @param chatThreadId Id of the thread to add participants to.\n * @param addChatParticipantsRequest Thread participants to be added to the thread.\n * @param options The options parameters.\n */\n async addChatParticipants(chatThreadId, addChatParticipantsRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.addChatParticipants\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, addChatParticipantsRequest, options }, addChatParticipantsOperationSpec);\n });\n }\n /**\n * Updates a thread's properties.\n * @param chatThreadId The id of the thread to update.\n * @param updateChatThreadRequest Request payload for updating a chat thread.\n * @param options The options parameters.\n */\n async updateChatThreadProperties(chatThreadId, updateChatThreadRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.updateChatThreadProperties\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, updateChatThreadRequest, options }, updateChatThreadPropertiesOperationSpec);\n });\n }\n /**\n * Gets a chat thread's properties.\n * @param chatThreadId Id of the thread.\n * @param options The options parameters.\n */\n async getChatThreadProperties(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.getChatThreadProperties\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, getChatThreadPropertiesOperationSpec);\n });\n }\n /**\n * Posts a typing event to a thread, on behalf of a user.\n * @param chatThreadId Id of the thread.\n * @param options The options parameters.\n */\n async sendTypingNotification(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.sendTypingNotification\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, sendTypingNotificationOperationSpec);\n });\n }\n /**\n * ListChatReadReceiptsNext\n * @param chatThreadId Thread id to get the chat message read receipts for.\n * @param nextLink The nextLink from the previous successful call to the ListChatReadReceipts method.\n * @param options The options parameters.\n */\n async listChatReadReceiptsNext(chatThreadId, nextLink, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatReadReceiptsNext\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, nextLink, options }, listChatReadReceiptsNextOperationSpec);\n });\n }\n /**\n * ListChatMessagesNext\n * @param chatThreadId The thread id of the message.\n * @param nextLink The nextLink from the previous successful call to the ListChatMessages method.\n * @param options The options parameters.\n */\n async listChatMessagesNext(chatThreadId, nextLink, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatMessagesNext\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, nextLink, options }, listChatMessagesNextOperationSpec);\n });\n }\n /**\n * ListChatParticipantsNext\n * @param chatThreadId Thread id to get participants for.\n * @param nextLink The nextLink from the previous successful call to the ListChatParticipants method.\n * @param options The options parameters.\n */\n async listChatParticipantsNext(chatThreadId, nextLink, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatParticipantsNext\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, nextLink, options }, listChatParticipantsNextOperationSpec);\n });\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\nconst listChatReadReceiptsOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/readReceipts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatMessageReadReceiptsCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.skip,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst sendChatReadReceiptOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/readReceipts\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.sendReadReceiptRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst sendChatMessageOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/messages\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SendChatMessageResult\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.sendChatMessageRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listChatMessagesOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/messages\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatMessagesCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.apiVersion,\n Parameters.startTime\n ],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getChatMessageOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/messages/{chatMessageId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatMessage\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.chatMessageId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateChatMessageOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/messages/{chatMessageId}\",\n httpMethod: \"PATCH\",\n responses: {\n 204: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.updateChatMessageRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.chatMessageId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst deleteChatMessageOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/messages/{chatMessageId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.chatMessageId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listChatParticipantsOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/participants\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatParticipantsCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.skip,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst removeChatParticipantOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/participants/:remove\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.participantCommunicationIdentifier,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst addChatParticipantsOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/participants/:add\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.AddChatParticipantsResult\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.addChatParticipantsRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst updateChatThreadPropertiesOperationSpec = {\n path: \"/chat/threads/{chatThreadId}\",\n httpMethod: \"PATCH\",\n responses: {\n 204: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.updateChatThreadRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getChatThreadPropertiesOperationSpec = {\n path: \"/chat/threads/{chatThreadId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatThreadProperties\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst sendTypingNotificationOperationSpec = {\n path: \"/chat/threads/{chatThreadId}/typing\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.sendTypingNotificationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listChatReadReceiptsNextOperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatMessageReadReceiptsCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.skip,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listChatMessagesNextOperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatMessagesCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.apiVersion,\n Parameters.startTime\n ],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listChatParticipantsNextOperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatParticipantsCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.skip,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.endpoint,\n Parameters.chatThreadId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n//# sourceMappingURL=chatThread.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { tracingClient } from \"../tracing\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\n/** Class containing Chat operations. */\nexport class ChatImpl {\n /**\n * Initialize a new instance of the class Chat class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * Creates a chat thread.\n * @param createChatThreadRequest Request payload for creating a chat thread.\n * @param options The options parameters.\n */\n async createChatThread(createChatThreadRequest, options) {\n return tracingClient.withSpan(\"ChatApiClient.createChatThread\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ createChatThreadRequest, options }, createChatThreadOperationSpec);\n });\n }\n /**\n * Gets the list of chat threads of a user.\n * @param options The options parameters.\n */\n async listChatThreads(options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatThreads\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ options }, listChatThreadsOperationSpec);\n });\n }\n /**\n * Deletes a thread.\n * @param chatThreadId Id of the thread to be deleted.\n * @param options The options parameters.\n */\n async deleteChatThread(chatThreadId, options) {\n return tracingClient.withSpan(\"ChatApiClient.deleteChatThread\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ chatThreadId, options }, deleteChatThreadOperationSpec);\n });\n }\n /**\n * ListChatThreadsNext\n * @param nextLink The nextLink from the previous successful call to the ListChatThreads method.\n * @param options The options parameters.\n */\n async listChatThreadsNext(nextLink, options) {\n return tracingClient.withSpan(\"ChatApiClient.listChatThreadsNext\", options !== null && options !== void 0 ? options : {}, async (options) => {\n return this.client.sendOperationRequest({ nextLink, options }, listChatThreadsNextOperationSpec);\n });\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\nconst createChatThreadOperationSpec = {\n path: \"/chat/threads\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CreateChatThreadResult\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n requestBody: Parameters.createChatThreadRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.repeatabilityRequestId\n ],\n mediaType: \"json\",\n serializer\n};\nconst listChatThreadsOperationSpec = {\n path: \"/chat/threads\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatThreadsItemCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.apiVersion,\n Parameters.startTime\n ],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteChatThreadOperationSpec = {\n path: \"/chat/threads/{chatThreadId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.chatThreadId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listChatThreadsNextOperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ChatThreadsItemCollection\n },\n 401: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 403: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 429: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n },\n 503: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n isError: true\n }\n },\n queryParameters: [\n Parameters.maxPageSize,\n Parameters.apiVersion,\n Parameters.startTime\n ],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n//# sourceMappingURL=chat.js.map","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport * as coreClient from \"@azure/core-client\";\nimport { ChatThreadImpl, ChatImpl } from \"./operations\";\nexport class ChatApiClient extends coreClient.ServiceClient {\n /**\n * Initializes a new instance of the ChatApiClient class.\n * @param endpoint The endpoint of the Azure Communication resource.\n * @param options The parameter options\n */\n constructor(endpoint, options) {\n var _a, _b;\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n const packageDetails = `azsdk-js-communication-chat/1.3.2`;\n const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {\n userAgentPrefix\n }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : \"{endpoint}\" });\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2021-09-07\";\n this.chatThread = new ChatThreadImpl(this);\n this.chat = new ChatImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n addCustomApiVersionPolicy(apiVersion) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(request, next) {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n }\n else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n}\n//# sourceMappingURL=chatApiClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"communication-chat\");\n//# sourceMappingURL=logger.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { bearerTokenAuthenticationPolicy, } from \"@azure/core-rest-pipeline\";\n/**\n * Creates a new CommunicationTokenCredentialPolicy factory.\n *\n * @param credential - The CommunicationTokenCredential implementation that can supply the user credential.\n */\nexport const createCommunicationTokenCredentialPolicy = (credential) => {\n const policyOptions = {\n credential: {\n getToken: (_scopes, options) => credential.getToken({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }),\n },\n scopes: [],\n };\n return bearerTokenAuthenticationPolicy(policyOptions);\n};\n//# sourceMappingURL=communicationTokenCredentialPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __rest } from \"tslib\";\nimport { logger } from \"./models/logger\";\nimport { serializeCommunicationIdentifier, } from \"@azure/communication-common\";\nimport { mapToAddChatParticipantsRequestRestModel, mapToChatMessageSdkModel, mapToChatParticipantSdkModel, mapToChatThreadPropertiesSdkModel, mapToReadReceiptSdkModel, } from \"./models/mappers\";\nimport { ChatApiClient } from \"./generated/src\";\nimport { createCommunicationTokenCredentialPolicy } from \"./credential/communicationTokenCredentialPolicy\";\nimport { tracingClient } from \"./generated/src/tracing\";\nconst minimumTypingIntervalInMilliSeconds = 8000;\n/**\n * The client to do chat operations\n */\nexport class ChatThreadClient {\n constructor(endpoint, threadId, credential, options = {}) {\n this.endpoint = endpoint;\n this.timeOfLastTypingRequest = undefined;\n this.threadId = threadId;\n this.tokenCredential = credential;\n const internalPipelineOptions = Object.assign(Object.assign({}, options), {\n loggingOptions: {\n logger: logger.info,\n },\n });\n this.client = new ChatApiClient(this.endpoint, Object.assign({ endpoint: this.endpoint }, internalPipelineOptions));\n const authPolicy = createCommunicationTokenCredentialPolicy(this.tokenCredential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n /**\n * Gets a chat thread.\n * Returns the chat thread.\n * @param options - Operation options.\n */\n getProperties(options = {}) {\n return tracingClient.withSpan(\"ChatClient-GetProperties\", options, async (updatedOptions) => {\n const result = await this.client.chatThread.getChatThreadProperties(this.threadId, updatedOptions);\n return mapToChatThreadPropertiesSdkModel(result);\n });\n }\n /**\n * Updates a thread's topic.\n * @param topic - The topic needs to be updated to.\n * @param options - Operation options.\n */\n updateTopic(topic, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-UpdateTopic\", options, async (updatedOptions) => {\n await this.client.chatThread.updateChatThreadProperties(this.threadId, { topic: topic }, updatedOptions);\n });\n }\n /**\n * Sends a chat message to a thread identified by threadId.\n * Returns the id of the created message.\n * @param request - Request for sending a message.\n * @param options - Operation options.\n */\n sendMessage(request, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-SendMessage\", options, async (updatedOptions) => {\n // reset typing notification clock\n this.timeOfLastTypingRequest = undefined;\n const result = await this.client.chatThread.sendChatMessage(this.threadId, Object.assign(Object.assign({}, request), options), updatedOptions);\n return result;\n });\n }\n /**\n * Gets a chat message identified by messageId.\n * Returns the specific message.\n * @param messageId - The message id of the message.\n * @param options - Operation options.\n */\n getMessage(messageId, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-GetMessage\", options, async (updatedOptions) => {\n const result = await this.client.chatThread.getChatMessage(this.threadId, messageId, updatedOptions);\n return mapToChatMessageSdkModel(result);\n });\n }\n listMessagesPage(pageSettings, options = {}) {\n return __asyncGenerator(this, arguments, function* listMessagesPage_1() {\n if (!pageSettings.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatMessages(this.threadId, options));\n pageSettings.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToChatMessageSdkModel, this));\n }\n }\n while (pageSettings.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatMessagesNext(this.threadId, pageSettings.continuationToken, options));\n pageSettings.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToChatMessageSdkModel, this));\n }\n else {\n break;\n }\n }\n });\n }\n listMessagesAll(options) {\n return __asyncGenerator(this, arguments, function* listMessagesAll_1() {\n var _a, e_1, _b, _c;\n try {\n for (var _d = true, _e = __asyncValues(this.listMessagesPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {\n _c = _f.value;\n _d = false;\n try {\n const page = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(page)));\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Gets a list of message from a thread identified by threadId.\n * Returns the list of the messages.\n * @param options - Get messages options.\n */\n listMessages(options = {}) {\n const { span, updatedOptions } = tracingClient.startSpan(\"ChatThreadClient-ListMessages\", options);\n try {\n const iter = this.listMessagesAll(updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listMessagesPage(settings, updatedOptions);\n },\n };\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Deletes a message identified by threadId and messageId\n * @param messageId - The message id of the message.\n * @param options - Operation options.\n */\n deleteMessage(messageId, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-DeleteMessage\", options, async (updatedOptions) => {\n await this.client.chatThread.deleteChatMessage(this.threadId, messageId, updatedOptions);\n });\n }\n /**\n * Updates a message identified by threadId and messageId\n * @param messageId - The message id of the message.\n * @param options - Operation options.\n */\n async updateMessage(messageId, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-UpdateMessage\", options, async (updatedOptions) => {\n await this.client.chatThread.updateChatMessage(this.threadId, messageId, options, updatedOptions);\n });\n }\n /**\n * Adds the details of chat participants belonging to the thread identified by threadId.\n * @param request - Thread participants' details to add in the thread roster\n * @param options - Operation options.\n */\n async addParticipants(request, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-AddParticipants\", options, async (updatedOptions) => {\n const result = await this.client.chatThread.addChatParticipants(this.threadId, mapToAddChatParticipantsRequestRestModel(request), updatedOptions);\n return result;\n });\n }\n listParticipantsPage(continuationState, options = {}) {\n return __asyncGenerator(this, arguments, function* listParticipantsPage_1() {\n if (!continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatParticipants(this.threadId, options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToChatParticipantSdkModel, this));\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatParticipantsNext(this.threadId, continuationState.continuationToken, options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToChatParticipantSdkModel, this));\n }\n else {\n break;\n }\n }\n });\n }\n listParticipantsAll(options) {\n return __asyncGenerator(this, arguments, function* listParticipantsAll_1() {\n var _a, e_2, _b, _c;\n try {\n for (var _d = true, _e = __asyncValues(this.listParticipantsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {\n _c = _f.value;\n _d = false;\n try {\n const page = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(page)));\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Gets the participants of the thread identified by threadId.\n * Returns the lists of the participants.\n * @param options - Operation options.\n */\n listParticipants(options = {}) {\n const { span, updatedOptions } = tracingClient.startSpan(\"ChatThreadClient-ListParticipants\", options);\n try {\n const iter = this.listParticipantsAll(updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listParticipantsPage(settings, updatedOptions);\n },\n };\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Removes participant from the thread identified by threadId.\n * @param participant - Thread participant to remove from the thread roster\n * @param options - Operation options.\n */\n async removeParticipant(participant, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-RemoveParticipant\", options, async (updatedOptions) => {\n await this.client.chatThread.removeChatParticipant(this.threadId, serializeCommunicationIdentifier(participant), updatedOptions);\n });\n }\n /**\n * Sends a typing notification to the thread.\n * Doesn't attempt to send if the time since last notification is smaller than the minimum typing interval\n * @param options - - Operation options\n * @returns True if the typing message notification could be sent, otherwise false.\n */\n async sendTypingNotification(options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-SendTypingNotification\", options, async (updatedOptions) => {\n const dateNow = new Date();\n const { senderDisplayName } = updatedOptions, restOptions = __rest(updatedOptions, [\"senderDisplayName\"]);\n if (this.canPostTypingNotification(dateNow)) {\n this.timeOfLastTypingRequest = dateNow;\n await this.client.chatThread.sendTypingNotification(this.threadId, Object.assign({ sendTypingNotificationRequest: { senderDisplayName: senderDisplayName } }, restOptions));\n return true;\n }\n logger.info(`Typing Notification NOT Send. [thread_id=${this.threadId}]`);\n return false;\n });\n }\n /**\n * Sends a read receipt to the thread identified by threadId.\n * @param request - Request for sending a read receipt\n * @param options - Operation options.\n */\n async sendReadReceipt(request, options = {}) {\n return tracingClient.withSpan(\"ChatThreadClient-SendReadReceipt\", options, async (updatedOptions) => {\n await this.client.chatThread.sendChatReadReceipt(this.threadId, request, updatedOptions);\n });\n }\n listReadReceiptsPage(continuationState, options = {}) {\n return __asyncGenerator(this, arguments, function* listReadReceiptsPage_1() {\n if (!continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatReadReceipts(this.threadId, options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToReadReceiptSdkModel, this));\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chatThread.listChatReadReceiptsNext(this.threadId, continuationState.continuationToken, options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value.map(mapToReadReceiptSdkModel, this));\n }\n else {\n break;\n }\n }\n });\n }\n listReadReceiptsAll(options) {\n return __asyncGenerator(this, arguments, function* listReadReceiptsAll_1() {\n var _a, e_3, _b, _c;\n try {\n for (var _d = true, _e = __asyncValues(this.listReadReceiptsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {\n _c = _f.value;\n _d = false;\n try {\n const page = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(page)));\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));\n }\n finally { if (e_3) throw e_3.error; }\n }\n });\n }\n /**\n * Gets a list of read receipt from a thread identified by threadId.\n * Returns the list of the messages.\n * @param options - Get messages options.\n */\n listReadReceipts(options = {}) {\n const { span, updatedOptions } = tracingClient.startSpan(\"ChatThreadClient-ListChatReadReceipts\", options);\n try {\n const iter = this.listReadReceiptsAll(updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listReadReceiptsPage(settings, updatedOptions);\n },\n };\n }\n catch (e) {\n span.setStatus({\n status: \"error\",\n error: e,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n canPostTypingNotification(dateNow) {\n if (this.timeOfLastTypingRequest) {\n const timeSinceLastRequestInMilliSeconds = dateNow.getTime() - this.timeOfLastTypingRequest.getTime();\n if (timeSinceLastRequestInMilliSeconds < minimumTypingIntervalInMilliSeconds) {\n logger.info(`Typing interval check failed. [last_request=${this.timeOfLastTypingRequest}]`);\n return false;\n }\n }\n return true;\n }\n}\n//# sourceMappingURL=chatThreadClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nimport { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from \"tslib\";\nimport { mapToChatParticipantRestModel, mapToCreateChatThreadOptionsRestModel, mapToCreateChatThreadResultSdkModel, } from \"./models/mappers\";\nimport { ChatApiClient } from \"./generated/src\";\nimport { ChatThreadClient } from \"./chatThreadClient\";\nimport { EventEmitter } from \"events\";\nimport { createCommunicationTokenCredentialPolicy } from \"./credential/communicationTokenCredentialPolicy\";\nimport { generateUuid } from \"./models/uuid\";\nimport { getSignalingClient } from \"./signaling/signalingClient\";\nimport { logger } from \"./models/logger\";\nimport { tracingClient } from \"./generated/src/tracing\";\n/**\n * The client to do chat operations\n */\nexport class ChatClient {\n /**\n * Creates an instance of the ChatClient for a given resource and user.\n *\n * @param endpoint - The url of the Communication Services resource.\n * @param credential - The token credential. Use AzureCommunicationTokenCredential from \\@azure/communication-common to create a credential.\n * @param options - Additional client options.\n */\n constructor(endpoint, credential, options = {}) {\n this.endpoint = endpoint;\n this.signalingClient = undefined;\n this.emitter = new EventEmitter();\n this.isRealtimeNotificationsStarted = false;\n this.tokenCredential = credential;\n this.clientOptions = Object.assign({}, options);\n const internalPipelineOptions = Object.assign(Object.assign({}, options), {\n loggingOptions: {\n logger: logger.info,\n },\n });\n this.client = new ChatApiClient(this.endpoint, Object.assign({ endpoint: this.endpoint }, internalPipelineOptions));\n const authPolicy = createCommunicationTokenCredentialPolicy(this.tokenCredential);\n this.client.pipeline.addPolicy(authPolicy);\n this.signalingClient = getSignalingClient(credential, logger, options.signalingClientOptions);\n }\n /**\n * Returns ChatThreadClient with the specific thread id.\n * @param threadId - Thread ID for the ChatThreadClient\n */\n getChatThreadClient(threadId) {\n return new ChatThreadClient(this.endpoint, threadId, this.tokenCredential, this.clientOptions);\n }\n /**\n * Creates a chat thread.\n * Returns thread client with the id of the created thread.\n * @param request - Request for creating a chat thread.\n * @param options - Operation options.\n */\n async createChatThread(request, options = {}) {\n return tracingClient.withSpan(\"ChatClient-CreateChatThread\", options, async (updatedOptions) => {\n var _a, _b;\n // We generate an UUID if the user does not provide an idempotencyToken value\n updatedOptions.idempotencyToken = (_a = updatedOptions.idempotencyToken) !== null && _a !== void 0 ? _a : generateUuid();\n const updatedRestModelOptions = mapToCreateChatThreadOptionsRestModel(updatedOptions);\n const result = await this.client.chat.createChatThread({\n topic: request.topic,\n participants: (_b = options.participants) === null || _b === void 0 ? void 0 : _b.map((participant) => mapToChatParticipantRestModel(participant)),\n }, updatedRestModelOptions);\n return mapToCreateChatThreadResultSdkModel(result);\n });\n }\n listChatThreadsPage(continuationState, options = {}) {\n return __asyncGenerator(this, arguments, function* listChatThreadsPage_1() {\n if (!continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chat.listChatThreads(options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = yield __await(this.client.chat.listChatThreadsNext(continuationState.continuationToken, options));\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield yield __await(currentSetResponse.value);\n }\n else {\n break;\n }\n }\n });\n }\n listChatThreadsAll(options) {\n return __asyncGenerator(this, arguments, function* listChatThreadsAll_1() {\n var _a, e_1, _b, _c;\n try {\n for (var _d = true, _e = __asyncValues(this.listChatThreadsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {\n _c = _f.value;\n _d = false;\n try {\n const page = _c;\n yield __await(yield* __asyncDelegator(__asyncValues(page)));\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Gets the list of chat threads of a user.\n * @param options - List chat threads options.\n */\n listChatThreads(options = {}) {\n const { span, updatedOptions } = tracingClient.startSpan(\"ChatClient-ListChatThreads\", options);\n try {\n const iter = this.listChatThreadsAll(updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listChatThreadsPage(settings, updatedOptions);\n },\n };\n }\n catch (e) {\n span.setStatus({\n error: e,\n status: \"error\",\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Deletes a chat thread.\n * @param threadId - The ID of the thread to delete.\n * @param options - Operation options.\n */\n async deleteChatThread(threadId, options = {}) {\n return tracingClient.withSpan(\"ChatClient-DeleteChatThread\", options, async (updatedOptions) => {\n await this.client.chat.deleteChatThread(threadId, updatedOptions);\n });\n }\n /**\n * Start receiving realtime notifications.\n * Call this function before subscribing to any event.\n */\n async startRealtimeNotifications() {\n if (this.signalingClient === undefined) {\n throw new Error(\"Realtime notifications are not supported in node js.\");\n }\n if (this.isRealtimeNotificationsStarted) {\n return;\n }\n this.isRealtimeNotificationsStarted = true;\n await this.signalingClient.start();\n this.subscribeToSignalingEvents();\n }\n /**\n * Stop receiving realtime notifications.\n * This function would unsubscribe to all events.\n */\n async stopRealtimeNotifications() {\n if (this.signalingClient === undefined) {\n throw new Error(\"Realtime notifications are not supported in node js.\");\n }\n this.isRealtimeNotificationsStarted = false;\n await this.signalingClient.stop();\n this.emitter.removeAllListeners();\n }\n on(event, listener) {\n if (this.signalingClient === undefined) {\n throw new Error(\"Realtime notifications are only supported in the browser.\");\n }\n if (!this.isRealtimeNotificationsStarted &&\n event !== \"realTimeNotificationConnected\" &&\n event !== \"realTimeNotificationDisconnected\") {\n throw new Error(\"You must call startRealtimeNotifications before you can subscribe to events.\");\n }\n this.emitter.on(event, listener);\n }\n off(event, listener) {\n if (this.signalingClient === undefined) {\n throw new Error(\"Realtime notifications are only supported in the browser.\");\n }\n this.emitter.removeListener(event, listener);\n }\n subscribeToSignalingEvents() {\n if (this.signalingClient === undefined) {\n throw new Error(\"Realtime notifications are only supported in the browser.\");\n }\n this.signalingClient.on(\"connectionChanged\", (payload) => {\n if (payload === 2 /* ConnectionState.Connected */) {\n this.emitter.emit(\"realTimeNotificationConnected\");\n }\n else if (payload === 3 /* ConnectionState.Disconnected */) {\n this.emitter.emit(\"realTimeNotificationDisconnected\");\n }\n });\n this.signalingClient.on(\"chatMessageReceived\", (payload) => {\n this.emitter.emit(\"chatMessageReceived\", payload);\n });\n this.signalingClient.on(\"chatMessageEdited\", (payload) => {\n this.emitter.emit(\"chatMessageEdited\", payload);\n });\n this.signalingClient.on(\"chatMessageDeleted\", (payload) => {\n this.emitter.emit(\"chatMessageDeleted\", payload);\n });\n this.signalingClient.on(\"typingIndicatorReceived\", (payload) => {\n this.emitter.emit(\"typingIndicatorReceived\", payload);\n });\n this.signalingClient.on(\"readReceiptReceived\", (payload) => {\n this.emitter.emit(\"readReceiptReceived\", payload);\n });\n this.signalingClient.on(\"chatThreadCreated\", (payload) => {\n this.emitter.emit(\"chatThreadCreated\", payload);\n });\n this.signalingClient.on(\"chatThreadDeleted\", (payload) => {\n this.emitter.emit(\"chatThreadDeleted\", payload);\n });\n this.signalingClient.on(\"chatThreadPropertiesUpdated\", (payload) => {\n this.emitter.emit(\"chatThreadPropertiesUpdated\", payload);\n });\n this.signalingClient.on(\"participantsAdded\", (payload) => {\n this.emitter.emit(\"participantsAdded\", payload);\n });\n this.signalingClient.on(\"participantsRemoved\", (payload) => {\n this.emitter.emit(\"participantsRemoved\", payload);\n });\n }\n}\n//# sourceMappingURL=chatClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { CommunicationSignalingClient } from \"@azure/communication-signaling\";\nexport const getSignalingClient = (credential, logger, options) => {\n var _a;\n return new CommunicationSignalingClient(credential, logger, {\n environment: (_a = options === null || options === void 0 ? void 0 : options.environment) !== null && _a !== void 0 ? _a : undefined,\n });\n};\n//# sourceMappingURL=signalingClient.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 as uuidv4 } from \"uuid\";\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n * @internal\n */\nexport function generateUuid() {\n return uuidv4();\n}\n//# sourceMappingURL=uuid.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport jwtDecode from \"jwt-decode\";\nexport const parseToken = (token) => {\n const { exp } = jwtDecode(token);\n return {\n token,\n expiresOnTimestamp: exp * 1000,\n };\n};\n//# sourceMappingURL=tokenParser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { parseToken } from \"./tokenParser\";\nconst expiredToken = { token: \"\", expiresOnTimestamp: -10 };\nconst minutesToMs = (minutes) => minutes * 1000 * 60;\nconst defaultExpiringSoonInterval = minutesToMs(10);\nconst defaultRefreshAfterLifetimePercentage = 0.5;\nexport class AutoRefreshTokenCredential {\n constructor(refreshArgs) {\n this.expiringSoonIntervalInMs = defaultExpiringSoonInterval;\n this.refreshAfterLifetimePercentage = defaultRefreshAfterLifetimePercentage;\n this.activeTokenFetching = null;\n this.activeTokenUpdating = null;\n this.disposed = false;\n const { tokenRefresher, token, refreshProactively } = refreshArgs;\n this.refresh = tokenRefresher;\n this.currentToken = token ? parseToken(token) : expiredToken;\n this.refreshProactively = refreshProactively !== null && refreshProactively !== void 0 ? refreshProactively : false;\n if (this.refreshProactively) {\n this.scheduleRefresh();\n }\n }\n async getToken(options) {\n if (!this.isTokenExpiringSoon(this.currentToken)) {\n return this.currentToken;\n }\n if (!this.isTokenValid(this.currentToken)) {\n const updatePromise = this.updateTokenAndReschedule(options === null || options === void 0 ? void 0 : options.abortSignal);\n await updatePromise;\n }\n return this.currentToken;\n }\n dispose() {\n this.disposed = true;\n this.activeTokenFetching = null;\n this.activeTokenUpdating = null;\n this.currentToken = expiredToken;\n if (this.activeTimeout) {\n clearTimeout(this.activeTimeout);\n }\n }\n async updateTokenAndReschedule(abortSignal) {\n if (this.activeTokenUpdating) {\n return this.activeTokenUpdating;\n }\n this.activeTokenUpdating = this.refreshTokenAndReschedule(abortSignal);\n try {\n await this.activeTokenUpdating;\n }\n finally {\n this.activeTokenUpdating = null;\n }\n }\n async refreshTokenAndReschedule(abortSignal) {\n const newToken = await this.refreshToken(abortSignal);\n if (!this.isTokenValid(newToken)) {\n throw new Error(\"The token returned from the tokenRefresher is expired.\");\n }\n this.currentToken = newToken;\n if (this.refreshProactively) {\n this.scheduleRefresh();\n }\n }\n async refreshToken(abortSignal) {\n try {\n if (!this.activeTokenFetching) {\n this.activeTokenFetching = this.refresh(abortSignal);\n }\n return parseToken(await this.activeTokenFetching);\n }\n finally {\n this.activeTokenFetching = null;\n }\n }\n scheduleRefresh() {\n if (this.disposed) {\n return;\n }\n if (this.activeTimeout) {\n clearTimeout(this.activeTimeout);\n }\n const tokenTtlInMs = this.currentToken.expiresOnTimestamp - Date.now();\n let timespanInMs = null;\n if (this.isTokenExpiringSoon(this.currentToken)) {\n // Schedule the next refresh for when it reaches a certain percentage of the remaining lifetime.\n timespanInMs = tokenTtlInMs * this.refreshAfterLifetimePercentage;\n }\n else {\n // Schedule the next refresh for when it gets in to the soon-to-expire window.\n timespanInMs = tokenTtlInMs - this.expiringSoonIntervalInMs;\n }\n this.activeTimeout = setTimeout(() => this.updateTokenAndReschedule(), timespanInMs);\n }\n isTokenValid(token) {\n return token && Date.now() < token.expiresOnTimestamp;\n }\n isTokenExpiringSoon(token) {\n return !token || Date.now() >= token.expiresOnTimestamp - this.expiringSoonIntervalInMs;\n }\n}\n//# sourceMappingURL=autoRefreshTokenCredential.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * StaticTokenCredential\n */\nexport class StaticTokenCredential {\n constructor(token) {\n this.token = token;\n }\n async getToken() {\n return this.token;\n }\n dispose() {\n /* intentionally empty */\n }\n}\n//# sourceMappingURL=staticTokenCredential.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AutoRefreshTokenCredential, } from \"./autoRefreshTokenCredential\";\nimport { StaticTokenCredential } from \"./staticTokenCredential\";\nimport { parseToken } from \"./tokenParser\";\n/**\n * The CommunicationTokenCredential implementation with support for proactive token refresh.\n */\nexport class AzureCommunicationTokenCredential {\n constructor(tokenOrRefreshOptions) {\n this.disposed = false;\n if (typeof tokenOrRefreshOptions === \"string\") {\n this.tokenCredential = new StaticTokenCredential(parseToken(tokenOrRefreshOptions));\n }\n else {\n this.tokenCredential = new AutoRefreshTokenCredential(tokenOrRefreshOptions);\n }\n }\n /**\n * Gets an `AccessToken` for the user. Throws if already disposed.\n * @param abortSignal - An implementation of `AbortSignalLike` to cancel the operation.\n */\n async getToken(options) {\n this.throwIfDisposed();\n const token = await this.tokenCredential.getToken(options);\n this.throwIfDisposed();\n return token;\n }\n /**\n * Disposes the CommunicationTokenCredential and cancels any internal auto-refresh operation.\n */\n dispose() {\n this.disposed = true;\n this.tokenCredential.dispose();\n }\n throwIfDisposed() {\n if (this.disposed) {\n throw new Error(\"User credential is disposed\");\n }\n }\n}\n//# sourceMappingURL=azureCommunicationTokenCredential.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getIdentifierKind, getIdentifierRawId, } from \"./identifierModels\";\nconst assertNotNullOrUndefined = (obj, prop) => {\n const subObjName = Object.keys(obj)[0];\n const subObj = obj[subObjName];\n if (prop in subObj) {\n return subObj[prop];\n }\n throw new Error(`Property ${prop} is required for identifier of type ${subObjName}.`);\n};\nconst assertMaximumOneNestedModel = (identifier) => {\n const presentProperties = [];\n if (identifier.communicationUser !== undefined) {\n presentProperties.push(\"communicationUser\");\n }\n if (identifier.microsoftTeamsUser !== undefined) {\n presentProperties.push(\"microsoftTeamsUser\");\n }\n if (identifier.microsoftTeamsApp !== undefined) {\n presentProperties.push(\"microsoftTeamsApp\");\n }\n if (identifier.phoneNumber !== undefined) {\n presentProperties.push(\"phoneNumber\");\n }\n if (presentProperties.length > 1) {\n throw new Error(`Only one of the properties in ${JSON.stringify(presentProperties)} should be present.`);\n }\n};\n/**\n * @hidden\n * Translates a CommunicationIdentifier to its serialized format for sending a request.\n * @param identifier - The CommunicationIdentifier to be serialized.\n */\nexport const serializeCommunicationIdentifier = (identifier) => {\n var _a, _b, _c, _d, _e, _f;\n const identifierKind = getIdentifierKind(identifier);\n switch (identifierKind.kind) {\n case \"communicationUser\":\n return {\n rawId: getIdentifierRawId(identifierKind),\n communicationUser: { id: identifierKind.communicationUserId },\n };\n case \"phoneNumber\":\n return {\n rawId: (_a = identifierKind.rawId) !== null && _a !== void 0 ? _a : getIdentifierRawId(identifierKind),\n phoneNumber: {\n value: identifierKind.phoneNumber,\n },\n };\n case \"microsoftTeamsUser\":\n return {\n rawId: (_b = identifierKind.rawId) !== null && _b !== void 0 ? _b : getIdentifierRawId(identifierKind),\n microsoftTeamsUser: {\n userId: identifierKind.microsoftTeamsUserId,\n isAnonymous: (_c = identifierKind.isAnonymous) !== null && _c !== void 0 ? _c : false,\n cloud: (_d = identifierKind.cloud) !== null && _d !== void 0 ? _d : \"public\",\n },\n };\n case \"microsoftTeamsApp\":\n return {\n rawId: (_e = identifierKind.rawId) !== null && _e !== void 0 ? _e : getIdentifierRawId(identifierKind),\n microsoftTeamsApp: {\n teamsAppId: identifierKind.teamsAppId,\n cloud: (_f = identifierKind.cloud) !== null && _f !== void 0 ? _f : \"public\",\n },\n };\n case \"unknown\":\n return { rawId: identifierKind.id };\n default:\n throw new Error(`Can't serialize an identifier with kind ${identifierKind.kind}`);\n }\n};\nconst getKind = (serializedIdentifier) => {\n if (serializedIdentifier.communicationUser) {\n return \"communicationUser\";\n }\n if (serializedIdentifier.phoneNumber) {\n return \"phoneNumber\";\n }\n if (serializedIdentifier.microsoftTeamsUser) {\n return \"microsoftTeamsUser\";\n }\n if (serializedIdentifier.microsoftTeamsApp) {\n return \"microsoftTeamsApp\";\n }\n return \"unknown\";\n};\n/**\n * @hidden\n * Translates the serialized format of a communication identifier to CommunicationIdentifier.\n * @param serializedIdentifier - The SerializedCommunicationIdentifier to be deserialized.\n */\nexport const deserializeCommunicationIdentifier = (serializedIdentifier) => {\n var _a;\n assertMaximumOneNestedModel(serializedIdentifier);\n const { communicationUser, microsoftTeamsUser, microsoftTeamsApp, phoneNumber } = serializedIdentifier;\n const kind = (_a = serializedIdentifier.kind) !== null && _a !== void 0 ? _a : getKind(serializedIdentifier);\n if (kind === \"communicationUser\" && communicationUser) {\n return {\n kind: \"communicationUser\",\n communicationUserId: assertNotNullOrUndefined({ communicationUser }, \"id\"),\n };\n }\n if (kind === \"phoneNumber\" && phoneNumber) {\n return {\n kind: \"phoneNumber\",\n phoneNumber: assertNotNullOrUndefined({ phoneNumber }, \"value\"),\n rawId: assertNotNullOrUndefined({ phoneNumber: serializedIdentifier }, \"rawId\"),\n };\n }\n if (kind === \"microsoftTeamsUser\" && microsoftTeamsUser) {\n return {\n kind: \"microsoftTeamsUser\",\n microsoftTeamsUserId: assertNotNullOrUndefined({ microsoftTeamsUser }, \"userId\"),\n isAnonymous: assertNotNullOrUndefined({ microsoftTeamsUser }, \"isAnonymous\"),\n cloud: assertNotNullOrUndefined({ microsoftTeamsUser }, \"cloud\"),\n rawId: assertNotNullOrUndefined({ microsoftTeamsUser: serializedIdentifier }, \"rawId\"),\n };\n }\n if (kind === \"microsoftTeamsApp\" && microsoftTeamsApp) {\n return {\n kind: \"microsoftTeamsApp\",\n teamsAppId: assertNotNullOrUndefined({ microsoftTeamsApp }, \"teamsAppId\"),\n cloud: assertNotNullOrUndefined({ microsoftTeamsApp }, \"cloud\"),\n rawId: assertNotNullOrUndefined({ microsoftTeamsApp: serializedIdentifier }, \"rawId\"),\n };\n }\n return {\n kind: \"unknown\",\n id: assertNotNullOrUndefined({ unknown: serializedIdentifier }, \"rawId\"),\n };\n};\n//# sourceMappingURL=identifierModelSerializer.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Tests an Identifier to determine whether it implements CommunicationUserIdentifier.\n *\n * @param identifier - The assumed CommunicationUserIdentifier to be tested.\n */\nexport const isCommunicationUserIdentifier = (identifier) => {\n return typeof identifier.communicationUserId === \"string\";\n};\n/**\n * Tests an Identifier to determine whether it implements PhoneNumberIdentifier.\n *\n * @param identifier - The assumed PhoneNumberIdentifier to be tested.\n */\nexport const isPhoneNumberIdentifier = (identifier) => {\n return typeof identifier.phoneNumber === \"string\";\n};\n/**\n * Tests an Identifier to determine whether it implements MicrosoftTeamsUserIdentifier.\n *\n * @param identifier - The assumed available to be tested.\n */\nexport const isMicrosoftTeamsUserIdentifier = (identifier) => {\n return typeof identifier.microsoftTeamsUserId === \"string\";\n};\n/**\n * Tests an Identifier to determine whether it implements MicrosoftTeamsAppIdentifier.\n *\n * @param identifier - The assumed available to be tested.\n */\nexport const isMicrosoftTeamsAppIdentifier = (identifier) => {\n return typeof identifier.teamsAppId === \"string\";\n};\n/**\n * Tests an Identifier to determine whether it implements UnknownIdentifier.\n *\n * @param identifier - The assumed UnknownIdentifier to be tested.\n */\nexport const isUnknownIdentifier = (identifier) => {\n return typeof identifier.id === \"string\";\n};\n/**\n * Returns the CommunicationIdentifierKind for a given CommunicationIdentifier. Returns undefined if the kind couldn't be inferred.\n *\n * @param identifier - The identifier whose kind is to be inferred.\n */\nexport const getIdentifierKind = (identifier) => {\n if (isCommunicationUserIdentifier(identifier)) {\n return Object.assign(Object.assign({}, identifier), { kind: \"communicationUser\" });\n }\n if (isPhoneNumberIdentifier(identifier)) {\n return Object.assign(Object.assign({}, identifier), { kind: \"phoneNumber\" });\n }\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n return Object.assign(Object.assign({}, identifier), { kind: \"microsoftTeamsUser\" });\n }\n if (isMicrosoftTeamsAppIdentifier(identifier)) {\n return Object.assign(Object.assign({}, identifier), { kind: \"microsoftTeamsApp\" });\n }\n return Object.assign(Object.assign({}, identifier), { kind: \"unknown\" });\n};\n/**\n * Returns the rawId for a given CommunicationIdentifier. You can use the rawId for encoding the identifier and then use it as a key in a database.\n *\n * @param identifier - The identifier to be translated to its rawId.\n */\nexport const getIdentifierRawId = (identifier) => {\n const identifierKind = getIdentifierKind(identifier);\n switch (identifierKind.kind) {\n case \"communicationUser\":\n return identifierKind.communicationUserId;\n case \"microsoftTeamsUser\": {\n const { microsoftTeamsUserId, rawId, cloud, isAnonymous } = identifierKind;\n if (rawId)\n return rawId;\n if (isAnonymous)\n return `8:teamsvisitor:${microsoftTeamsUserId}`;\n switch (cloud) {\n case \"dod\":\n return `8:dod:${microsoftTeamsUserId}`;\n case \"gcch\":\n return `8:gcch:${microsoftTeamsUserId}`;\n case \"public\":\n return `8:orgid:${microsoftTeamsUserId}`;\n }\n return `8:orgid:${microsoftTeamsUserId}`;\n }\n case \"microsoftTeamsApp\": {\n const { teamsAppId, rawId, cloud } = identifierKind;\n if (rawId)\n return rawId;\n switch (cloud) {\n case \"dod\":\n return `28:dod:${teamsAppId}`;\n case \"gcch\":\n return `28:gcch:${teamsAppId}`;\n }\n return `28:orgid:${teamsAppId}`;\n }\n case \"phoneNumber\": {\n const { phoneNumber, rawId } = identifierKind;\n if (rawId)\n return rawId;\n return `4:${phoneNumber}`;\n }\n case \"unknown\": {\n return identifierKind.id;\n }\n }\n};\nconst buildMicrosoftTeamsAppIdentifier = (teamsAppId, cloud) => {\n return {\n kind: \"microsoftTeamsApp\",\n teamsAppId: teamsAppId,\n cloud: cloud,\n };\n};\nconst buildMicrosoftTeamsUserIdentifier = (id, cloud, isAnonymous) => {\n return {\n kind: \"microsoftTeamsUser\",\n microsoftTeamsUserId: id,\n isAnonymous: isAnonymous,\n cloud: cloud,\n };\n};\n/**\n * Creates a CommunicationIdentifierKind from a given rawId. When storing rawIds use this function to restore the identifier that was encoded in the rawId.\n *\n * @param rawId - The rawId to be translated to its identifier representation.\n */\nexport const createIdentifierFromRawId = (rawId) => {\n if (rawId.startsWith(\"4:\")) {\n return { kind: \"phoneNumber\", phoneNumber: `${rawId.substring(\"4:\".length)}` };\n }\n const segments = rawId.split(\":\");\n if (segments.length !== 3) {\n return { kind: \"unknown\", id: rawId };\n }\n const prefix = `${segments[0]}:${segments[1]}:`;\n const suffix = segments[2];\n switch (prefix) {\n case \"8:teamsvisitor:\":\n return { kind: \"microsoftTeamsUser\", microsoftTeamsUserId: suffix, isAnonymous: true };\n case \"8:orgid:\":\n return buildMicrosoftTeamsUserIdentifier(suffix, \"public\", false);\n case \"8:dod:\":\n return buildMicrosoftTeamsUserIdentifier(suffix, \"dod\", false);\n case \"8:gcch:\":\n return buildMicrosoftTeamsUserIdentifier(suffix, \"gcch\", false);\n case \"8:acs:\":\n case \"8:spool:\":\n case \"8:dod-acs:\":\n case \"8:gcch-acs:\":\n return { kind: \"communicationUser\", communicationUserId: rawId };\n case \"28:orgid:\":\n return buildMicrosoftTeamsAppIdentifier(suffix, \"public\");\n case \"28:gcch:\":\n return buildMicrosoftTeamsAppIdentifier(suffix, \"gcch\");\n case \"28:dod:\":\n return buildMicrosoftTeamsAppIdentifier(suffix, \"dod\");\n }\n return { kind: \"unknown\", id: rawId };\n};\n//# sourceMappingURL=identifierModels.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const encodeUTF8 = (str) => new TextEncoder().encode(str);\nexport function encodeUTF8fromBase64(str) {\n if (typeof atob !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `atob` function\");\n }\n const binary = atob(str);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\nexport function encodeBase64(value) {\n if (typeof btoa !== \"function\") {\n throw new Error(\"Your browser environment is missing the global `btoa` function\");\n }\n const bytes = new Uint8Array(value);\n let binary = \"\";\n for (const byte of bytes) {\n binary += String.fromCharCode(byte);\n }\n return btoa(binary);\n}\n//# sourceMappingURL=encodeUtils.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a;\n/// \nimport { encodeBase64, encodeUTF8, encodeUTF8fromBase64 } from \"./encodeUtils.browser\";\nconst subtle = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.subtle;\nexport const shaHash = async (content) => {\n const data = encodeUTF8(content);\n const hash = await subtle.digest(\"SHA-256\", data);\n return encodeBase64(hash);\n};\nexport const shaHMAC = async (secret, content) => {\n const importParams = { name: \"HMAC\", hash: { name: \"SHA-256\" } };\n const encodedMessage = encodeUTF8(content);\n const encodedKey = encodeUTF8fromBase64(secret);\n const crypto = subtle;\n const cryptoKey = await crypto.importKey(\"raw\", encodedKey, importParams, false, [\"sign\"]);\n const signature = await crypto.sign(importParams, cryptoKey, encodedMessage);\n return encodeBase64(signature);\n};\n//# sourceMappingURL=cryptoUtils.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { shaHMAC, shaHash } from \"./cryptoUtils\";\nimport { isNode } from \"@azure/core-util\";\n/**\n * CommunicationKeyCredentialPolicy provides a means of signing requests made through\n * the SmsClient.\n */\nconst communicationAccessKeyCredentialPolicy = \"CommunicationAccessKeyCredentialPolicy\";\n/**\n * Creates an HTTP pipeline policy to authenticate a request using a `KeyCredential`.\n * @hidden\n *\n * @param credential - The key credential.\n */\nexport function createCommunicationAccessKeyCredentialPolicy(credential) {\n return {\n name: communicationAccessKeyCredentialPolicy,\n async sendRequest(request, next) {\n var _a;\n const verb = request.method.toUpperCase();\n const utcNow = new Date().toUTCString();\n const contentHash = await shaHash(((_a = request.body) === null || _a === void 0 ? void 0 : _a.toString()) || \"\");\n const dateHeader = \"x-ms-date\";\n const signedHeaders = `${dateHeader};host;x-ms-content-sha256`;\n const url = new URL(request.url);\n const query = url.searchParams.toString();\n const urlPathAndQuery = query ? `${url.pathname}?${query}` : url.pathname;\n const port = url.port;\n const hostAndPort = port ? `${url.host}:${port}` : url.host;\n const stringToSign = `${verb}\\n${urlPathAndQuery}\\n${utcNow};${hostAndPort};${contentHash}`;\n const signature = await shaHMAC(credential.key, stringToSign);\n if (isNode) {\n request.headers.set(\"Host\", hostAndPort || \"\");\n }\n request.headers.set(dateHeader, utcNow);\n request.headers.set(\"x-ms-content-sha256\", contentHash);\n request.headers.set(\"Authorization\", `HMAC-SHA256 SignedHeaders=${signedHeaders}&Signature=${signature}`);\n return next(request);\n },\n };\n}\n//# sourceMappingURL=communicationAccessKeyCredentialPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { bearerTokenAuthenticationPolicy, } from \"@azure/core-rest-pipeline\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { createCommunicationAccessKeyCredentialPolicy } from \"./communicationAccessKeyCredentialPolicy\";\n/**\n * Creates a pipeline policy to authenticate request based\n * on the credential passed in.\n * @hidden\n *\n * @param credential - The KeyCredential or TokenCredential.\n */\nexport function createCommunicationAuthPolicy(credential) {\n if (isTokenCredential(credential)) {\n const policyOptions = {\n credential: credential,\n scopes: [\"https://communication.azure.com//.default\"],\n };\n return bearerTokenAuthenticationPolicy(policyOptions);\n }\n else {\n return createCommunicationAccessKeyCredentialPolicy(credential);\n }\n}\n//# sourceMappingURL=communicationAuthPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AzureKeyCredential } from \"@azure/core-auth\";\n// TODO: update when connection string format is finalized\nconst CONNECTION_STRING_REGEX = /endpoint=(.*);accesskey=(.*)/i;\nconst tryParseConnectionString = (s) => {\n const match = s.match(CONNECTION_STRING_REGEX);\n if ((match === null || match === void 0 ? void 0 : match[1]) && match[2]) {\n return { endpoint: match[1], credential: new AzureKeyCredential(match[2]) };\n }\n return undefined;\n};\n/**\n * Returns an EndpointCredential to easily access properties of the connection string.\n * @hidden\n *\n * @param connectionString - The connection string to parse\n * @returns Object to access the endpoint and the credentials\n */\nexport const parseConnectionString = (connectionString) => {\n const parsedConnectionString = tryParseConnectionString(connectionString);\n if (parsedConnectionString) {\n return parsedConnectionString;\n }\n else {\n throw new Error(`Invalid connection string ${connectionString}`);\n }\n};\n//# sourceMappingURL=connectionString.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { parseConnectionString } from \"./connectionString\";\nconst isValidEndpoint = (host) => {\n var _a;\n const url = new URL(host);\n return (!!((_a = url.protocol) === null || _a === void 0 ? void 0 : _a.match(/^http[s]?/)) &&\n url.host !== undefined &&\n url.host !== \"\" &&\n (url.pathname === undefined || url.pathname === \"\" || url.pathname === \"/\"));\n};\nconst assertValidEndpoint = (host) => {\n if (!isValidEndpoint(host)) {\n throw new Error(`Invalid endpoint url ${host}`);\n }\n};\n/**\n * Checks whether a value is a KeyCredential.\n *\n * @param credential - The credential being checked.\n */\nexport const isKeyCredential = (credential) => {\n const castCredential = credential;\n return (castCredential &&\n typeof castCredential.key === \"string\" &&\n castCredential.getToken === undefined);\n};\n/**\n * Parses arguments passed to a communication client.\n * @hidden\n */\nexport const parseClientArguments = (connectionStringOrUrl, credentialOrOptions) => {\n if (isKeyCredential(credentialOrOptions) || isTokenCredential(credentialOrOptions)) {\n assertValidEndpoint(connectionStringOrUrl);\n return { url: connectionStringOrUrl, credential: credentialOrOptions };\n }\n else {\n const { endpoint: host, credential } = parseConnectionString(connectionStringOrUrl);\n assertValidEndpoint(host);\n return { url: host, credential };\n }\n};\n//# sourceMappingURL=clientArguments.js.map"],"names":["AbortError","Error","constructor","message","super","this","name","mapToChatParticipantRestModel","chatParticipant","id","rest","Object","assign","communicationIdentifier","mapToChatParticipantSdkModel","mapToChatContentSdkModel","content","participants","initiatorCommunicationIdentifier","otherChatContents","result","initiator","map","participant","mapToChatMessageSdkModel","chatMessage","senderCommunicationIdentifier","otherChatMessage","sender","mapToChatThreadPropertiesSdkModel","chatThread","createdByCommunicationIdentifier","createdBy","mapToReadReceiptSdkModel","readReceipt","namespace","packageName","packageVersion","ChatMessageReadReceiptsCollection","type","className","modelProperties","value","serializedName","required","element","nextLink","readOnly","ChatMessageReadReceipt","chatMessageId","readOn","CommunicationIdentifierModel","rawId","communicationUser","phoneNumber","microsoftTeamsUser","CommunicationUserIdentifierModel","PhoneNumberIdentifierModel","MicrosoftTeamsUserIdentifierModel","userId","isAnonymous","cloud","CommunicationErrorResponse","error","ChatError","code","target","details","innerError","SendReadReceiptRequest","SendChatMessageRequest","senderDisplayName","allowedValues","metadata","SendChatMessageResult","ChatMessagesCollection","ChatMessage","sequenceId","version","createdOn","deletedOn","editedOn","ChatMessageContent","topic","ChatParticipant","displayName","shareHistoryTime","UpdateChatMessageRequest","ChatParticipantsCollection","AddChatParticipantsRequest","AddChatParticipantsResult","invalidParticipants","CreateChatThreadRequest","CreateChatThreadResult","ChatThreadProperties","ChatThreadsItemCollection","ChatThreadItem","lastMessageReceivedOn","UpdateChatThreadRequest","SendTypingNotificationRequest","accept","parameterPath","mapper","defaultValue","isConstant","endpoint","skipEncoding","chatThreadId","maxPageSize","skip","apiVersion","contentType","sendReadReceiptRequest","sendChatMessageRequest","startTime","contentType1","updateChatMessageRequest","participantCommunicationIdentifier","addChatParticipantsRequest","updateChatThreadRequest","sendTypingNotificationRequest","createChatThreadRequest","ChatThreadImpl","client","listChatReadReceipts","options","async","sendOperationRequest","listChatReadReceiptsOperationSpec","sendChatReadReceipt","sendChatReadReceiptOperationSpec","sendChatMessage","sendChatMessageOperationSpec","listChatMessages","listChatMessagesOperationSpec","getChatMessage","getChatMessageOperationSpec","updateChatMessage","updateChatMessageOperationSpec","deleteChatMessage","deleteChatMessageOperationSpec","listChatParticipants","listChatParticipantsOperationSpec","removeChatParticipant","removeChatParticipantOperationSpec","addChatParticipants","addChatParticipantsOperationSpec","updateChatThreadProperties","updateChatThreadPropertiesOperationSpec","getChatThreadProperties","getChatThreadPropertiesOperationSpec","sendTypingNotification","sendTypingNotificationOperationSpec","listChatReadReceiptsNext","listChatReadReceiptsNextOperationSpec","listChatMessagesNext","listChatMessagesNextOperationSpec","listChatParticipantsNext","listChatParticipantsNextOperationSpec","path","httpMethod","responses","bodyMapper","isError","queryParameters","urlParameters","headerParameters","serializer","requestBody","mediaType","ChatImpl","createChatThread","createChatThreadOperationSpec","listChatThreads","listChatThreadsOperationSpec","deleteChatThread","deleteChatThreadOperationSpec","listChatThreadsNext","listChatThreadsNextOperationSpec","ChatApiClient","_a","_b","undefined","packageDetails","userAgentPrefix","userAgentOptions","requestContentType","baseUri","chat","addCustomApiVersionPolicy","apiVersionPolicy","sendRequest","request","next","param","url","split","length","newParams","item","indexOf","join","pipeline","addPolicy","logger","createClientLogger","createCommunicationTokenCredentialPolicy","credential","policyOptions","getToken","_scopes","abortSignal","scopes","bearerTokenAuthenticationPolicy","ChatThreadClient","threadId","timeOfLastTypingRequest","tokenCredential","internalPipelineOptions","loggingOptions","info","authPolicy","getProperties","updatedOptions","updateTopic","sendMessage","getMessage","messageId","listMessagesPage","pageSettings","arguments","continuationToken","currentSetResponse","listMessagesAll","e_1","_c","_f","_d","_e","done","page","e_1_1","return","call","listMessages","span","iter","Symbol","asyncIterator","byPage","settings","e","setStatus","status","end","deleteMessage","updateMessage","addParticipants","addParticipantsRequest","listParticipantsPage","continuationState","listParticipantsAll","e_2","e_2_1","listParticipants","removeParticipant","dateNow","Date","restOptions","canPostTypingNotification","sendReadReceipt","listReadReceiptsPage","listReadReceiptsAll","e_3","e_3_1","listReadReceipts","getTime","ChatClient","signalingClient","emitter","EventEmitter","isRealtimeNotificationsStarted","clientOptions","CommunicationSignalingClient","environment","getSignalingClient","signalingClientOptions","getChatThreadClient","idempotencyToken","updatedRestModelOptions","repeatabilityRequestId","mapToCreateChatThreadOptionsRestModel","mapToCreateChatThreadResultSdkModel","listChatThreadsPage","listChatThreadsAll","startRealtimeNotifications","start","subscribeToSignalingEvents","stopRealtimeNotifications","stop","removeAllListeners","on","event","listener","off","removeListener","payload","emit","parseToken","token","exp","expiresOnTimestamp","expiredToken","defaultExpiringSoonInterval","AutoRefreshTokenCredential","refreshArgs","expiringSoonIntervalInMs","refreshAfterLifetimePercentage","activeTokenFetching","activeTokenUpdating","disposed","tokenRefresher","refreshProactively","refresh","currentToken","scheduleRefresh","isTokenExpiringSoon","isTokenValid","updatePromise","updateTokenAndReschedule","dispose","activeTimeout","clearTimeout","refreshTokenAndReschedule","newToken","refreshToken","tokenTtlInMs","now","timespanInMs","setTimeout","StaticTokenCredential","AzureCommunicationTokenCredential","tokenOrRefreshOptions","throwIfDisposed","assertNotNullOrUndefined","obj","prop","subObjName","keys","subObj","serializeCommunicationIdentifier","identifier","identifierKind","kind","communicationUserId","microsoftTeamsUserId","microsoftTeamsApp","teamsAppId","deserializeCommunicationIdentifier","serializedIdentifier","presentProperties","push","JSON","stringify","assertMaximumOneNestedModel","getKind","unknown","isCommunicationUserIdentifier","isPhoneNumberIdentifier","isMicrosoftTeamsUserIdentifier","isMicrosoftTeamsAppIdentifier","isUnknownIdentifier","getIdentifierKind","getIdentifierRawId","buildMicrosoftTeamsAppIdentifier","buildMicrosoftTeamsUserIdentifier","createIdentifierFromRawId","startsWith","substring","segments","prefix","suffix","encodeUTF8","str","TextEncoder","encode","encodeBase64","btoa","bytes","Uint8Array","binary","byte","String","fromCharCode","subtle","globalThis","crypto","shaHash","data","digest","shaHMAC","secret","importParams","hash","encodedMessage","encodedKey","atob","i","charCodeAt","encodeUTF8fromBase64","cryptoKey","importKey","sign","communicationAccessKeyCredentialPolicy","createCommunicationAccessKeyCredentialPolicy","verb","method","toUpperCase","utcNow","toUTCString","contentHash","body","toString","dateHeader","signedHeaders","URL","query","searchParams","urlPathAndQuery","pathname","port","hostAndPort","host","stringToSign","signature","key","headers","set","createCommunicationAuthPolicy","CONNECTION_STRING_REGEX","parseConnectionString","connectionString","parsedConnectionString","s","match","tryParseConnectionString","assertValidEndpoint","protocol","isValidEndpoint","isKeyCredential","castCredential","parseClientArguments","connectionStringOrUrl","credentialOrOptions"],"sourceRoot":""}