UNPKG

@azure/communication-chat

Version:
944 lines 27.8 kB
"use strict"; /* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.discriminators = exports.NoneRetentionPolicy = exports.ThreadCreationDateRetentionPolicy = exports.SendTypingNotificationRequest = exports.UpdateChatThreadRequest = exports.ChatThreadItem = exports.ChatThreadsItemCollection = exports.ChatThreadProperties = exports.CreateChatThreadResult = exports.ChatRetentionPolicy = exports.CreateChatThreadRequest = exports.AddChatParticipantsResult = exports.AddChatParticipantsRequest = exports.ChatParticipantsCollection = exports.UpdateChatMessageRequest = exports.ChatAttachment = exports.ChatParticipant = exports.ChatMessageContent = exports.ChatMessage = exports.ChatMessagesCollection = exports.SendChatMessageResult = exports.SendChatMessageRequest = exports.SendReadReceiptRequest = exports.ChatError = exports.CommunicationErrorResponse = exports.MicrosoftTeamsAppIdentifierModel = exports.MicrosoftTeamsUserIdentifierModel = exports.PhoneNumberIdentifierModel = exports.CommunicationUserIdentifierModel = exports.CommunicationIdentifierModel = exports.ChatMessageReadReceipt = exports.ChatMessageReadReceiptsCollection = void 0; exports.ChatMessageReadReceiptsCollection = { type: { name: "Composite", className: "ChatMessageReadReceiptsCollection", modelProperties: { value: { serializedName: "value", required: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatMessageReadReceipt", }, }, }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, }, }, }; exports.ChatMessageReadReceipt = { type: { name: "Composite", className: "ChatMessageReadReceipt", modelProperties: { senderCommunicationIdentifier: { serializedName: "senderCommunicationIdentifier", type: { name: "Composite", className: "CommunicationIdentifierModel", }, }, chatMessageId: { serializedName: "chatMessageId", required: true, type: { name: "String", }, }, readOn: { serializedName: "readOn", required: true, type: { name: "DateTime", }, }, }, }, }; exports.CommunicationIdentifierModel = { type: { name: "Composite", className: "CommunicationIdentifierModel", modelProperties: { kind: { serializedName: "kind", type: { name: "String", }, }, rawId: { serializedName: "rawId", type: { name: "String", }, }, communicationUser: { serializedName: "communicationUser", type: { name: "Composite", className: "CommunicationUserIdentifierModel", }, }, phoneNumber: { serializedName: "phoneNumber", type: { name: "Composite", className: "PhoneNumberIdentifierModel", }, }, microsoftTeamsUser: { serializedName: "microsoftTeamsUser", type: { name: "Composite", className: "MicrosoftTeamsUserIdentifierModel", }, }, microsoftTeamsApp: { serializedName: "microsoftTeamsApp", type: { name: "Composite", className: "MicrosoftTeamsAppIdentifierModel", }, }, }, }, }; exports.CommunicationUserIdentifierModel = { type: { name: "Composite", className: "CommunicationUserIdentifierModel", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, }, }, }; exports.PhoneNumberIdentifierModel = { type: { name: "Composite", className: "PhoneNumberIdentifierModel", modelProperties: { value: { serializedName: "value", required: true, type: { name: "String", }, }, }, }, }; exports.MicrosoftTeamsUserIdentifierModel = { type: { name: "Composite", className: "MicrosoftTeamsUserIdentifierModel", modelProperties: { userId: { serializedName: "userId", required: true, type: { name: "String", }, }, isAnonymous: { serializedName: "isAnonymous", type: { name: "Boolean", }, }, cloud: { serializedName: "cloud", type: { name: "String", }, }, }, }, }; exports.MicrosoftTeamsAppIdentifierModel = { type: { name: "Composite", className: "MicrosoftTeamsAppIdentifierModel", modelProperties: { appId: { serializedName: "appId", required: true, type: { name: "String", }, }, cloud: { serializedName: "cloud", type: { name: "String", }, }, }, }, }; exports.CommunicationErrorResponse = { type: { name: "Composite", className: "CommunicationErrorResponse", modelProperties: { error: { serializedName: "error", type: { name: "Composite", className: "ChatError", }, }, }, }, }; exports.ChatError = { type: { name: "Composite", className: "ChatError", modelProperties: { code: { serializedName: "code", required: true, type: { name: "String", }, }, message: { serializedName: "message", required: true, type: { name: "String", }, }, target: { serializedName: "target", readOnly: true, type: { name: "String", }, }, details: { serializedName: "details", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatError", }, }, }, }, innerError: { serializedName: "innererror", type: { name: "Composite", className: "ChatError", }, }, }, }, }; exports.SendReadReceiptRequest = { type: { name: "Composite", className: "SendReadReceiptRequest", modelProperties: { chatMessageId: { serializedName: "chatMessageId", required: true, type: { name: "String", }, }, }, }, }; exports.SendChatMessageRequest = { type: { name: "Composite", className: "SendChatMessageRequest", modelProperties: { content: { serializedName: "content", required: true, type: { name: "String", }, }, senderDisplayName: { serializedName: "senderDisplayName", type: { name: "String", }, }, type: { serializedName: "type", type: { name: "Enum", allowedValues: [ "text", "html", "topicUpdated", "participantAdded", "participantRemoved", ], }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, }, }, }; exports.SendChatMessageResult = { type: { name: "Composite", className: "SendChatMessageResult", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, }, }, }; exports.ChatMessagesCollection = { type: { name: "Composite", className: "ChatMessagesCollection", modelProperties: { value: { serializedName: "value", required: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatMessage", }, }, }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, }, }, }; exports.ChatMessage = { type: { name: "Composite", className: "ChatMessage", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, type: { serializedName: "type", required: true, type: { name: "Enum", allowedValues: [ "text", "html", "topicUpdated", "participantAdded", "participantRemoved", ], }, }, sequenceId: { serializedName: "sequenceId", required: true, type: { name: "String", }, }, version: { serializedName: "version", required: true, type: { name: "String", }, }, content: { serializedName: "content", type: { name: "Composite", className: "ChatMessageContent", }, }, senderDisplayName: { serializedName: "senderDisplayName", type: { name: "String", }, }, createdOn: { serializedName: "createdOn", required: true, type: { name: "DateTime", }, }, senderCommunicationIdentifier: { serializedName: "senderCommunicationIdentifier", type: { name: "Composite", className: "CommunicationIdentifierModel", }, }, deletedOn: { serializedName: "deletedOn", type: { name: "DateTime", }, }, editedOn: { serializedName: "editedOn", type: { name: "DateTime", }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, }, }, }; exports.ChatMessageContent = { type: { name: "Composite", className: "ChatMessageContent", modelProperties: { message: { serializedName: "message", type: { name: "String", }, }, topic: { serializedName: "topic", type: { name: "String", }, }, participants: { serializedName: "participants", type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatParticipant", }, }, }, }, attachments: { serializedName: "attachments", type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatAttachment", }, }, }, }, initiatorCommunicationIdentifier: { serializedName: "initiatorCommunicationIdentifier", type: { name: "Composite", className: "CommunicationIdentifierModel", }, }, }, }, }; exports.ChatParticipant = { type: { name: "Composite", className: "ChatParticipant", modelProperties: { communicationIdentifier: { serializedName: "communicationIdentifier", type: { name: "Composite", className: "CommunicationIdentifierModel", }, }, displayName: { serializedName: "displayName", type: { name: "String", }, }, shareHistoryTime: { serializedName: "shareHistoryTime", type: { name: "DateTime", }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, }, }, }; exports.ChatAttachment = { type: { name: "Composite", className: "ChatAttachment", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, attachmentType: { serializedName: "attachmentType", required: true, type: { name: "Enum", allowedValues: ["image", "file"], }, }, name: { serializedName: "name", type: { name: "String", }, }, url: { serializedName: "url", type: { name: "String", }, }, previewUrl: { serializedName: "previewUrl", type: { name: "String", }, }, }, }, }; exports.UpdateChatMessageRequest = { type: { name: "Composite", className: "UpdateChatMessageRequest", modelProperties: { content: { serializedName: "content", type: { name: "String", }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, }, }, }; exports.ChatParticipantsCollection = { type: { name: "Composite", className: "ChatParticipantsCollection", modelProperties: { value: { serializedName: "value", required: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatParticipant", }, }, }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, }, }, }; exports.AddChatParticipantsRequest = { type: { name: "Composite", className: "AddChatParticipantsRequest", modelProperties: { participants: { serializedName: "participants", required: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatParticipant", }, }, }, }, }, }, }; exports.AddChatParticipantsResult = { type: { name: "Composite", className: "AddChatParticipantsResult", modelProperties: { invalidParticipants: { serializedName: "invalidParticipants", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatError", }, }, }, }, }, }, }; exports.CreateChatThreadRequest = { type: { name: "Composite", className: "CreateChatThreadRequest", modelProperties: { topic: { serializedName: "topic", required: true, type: { name: "String", }, }, participants: { serializedName: "participants", type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatParticipant", }, }, }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, retentionPolicy: { serializedName: "retentionPolicy", type: { name: "Composite", className: "ChatRetentionPolicy", }, }, }, }, }; exports.ChatRetentionPolicy = { type: { name: "Composite", className: "ChatRetentionPolicy", uberParent: "ChatRetentionPolicy", polymorphicDiscriminator: { serializedName: "kind", clientName: "kind", }, modelProperties: { kind: { serializedName: "kind", required: true, type: { name: "String", }, }, }, }, }; exports.CreateChatThreadResult = { type: { name: "Composite", className: "CreateChatThreadResult", modelProperties: { chatThread: { serializedName: "chatThread", type: { name: "Composite", className: "ChatThreadProperties", }, }, invalidParticipants: { serializedName: "invalidParticipants", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatError", }, }, }, }, }, }, }; exports.ChatThreadProperties = { type: { name: "Composite", className: "ChatThreadProperties", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, topic: { serializedName: "topic", required: true, type: { name: "String", }, }, createdOn: { serializedName: "createdOn", required: true, type: { name: "DateTime", }, }, createdByCommunicationIdentifier: { serializedName: "createdByCommunicationIdentifier", type: { name: "Composite", className: "CommunicationIdentifierModel", }, }, deletedOn: { serializedName: "deletedOn", type: { name: "DateTime", }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, retentionPolicy: { serializedName: "retentionPolicy", type: { name: "Composite", className: "ChatRetentionPolicy", }, }, }, }, }; exports.ChatThreadsItemCollection = { type: { name: "Composite", className: "ChatThreadsItemCollection", modelProperties: { value: { serializedName: "value", required: true, type: { name: "Sequence", element: { type: { name: "Composite", className: "ChatThreadItem", }, }, }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, }, }, }; exports.ChatThreadItem = { type: { name: "Composite", className: "ChatThreadItem", modelProperties: { id: { serializedName: "id", required: true, type: { name: "String", }, }, topic: { serializedName: "topic", required: true, type: { name: "String", }, }, deletedOn: { serializedName: "deletedOn", type: { name: "DateTime", }, }, lastMessageReceivedOn: { serializedName: "lastMessageReceivedOn", readOnly: true, type: { name: "DateTime", }, }, }, }, }; exports.UpdateChatThreadRequest = { type: { name: "Composite", className: "UpdateChatThreadRequest", modelProperties: { topic: { serializedName: "topic", type: { name: "String", }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, retentionPolicy: { serializedName: "retentionPolicy", type: { name: "Composite", className: "ChatRetentionPolicy", }, }, }, }, }; exports.SendTypingNotificationRequest = { type: { name: "Composite", className: "SendTypingNotificationRequest", modelProperties: { senderDisplayName: { serializedName: "senderDisplayName", type: { name: "String", }, }, }, }, }; exports.ThreadCreationDateRetentionPolicy = { serializedName: "threadCreationDate", type: { name: "Composite", className: "ThreadCreationDateRetentionPolicy", uberParent: "ChatRetentionPolicy", polymorphicDiscriminator: exports.ChatRetentionPolicy.type.polymorphicDiscriminator, modelProperties: Object.assign(Object.assign({}, exports.ChatRetentionPolicy.type.modelProperties), { deleteThreadAfterDays: { serializedName: "deleteThreadAfterDays", required: true, type: { name: "Number", }, } }), }, }; exports.NoneRetentionPolicy = { serializedName: "none", type: { name: "Composite", className: "NoneRetentionPolicy", uberParent: "ChatRetentionPolicy", polymorphicDiscriminator: exports.ChatRetentionPolicy.type.polymorphicDiscriminator, modelProperties: Object.assign({}, exports.ChatRetentionPolicy.type.modelProperties), }, }; exports.discriminators = { ChatRetentionPolicy: exports.ChatRetentionPolicy, "ChatRetentionPolicy.threadCreationDate": exports.ThreadCreationDateRetentionPolicy, "ChatRetentionPolicy.none": exports.NoneRetentionPolicy, }; //# sourceMappingURL=mappers.js.map