{"version":3,"sources":["node_modules/@vendasta/conversation/fesm2022/vendasta-conversation.mjs","libs/sms/src/lib/info-banner/learn-more-modal/learn-more-modal.component.ts","libs/sms/src/lib/info-banner/learn-more-modal/learn-more-modal.component.html","libs/sms/src/lib/progress-tracker/progress-tracker.component.ts","libs/sms/src/lib/progress-tracker/progress-tracker.component.html","node_modules/@vendasta/smsv2/fesm2020/vendasta-smsv2.mjs","libs/sms/src/lib/sms-registration-form/types.ts","libs/sms/src/lib/sms.constants.ts","libs/sms/src/lib/token.ts","libs/sms/src/lib/service/sms.service.ts","libs/sms/src/lib/info-banner/info-banner.component.ts","libs/sms/src/lib/info-banner/info-banner.component.html","libs/sms/src/lib/sms-registration-card/sms-registration-card.component.ts","libs/sms/src/lib/sms-registration-card/sms-registration-card.component.html","libs/sms/src/lib/sms-registration-error-banner/sms-registration-error-banner.component.ts","libs/sms/src/lib/sms-registration-error-banner/sms-registration-error-banner.component.html","libs/sms/src/lib/sms-registration-form/pipes/business-category-to-label.pipe.ts","libs/sms/src/lib/sms-registration-form/pipes/region-to-label.pipe.ts","libs/sms/src/lib/sms-registration-form/comfirmation-dialog/confirmation-modal.component.ts","libs/sms/src/lib/sms-registration-form/comfirmation-dialog/confirmation-modal.component.html","libs/sms/src/lib/sms-registration-form/sms-registration-form.component.ts","libs/sms/src/lib/sms-registration-form/sms-registration-form.component.html","libs/sms/src/lib/sms-registration/sms-registration.component.ts","libs/sms/src/lib/sms-registration/sms-registration.component.html","libs/sms/src/lib/assets/i18n/en_devel.json","libs/sms/src/lib/assets/i18n/sms-i18n.module.ts","libs/sms/src/lib/sms.module.ts","node_modules/@vendasta/templates/fesm2020/vendasta-templates.mjs","libs/email-ui/email-builder/src/services/app-listing-service.interface.ts","libs/templates/src/lib/dynamic-component-selector/dynamic-component-selector.service.ts","libs/templates/src/lib/dynamic-component-selector/dynamic-component-dialog/dynamic-component-dialog.component.ts","libs/templates/src/lib/dynamic-component-selector/dynamic-component-dialog/dynamic-component-dialog.component.html","libs/templates/src/lib/dynamic-component-selector/dynamic-component-selector.component.ts","libs/templates/src/lib/dynamic-component-selector/dynamic-component-selector.component.html","libs/templates/src/lib/assets/i18n/en_devel.json","libs/templates/src/lib/assets/i18n/templates-i18n.module.ts","libs/templates/src/lib/dynamic-component-selector/dynamic-component-selector.module.ts","libs/sms/src/lib/text-message-builder/text-message-builder-form/text-message-builder-form.component.ts","libs/sms/src/lib/text-message-builder/text-message-builder-form/text-message-builder-form.component.html","libs/galaxy/chat/src/chat-bubble/chat-bubble.component.ts","libs/galaxy/chat/src/chat-bubble/chat-bubble.component.html","libs/galaxy/chat/src/chat-divider-text/chat-divider-text.component.ts","libs/galaxy/chat/src/chat-divider-text/chat-divider-text.component.html","libs/galaxy/chat/src/chat-event/chat-event.component.ts","libs/galaxy/chat/src/chat-event/chat-event.component.html","libs/galaxy/chat/src/chat-container/chat-container.component.ts","libs/galaxy/chat/src/chat-container/chat-container.component.html","libs/galaxy/chat/src/chat-message/chat-message.component.ts","libs/galaxy/chat/src/chat-message/chat-message.component.html","libs/galaxy/chat/src/chat-message-group/chat-message-group.component.ts","libs/galaxy/chat/src/chat-message-group/chat-message-group.component.html","libs/galaxy/chat/src/directives/additional-metadata.ts","libs/galaxy/chat/src/chat.module.ts","libs/sms/src/lib/text-message-builder/text-message-builder-preview/text-message-builder-preview.component.ts","libs/sms/src/lib/text-message-builder/text-message-builder-preview/text-message-builder-preview.component.html","libs/sms/src/lib/text-message-builder/text-message-builder.component.ts","libs/sms/src/lib/text-message-builder/text-message-builder.component.html","libs/conversation/core/src/lib/tokens.ts"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { Injectable, inject } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { map } from 'rxjs/operators';\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar GlobalParticipantType = /*#__PURE__*/function (GlobalParticipantType) {\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_UNDEFINED\"] = 0] = \"GLOBAL_PARTICIPANT_TYPE_UNDEFINED\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_CUSTOMER\"] = 1] = \"GLOBAL_PARTICIPANT_TYPE_CUSTOMER\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_IAM_USER\"] = 2] = \"GLOBAL_PARTICIPANT_TYPE_IAM_USER\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP\"] = 3] = \"GLOBAL_PARTICIPANT_TYPE_ACCOUNT_GROUP\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_PARTNER\"] = 4] = \"GLOBAL_PARTICIPANT_TYPE_PARTNER\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT\"] = 5] = \"GLOBAL_PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT\"] = 6] = \"GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_VENDOR\"] = 7] = \"GLOBAL_PARTICIPANT_TYPE_VENDOR\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT\"] = 8] = \"GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_ANONYMOUS\"] = 9] = \"GLOBAL_PARTICIPANT_TYPE_ANONYMOUS\";\n GlobalParticipantType[GlobalParticipantType[\"GLOBAL_PARTICIPANT_TYPE_GROUP\"] = 10] = \"GLOBAL_PARTICIPANT_TYPE_GROUP\";\n return GlobalParticipantType;\n}(GlobalParticipantType || {});\nvar SortDirection = /*#__PURE__*/function (SortDirection) {\n SortDirection[SortDirection[\"SORT_DIRECTION_DESCENDING\"] = 0] = \"SORT_DIRECTION_DESCENDING\";\n SortDirection[SortDirection[\"SORT_DIRECTION_ASCENDING\"] = 1] = \"SORT_DIRECTION_ASCENDING\";\n return SortDirection;\n}(SortDirection || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar ConversationChannel = /*#__PURE__*/function (ConversationChannel) {\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_UNDEFINED\"] = 0] = \"CONVERSATION_CHANNEL_UNDEFINED\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_INTERNAL\"] = 1] = \"CONVERSATION_CHANNEL_INTERNAL\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_SMS\"] = 2] = \"CONVERSATION_CHANNEL_SMS\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_FACEBOOK\"] = 3] = \"CONVERSATION_CHANNEL_FACEBOOK\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_GOOGLE_MESSAGES\"] = 4] = \"CONVERSATION_CHANNEL_GOOGLE_MESSAGES\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_OPENAI\"] = 5] = \"CONVERSATION_CHANNEL_OPENAI\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_EMAIL\"] = 6] = \"CONVERSATION_CHANNEL_EMAIL\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_GOOGLE_BUSINESS_COMMUNICATIONS\"] = 7] = \"CONVERSATION_CHANNEL_GOOGLE_BUSINESS_COMMUNICATIONS\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_WEB_CHAT\"] = 8] = \"CONVERSATION_CHANNEL_WEB_CHAT\";\n ConversationChannel[ConversationChannel[\"CONVERSATION_CHANNEL_INSTAGRAM\"] = 9] = \"CONVERSATION_CHANNEL_INSTAGRAM\";\n return ConversationChannel;\n}(ConversationChannel || {});\nvar PlatformLocation = /*#__PURE__*/function (PlatformLocation) {\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_UNDEFINED\"] = 0] = \"PLATFORM_LOCATION_UNDEFINED\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_BUSINESS_APP\"] = 1] = \"PLATFORM_LOCATION_BUSINESS_APP\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_PARTNER_CENTER\"] = 2] = \"PLATFORM_LOCATION_PARTNER_CENTER\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_VENDOR_CENTER\"] = 3] = \"PLATFORM_LOCATION_VENDOR_CENTER\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_TASK_MANAGER\"] = 4] = \"PLATFORM_LOCATION_TASK_MANAGER\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_PROPOSAL_BUILDER\"] = 5] = \"PLATFORM_LOCATION_PROPOSAL_BUILDER\";\n PlatformLocation[PlatformLocation[\"PLATFORM_LOCATION_SALES_CENTER\"] = 6] = \"PLATFORM_LOCATION_SALES_CENTER\";\n return PlatformLocation;\n}(PlatformLocation || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar MessageStatus = /*#__PURE__*/function (MessageStatus) {\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_NOT_READ\"] = 0] = \"MESSAGE_STATUS_NOT_READ\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_READ\"] = 1] = \"MESSAGE_STATUS_READ\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_SENT\"] = 2] = \"MESSAGE_STATUS_SENT\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_DELIVERED\"] = 3] = \"MESSAGE_STATUS_DELIVERED\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_FAILED\"] = 4] = \"MESSAGE_STATUS_FAILED\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_UNDELIVERED\"] = 5] = \"MESSAGE_STATUS_UNDELIVERED\";\n MessageStatus[MessageStatus[\"MESSAGE_STATUS_SENDING\"] = 6] = \"MESSAGE_STATUS_SENDING\";\n return MessageStatus;\n}(MessageStatus || {});\nvar MessageType = /*#__PURE__*/function (MessageType) {\n MessageType[MessageType[\"MESSAGE_TYPE_MESSAGE\"] = 0] = \"MESSAGE_TYPE_MESSAGE\";\n MessageType[MessageType[\"MESSAGE_TYPE_MEDIA\"] = 1] = \"MESSAGE_TYPE_MEDIA\";\n MessageType[MessageType[\"MESSAGE_TYPE_SYSTEM\"] = 2] = \"MESSAGE_TYPE_SYSTEM\";\n return MessageType;\n}(MessageType || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar ParticipantType = /*#__PURE__*/function (ParticipantType) {\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_UNDEFINED\"] = 0] = \"PARTICIPANT_TYPE_UNDEFINED\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_CUSTOMER\"] = 1] = \"PARTICIPANT_TYPE_CUSTOMER\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_IAM_USER\"] = 2] = \"PARTICIPANT_TYPE_IAM_USER\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_ACCOUNT_GROUP\"] = 3] = \"PARTICIPANT_TYPE_ACCOUNT_GROUP\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_PARTNER\"] = 4] = \"PARTICIPANT_TYPE_PARTNER\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT\"] = 5] = \"PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_DIGITAL_AGENT\"] = 6] = \"PARTICIPANT_TYPE_DIGITAL_AGENT\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_VENDOR\"] = 7] = \"PARTICIPANT_TYPE_VENDOR\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_OPENAI_BOT\"] = 8] = \"PARTICIPANT_TYPE_OPENAI_BOT\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_ANONYMOUS\"] = 9] = \"PARTICIPANT_TYPE_ANONYMOUS\";\n ParticipantType[ParticipantType[\"PARTICIPANT_TYPE_GROUP\"] = 10] = \"PARTICIPANT_TYPE_GROUP\";\n return ParticipantType;\n}(ParticipantType || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar ViewType = /*#__PURE__*/function (ViewType) {\n ViewType[ViewType[\"VIEW_TYPE_UNDEFINED\"] = 0] = \"VIEW_TYPE_UNDEFINED\";\n ViewType[ViewType[\"VIEW_TYPE_FOLLOWING\"] = 1] = \"VIEW_TYPE_FOLLOWING\";\n return ViewType;\n}(ViewType || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar WidgetPosition = /*#__PURE__*/function (WidgetPosition) {\n WidgetPosition[WidgetPosition[\"WIDGET_POSITION_UNSPECIFIED\"] = 0] = \"WIDGET_POSITION_UNSPECIFIED\";\n WidgetPosition[WidgetPosition[\"WIDGET_POSITION_RIGHT\"] = 1] = \"WIDGET_POSITION_RIGHT\";\n WidgetPosition[WidgetPosition[\"WIDGET_POSITION_LEFT\"] = 2] = \"WIDGET_POSITION_LEFT\";\n return WidgetPosition;\n}(WidgetPosition || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar EvaluationSentiment = /*#__PURE__*/function (EvaluationSentiment) {\n EvaluationSentiment[EvaluationSentiment[\"EVALUATION_SENTIMENT_UNDEFINED\"] = 0] = \"EVALUATION_SENTIMENT_UNDEFINED\";\n EvaluationSentiment[EvaluationSentiment[\"EVALUATION_SENTIMENT_POSITIVE\"] = 1] = \"EVALUATION_SENTIMENT_POSITIVE\";\n EvaluationSentiment[EvaluationSentiment[\"EVALUATION_SENTIMENT_NEGATIVE\"] = 2] = \"EVALUATION_SENTIMENT_NEGATIVE\";\n return EvaluationSentiment;\n}(EvaluationSentiment || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums.\n// *********************************\nvar MetadataIdentifier = /*#__PURE__*/function (MetadataIdentifier) {\n MetadataIdentifier[MetadataIdentifier[\"METADATA_IDENTIFIER_UNDEFINED\"] = 0] = \"METADATA_IDENTIFIER_UNDEFINED\";\n MetadataIdentifier[MetadataIdentifier[\"METADATA_IDENTIFIER_RECIPIENT\"] = 1] = \"METADATA_IDENTIFIER_RECIPIENT\";\n MetadataIdentifier[MetadataIdentifier[\"METADATA_IDENTIFIER_SENDER\"] = 2] = \"METADATA_IDENTIFIER_SENDER\";\n MetadataIdentifier[MetadataIdentifier[\"METADATA_IDENTIFIER_CONVERSATION\"] = 3] = \"METADATA_IDENTIFIER_CONVERSATION\";\n return MetadataIdentifier;\n}(MetadataIdentifier || {});\nvar SetLastSeenRequestStatus = /*#__PURE__*/function (SetLastSeenRequestStatus) {\n SetLastSeenRequestStatus[SetLastSeenRequestStatus[\"SET_LAST_SEEN_REQUEST_STATUS_READ\"] = 0] = \"SET_LAST_SEEN_REQUEST_STATUS_READ\";\n SetLastSeenRequestStatus[SetLastSeenRequestStatus[\"SET_LAST_SEEN_REQUEST_STATUS_UNREAD\"] = 1] = \"SET_LAST_SEEN_REQUEST_STATUS_UNREAD\";\n return SetLastSeenRequestStatus;\n}(SetLastSeenRequestStatus || {});\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Enums Index.\n// *********************************\n\nfunction enumStringToValue$a(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass NamespaceDetail {\n participantType;\n internalParticipantId;\n static fromProto(proto) {\n let m = new NamespaceDetail();\n m = Object.assign(m, proto);\n if (proto.participantType) {\n m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantType !== 'undefined') {\n toReturn['participantType'] = this.participantType;\n }\n if (typeof this.internalParticipantId !== 'undefined') {\n toReturn['internalParticipantId'] = this.internalParticipantId;\n }\n return toReturn;\n }\n}\nclass SubjectParticipant {\n participantType;\n internalParticipantId;\n static fromProto(proto) {\n let m = new SubjectParticipant();\n m = Object.assign(m, proto);\n if (proto.participantType) {\n m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantType !== 'undefined') {\n toReturn['participantType'] = this.participantType;\n }\n if (typeof this.internalParticipantId !== 'undefined') {\n toReturn['internalParticipantId'] = this.internalParticipantId;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$9(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Conversation {\n conversationId;\n channel;\n externalConversationId;\n created;\n updated;\n deleted;\n participantIds;\n latestMsgSentTime;\n originLocation;\n originLocationExternalId;\n lastSeenByParticipant;\n conversationViewIds;\n subjectParticipantsKey;\n subjectParticipants;\n isOpen;\n static fromProto(proto) {\n let m = new Conversation();\n m = Object.assign(m, proto);\n if (proto.channel) {\n m.channel = enumStringToValue$9(ConversationChannel, proto.channel);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n if (proto.deleted) {\n m.deleted = new Date(proto.deleted);\n }\n if (proto.latestMsgSentTime) {\n m.latestMsgSentTime = new Date(proto.latestMsgSentTime);\n }\n if (proto.originLocation) {\n m.originLocation = enumStringToValue$9(PlatformLocation, proto.originLocation);\n }\n if (proto.lastSeenByParticipant) {\n m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);\n }\n if (proto.subjectParticipants) {\n m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.externalConversationId !== 'undefined') {\n toReturn['externalConversationId'] = this.externalConversationId;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.deleted !== 'undefined' && this.deleted !== null) {\n toReturn['deleted'] = 'toApiJson' in this.deleted ? this.deleted.toApiJson() : this.deleted;\n }\n if (typeof this.participantIds !== 'undefined') {\n toReturn['participantIds'] = this.participantIds;\n }\n if (typeof this.latestMsgSentTime !== 'undefined' && this.latestMsgSentTime !== null) {\n toReturn['latestMsgSentTime'] = 'toApiJson' in this.latestMsgSentTime ? this.latestMsgSentTime.toApiJson() : this.latestMsgSentTime;\n }\n if (typeof this.originLocation !== 'undefined') {\n toReturn['originLocation'] = this.originLocation;\n }\n if (typeof this.originLocationExternalId !== 'undefined') {\n toReturn['originLocationExternalId'] = this.originLocationExternalId;\n }\n if (typeof this.lastSeenByParticipant !== 'undefined' && this.lastSeenByParticipant !== null) {\n toReturn['lastSeenByParticipant'] = 'toApiJson' in this.lastSeenByParticipant ? this.lastSeenByParticipant.toApiJson() : this.lastSeenByParticipant;\n }\n if (typeof this.conversationViewIds !== 'undefined') {\n toReturn['conversationViewIds'] = this.conversationViewIds;\n }\n if (typeof this.subjectParticipantsKey !== 'undefined') {\n toReturn['subjectParticipantsKey'] = this.subjectParticipantsKey;\n }\n if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {\n toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;\n }\n if (typeof this.isOpen !== 'undefined') {\n toReturn['isOpen'] = this.isOpen;\n }\n return toReturn;\n }\n}\nclass ConversationKey {\n subjectParticipants;\n channel;\n originLocationExternalId;\n static fromProto(proto) {\n let m = new ConversationKey();\n m = Object.assign(m, proto);\n if (proto.subjectParticipants) {\n m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);\n }\n if (proto.channel) {\n m.channel = enumStringToValue$9(ConversationChannel, proto.channel);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {\n toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.originLocationExternalId !== 'undefined') {\n toReturn['originLocationExternalId'] = this.originLocationExternalId;\n }\n return toReturn;\n }\n}\nclass LastSeenByParticipant {\n participantId;\n lastSeenTime;\n static fromProto(proto) {\n let m = new LastSeenByParticipant();\n m = Object.assign(m, proto);\n if (proto.lastSeenTime) {\n m.lastSeenTime = new Date(proto.lastSeenTime);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n if (typeof this.lastSeenTime !== 'undefined' && this.lastSeenTime !== null) {\n toReturn['lastSeenTime'] = 'toApiJson' in this.lastSeenTime ? this.lastSeenTime.toApiJson() : this.lastSeenTime;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$8(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Message {\n messageId;\n externalMessageId;\n conversationId;\n participantId;\n type;\n body;\n error;\n created;\n updated;\n deleted;\n media;\n sendStatus;\n channel;\n static fromProto(proto) {\n let m = new Message();\n m = Object.assign(m, proto);\n if (proto.type) {\n m.type = enumStringToValue$8(MessageType, proto.type);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n if (proto.deleted) {\n m.deleted = new Date(proto.deleted);\n }\n if (proto.sendStatus) {\n m.sendStatus = SendStatus.fromProto(proto.sendStatus);\n }\n if (proto.channel) {\n m.channel = enumStringToValue$8(ConversationChannel, proto.channel);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n if (typeof this.externalMessageId !== 'undefined') {\n toReturn['externalMessageId'] = this.externalMessageId;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n if (typeof this.type !== 'undefined') {\n toReturn['type'] = this.type;\n }\n if (typeof this.body !== 'undefined') {\n toReturn['body'] = this.body;\n }\n if (typeof this.error !== 'undefined') {\n toReturn['error'] = this.error;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.deleted !== 'undefined' && this.deleted !== null) {\n toReturn['deleted'] = 'toApiJson' in this.deleted ? this.deleted.toApiJson() : this.deleted;\n }\n if (typeof this.media !== 'undefined') {\n toReturn['media'] = this.media;\n }\n if (typeof this.sendStatus !== 'undefined' && this.sendStatus !== null) {\n toReturn['sendStatus'] = 'toApiJson' in this.sendStatus ? this.sendStatus.toApiJson() : this.sendStatus;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n return toReturn;\n }\n}\nclass ParticipantMessageStatus {\n participantId;\n messageId;\n status;\n updated;\n static fromProto(proto) {\n let m = new ParticipantMessageStatus();\n m = Object.assign(m, proto);\n if (proto.status) {\n m.status = enumStringToValue$8(MessageStatus, proto.status);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n return toReturn;\n }\n}\nclass SendStatus {\n status;\n reason;\n created;\n static fromProto(proto) {\n let m = new SendStatus();\n m = Object.assign(m, proto);\n if (proto.status) {\n m.status = enumStringToValue$8(MessageStatus, proto.status);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n if (typeof this.reason !== 'undefined') {\n toReturn['reason'] = this.reason;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$7(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Address {\n firstLineAddress;\n secondLineAddress;\n city;\n state;\n country;\n zipCode;\n static fromProto(proto) {\n let m = new Address();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.firstLineAddress !== 'undefined') {\n toReturn['firstLineAddress'] = this.firstLineAddress;\n }\n if (typeof this.secondLineAddress !== 'undefined') {\n toReturn['secondLineAddress'] = this.secondLineAddress;\n }\n if (typeof this.city !== 'undefined') {\n toReturn['city'] = this.city;\n }\n if (typeof this.state !== 'undefined') {\n toReturn['state'] = this.state;\n }\n if (typeof this.country !== 'undefined') {\n toReturn['country'] = this.country;\n }\n if (typeof this.zipCode !== 'undefined') {\n toReturn['zipCode'] = this.zipCode;\n }\n return toReturn;\n }\n}\nclass Participant {\n participantId;\n internalParticipantId;\n partnerId;\n accountGroupId;\n location;\n channel;\n externalParticipantId;\n name;\n created;\n updated;\n deleted;\n participantType;\n email;\n phoneNumber;\n address;\n isSubjectParticipant;\n isParticipantInternalInfoDeleted;\n profileImageUrl;\n namespaceHierarchy;\n static fromProto(proto) {\n let m = new Participant();\n m = Object.assign(m, proto);\n if (proto.location) {\n m.location = enumStringToValue$7(PlatformLocation, proto.location);\n }\n if (proto.channel) {\n m.channel = enumStringToValue$7(ConversationChannel, proto.channel);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n if (proto.deleted) {\n m.deleted = new Date(proto.deleted);\n }\n if (proto.participantType) {\n m.participantType = enumStringToValue$7(ParticipantType, proto.participantType);\n }\n if (proto.address) {\n m.address = Address.fromProto(proto.address);\n }\n if (proto.namespaceHierarchy) {\n m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n if (typeof this.internalParticipantId !== 'undefined') {\n toReturn['internalParticipantId'] = this.internalParticipantId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.externalParticipantId !== 'undefined') {\n toReturn['externalParticipantId'] = this.externalParticipantId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.deleted !== 'undefined' && this.deleted !== null) {\n toReturn['deleted'] = 'toApiJson' in this.deleted ? this.deleted.toApiJson() : this.deleted;\n }\n if (typeof this.participantType !== 'undefined') {\n toReturn['participantType'] = this.participantType;\n }\n if (typeof this.email !== 'undefined') {\n toReturn['email'] = this.email;\n }\n if (typeof this.phoneNumber !== 'undefined') {\n toReturn['phoneNumber'] = this.phoneNumber;\n }\n if (typeof this.address !== 'undefined' && this.address !== null) {\n toReturn['address'] = 'toApiJson' in this.address ? this.address.toApiJson() : this.address;\n }\n if (typeof this.isSubjectParticipant !== 'undefined') {\n toReturn['isSubjectParticipant'] = this.isSubjectParticipant;\n }\n if (typeof this.isParticipantInternalInfoDeleted !== 'undefined') {\n toReturn['isParticipantInternalInfoDeleted'] = this.isParticipantInternalInfoDeleted;\n }\n if (typeof this.profileImageUrl !== 'undefined') {\n toReturn['profileImageUrl'] = this.profileImageUrl;\n }\n if (typeof this.namespaceHierarchy !== 'undefined' && this.namespaceHierarchy !== null) {\n toReturn['namespaceHierarchy'] = 'toApiJson' in this.namespaceHierarchy ? this.namespaceHierarchy.toApiJson() : this.namespaceHierarchy;\n }\n return toReturn;\n }\n}\nclass ParticipantKey {\n internalParticipantId;\n partnerId;\n accountGroupId;\n location;\n channels;\n participantType;\n namespaceHierarchy;\n static fromProto(proto) {\n let m = new ParticipantKey();\n m = Object.assign(m, proto);\n if (proto.location) {\n m.location = enumStringToValue$7(PlatformLocation, proto.location);\n }\n if (proto.channels) {\n m.channels = proto.channels.map(v => enumStringToValue$7(ConversationChannel, v));\n }\n if (proto.participantType) {\n m.participantType = enumStringToValue$7(GlobalParticipantType, proto.participantType);\n }\n if (proto.namespaceHierarchy) {\n m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.internalParticipantId !== 'undefined') {\n toReturn['internalParticipantId'] = this.internalParticipantId;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n if (typeof this.channels !== 'undefined') {\n toReturn['channels'] = this.channels;\n }\n if (typeof this.participantType !== 'undefined') {\n toReturn['participantType'] = this.participantType;\n }\n if (typeof this.namespaceHierarchy !== 'undefined' && this.namespaceHierarchy !== null) {\n toReturn['namespaceHierarchy'] = 'toApiJson' in this.namespaceHierarchy ? this.namespaceHierarchy.toApiJson() : this.namespaceHierarchy;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$6(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Access {\n scope;\n public;\n static fromProto(proto) {\n let m = new Access();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.scope !== 'undefined') {\n toReturn['scope'] = this.scope;\n }\n if (typeof this.public !== 'undefined') {\n toReturn['public'] = this.public;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$5(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass Configuration {\n subjectParticipant;\n createdAt;\n updatedAt;\n availabilityMessage;\n showAvailabilityMessage;\n googleBusinessMessagesEnabled;\n smsEnabled;\n inboxProEnabled;\n webChatEnabled;\n facebookMessengerEnabled;\n multiLocationEnabled;\n instagramMessagingEnabled;\n static fromProto(proto) {\n let m = new Configuration();\n m = Object.assign(m, proto);\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n if (proto.createdAt) {\n m.createdAt = new Date(proto.createdAt);\n }\n if (proto.updatedAt) {\n m.updatedAt = new Date(proto.updatedAt);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n if (typeof this.createdAt !== 'undefined' && this.createdAt !== null) {\n toReturn['createdAt'] = 'toApiJson' in this.createdAt ? this.createdAt.toApiJson() : this.createdAt;\n }\n if (typeof this.updatedAt !== 'undefined' && this.updatedAt !== null) {\n toReturn['updatedAt'] = 'toApiJson' in this.updatedAt ? this.updatedAt.toApiJson() : this.updatedAt;\n }\n if (typeof this.availabilityMessage !== 'undefined') {\n toReturn['availabilityMessage'] = this.availabilityMessage;\n }\n if (typeof this.showAvailabilityMessage !== 'undefined') {\n toReturn['showAvailabilityMessage'] = this.showAvailabilityMessage;\n }\n if (typeof this.googleBusinessMessagesEnabled !== 'undefined') {\n toReturn['googleBusinessMessagesEnabled'] = this.googleBusinessMessagesEnabled;\n }\n if (typeof this.smsEnabled !== 'undefined') {\n toReturn['smsEnabled'] = this.smsEnabled;\n }\n if (typeof this.inboxProEnabled !== 'undefined') {\n toReturn['inboxProEnabled'] = this.inboxProEnabled;\n }\n if (typeof this.webChatEnabled !== 'undefined') {\n toReturn['webChatEnabled'] = this.webChatEnabled;\n }\n if (typeof this.facebookMessengerEnabled !== 'undefined') {\n toReturn['facebookMessengerEnabled'] = this.facebookMessengerEnabled;\n }\n if (typeof this.multiLocationEnabled !== 'undefined') {\n toReturn['multiLocationEnabled'] = this.multiLocationEnabled;\n }\n if (typeof this.instagramMessagingEnabled !== 'undefined') {\n toReturn['instagramMessagingEnabled'] = this.instagramMessagingEnabled;\n }\n return toReturn;\n }\n}\nclass ProductFeature {\n googleBusinessMessagesEnabled;\n smsEnabled;\n multiLocationEnabled;\n webChatEnabled;\n facebookMessengerEnabled;\n instagramMessagingEnabled;\n static fromProto(proto) {\n let m = new ProductFeature();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.googleBusinessMessagesEnabled !== 'undefined') {\n toReturn['googleBusinessMessagesEnabled'] = this.googleBusinessMessagesEnabled;\n }\n if (typeof this.smsEnabled !== 'undefined') {\n toReturn['smsEnabled'] = this.smsEnabled;\n }\n if (typeof this.multiLocationEnabled !== 'undefined') {\n toReturn['multiLocationEnabled'] = this.multiLocationEnabled;\n }\n if (typeof this.webChatEnabled !== 'undefined') {\n toReturn['webChatEnabled'] = this.webChatEnabled;\n }\n if (typeof this.facebookMessengerEnabled !== 'undefined') {\n toReturn['facebookMessengerEnabled'] = this.facebookMessengerEnabled;\n }\n if (typeof this.instagramMessagingEnabled !== 'undefined') {\n toReturn['instagramMessagingEnabled'] = this.instagramMessagingEnabled;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$4(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass View {\n viewId;\n created;\n static fromProto(proto) {\n let m = new View();\n m = Object.assign(m, proto);\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.viewId !== 'undefined') {\n toReturn['viewId'] = this.viewId;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$3(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass DataSources {\n businessProfile;\n static fromProto(proto) {\n let m = new DataSources();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.businessProfile !== 'undefined') {\n toReturn['businessProfile'] = this.businessProfile;\n }\n return toReturn;\n }\n}\nclass Widget {\n widgetId;\n name;\n namespace;\n color;\n allowedUrls;\n position;\n created;\n updated;\n isEnabled;\n welcomeMessage;\n textColor;\n accentColor;\n accentTextColor;\n static fromProto(proto) {\n let m = new Widget();\n m = Object.assign(m, proto);\n if (proto.position) {\n m.position = enumStringToValue$3(WidgetPosition, proto.position);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.namespace !== 'undefined') {\n toReturn['namespace'] = this.namespace;\n }\n if (typeof this.color !== 'undefined') {\n toReturn['color'] = this.color;\n }\n if (typeof this.allowedUrls !== 'undefined') {\n toReturn['allowedUrls'] = this.allowedUrls;\n }\n if (typeof this.position !== 'undefined') {\n toReturn['position'] = this.position;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.isEnabled !== 'undefined') {\n toReturn['isEnabled'] = this.isEnabled;\n }\n if (typeof this.welcomeMessage !== 'undefined') {\n toReturn['welcomeMessage'] = this.welcomeMessage;\n }\n if (typeof this.textColor !== 'undefined') {\n toReturn['textColor'] = this.textColor;\n }\n if (typeof this.accentColor !== 'undefined') {\n toReturn['accentColor'] = this.accentColor;\n }\n if (typeof this.accentTextColor !== 'undefined') {\n toReturn['accentTextColor'] = this.accentTextColor;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$2(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass FieldMask {\n paths;\n static fromProto(proto) {\n let m = new FieldMask();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.paths !== 'undefined') {\n toReturn['paths'] = this.paths;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue$1(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass MessageTemplate {\n templateId;\n name;\n content;\n created;\n static fromProto(proto) {\n let m = new MessageTemplate();\n m = Object.assign(m, proto);\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.templateId !== 'undefined') {\n toReturn['templateId'] = this.templateId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.content !== 'undefined') {\n toReturn['content'] = this.content;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n return toReturn;\n }\n}\nfunction enumStringToValue(enumRef, value) {\n if (typeof value === 'number') {\n return value;\n }\n return enumRef[value];\n}\nclass AddConversationToConversationViewRequest {\n viewId;\n conversationId;\n participantId;\n static fromProto(proto) {\n let m = new AddConversationToConversationViewRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.viewId !== 'undefined') {\n toReturn['viewId'] = this.viewId;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n return toReturn;\n }\n}\nclass AddMultiParticipantsRequest {\n conversationId;\n participants;\n static fromProto(proto) {\n let m = new AddMultiParticipantsRequest();\n m = Object.assign(m, proto);\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass AddMultiParticipantsResponse {\n participants;\n static fromProto(proto) {\n let m = new AddMultiParticipantsResponse();\n m = Object.assign(m, proto);\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass CapturedLead {\n name;\n email;\n phone;\n static fromProto(proto) {\n let m = new CapturedLead();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.email !== 'undefined') {\n toReturn['email'] = this.email;\n }\n if (typeof this.phone !== 'undefined') {\n toReturn['phone'] = this.phone;\n }\n return toReturn;\n }\n}\nclass ConversationMessageCount {\n conversationId;\n count;\n static fromProto(proto) {\n let m = new ConversationMessageCount();\n m = Object.assign(m, proto);\n if (proto.count) {\n m.count = parseInt(proto.count, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.count !== 'undefined') {\n toReturn['count'] = this.count;\n }\n return toReturn;\n }\n}\nclass LookupConversationsResponseConversations {\n conversation;\n participants;\n static fromProto(proto) {\n let m = new LookupConversationsResponseConversations();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationMessageCountResponseCountsEntry {\n key;\n value;\n static fromProto(proto) {\n let m = new GetMultiConversationMessageCountResponseCountsEntry();\n m = Object.assign(m, proto);\n if (proto.value) {\n m.value = parseInt(proto.value, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.key !== 'undefined') {\n toReturn['key'] = this.key;\n }\n if (typeof this.value !== 'undefined') {\n toReturn['value'] = this.value;\n }\n return toReturn;\n }\n}\nclass CreateConversationRequest {\n participants;\n channel;\n externalConversationId;\n created;\n updated;\n originLocation;\n originLocationExternalId;\n static fromProto(proto) {\n let m = new CreateConversationRequest();\n m = Object.assign(m, proto);\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n if (proto.channel) {\n m.channel = enumStringToValue(ConversationChannel, proto.channel);\n }\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n if (proto.originLocation) {\n m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.externalConversationId !== 'undefined') {\n toReturn['externalConversationId'] = this.externalConversationId;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.originLocation !== 'undefined') {\n toReturn['originLocation'] = this.originLocation;\n }\n if (typeof this.originLocationExternalId !== 'undefined') {\n toReturn['originLocationExternalId'] = this.originLocationExternalId;\n }\n return toReturn;\n }\n}\nclass CreateConversationResponse {\n conversation;\n participants;\n static fromProto(proto) {\n let m = new CreateConversationResponse();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass CreateMessageTemplateRequest {\n template;\n subjectParticipant;\n static fromProto(proto) {\n let m = new CreateMessageTemplateRequest();\n m = Object.assign(m, proto);\n if (proto.template) {\n m.template = MessageTemplate.fromProto(proto.template);\n }\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.template !== 'undefined' && this.template !== null) {\n toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;\n }\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n return toReturn;\n }\n}\nclass CreateMessageTemplateResponse {\n template;\n static fromProto(proto) {\n let m = new CreateMessageTemplateResponse();\n m = Object.assign(m, proto);\n if (proto.template) {\n m.template = MessageTemplate.fromProto(proto.template);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.template !== 'undefined' && this.template !== null) {\n toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;\n }\n return toReturn;\n }\n}\nclass CreateMultiMessagesRequest {\n messages;\n lastSeen;\n static fromProto(proto) {\n let m = new CreateMultiMessagesRequest();\n m = Object.assign(m, proto);\n if (proto.messages) {\n m.messages = proto.messages.map(Message.fromProto);\n }\n if (proto.lastSeen) {\n m.lastSeen = new Date(proto.lastSeen);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messages !== 'undefined' && this.messages !== null) {\n toReturn['messages'] = 'toApiJson' in this.messages ? this.messages.toApiJson() : this.messages;\n }\n if (typeof this.lastSeen !== 'undefined' && this.lastSeen !== null) {\n toReturn['lastSeen'] = 'toApiJson' in this.lastSeen ? this.lastSeen.toApiJson() : this.lastSeen;\n }\n return toReturn;\n }\n}\nclass CreateWidgetConversationRequest {\n widgetId;\n chatSourceUrl;\n static fromProto(proto) {\n let m = new CreateWidgetConversationRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n if (typeof this.chatSourceUrl !== 'undefined') {\n toReturn['chatSourceUrl'] = this.chatSourceUrl;\n }\n return toReturn;\n }\n}\nclass CreateWidgetConversationResponse {\n widgetParticipantToken;\n conversation;\n static fromProto(proto) {\n let m = new CreateWidgetConversationResponse();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetParticipantToken !== 'undefined') {\n toReturn['widgetParticipantToken'] = this.widgetParticipantToken;\n }\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n return toReturn;\n }\n}\nclass CreateWidgetRequest {\n name;\n namespace;\n color;\n allowedUrls;\n welcomeMessage;\n dataSources;\n textColor;\n accentColor;\n accentTextColor;\n static fromProto(proto) {\n let m = new CreateWidgetRequest();\n m = Object.assign(m, proto);\n if (proto.dataSources) {\n m.dataSources = DataSources.fromProto(proto.dataSources);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.namespace !== 'undefined') {\n toReturn['namespace'] = this.namespace;\n }\n if (typeof this.color !== 'undefined') {\n toReturn['color'] = this.color;\n }\n if (typeof this.allowedUrls !== 'undefined') {\n toReturn['allowedUrls'] = this.allowedUrls;\n }\n if (typeof this.welcomeMessage !== 'undefined') {\n toReturn['welcomeMessage'] = this.welcomeMessage;\n }\n if (typeof this.dataSources !== 'undefined' && this.dataSources !== null) {\n toReturn['dataSources'] = 'toApiJson' in this.dataSources ? this.dataSources.toApiJson() : this.dataSources;\n }\n if (typeof this.textColor !== 'undefined') {\n toReturn['textColor'] = this.textColor;\n }\n if (typeof this.accentColor !== 'undefined') {\n toReturn['accentColor'] = this.accentColor;\n }\n if (typeof this.accentTextColor !== 'undefined') {\n toReturn['accentTextColor'] = this.accentTextColor;\n }\n return toReturn;\n }\n}\nclass CreateWidgetResponse {\n widget;\n static fromProto(proto) {\n let m = new CreateWidgetResponse();\n m = Object.assign(m, proto);\n if (proto.widget) {\n m.widget = Widget.fromProto(proto.widget);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widget !== 'undefined' && this.widget !== null) {\n toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;\n }\n return toReturn;\n }\n}\nclass MetadataDataEntry {\n key;\n value;\n static fromProto(proto) {\n let m = new MetadataDataEntry();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.key !== 'undefined') {\n toReturn['key'] = this.key;\n }\n if (typeof this.value !== 'undefined') {\n toReturn['value'] = this.value;\n }\n return toReturn;\n }\n}\nclass DeleteConversationRequest {\n conversationId;\n static fromProto(proto) {\n let m = new DeleteConversationRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n return toReturn;\n }\n}\nclass DeleteMessageRequest {\n messageId;\n static fromProto(proto) {\n let m = new DeleteMessageRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n return toReturn;\n }\n}\nclass DeleteMessageTemplateRequest {\n templateId;\n static fromProto(proto) {\n let m = new DeleteMessageTemplateRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.templateId !== 'undefined') {\n toReturn['templateId'] = this.templateId;\n }\n return toReturn;\n }\n}\nclass DeleteWidgetRequest {\n widgetId;\n static fromProto(proto) {\n let m = new DeleteWidgetRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationDetailsResponseDetailedConversation {\n conversation;\n latestMessage;\n participants;\n summary;\n static fromProto(proto) {\n let m = new GetMultiConversationDetailsResponseDetailedConversation();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n if (proto.latestMessage) {\n m.latestMessage = Message.fromProto(proto.latestMessage);\n }\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n if (typeof this.latestMessage !== 'undefined' && this.latestMessage !== null) {\n toReturn['latestMessage'] = 'toApiJson' in this.latestMessage ? this.latestMessage.toApiJson() : this.latestMessage;\n }\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n if (typeof this.summary !== 'undefined') {\n toReturn['summary'] = this.summary;\n }\n return toReturn;\n }\n}\nclass SearchConversationsResponseDetailedConversation {\n conversation;\n latestMessage;\n participants;\n static fromProto(proto) {\n let m = new SearchConversationsResponseDetailedConversation();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n if (proto.latestMessage) {\n m.latestMessage = Message.fromProto(proto.latestMessage);\n }\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n if (typeof this.latestMessage !== 'undefined' && this.latestMessage !== null) {\n toReturn['latestMessage'] = 'toApiJson' in this.latestMessage ? this.latestMessage.toApiJson() : this.latestMessage;\n }\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass EvaluateResponseRequest {\n messageId;\n sentiment;\n comment;\n static fromProto(proto) {\n let m = new EvaluateResponseRequest();\n m = Object.assign(m, proto);\n if (proto.sentiment) {\n m.sentiment = enumStringToValue(EvaluationSentiment, proto.sentiment);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n if (typeof this.sentiment !== 'undefined') {\n toReturn['sentiment'] = this.sentiment;\n }\n if (typeof this.comment !== 'undefined') {\n toReturn['comment'] = this.comment;\n }\n return toReturn;\n }\n}\nclass GetAvailableChannelsForConversationRequest {\n conversationId;\n static fromProto(proto) {\n let m = new GetAvailableChannelsForConversationRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n return toReturn;\n }\n}\nclass GetAvailableChannelsForConversationResponse {\n channels;\n preferredChannel;\n static fromProto(proto) {\n let m = new GetAvailableChannelsForConversationResponse();\n m = Object.assign(m, proto);\n if (proto.channels) {\n m.channels = proto.channels.map(v => enumStringToValue(ConversationChannel, v));\n }\n if (proto.preferredChannel) {\n m.preferredChannel = enumStringToValue(ConversationChannel, proto.preferredChannel);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.channels !== 'undefined') {\n toReturn['channels'] = this.channels;\n }\n if (typeof this.preferredChannel !== 'undefined') {\n toReturn['preferredChannel'] = this.preferredChannel;\n }\n return toReturn;\n }\n}\nclass GetConfigurationRequest {\n subjectParticipant;\n static fromProto(proto) {\n let m = new GetConfigurationRequest();\n m = Object.assign(m, proto);\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n return toReturn;\n }\n}\nclass GetConfigurationResponse {\n configuration;\n static fromProto(proto) {\n let m = new GetConfigurationResponse();\n m = Object.assign(m, proto);\n if (proto.configuration) {\n m.configuration = Configuration.fromProto(proto.configuration);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.configuration !== 'undefined' && this.configuration !== null) {\n toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;\n }\n return toReturn;\n }\n}\nclass GetConversationByKeyRequest {\n conversationKey;\n static fromProto(proto) {\n let m = new GetConversationByKeyRequest();\n m = Object.assign(m, proto);\n if (proto.conversationKey) {\n m.conversationKey = ConversationKey.fromProto(proto.conversationKey);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationKey !== 'undefined' && this.conversationKey !== null) {\n toReturn['conversationKey'] = 'toApiJson' in this.conversationKey ? this.conversationKey.toApiJson() : this.conversationKey;\n }\n return toReturn;\n }\n}\nclass GetConversationByKeyResponse {\n conversation;\n static fromProto(proto) {\n let m = new GetConversationByKeyResponse();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n return toReturn;\n }\n}\nclass GetConversationSummaryRequest {\n conversationId;\n static fromProto(proto) {\n let m = new GetConversationSummaryRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n return toReturn;\n }\n}\nclass GetConversationSummaryResponse {\n summary;\n static fromProto(proto) {\n let m = new GetConversationSummaryResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.summary !== 'undefined') {\n toReturn['summary'] = this.summary;\n }\n return toReturn;\n }\n}\nclass GetConversationViewsRequest {\n participantId;\n static fromProto(proto) {\n let m = new GetConversationViewsRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n return toReturn;\n }\n}\nclass GetConversationViewsResponse {\n views;\n static fromProto(proto) {\n let m = new GetConversationViewsResponse();\n m = Object.assign(m, proto);\n if (proto.views) {\n m.views = proto.views.map(View.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.views !== 'undefined' && this.views !== null) {\n toReturn['views'] = 'toApiJson' in this.views ? this.views.toApiJson() : this.views;\n }\n return toReturn;\n }\n}\nclass GetMessageRequest {\n messageId;\n static fromProto(proto) {\n let m = new GetMessageRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n return toReturn;\n }\n}\nclass GetMessageTemplateRequest {\n templateId;\n static fromProto(proto) {\n let m = new GetMessageTemplateRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.templateId !== 'undefined') {\n toReturn['templateId'] = this.templateId;\n }\n return toReturn;\n }\n}\nclass GetMessageTemplateResponse {\n template;\n static fromProto(proto) {\n let m = new GetMessageTemplateResponse();\n m = Object.assign(m, proto);\n if (proto.template) {\n m.template = MessageTemplate.fromProto(proto.template);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.template !== 'undefined' && this.template !== null) {\n toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;\n }\n return toReturn;\n }\n}\nclass GetMultiConfigurationRequest {\n subjectParticipants;\n static fromProto(proto) {\n let m = new GetMultiConfigurationRequest();\n m = Object.assign(m, proto);\n if (proto.subjectParticipants) {\n m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {\n toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;\n }\n return toReturn;\n }\n}\nclass GetMultiConfigurationResponse {\n configurations;\n static fromProto(proto) {\n let m = new GetMultiConfigurationResponse();\n m = Object.assign(m, proto);\n if (proto.configurations) {\n m.configurations = proto.configurations.map(Configuration.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.configurations !== 'undefined' && this.configurations !== null) {\n toReturn['configurations'] = 'toApiJson' in this.configurations ? this.configurations.toApiJson() : this.configurations;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationDetailsRequest {\n conversationIds;\n options;\n static fromProto(proto) {\n let m = new GetMultiConversationDetailsRequest();\n m = Object.assign(m, proto);\n if (proto.options) {\n m.options = FieldMask.fromProto(proto.options);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationIds !== 'undefined') {\n toReturn['conversationIds'] = this.conversationIds;\n }\n if (typeof this.options !== 'undefined' && this.options !== null) {\n toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationDetailsResponse {\n conversations;\n static fromProto(proto) {\n let m = new GetMultiConversationDetailsResponse();\n m = Object.assign(m, proto);\n if (proto.conversations) {\n m.conversations = proto.conversations.map(GetMultiConversationDetailsResponseDetailedConversation.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversations !== 'undefined' && this.conversations !== null) {\n toReturn['conversations'] = 'toApiJson' in this.conversations ? this.conversations.toApiJson() : this.conversations;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationMessageCountRequest {\n conversationIds;\n static fromProto(proto) {\n let m = new GetMultiConversationMessageCountRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationIds !== 'undefined') {\n toReturn['conversationIds'] = this.conversationIds;\n }\n return toReturn;\n }\n}\nclass GetMultiConversationMessageCountResponse {\n messageCounts;\n counts;\n static fromProto(proto) {\n let m = new GetMultiConversationMessageCountResponse();\n m = Object.assign(m, proto);\n if (proto.messageCounts) {\n m.messageCounts = proto.messageCounts.map(ConversationMessageCount.fromProto);\n }\n if (proto.counts) {\n m.counts = Object.keys(proto.counts).reduce((obj, k) => {\n obj[k] = parseInt(proto.counts[k], 10);\n return obj;\n }, {});\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageCounts !== 'undefined' && this.messageCounts !== null) {\n toReturn['messageCounts'] = 'toApiJson' in this.messageCounts ? this.messageCounts.toApiJson() : this.messageCounts;\n }\n if (typeof this.counts !== 'undefined' && this.counts !== null) {\n toReturn['counts'] = 'toApiJson' in this.counts ? this.counts.toApiJson() : this.counts;\n }\n return toReturn;\n }\n}\nclass GetMultiMessagesRequest {\n messageIds;\n conversationId;\n languageCode;\n static fromProto(proto) {\n let m = new GetMultiMessagesRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageIds !== 'undefined') {\n toReturn['messageIds'] = this.messageIds;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.languageCode !== 'undefined') {\n toReturn['languageCode'] = this.languageCode;\n }\n return toReturn;\n }\n}\nclass GetMultiMessagesResponse {\n messages;\n static fromProto(proto) {\n let m = new GetMultiMessagesResponse();\n m = Object.assign(m, proto);\n if (proto.messages) {\n m.messages = proto.messages.map(Message.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messages !== 'undefined' && this.messages !== null) {\n toReturn['messages'] = 'toApiJson' in this.messages ? this.messages.toApiJson() : this.messages;\n }\n return toReturn;\n }\n}\nclass GetMultiParticipantsRequest {\n participantIds;\n conversationId;\n static fromProto(proto) {\n let m = new GetMultiParticipantsRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantIds !== 'undefined') {\n toReturn['participantIds'] = this.participantIds;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n return toReturn;\n }\n}\nclass GetMultiParticipantsResponse {\n participants;\n static fromProto(proto) {\n let m = new GetMultiParticipantsResponse();\n m = Object.assign(m, proto);\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n return toReturn;\n }\n}\nclass GetMultiWidgetMessagesRequest {\n messageIds;\n static fromProto(proto) {\n let m = new GetMultiWidgetMessagesRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageIds !== 'undefined') {\n toReturn['messageIds'] = this.messageIds;\n }\n return toReturn;\n }\n}\nclass GetMultiWidgetMessagesResponse {\n messages;\n static fromProto(proto) {\n let m = new GetMultiWidgetMessagesResponse();\n m = Object.assign(m, proto);\n if (proto.messages) {\n m.messages = proto.messages.map(Message.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messages !== 'undefined' && this.messages !== null) {\n toReturn['messages'] = 'toApiJson' in this.messages ? this.messages.toApiJson() : this.messages;\n }\n return toReturn;\n }\n}\nclass GetOwnerEmailRequest {\n subjectParticipant;\n static fromProto(proto) {\n let m = new GetOwnerEmailRequest();\n m = Object.assign(m, proto);\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n return toReturn;\n }\n}\nclass GetOwnerEmailResponse {\n forwardingEmail;\n static fromProto(proto) {\n let m = new GetOwnerEmailResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.forwardingEmail !== 'undefined') {\n toReturn['forwardingEmail'] = this.forwardingEmail;\n }\n return toReturn;\n }\n}\nclass GetParticipantsByKeyRequest {\n participantKey;\n static fromProto(proto) {\n let m = new GetParticipantsByKeyRequest();\n m = Object.assign(m, proto);\n if (proto.participantKey) {\n m.participantKey = ParticipantKey.fromProto(proto.participantKey);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participantKey !== 'undefined' && this.participantKey !== null) {\n toReturn['participantKey'] = 'toApiJson' in this.participantKey ? this.participantKey.toApiJson() : this.participantKey;\n }\n return toReturn;\n }\n}\nclass GetParticipantsByKeyResponse {\n participants;\n participant;\n static fromProto(proto) {\n let m = new GetParticipantsByKeyResponse();\n m = Object.assign(m, proto);\n if (proto.participants) {\n m.participants = proto.participants.map(Participant.fromProto);\n }\n if (proto.participant) {\n m.participant = Participant.fromProto(proto.participant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participants !== 'undefined' && this.participants !== null) {\n toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;\n }\n if (typeof this.participant !== 'undefined' && this.participant !== null) {\n toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;\n }\n return toReturn;\n }\n}\nclass GetWidgetConfigRequest {\n widgetId;\n static fromProto(proto) {\n let m = new GetWidgetConfigRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n return toReturn;\n }\n}\nclass GetWidgetConfigResponse {\n name;\n color;\n isEnabled;\n welcomeMessage;\n textColor;\n accentColor;\n accentTextColor;\n static fromProto(proto) {\n let m = new GetWidgetConfigResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.color !== 'undefined') {\n toReturn['color'] = this.color;\n }\n if (typeof this.isEnabled !== 'undefined') {\n toReturn['isEnabled'] = this.isEnabled;\n }\n if (typeof this.welcomeMessage !== 'undefined') {\n toReturn['welcomeMessage'] = this.welcomeMessage;\n }\n if (typeof this.textColor !== 'undefined') {\n toReturn['textColor'] = this.textColor;\n }\n if (typeof this.accentColor !== 'undefined') {\n toReturn['accentColor'] = this.accentColor;\n }\n if (typeof this.accentTextColor !== 'undefined') {\n toReturn['accentTextColor'] = this.accentTextColor;\n }\n return toReturn;\n }\n}\nclass GetWidgetConversationResponse {\n conversation;\n static fromProto(proto) {\n let m = new GetWidgetConversationResponse();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n return toReturn;\n }\n}\nclass GetWidgetRequest {\n widgetId;\n static fromProto(proto) {\n let m = new GetWidgetRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n return toReturn;\n }\n}\nclass GetWidgetResponse {\n widget;\n static fromProto(proto) {\n let m = new GetWidgetResponse();\n m = Object.assign(m, proto);\n if (proto.widget) {\n m.widget = Widget.fromProto(proto.widget);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widget !== 'undefined' && this.widget !== null) {\n toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;\n }\n return toReturn;\n }\n}\nclass ListMessageTemplateRequest {\n subjectParticipant;\n pagingOptions;\n static fromProto(proto) {\n let m = new ListMessageTemplateRequest();\n m = Object.assign(m, proto);\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n if (proto.pagingOptions) {\n m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {\n toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;\n }\n return toReturn;\n }\n}\nclass ListMessageTemplateResponse {\n templates;\n pagingMetadata;\n static fromProto(proto) {\n let m = new ListMessageTemplateResponse();\n m = Object.assign(m, proto);\n if (proto.templates) {\n m.templates = proto.templates.map(MessageTemplate.fromProto);\n }\n if (proto.pagingMetadata) {\n m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.templates !== 'undefined' && this.templates !== null) {\n toReturn['templates'] = 'toApiJson' in this.templates ? this.templates.toApiJson() : this.templates;\n }\n if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {\n toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;\n }\n return toReturn;\n }\n}\nclass ListMessagesRequestListMessagesFilters {\n conversationId;\n static fromProto(proto) {\n let m = new ListMessagesRequestListMessagesFilters();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n return toReturn;\n }\n}\nclass ListMessagesRequest {\n filters;\n pagingOptions;\n static fromProto(proto) {\n let m = new ListMessagesRequest();\n m = Object.assign(m, proto);\n if (proto.filters) {\n m.filters = ListMessagesRequestListMessagesFilters.fromProto(proto.filters);\n }\n if (proto.pagingOptions) {\n m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.filters !== 'undefined' && this.filters !== null) {\n toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;\n }\n if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {\n toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;\n }\n return toReturn;\n }\n}\nclass ListMessagesResponse {\n messages;\n pagingMetadata;\n static fromProto(proto) {\n let m = new ListMessagesResponse();\n m = Object.assign(m, proto);\n if (proto.messages) {\n m.messages = proto.messages.map(Message.fromProto);\n }\n if (proto.pagingMetadata) {\n m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messages !== 'undefined' && this.messages !== null) {\n toReturn['messages'] = 'toApiJson' in this.messages ? this.messages.toApiJson() : this.messages;\n }\n if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {\n toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;\n }\n return toReturn;\n }\n}\nclass ListWidgetsRequest {\n namespace;\n pagingOptions;\n static fromProto(proto) {\n let m = new ListWidgetsRequest();\n m = Object.assign(m, proto);\n if (proto.pagingOptions) {\n m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.namespace !== 'undefined') {\n toReturn['namespace'] = this.namespace;\n }\n if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {\n toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;\n }\n return toReturn;\n }\n}\nclass ListWidgetsResponse {\n widgets;\n pagingMetadata;\n static fromProto(proto) {\n let m = new ListWidgetsResponse();\n m = Object.assign(m, proto);\n if (proto.widgets) {\n m.widgets = proto.widgets.map(Widget.fromProto);\n }\n if (proto.pagingMetadata) {\n m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgets !== 'undefined' && this.widgets !== null) {\n toReturn['widgets'] = 'toApiJson' in this.widgets ? this.widgets.toApiJson() : this.widgets;\n }\n if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {\n toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;\n }\n return toReturn;\n }\n}\nclass LookupConversationsRequestLookupConversationsFilters {\n internalParticipantId;\n location;\n channel;\n accountGroupId;\n externalConversationId;\n originLocation;\n originLocationExternalId;\n static fromProto(proto) {\n let m = new LookupConversationsRequestLookupConversationsFilters();\n m = Object.assign(m, proto);\n if (proto.location) {\n m.location = enumStringToValue(PlatformLocation, proto.location);\n }\n if (proto.channel) {\n m.channel = enumStringToValue(ConversationChannel, proto.channel);\n }\n if (proto.originLocation) {\n m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.internalParticipantId !== 'undefined') {\n toReturn['internalParticipantId'] = this.internalParticipantId;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.externalConversationId !== 'undefined') {\n toReturn['externalConversationId'] = this.externalConversationId;\n }\n if (typeof this.originLocation !== 'undefined') {\n toReturn['originLocation'] = this.originLocation;\n }\n if (typeof this.originLocationExternalId !== 'undefined') {\n toReturn['originLocationExternalId'] = this.originLocationExternalId;\n }\n return toReturn;\n }\n}\nclass LookupConversationsRequest {\n filters;\n pagingOptions;\n static fromProto(proto) {\n let m = new LookupConversationsRequest();\n m = Object.assign(m, proto);\n if (proto.filters) {\n m.filters = LookupConversationsRequestLookupConversationsFilters.fromProto(proto.filters);\n }\n if (proto.pagingOptions) {\n m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.filters !== 'undefined' && this.filters !== null) {\n toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;\n }\n if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {\n toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;\n }\n return toReturn;\n }\n}\nclass LookupConversationsResponse {\n conversations;\n pagingMetadata;\n static fromProto(proto) {\n let m = new LookupConversationsResponse();\n m = Object.assign(m, proto);\n if (proto.conversations) {\n m.conversations = proto.conversations.map(LookupConversationsResponseConversations.fromProto);\n }\n if (proto.pagingMetadata) {\n m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversations !== 'undefined' && this.conversations !== null) {\n toReturn['conversations'] = 'toApiJson' in this.conversations ? this.conversations.toApiJson() : this.conversations;\n }\n if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {\n toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;\n }\n return toReturn;\n }\n}\nclass Media {\n mediaContentType;\n mediaLocationPath;\n mediaFileName;\n fileSize;\n static fromProto(proto) {\n let m = new Media();\n m = Object.assign(m, proto);\n if (proto.fileSize) {\n m.fileSize = parseInt(proto.fileSize, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.mediaContentType !== 'undefined') {\n toReturn['mediaContentType'] = this.mediaContentType;\n }\n if (typeof this.mediaLocationPath !== 'undefined') {\n toReturn['mediaLocationPath'] = this.mediaLocationPath;\n }\n if (typeof this.mediaFileName !== 'undefined') {\n toReturn['mediaFileName'] = this.mediaFileName;\n }\n if (typeof this.fileSize !== 'undefined') {\n toReturn['fileSize'] = this.fileSize;\n }\n return toReturn;\n }\n}\nclass Metadata {\n identifier;\n data;\n static fromProto(proto) {\n let m = new Metadata();\n m = Object.assign(m, proto);\n if (proto.identifier) {\n m.identifier = enumStringToValue(MetadataIdentifier, proto.identifier);\n }\n if (proto.data) {\n m.data = Object.keys(proto.data).reduce((obj, k) => {\n obj[k] = proto.data[k];\n return obj;\n }, {});\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.identifier !== 'undefined') {\n toReturn['identifier'] = this.identifier;\n }\n if (typeof this.data !== 'undefined' && this.data !== null) {\n toReturn['data'] = 'toApiJson' in this.data ? this.data.toApiJson() : this.data;\n }\n return toReturn;\n }\n}\nclass ReceiveMessageRequestMetadataEntry {\n key;\n value;\n static fromProto(proto) {\n let m = new ReceiveMessageRequestMetadataEntry();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.key !== 'undefined') {\n toReturn['key'] = this.key;\n }\n if (typeof this.value !== 'undefined') {\n toReturn['value'] = this.value;\n }\n return toReturn;\n }\n}\nclass NewInboxLeadCapturedRequest {\n namespace;\n parentNamespace;\n conversationId;\n conversationSummary;\n capturedLead;\n source;\n capturedAt;\n static fromProto(proto) {\n let m = new NewInboxLeadCapturedRequest();\n m = Object.assign(m, proto);\n if (proto.capturedLead) {\n m.capturedLead = CapturedLead.fromProto(proto.capturedLead);\n }\n if (proto.capturedAt) {\n m.capturedAt = new Date(proto.capturedAt);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.namespace !== 'undefined') {\n toReturn['namespace'] = this.namespace;\n }\n if (typeof this.parentNamespace !== 'undefined') {\n toReturn['parentNamespace'] = this.parentNamespace;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.conversationSummary !== 'undefined') {\n toReturn['conversationSummary'] = this.conversationSummary;\n }\n if (typeof this.capturedLead !== 'undefined' && this.capturedLead !== null) {\n toReturn['capturedLead'] = 'toApiJson' in this.capturedLead ? this.capturedLead.toApiJson() : this.capturedLead;\n }\n if (typeof this.source !== 'undefined') {\n toReturn['source'] = this.source;\n }\n if (typeof this.capturedAt !== 'undefined' && this.capturedAt !== null) {\n toReturn['capturedAt'] = 'toApiJson' in this.capturedAt ? this.capturedAt.toApiJson() : this.capturedAt;\n }\n return toReturn;\n }\n}\nclass NewInboxLeadCapturedResponse {\n static fromProto(proto) {\n let m = new NewInboxLeadCapturedResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n return toReturn;\n }\n}\nclass PagedRequestOptions {\n cursor;\n pageSize;\n static fromProto(proto) {\n let m = new PagedRequestOptions();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.cursor !== 'undefined') {\n toReturn['cursor'] = this.cursor;\n }\n if (typeof this.pageSize !== 'undefined') {\n toReturn['pageSize'] = this.pageSize;\n }\n return toReturn;\n }\n}\nclass PagedResponseMetadata {\n nextCursor;\n hasMore;\n totalResults;\n static fromProto(proto) {\n let m = new PagedResponseMetadata();\n m = Object.assign(m, proto);\n if (proto.totalResults) {\n m.totalResults = parseInt(proto.totalResults, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.nextCursor !== 'undefined') {\n toReturn['nextCursor'] = this.nextCursor;\n }\n if (typeof this.hasMore !== 'undefined') {\n toReturn['hasMore'] = this.hasMore;\n }\n if (typeof this.totalResults !== 'undefined') {\n toReturn['totalResults'] = this.totalResults;\n }\n return toReturn;\n }\n}\nclass ReceiveMessageRequest {\n senderId;\n recipientId;\n conversationId;\n messageId;\n body;\n channel;\n type;\n location;\n partnerId;\n accountGroupId;\n metadata;\n media;\n static fromProto(proto) {\n let m = new ReceiveMessageRequest();\n m = Object.assign(m, proto);\n if (proto.channel) {\n m.channel = enumStringToValue(ConversationChannel, proto.channel);\n }\n if (proto.type) {\n m.type = enumStringToValue(MessageType, proto.type);\n }\n if (proto.location) {\n m.location = enumStringToValue(PlatformLocation, proto.location);\n }\n if (proto.metadata) {\n m.metadata = Object.keys(proto.metadata).reduce((obj, k) => {\n obj[k] = proto.metadata[k];\n return obj;\n }, {});\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.senderId !== 'undefined') {\n toReturn['senderId'] = this.senderId;\n }\n if (typeof this.recipientId !== 'undefined') {\n toReturn['recipientId'] = this.recipientId;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n if (typeof this.body !== 'undefined') {\n toReturn['body'] = this.body;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n if (typeof this.type !== 'undefined') {\n toReturn['type'] = this.type;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.metadata !== 'undefined' && this.metadata !== null) {\n toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;\n }\n if (typeof this.media !== 'undefined') {\n toReturn['media'] = this.media;\n }\n return toReturn;\n }\n}\nclass RemoveConversationFromConversationViewRequest {\n viewId;\n conversationId;\n participantId;\n static fromProto(proto) {\n let m = new RemoveConversationFromConversationViewRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.viewId !== 'undefined') {\n toReturn['viewId'] = this.viewId;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n return toReturn;\n }\n}\nclass SearchConversationsRequest {\n partnerId;\n accountGroupId;\n location;\n searchTerm;\n pagingOptions;\n static fromProto(proto) {\n let m = new SearchConversationsRequest();\n m = Object.assign(m, proto);\n if (proto.location) {\n m.location = enumStringToValue(PlatformLocation, proto.location);\n }\n if (proto.pagingOptions) {\n m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.accountGroupId !== 'undefined') {\n toReturn['accountGroupId'] = this.accountGroupId;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n if (typeof this.searchTerm !== 'undefined') {\n toReturn['searchTerm'] = this.searchTerm;\n }\n if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {\n toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;\n }\n return toReturn;\n }\n}\nclass SearchConversationsResponse {\n conversations;\n pagingMetadata;\n static fromProto(proto) {\n let m = new SearchConversationsResponse();\n m = Object.assign(m, proto);\n if (proto.conversations) {\n m.conversations = proto.conversations.map(SearchConversationsResponseDetailedConversation.fromProto);\n }\n if (proto.pagingMetadata) {\n m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversations !== 'undefined' && this.conversations !== null) {\n toReturn['conversations'] = 'toApiJson' in this.conversations ? this.conversations.toApiJson() : this.conversations;\n }\n if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {\n toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;\n }\n return toReturn;\n }\n}\nclass SendMessageRequest {\n sender;\n recipient;\n conversationId;\n type;\n body;\n metadata;\n originLocation;\n media;\n channel;\n static fromProto(proto) {\n let m = new SendMessageRequest();\n m = Object.assign(m, proto);\n if (proto.sender) {\n m.sender = Participant.fromProto(proto.sender);\n }\n if (proto.recipient) {\n m.recipient = Participant.fromProto(proto.recipient);\n }\n if (proto.type) {\n m.type = enumStringToValue(MessageType, proto.type);\n }\n if (proto.metadata) {\n m.metadata = proto.metadata.map(Metadata.fromProto);\n }\n if (proto.originLocation) {\n m.originLocation = enumStringToValue(PlatformLocation, proto.originLocation);\n }\n if (proto.media) {\n m.media = proto.media.map(Media.fromProto);\n }\n if (proto.channel) {\n m.channel = enumStringToValue(ConversationChannel, proto.channel);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.sender !== 'undefined' && this.sender !== null) {\n toReturn['sender'] = 'toApiJson' in this.sender ? this.sender.toApiJson() : this.sender;\n }\n if (typeof this.recipient !== 'undefined' && this.recipient !== null) {\n toReturn['recipient'] = 'toApiJson' in this.recipient ? this.recipient.toApiJson() : this.recipient;\n }\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.type !== 'undefined') {\n toReturn['type'] = this.type;\n }\n if (typeof this.body !== 'undefined') {\n toReturn['body'] = this.body;\n }\n if (typeof this.metadata !== 'undefined' && this.metadata !== null) {\n toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;\n }\n if (typeof this.originLocation !== 'undefined') {\n toReturn['originLocation'] = this.originLocation;\n }\n if (typeof this.media !== 'undefined' && this.media !== null) {\n toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;\n }\n if (typeof this.channel !== 'undefined') {\n toReturn['channel'] = this.channel;\n }\n return toReturn;\n }\n}\nclass SendMessageResponse {\n workflowId;\n messageId;\n static fromProto(proto) {\n let m = new SendMessageResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.workflowId !== 'undefined') {\n toReturn['workflowId'] = this.workflowId;\n }\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n return toReturn;\n }\n}\nclass SendWidgetMessageRequest {\n type;\n body;\n metadata;\n location;\n static fromProto(proto) {\n let m = new SendWidgetMessageRequest();\n m = Object.assign(m, proto);\n if (proto.type) {\n m.type = enumStringToValue(MessageType, proto.type);\n }\n if (proto.metadata) {\n m.metadata = proto.metadata.map(Metadata.fromProto);\n }\n if (proto.location) {\n m.location = enumStringToValue(PlatformLocation, proto.location);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.type !== 'undefined') {\n toReturn['type'] = this.type;\n }\n if (typeof this.body !== 'undefined') {\n toReturn['body'] = this.body;\n }\n if (typeof this.metadata !== 'undefined' && this.metadata !== null) {\n toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;\n }\n if (typeof this.location !== 'undefined') {\n toReturn['location'] = this.location;\n }\n return toReturn;\n }\n}\nclass SendWidgetMessageResponse {\n messageId;\n static fromProto(proto) {\n let m = new SendWidgetMessageResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n return toReturn;\n }\n}\nclass SetLastSeenRequest {\n conversationId;\n participant;\n status;\n static fromProto(proto) {\n let m = new SetLastSeenRequest();\n m = Object.assign(m, proto);\n if (proto.participant) {\n m.participant = Participant.fromProto(proto.participant);\n }\n if (proto.status) {\n m.status = enumStringToValue(SetLastSeenRequestStatus, proto.status);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversationId !== 'undefined') {\n toReturn['conversationId'] = this.conversationId;\n }\n if (typeof this.participant !== 'undefined' && this.participant !== null) {\n toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n return toReturn;\n }\n}\nclass SetLastSeenResponse {\n participant;\n static fromProto(proto) {\n let m = new SetLastSeenResponse();\n m = Object.assign(m, proto);\n if (proto.participant) {\n m.participant = Participant.fromProto(proto.participant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.participant !== 'undefined' && this.participant !== null) {\n toReturn['participant'] = 'toApiJson' in this.participant ? this.participant.toApiJson() : this.participant;\n }\n return toReturn;\n }\n}\nclass UpdateConversationRequest {\n conversation;\n fieldMask;\n static fromProto(proto) {\n let m = new UpdateConversationRequest();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n if (proto.fieldMask) {\n m.fieldMask = FieldMask.fromProto(proto.fieldMask);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {\n toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;\n }\n return toReturn;\n }\n}\nclass UpdateConversationResponse {\n conversation;\n static fromProto(proto) {\n let m = new UpdateConversationResponse();\n m = Object.assign(m, proto);\n if (proto.conversation) {\n m.conversation = Conversation.fromProto(proto.conversation);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.conversation !== 'undefined' && this.conversation !== null) {\n toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;\n }\n return toReturn;\n }\n}\nclass UpdateMessageStatusRequest {\n messageId;\n participantId;\n status;\n static fromProto(proto) {\n let m = new UpdateMessageStatusRequest();\n m = Object.assign(m, proto);\n if (proto.status) {\n m.status = enumStringToValue(MessageStatus, proto.status);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.messageId !== 'undefined') {\n toReturn['messageId'] = this.messageId;\n }\n if (typeof this.participantId !== 'undefined') {\n toReturn['participantId'] = this.participantId;\n }\n if (typeof this.status !== 'undefined') {\n toReturn['status'] = this.status;\n }\n return toReturn;\n }\n}\nclass UpdateMessageTemplateRequest {\n template;\n fieldMask;\n static fromProto(proto) {\n let m = new UpdateMessageTemplateRequest();\n m = Object.assign(m, proto);\n if (proto.template) {\n m.template = MessageTemplate.fromProto(proto.template);\n }\n if (proto.fieldMask) {\n m.fieldMask = FieldMask.fromProto(proto.fieldMask);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.template !== 'undefined' && this.template !== null) {\n toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;\n }\n if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {\n toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;\n }\n return toReturn;\n }\n}\nclass UpdateMessageTemplateResponse {\n template;\n static fromProto(proto) {\n let m = new UpdateMessageTemplateResponse();\n m = Object.assign(m, proto);\n if (proto.template) {\n m.template = MessageTemplate.fromProto(proto.template);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.template !== 'undefined' && this.template !== null) {\n toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;\n }\n return toReturn;\n }\n}\nclass UpdateWidgetRequest {\n widgetId;\n name;\n color;\n allowedUrls;\n welcomeMessage;\n isEnabled;\n fieldMask;\n textColor;\n accentColor;\n accentTextColor;\n static fromProto(proto) {\n let m = new UpdateWidgetRequest();\n m = Object.assign(m, proto);\n if (proto.fieldMask) {\n m.fieldMask = FieldMask.fromProto(proto.fieldMask);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widgetId !== 'undefined') {\n toReturn['widgetId'] = this.widgetId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.color !== 'undefined') {\n toReturn['color'] = this.color;\n }\n if (typeof this.allowedUrls !== 'undefined') {\n toReturn['allowedUrls'] = this.allowedUrls;\n }\n if (typeof this.welcomeMessage !== 'undefined') {\n toReturn['welcomeMessage'] = this.welcomeMessage;\n }\n if (typeof this.isEnabled !== 'undefined') {\n toReturn['isEnabled'] = this.isEnabled;\n }\n if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {\n toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;\n }\n if (typeof this.textColor !== 'undefined') {\n toReturn['textColor'] = this.textColor;\n }\n if (typeof this.accentColor !== 'undefined') {\n toReturn['accentColor'] = this.accentColor;\n }\n if (typeof this.accentTextColor !== 'undefined') {\n toReturn['accentTextColor'] = this.accentTextColor;\n }\n return toReturn;\n }\n}\nclass UpdateWidgetResponse {\n widget;\n static fromProto(proto) {\n let m = new UpdateWidgetResponse();\n m = Object.assign(m, proto);\n if (proto.widget) {\n m.widget = Widget.fromProto(proto.widget);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.widget !== 'undefined' && this.widget !== null) {\n toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;\n }\n return toReturn;\n }\n}\nclass UpsertConfigurationRequest {\n configuration;\n fieldMask;\n static fromProto(proto) {\n let m = new UpsertConfigurationRequest();\n m = Object.assign(m, proto);\n if (proto.configuration) {\n m.configuration = Configuration.fromProto(proto.configuration);\n }\n if (proto.fieldMask) {\n m.fieldMask = FieldMask.fromProto(proto.fieldMask);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.configuration !== 'undefined' && this.configuration !== null) {\n toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;\n }\n if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {\n toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;\n }\n return toReturn;\n }\n}\nclass UpsertConfigurationResponse {\n configuration;\n static fromProto(proto) {\n let m = new UpsertConfigurationResponse();\n m = Object.assign(m, proto);\n if (proto.configuration) {\n m.configuration = Configuration.fromProto(proto.configuration);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.configuration !== 'undefined' && this.configuration !== null) {\n toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;\n }\n return toReturn;\n }\n}\nclass UpsertProductFeatureRequest {\n productFeature;\n fieldMask;\n subjectParticipant;\n static fromProto(proto) {\n let m = new UpsertProductFeatureRequest();\n m = Object.assign(m, proto);\n if (proto.productFeature) {\n m.productFeature = ProductFeature.fromProto(proto.productFeature);\n }\n if (proto.fieldMask) {\n m.fieldMask = FieldMask.fromProto(proto.fieldMask);\n }\n if (proto.subjectParticipant) {\n m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.productFeature !== 'undefined' && this.productFeature !== null) {\n toReturn['productFeature'] = 'toApiJson' in this.productFeature ? this.productFeature.toApiJson() : this.productFeature;\n }\n if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {\n toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;\n }\n if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {\n toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;\n }\n return toReturn;\n }\n}\nclass UpsertProductFeatureResponse {\n productFeature;\n static fromProto(proto) {\n let m = new UpsertProductFeatureResponse();\n m = Object.assign(m, proto);\n if (proto.productFeature) {\n m.productFeature = ProductFeature.fromProto(proto.productFeature);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.productFeature !== 'undefined' && this.productFeature !== null) {\n toReturn['productFeature'] = 'toApiJson' in this.productFeature ? this.productFeature.toApiJson() : this.productFeature;\n }\n return toReturn;\n }\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Objects Index.\n// *********************************\n\nconst environment = (window ? window['environment'] : 'prod') ?? 'prod';\nconst hostMap = {\n 'local': 'conversation-api.vendasta-local.com',\n 'test': '',\n 'demo': 'conversation-demo.apigateway.co',\n 'prod': 'conversation-prod.apigateway.co',\n 'production': 'conversation-prod.apigateway.co'\n};\nlet HostService = /*#__PURE__*/(() => {\n class HostService {\n get host() {\n return hostMap[environment.toLowerCase()];\n }\n get hostWithScheme() {\n return 'https://' + this.host;\n }\n static ɵfac = function HostService_Factory(t) {\n return new (t || HostService)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HostService,\n factory: HostService.ɵfac,\n providedIn: 'root'\n });\n }\n return HostService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet ConversationApiService = /*#__PURE__*/(() => {\n class ConversationApiService {\n hostService = inject(HostService);\n http = inject(HttpClient);\n _host = this.hostService.hostWithScheme;\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n sendMessage(r) {\n const request = r.toApiJson ? r : new SendMessageRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/SendMessage\", request.toApiJson(), this.apiOptions()).pipe(map(resp => SendMessageResponse.fromProto(resp)));\n }\n getMessage(r) {\n const request = r.toApiJson ? r : new GetMessageRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMessage\", request.toApiJson(), this.apiOptions()).pipe(map(resp => Message.fromProto(resp)));\n }\n listMessages(r) {\n const request = r.toApiJson ? r : new ListMessagesRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/ListMessages\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListMessagesResponse.fromProto(resp)));\n }\n deleteMessage(r) {\n const request = r.toApiJson ? r : new DeleteMessageRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/DeleteMessage\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n updateMessageStatus(r) {\n const request = r.toApiJson ? r : new UpdateMessageStatusRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/UpdateMessageStatus\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n lookupConversations(r) {\n const request = r.toApiJson ? r : new LookupConversationsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/LookupConversations\", request.toApiJson(), this.apiOptions()).pipe(map(resp => LookupConversationsResponse.fromProto(resp)));\n }\n getConversationByKey(r) {\n const request = r.toApiJson ? r : new GetConversationByKeyRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetConversationByKey\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetConversationByKeyResponse.fromProto(resp)));\n }\n createConversation(r) {\n const request = r.toApiJson ? r : new CreateConversationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/CreateConversation\", request.toApiJson(), this.apiOptions()).pipe(map(resp => CreateConversationResponse.fromProto(resp)));\n }\n updateConversation(r) {\n const request = r.toApiJson ? r : new UpdateConversationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/UpdateConversation\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpdateConversationResponse.fromProto(resp)));\n }\n deleteConversation(r) {\n const request = r.toApiJson ? r : new DeleteConversationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/DeleteConversation\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n receiveMessage(r) {\n const request = r.toApiJson ? r : new ReceiveMessageRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/ReceiveMessage\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getMultiMessages(r) {\n const request = r.toApiJson ? r : new GetMultiMessagesRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMultiMessages\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiMessagesResponse.fromProto(resp)));\n }\n createMultiMessages(r) {\n const request = r.toApiJson ? r : new CreateMultiMessagesRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/CreateMultiMessages\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n getMultiConversationDetails(r) {\n const request = r.toApiJson ? r : new GetMultiConversationDetailsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMultiConversationDetails\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiConversationDetailsResponse.fromProto(resp)));\n }\n getMultiParticipants(r) {\n const request = r.toApiJson ? r : new GetMultiParticipantsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMultiParticipants\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiParticipantsResponse.fromProto(resp)));\n }\n searchConversations(r) {\n const request = r.toApiJson ? r : new SearchConversationsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/SearchConversations\", request.toApiJson(), this.apiOptions()).pipe(map(resp => SearchConversationsResponse.fromProto(resp)));\n }\n getMultiConversationMessageCount(r) {\n const request = r.toApiJson ? r : new GetMultiConversationMessageCountRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMultiConversationMessageCount\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiConversationMessageCountResponse.fromProto(resp)));\n }\n addMultiParticipants(r) {\n const request = r.toApiJson ? r : new AddMultiParticipantsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/AddMultiParticipants\", request.toApiJson(), this.apiOptions()).pipe(map(resp => AddMultiParticipantsResponse.fromProto(resp)));\n }\n setLastSeen(r) {\n const request = r.toApiJson ? r : new SetLastSeenRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/SetLastSeen\", request.toApiJson(), this.apiOptions()).pipe(map(resp => SetLastSeenResponse.fromProto(resp)));\n }\n getParticipantsByKey(r) {\n const request = r.toApiJson ? r : new GetParticipantsByKeyRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetParticipantsByKey\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetParticipantsByKeyResponse.fromProto(resp)));\n }\n getConversationViews(r) {\n const request = r.toApiJson ? r : new GetConversationViewsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetConversationViews\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetConversationViewsResponse.fromProto(resp)));\n }\n addConversationToConversationView(r) {\n const request = r.toApiJson ? r : new AddConversationToConversationViewRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/AddConversationToConversationView\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n removeConversationFromConversationView(r) {\n const request = r.toApiJson ? r : new RemoveConversationFromConversationViewRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/RemoveConversationFromConversationView\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n createWidgetConversation(r) {\n const request = r.toApiJson ? r : new CreateWidgetConversationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/CreateWidgetConversation\", request.toApiJson(), this.apiOptions()).pipe(map(resp => CreateWidgetConversationResponse.fromProto(resp)));\n }\n getMultiWidgetMessages(r) {\n const request = r.toApiJson ? r : new GetMultiWidgetMessagesRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMultiWidgetMessages\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiWidgetMessagesResponse.fromProto(resp)));\n }\n sendWidgetMessage(r) {\n const request = r.toApiJson ? r : new SendWidgetMessageRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/SendWidgetMessage\", request.toApiJson(), this.apiOptions()).pipe(map(resp => SendWidgetMessageResponse.fromProto(resp)));\n }\n getWidgetConversation() {\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetWidgetConversation\", {}, this.apiOptions()).pipe(map(resp => GetWidgetConversationResponse.fromProto(resp)));\n }\n getAvailableChannelsForConversation(r) {\n const request = r.toApiJson ? r : new GetAvailableChannelsForConversationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetAvailableChannelsForConversation\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetAvailableChannelsForConversationResponse.fromProto(resp)));\n }\n evaluateResponse(r) {\n const request = r.toApiJson ? r : new EvaluateResponseRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/EvaluateResponse\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n createWidget(r) {\n const request = r.toApiJson ? r : new CreateWidgetRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/CreateWidget\", request.toApiJson(), this.apiOptions()).pipe(map(resp => CreateWidgetResponse.fromProto(resp)));\n }\n getWidget(r) {\n const request = r.toApiJson ? r : new GetWidgetRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetWidget\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetWidgetResponse.fromProto(resp)));\n }\n updateWidget(r) {\n const request = r.toApiJson ? r : new UpdateWidgetRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/UpdateWidget\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpdateWidgetResponse.fromProto(resp)));\n }\n deleteWidget(r) {\n const request = r.toApiJson ? r : new DeleteWidgetRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/DeleteWidget\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n listWidgets(r) {\n const request = r.toApiJson ? r : new ListWidgetsRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/ListWidgets\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListWidgetsResponse.fromProto(resp)));\n }\n getWidgetConfig(r) {\n const request = r.toApiJson ? r : new GetWidgetConfigRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetWidgetConfig\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetWidgetConfigResponse.fromProto(resp)));\n }\n listMessageTemplate(r) {\n const request = r.toApiJson ? r : new ListMessageTemplateRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/ListMessageTemplate\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListMessageTemplateResponse.fromProto(resp)));\n }\n deleteMessageTemplate(r) {\n const request = r.toApiJson ? r : new DeleteMessageTemplateRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/DeleteMessageTemplate\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n createMessageTemplate(r) {\n const request = r.toApiJson ? r : new CreateMessageTemplateRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/CreateMessageTemplate\", request.toApiJson(), this.apiOptions()).pipe(map(resp => CreateMessageTemplateResponse.fromProto(resp)));\n }\n updateMessageTemplate(r) {\n const request = r.toApiJson ? r : new UpdateMessageTemplateRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/UpdateMessageTemplate\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpdateMessageTemplateResponse.fromProto(resp)));\n }\n getMessageTemplate(r) {\n const request = r.toApiJson ? r : new GetMessageTemplateRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetMessageTemplate\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMessageTemplateResponse.fromProto(resp)));\n }\n getConversationSummary(r) {\n const request = r.toApiJson ? r : new GetConversationSummaryRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/GetConversationSummary\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetConversationSummaryResponse.fromProto(resp)));\n }\n newInboxLeadCaptured(r) {\n const request = r.toApiJson ? r : new NewInboxLeadCapturedRequest(r);\n return this.http.post(this._host + \"/conversation.v1.ConversationService/NewInboxLeadCaptured\", request.toApiJson(), this.apiOptions()).pipe(map(resp => NewInboxLeadCapturedResponse.fromProto(resp)));\n }\n static ɵfac = function ConversationApiService_Factory(t) {\n return new (t || ConversationApiService)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ConversationApiService,\n factory: ConversationApiService.ɵfac,\n providedIn: 'root'\n });\n }\n return ConversationApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet EmailApiService = /*#__PURE__*/(() => {\n class EmailApiService {\n hostService = inject(HostService);\n http = inject(HttpClient);\n _host = this.hostService.hostWithScheme;\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n getOwnerEmail(r) {\n const request = r.toApiJson ? r : new GetOwnerEmailRequest(r);\n return this.http.post(this._host + \"/conversation.v1.EmailService/GetOwnerEmail\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetOwnerEmailResponse.fromProto(resp)));\n }\n static ɵfac = function EmailApiService_Factory(t) {\n return new (t || EmailApiService)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EmailApiService,\n factory: EmailApiService.ɵfac,\n providedIn: 'root'\n });\n }\n return EmailApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet InboxApiService = /*#__PURE__*/(() => {\n class InboxApiService {\n hostService = inject(HostService);\n http = inject(HttpClient);\n _host = this.hostService.hostWithScheme;\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n getConfiguration(r) {\n const request = r.toApiJson ? r : new GetConfigurationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.InboxService/GetConfiguration\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetConfigurationResponse.fromProto(resp)));\n }\n getMultiConfiguration(r) {\n const request = r.toApiJson ? r : new GetMultiConfigurationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.InboxService/GetMultiConfiguration\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetMultiConfigurationResponse.fromProto(resp)));\n }\n upsertConfiguration(r) {\n const request = r.toApiJson ? r : new UpsertConfigurationRequest(r);\n return this.http.post(this._host + \"/conversation.v1.InboxService/UpsertConfiguration\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));\n }\n upsertProductFeature(r) {\n const request = r.toApiJson ? r : new UpsertProductFeatureRequest(r);\n return this.http.post(this._host + \"/conversation.v1.InboxService/UpsertProductFeature\", request.toApiJson(), this.apiOptions()).pipe(map(resp => UpsertProductFeatureResponse.fromProto(resp)));\n }\n static ɵfac = function InboxApiService_Factory(t) {\n return new (t || InboxApiService)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InboxApiService,\n factory: InboxApiService.ɵfac,\n providedIn: 'root'\n });\n }\n return InboxApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Index.\n// *********************************\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, CapturedLead, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, EmailApiService, EvaluateResponseRequest, EvaluationSentiment, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationSummaryRequest, GetConversationSummaryResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMessageTemplateRequest, GetMessageTemplateResponse, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetOwnerEmailRequest, GetOwnerEmailResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, NamespaceDetail, NewInboxLeadCapturedRequest, NewInboxLeadCapturedResponse, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ProductFeature, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateConversationRequest, UpdateConversationResponse, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, UpsertProductFeatureRequest, UpsertProductFeatureResponse, View, ViewType, Widget, WidgetPosition };\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n standalone: true,\n imports: [CommonModule, MatDialogModule, MatButtonModule],\n templateUrl: './learn-more-modal.component.html',\n styleUrls: ['./learn-more-modal.component.scss'],\n})\nexport class LearnMoreModalComponent {}\n","
\n To prevent spam and other SMS abuse, phone carriers in the United States now require businesses to register their\n phone numbers before sending SMS messages to customers. (Policy known as A2P 10DLC)\n
\n How long does registration take?\n\n Once the form has been submitted, registration through third-party verification can take anywhere from one week, up\n to one month. A third-party agency is being used by telecom carriers in the United States to verify business\n registration data with government databases.\n
\n How do I find my business registration number a.k.a. EIN / Tax ID?\n\n An EIN is a nine-digit number the IRS uses to identify a business for tax purposes, much like a Social Security\n number identifies an individual business. In the US, the Internal Revenue Service (IRS) issues a CP 575 EIN\n Confirmation Letter to confirm the unique Employer Identification Number (EIN) issued to a new business. The EIN\n provided in a CP 575 letter is required to file your company’s taxes, open a business bank account, and apply for a\n business credit card, loan, or payroll processing. You may be able to find your number on previous business tax\n returns, loans, licenses or bank statements. If you can't find your EIN on any of your documents, you can contact\n the IRS at 800-829-4933, Monday through Friday between 7 a.m. and 7 p.m. local time. If your business does not have\n an EIN, you can apply for an EIN by submitting IRS Form SS-4 with the IRS.\n
\n How can I ensure my application is approved?\n\n Make sure the data entered exactly matches the information associated with your EIN, including your legal company\n name. The most common reason for a business’s application being rejected is because the information entered in the\n form does not match the information the IRS has for the business, associated with your EIN.\n
\nAssigned number: {{ (smsNumber$ | async) || '-' }}
\n \n{{ 'SMS_REGISTRATION.CARD.ASSIGNED_NUMBER_DESCRIPTION' | translate }}
\n\n You will not be able to edit this information after submitting. Make sure that all the information you've provided\n is accurate.\n
\n