@vendasta/conversation 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/vendasta-conversation.umd.js +46 -12
- package/bundles/vendasta-conversation.umd.js.map +1 -1
- package/bundles/vendasta-conversation.umd.min.js +1 -1
- package/bundles/vendasta-conversation.umd.min.js.map +1 -1
- package/esm2015/lib/_internal/interfaces/api.interface.js +1 -1
- package/esm2015/lib/_internal/interfaces/index.js +1 -1
- package/esm2015/lib/_internal/objects/api.js +37 -5
- package/esm2015/lib/_internal/objects/index.js +2 -2
- package/fesm2015/vendasta-conversation.js +37 -5
- package/fesm2015/vendasta-conversation.js.map +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +9 -2
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +16 -6
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@angular/core"),require("@angular/common/http"),require("@vendasta/core"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@vendasta/conversation",["exports","@angular/core","@angular/common/http","@vendasta/core","rxjs/operators"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).vendasta=t.vendasta||{},t.vendasta.conversation={}),t.ng.core,t.ng.common.http,t.i1,t.rxjs.operators)}(this,(function(t,i,n,e,o){"use strict";var s,a,r,p,c,h;function u(t,i){return"number"==typeof i?i:t[i]}(s=t.MessageStatus||(t.MessageStatus={}))[s.MESSAGE_STATUS_NOT_READ=0]="MESSAGE_STATUS_NOT_READ",s[s.MESSAGE_STATUS_READ=1]="MESSAGE_STATUS_READ",s[s.MESSAGE_STATUS_SENT=2]="MESSAGE_STATUS_SENT",s[s.MESSAGE_STATUS_DELIVERED=3]="MESSAGE_STATUS_DELIVERED",s[s.MESSAGE_STATUS_FAILED=4]="MESSAGE_STATUS_FAILED",s[s.MESSAGE_STATUS_UNDELIVERED=5]="MESSAGE_STATUS_UNDELIVERED",(a=t.MessageType||(t.MessageType={}))[a.MESSAGE_TYPE_MESSAGE=0]="MESSAGE_TYPE_MESSAGE",a[a.MESSAGE_TYPE_MEDIA=1]="MESSAGE_TYPE_MEDIA",(r=t.ConversationChannel||(t.ConversationChannel={}))[r.CONVERSATION_CHANNEL_UNDEFINED=0]="CONVERSATION_CHANNEL_UNDEFINED",r[r.CONVERSATION_CHANNEL_INTERNAL=1]="CONVERSATION_CHANNEL_INTERNAL",r[r.CONVERSATION_CHANNEL_SMS=2]="CONVERSATION_CHANNEL_SMS",r[r.CONVERSATION_CHANNEL_FACEBOOK=3]="CONVERSATION_CHANNEL_FACEBOOK",r[r.CONVERSATION_CHANNEL_GOOGLE_MESSAGES=4]="CONVERSATION_CHANNEL_GOOGLE_MESSAGES",(p=t.PlatformLocation||(t.PlatformLocation={}))[p.PLATFORM_LOCATION_UNDEFINED=0]="PLATFORM_LOCATION_UNDEFINED",p[p.PLATFORM_LOCATION_BUSINESS_APP=1]="PLATFORM_LOCATION_BUSINESS_APP",p[p.PLATFORM_LOCATION_PARTNER_CENTER=2]="PLATFORM_LOCATION_PARTNER_CENTER",p[p.PLATFORM_LOCATION_VENDOR_CENTER=3]="PLATFORM_LOCATION_VENDOR_CENTER",p[p.PLATFORM_LOCATION_TASK_MANAGER=4]="PLATFORM_LOCATION_TASK_MANAGER",p[p.PLATFORM_LOCATION_PROPOSAL_BUILDER=5]="PLATFORM_LOCATION_PROPOSAL_BUILDER",p[p.PLATFORM_LOCATION_SALES_CENTER=6]="PLATFORM_LOCATION_SALES_CENTER",(c=t.ParticipantType||(t.ParticipantType={}))[c.PARTICIPANT_TYPE_UNDEFINED=0]="PARTICIPANT_TYPE_UNDEFINED",c[c.PARTICIPANT_TYPE_CUSTOMER=1]="PARTICIPANT_TYPE_CUSTOMER",c[c.PARTICIPANT_TYPE_IAM_USER=2]="PARTICIPANT_TYPE_IAM_USER",c[c.PARTICIPANT_TYPE_ACCOUNT_GROUP=3]="PARTICIPANT_TYPE_ACCOUNT_GROUP",c[c.PARTICIPANT_TYPE_PARTNER=4]="PARTICIPANT_TYPE_PARTNER",c[c.PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT=5]="PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT",c[c.PARTICIPANT_TYPE_DIGITAL_AGENT=6]="PARTICIPANT_TYPE_DIGITAL_AGENT",c[c.PARTICIPANT_TYPE_VENDOR=7]="PARTICIPANT_TYPE_VENDOR",(h=t.MetadataIdentifier||(t.MetadataIdentifier={}))[h.METADATA_IDENTIFIER_UNDEFINED=0]="METADATA_IDENTIFIER_UNDEFINED",h[h.METADATA_IDENTIFIER_RECIPIENT=1]="METADATA_IDENTIFIER_RECIPIENT",h[h.METADATA_IDENTIFIER_SENDER=2]="METADATA_IDENTIFIER_SENDER",h[h.METADATA_IDENTIFIER_CONVERSATION=3]="METADATA_IDENTIFIER_CONVERSATION";var d=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.type&&(e.type=u(t.MessageType,n.type)),n.created&&(e.created=new Date(n.created)),n.updated&&(e.updated=new Date(n.updated)),n.deleted&&(e.deleted=new Date(n.deleted)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.externalMessageId&&(t.externalMessageId=this.externalMessageId),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.type&&(t.type=this.type),void 0!==this.body&&(t.body=this.body),void 0!==this.error&&(t.error=this.error),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.media&&(t.media=this.media),t},i}(),v=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.status&&(e.status=u(t.MessageStatus,n.status)),n.updated&&(e.updated=new Date(n.updated)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.status&&(t.status=this.status),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),t},i}();function g(t,i){return"number"==typeof i?i:t[i]}var l=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.channel&&(e.channel=g(t.ConversationChannel,n.channel)),n.created&&(e.created=new Date(n.created)),n.updated&&(e.updated=new Date(n.updated)),n.deleted&&(e.deleted=new Date(n.deleted)),n.latestMsgSentTime&&(e.latestMsgSentTime=new Date(n.latestMsgSentTime)),n.originLocation&&(e.originLocation=g(t.PlatformLocation,n.originLocation)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.participantIds&&(t.participantIds=this.participantIds),void 0!==this.latestMsgSentTime&&null!==this.latestMsgSentTime&&(t.latestMsgSentTime="toApiJson"in this.latestMsgSentTime?this.latestMsgSentTime.toApiJson():this.latestMsgSentTime),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},i}();function A(t,i){return"number"==typeof i?i:t[i]}var f=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.location&&(e.location=A(t.PlatformLocation,n.location)),n.channel&&(e.channel=A(t.ConversationChannel,n.channel)),n.created&&(e.created=new Date(n.created)),n.updated&&(e.updated=new Date(n.updated)),n.deleted&&(e.deleted=new Date(n.deleted)),n.participantType&&(e.participantType=A(t.ParticipantType,n.participantType)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.internalParticipantId&&(t.internalParticipantId=this.internalParticipantId),void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.location&&(t.location=this.location),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalParticipantId&&(t.externalParticipantId=this.externalParticipantId),void 0!==this.name&&(t.name=this.name),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.participantType&&(t.participantType=this.participantType),void 0!==this.email&&(t.email=this.email),void 0!==this.phoneNumber&&(t.phoneNumber=this.phoneNumber),t},i}();function m(t,i){return"number"==typeof i?i:t[i]}var I=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.count&&(n.count=parseInt(i.count,10)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.count&&(t.count=this.count),t},t}(),O=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversation&&(n.conversation=l.fromProto(i.conversation)),i.participants&&(n.participants=i.participants.map(f.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),E=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.participants&&(e.participants=n.participants.map(f.fromProto)),n.channel&&(e.channel=m(t.ConversationChannel,n.channel)),n.created&&(e.created=new Date(n.created)),n.updated&&(e.updated=new Date(n.updated)),n.originLocation&&(e.originLocation=m(t.PlatformLocation,n.originLocation)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},i}(),T=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversation&&(n.conversation=l.fromProto(i.conversation)),i.participants&&(n.participants=i.participants.map(f.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),S=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.messages&&(n.messages=i.messages.map(d.fromProto)),i.lastSeen&&(n.lastSeen=new Date(i.lastSeen)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),void 0!==this.lastSeen&&null!==this.lastSeen&&(t.lastSeen="toApiJson"in this.lastSeen?this.lastSeen.toApiJson():this.lastSeen),t},t}(),P=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.key&&(t.key=this.key),void 0!==this.value&&(t.value=this.value),t},t}(),M=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),t},t}(),C=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),t},t}(),_=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversation&&(n.conversation=l.fromProto(i.conversation)),i.latestMessage&&(n.latestMessage=d.fromProto(i.latestMessage)),i.participants&&(n.participants=i.participants.map(f.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.latestMessage&&null!==this.latestMessage&&(t.latestMessage="toApiJson"in this.latestMessage?this.latestMessage.toApiJson():this.latestMessage),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),J=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversation&&(n.conversation=l.fromProto(i.conversation)),i.latestMessage&&(n.latestMessage=d.fromProto(i.latestMessage)),i.participants&&(n.participants=i.participants.map(f.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.latestMessage&&null!==this.latestMessage&&(t.latestMessage="toApiJson"in this.latestMessage?this.latestMessage.toApiJson():this.latestMessage),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),N=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),t},t}(),R=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationIds&&(t.conversationIds=this.conversationIds),t},t}(),y=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversations&&(n.conversations=i.conversations.map(_.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),t},t}(),b=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationIds&&(t.conversationIds=this.conversationIds),t},t}(),L=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.messageCounts&&(n.messageCounts=i.messageCounts.map(I.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageCounts&&null!==this.messageCounts&&(t.messageCounts="toApiJson"in this.messageCounts?this.messageCounts.toApiJson():this.messageCounts),t},t}(),j=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageIds&&(t.messageIds=this.messageIds),t},t}(),D=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.messages&&(n.messages=i.messages.map(d.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),t},t}(),w=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.participantIds&&(t.participantIds=this.participantIds),t},t}(),G=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.participants&&(n.participants=i.participants.map(f.fromProto)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),U=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),t},t}(),F=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.filters&&(n.filters=U.fromProto(i.filters)),i.pagingOptions&&(n.pagingOptions=W.fromProto(i.pagingOptions)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.filters&&null!==this.filters&&(t.filters="toApiJson"in this.filters?this.filters.toApiJson():this.filters),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},t}(),x=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.messages&&(n.messages=i.messages.map(d.fromProto)),i.pagingMetadata&&(n.pagingMetadata=B.fromProto(i.pagingMetadata)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),k=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.location&&(e.location=m(t.PlatformLocation,n.location)),n.channel&&(e.channel=m(t.ConversationChannel,n.channel)),n.originLocation&&(e.originLocation=m(t.PlatformLocation,n.originLocation)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.internalParticipantId&&(t.internalParticipantId=this.internalParticipantId),void 0!==this.location&&(t.location=this.location),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},i}(),H=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.filters&&(n.filters=k.fromProto(i.filters)),i.pagingOptions&&(n.pagingOptions=W.fromProto(i.pagingOptions)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.filters&&null!==this.filters&&(t.filters="toApiJson"in this.filters?this.filters.toApiJson():this.filters),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},t}(),q=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversations&&(n.conversations=i.conversations.map(O.fromProto)),i.pagingMetadata&&(n.pagingMetadata=B.fromProto(i.pagingMetadata)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),Y=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.identifier&&(e.identifier=m(t.MetadataIdentifier,n.identifier)),n.data&&(e.data=Object.keys(n.data).reduce((function(t,i){return t[i]=n.data[i],t}),{})),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.identifier&&(t.identifier=this.identifier),void 0!==this.data&&null!==this.data&&(t.data="toApiJson"in this.data?this.data.toApiJson():this.data),t},i}(),V=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.key&&(t.key=this.key),void 0!==this.value&&(t.value=this.value),t},t}(),W=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.cursor&&(t.cursor=this.cursor),void 0!==this.pageSize&&(t.pageSize=this.pageSize),t},t}(),B=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.nextCursor&&(t.nextCursor=this.nextCursor),void 0!==this.hasMore&&(t.hasMore=this.hasMore),t},t}(),K=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.channel&&(e.channel=m(t.ConversationChannel,n.channel)),n.type&&(e.type=m(t.MessageType,n.type)),n.location&&(e.location=m(t.PlatformLocation,n.location)),n.metadata&&(e.metadata=Object.keys(n.metadata).reduce((function(t,i){return t[i]=n.metadata[i],t}),{})),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.senderId&&(t.senderId=this.senderId),void 0!==this.recipientId&&(t.recipientId=this.recipientId),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.body&&(t.body=this.body),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.type&&(t.type=this.type),void 0!==this.location&&(t.location=this.location),void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.metadata&&null!==this.metadata&&(t.metadata="toApiJson"in this.metadata?this.metadata.toApiJson():this.metadata),void 0!==this.media&&(t.media=this.media),t},i}(),z=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.location&&(e.location=m(t.PlatformLocation,n.location)),n.pagingOptions&&(e.pagingOptions=W.fromProto(n.pagingOptions)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.location&&(t.location=this.location),void 0!==this.searchTerm&&(t.searchTerm=this.searchTerm),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},i}(),Q=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i),i.conversations&&(n.conversations=i.conversations.map(J.fromProto)),i.pagingMetadata&&(n.pagingMetadata=B.fromProto(i.pagingMetadata)),n},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),X=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.sender&&(e.sender=f.fromProto(n.sender)),n.recipient&&(e.recipient=f.fromProto(n.recipient)),n.type&&(e.type=m(t.MessageType,n.type)),n.metadata&&(e.metadata=n.metadata.map(Y.fromProto)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.sender&&null!==this.sender&&(t.sender="toApiJson"in this.sender?this.sender.toApiJson():this.sender),void 0!==this.recipient&&null!==this.recipient&&(t.recipient="toApiJson"in this.recipient?this.recipient.toApiJson():this.recipient),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.type&&(t.type=this.type),void 0!==this.body&&(t.body=this.body),void 0!==this.metadata&&null!==this.metadata&&(t.metadata="toApiJson"in this.metadata?this.metadata.toApiJson():this.metadata),t},i}(),Z=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(i){var n=new t;return n=Object.assign(n,i)},t.prototype.toApiJson=function(){var t={};return void 0!==this.workflowId&&(t.workflowId=this.workflowId),t},t}(),$=function(){function i(t){t&&Object.assign(this,t)}return i.fromProto=function(n){var e=new i;return e=Object.assign(e,n),n.status&&(e.status=m(t.MessageStatus,n.status)),e},i.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.status&&(t.status=this.status),t},i}(),tt=function(){function t(t){this.environmentService=t}return t.prototype.host=function(){if(this._host)return this._host;switch(this.environmentService.getEnvironment()){case e.Environment.LOCAL:this._host="conversation-api.vendasta-local.com";break;case e.Environment.TEST:this._host="";break;case e.Environment.DEMO:this._host="conversation-demo.apigateway.co";break;case e.Environment.PROD:this._host="conversation-prod.apigateway.co"}return this._host},t.prototype.httpsHost=function(){if(this._httpsHost)return this._httpsHost;switch(this.environmentService.getEnvironment()){case e.Environment.LOCAL:this._httpsHost="conversation.vendasta-local.com";break;case e.Environment.TEST:this._httpsHost="";break;case e.Environment.DEMO:this._httpsHost="conversation-demo.apigateway.co";break;case e.Environment.PROD:this._httpsHost="conversation-prod.apigateway.co"}return this._httpsHost},t.prototype.hostWithScheme=function(){return(this.environmentService.getEnvironment()===e.Environment.LOCAL?"http://":"https://")+this.host()},t.prototype.httpsHostWithScheme=function(){return(this.environmentService.getEnvironment()===e.Environment.LOCAL?"http://":"https://")+this.httpsHost()},t}();tt.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new tt(i.ɵɵinject(e.EnvironmentService))},token:tt,providedIn:"root"}),tt.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[{type:e.EnvironmentService}]};var it=function(){function t(t,i){this.http=t,this.hostService=i}return t.prototype.apiOptions=function(){return{headers:new n.HttpHeaders({"Content-Type":"application/json"}),withCredentials:!0}},t.prototype.sendMessage=function(t){var i=t.toApiJson?t:new X(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/SendMessage",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return Z.fromProto(t)})),o.share())},t.prototype.getMessage=function(t){var i=t.toApiJson?t:new N(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMessage",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return d.fromProto(t)})),o.share())},t.prototype.listMessages=function(t){var i=t.toApiJson?t:new F(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/ListMessages",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return x.fromProto(t)})),o.share())},t.prototype.deleteMessage=function(t){var i=t.toApiJson?t:new C(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/DeleteMessage",i.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.updateMessageStatus=function(t){var i=t.toApiJson?t:new $(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/UpdateMessageStatus",i.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.lookupConversations=function(t){var i=t.toApiJson?t:new H(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/LookupConversations",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return q.fromProto(t)})),o.share())},t.prototype.createConversation=function(t){var i=t.toApiJson?t:new E(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/CreateConversation",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return T.fromProto(t)})),o.share())},t.prototype.deleteConversation=function(t){var i=t.toApiJson?t:new M(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/DeleteConversation",i.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.receiveMessage=function(t){var i=t.toApiJson?t:new K(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/ReceiveMessage",i.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.getMultiMessages=function(t){var i=t.toApiJson?t:new j(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiMessages",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return D.fromProto(t)})),o.share())},t.prototype.createMultiMessages=function(t){var i=t.toApiJson?t:new S(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/CreateMultiMessages",i.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.getMultiConversationDetails=function(t){var i=t.toApiJson?t:new R(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiConversationDetails",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return y.fromProto(t)})),o.share())},t.prototype.getMultiParticipants=function(t){var i=t.toApiJson?t:new w(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiParticipants",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return G.fromProto(t)})),o.share())},t.prototype.searchConversations=function(t){var i=t.toApiJson?t:new z(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/SearchConversations",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return Q.fromProto(t)})),o.share())},t.prototype.getMultiConversationMessageCount=function(t){var i=t.toApiJson?t:new b(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiConversationMessageCount",i.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return L.fromProto(t)})),o.share())},t}();it.ɵprov=i.ɵɵdefineInjectable({factory:function(){return new it(i.ɵɵinject(n.HttpClient),i.ɵɵinject(tt))},token:it,providedIn:"root"}),it.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],it.ctorParameters=function(){return[{type:n.HttpClient},{type:tt}]},t.Conversation=l,t.ConversationApiService=it,t.ConversationMessageCount=I,t.CreateConversationRequest=E,t.CreateConversationResponse=T,t.CreateMultiMessagesRequest=S,t.DeleteConversationRequest=M,t.DeleteMessageRequest=C,t.GetMessageRequest=N,t.GetMultiConversationDetailsRequest=R,t.GetMultiConversationDetailsResponse=y,t.GetMultiConversationDetailsResponseDetailedConversation=_,t.GetMultiConversationMessageCountRequest=b,t.GetMultiConversationMessageCountResponse=L,t.GetMultiMessagesRequest=j,t.GetMultiMessagesResponse=D,t.GetMultiParticipantsRequest=w,t.GetMultiParticipantsResponse=G,t.ListMessagesRequest=F,t.ListMessagesRequestListMessagesFilters=U,t.ListMessagesResponse=x,t.LookupConversationsRequest=H,t.LookupConversationsRequestLookupConversationsFilters=k,t.LookupConversationsResponse=q,t.LookupConversationsResponseConversations=O,t.Message=d,t.Metadata=Y,t.MetadataDataEntry=P,t.PagedRequestOptions=W,t.PagedResponseMetadata=B,t.Participant=f,t.ParticipantMessageStatus=v,t.ReceiveMessageRequest=K,t.ReceiveMessageRequestMetadataEntry=V,t.SearchConversationsRequest=z,t.SearchConversationsResponse=Q,t.SearchConversationsResponseDetailedConversation=J,t.SendMessageRequest=X,t.SendMessageResponse=Z,t.UpdateMessageStatusRequest=$,t.ɵa=tt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common/http"),require("@vendasta/core"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@vendasta/conversation",["exports","@angular/core","@angular/common/http","@vendasta/core","rxjs/operators"],n):n(((t="undefined"!=typeof globalThis?globalThis:t||self).vendasta=t.vendasta||{},t.vendasta.conversation={}),t.ng.core,t.ng.common.http,t.i1,t.rxjs.operators)}(this,(function(t,n,i,e,o){"use strict";var s,a,r,p,c,h;function u(t,n){return"number"==typeof n?n:t[n]}(s=t.MessageStatus||(t.MessageStatus={}))[s.MESSAGE_STATUS_NOT_READ=0]="MESSAGE_STATUS_NOT_READ",s[s.MESSAGE_STATUS_READ=1]="MESSAGE_STATUS_READ",s[s.MESSAGE_STATUS_SENT=2]="MESSAGE_STATUS_SENT",s[s.MESSAGE_STATUS_DELIVERED=3]="MESSAGE_STATUS_DELIVERED",s[s.MESSAGE_STATUS_FAILED=4]="MESSAGE_STATUS_FAILED",s[s.MESSAGE_STATUS_UNDELIVERED=5]="MESSAGE_STATUS_UNDELIVERED",(a=t.MessageType||(t.MessageType={}))[a.MESSAGE_TYPE_MESSAGE=0]="MESSAGE_TYPE_MESSAGE",a[a.MESSAGE_TYPE_MEDIA=1]="MESSAGE_TYPE_MEDIA",(r=t.ConversationChannel||(t.ConversationChannel={}))[r.CONVERSATION_CHANNEL_UNDEFINED=0]="CONVERSATION_CHANNEL_UNDEFINED",r[r.CONVERSATION_CHANNEL_INTERNAL=1]="CONVERSATION_CHANNEL_INTERNAL",r[r.CONVERSATION_CHANNEL_SMS=2]="CONVERSATION_CHANNEL_SMS",r[r.CONVERSATION_CHANNEL_FACEBOOK=3]="CONVERSATION_CHANNEL_FACEBOOK",r[r.CONVERSATION_CHANNEL_GOOGLE_MESSAGES=4]="CONVERSATION_CHANNEL_GOOGLE_MESSAGES",(p=t.PlatformLocation||(t.PlatformLocation={}))[p.PLATFORM_LOCATION_UNDEFINED=0]="PLATFORM_LOCATION_UNDEFINED",p[p.PLATFORM_LOCATION_BUSINESS_APP=1]="PLATFORM_LOCATION_BUSINESS_APP",p[p.PLATFORM_LOCATION_PARTNER_CENTER=2]="PLATFORM_LOCATION_PARTNER_CENTER",p[p.PLATFORM_LOCATION_VENDOR_CENTER=3]="PLATFORM_LOCATION_VENDOR_CENTER",p[p.PLATFORM_LOCATION_TASK_MANAGER=4]="PLATFORM_LOCATION_TASK_MANAGER",p[p.PLATFORM_LOCATION_PROPOSAL_BUILDER=5]="PLATFORM_LOCATION_PROPOSAL_BUILDER",p[p.PLATFORM_LOCATION_SALES_CENTER=6]="PLATFORM_LOCATION_SALES_CENTER",(c=t.ParticipantType||(t.ParticipantType={}))[c.PARTICIPANT_TYPE_UNDEFINED=0]="PARTICIPANT_TYPE_UNDEFINED",c[c.PARTICIPANT_TYPE_CUSTOMER=1]="PARTICIPANT_TYPE_CUSTOMER",c[c.PARTICIPANT_TYPE_IAM_USER=2]="PARTICIPANT_TYPE_IAM_USER",c[c.PARTICIPANT_TYPE_ACCOUNT_GROUP=3]="PARTICIPANT_TYPE_ACCOUNT_GROUP",c[c.PARTICIPANT_TYPE_PARTNER=4]="PARTICIPANT_TYPE_PARTNER",c[c.PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT=5]="PARTICIPANT_TYPE_IAM_TEMPORARY_SUBJECT",c[c.PARTICIPANT_TYPE_DIGITAL_AGENT=6]="PARTICIPANT_TYPE_DIGITAL_AGENT",c[c.PARTICIPANT_TYPE_VENDOR=7]="PARTICIPANT_TYPE_VENDOR",(h=t.MetadataIdentifier||(t.MetadataIdentifier={}))[h.METADATA_IDENTIFIER_UNDEFINED=0]="METADATA_IDENTIFIER_UNDEFINED",h[h.METADATA_IDENTIFIER_RECIPIENT=1]="METADATA_IDENTIFIER_RECIPIENT",h[h.METADATA_IDENTIFIER_SENDER=2]="METADATA_IDENTIFIER_SENDER",h[h.METADATA_IDENTIFIER_CONVERSATION=3]="METADATA_IDENTIFIER_CONVERSATION";var d=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.type&&(e.type=u(t.MessageType,i.type)),i.created&&(e.created=new Date(i.created)),i.updated&&(e.updated=new Date(i.updated)),i.deleted&&(e.deleted=new Date(i.deleted)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.externalMessageId&&(t.externalMessageId=this.externalMessageId),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.type&&(t.type=this.type),void 0!==this.body&&(t.body=this.body),void 0!==this.error&&(t.error=this.error),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.media&&(t.media=this.media),t},n}(),v=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.status&&(e.status=u(t.MessageStatus,i.status)),i.updated&&(e.updated=new Date(i.updated)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.status&&(t.status=this.status),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),t},n}();function g(t,n){return"number"==typeof n?n:t[n]}var l=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.channel&&(e.channel=g(t.ConversationChannel,i.channel)),i.created&&(e.created=new Date(i.created)),i.updated&&(e.updated=new Date(i.updated)),i.deleted&&(e.deleted=new Date(i.deleted)),i.latestMsgSentTime&&(e.latestMsgSentTime=new Date(i.latestMsgSentTime)),i.originLocation&&(e.originLocation=g(t.PlatformLocation,i.originLocation)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.participantIds&&(t.participantIds=this.participantIds),void 0!==this.latestMsgSentTime&&null!==this.latestMsgSentTime&&(t.latestMsgSentTime="toApiJson"in this.latestMsgSentTime?this.latestMsgSentTime.toApiJson():this.latestMsgSentTime),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},n}();function f(t,n){return"number"==typeof n?n:t[n]}var A=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.location&&(e.location=f(t.PlatformLocation,i.location)),i.channel&&(e.channel=f(t.ConversationChannel,i.channel)),i.created&&(e.created=new Date(i.created)),i.updated&&(e.updated=new Date(i.updated)),i.deleted&&(e.deleted=new Date(i.deleted)),i.participantType&&(e.participantType=f(t.ParticipantType,i.participantType)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.internalParticipantId&&(t.internalParticipantId=this.internalParticipantId),void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.location&&(t.location=this.location),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalParticipantId&&(t.externalParticipantId=this.externalParticipantId),void 0!==this.name&&(t.name=this.name),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.deleted&&null!==this.deleted&&(t.deleted="toApiJson"in this.deleted?this.deleted.toApiJson():this.deleted),void 0!==this.participantType&&(t.participantType=this.participantType),void 0!==this.email&&(t.email=this.email),void 0!==this.phoneNumber&&(t.phoneNumber=this.phoneNumber),t},n}();function m(t,n){return"number"==typeof n?n:t[n]}var I=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.count&&(i.count=parseInt(n.count,10)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.count&&(t.count=this.count),t},t}(),O=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversation&&(i.conversation=l.fromProto(n.conversation)),n.participants&&(i.participants=n.participants.map(A.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),E=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.value&&(i.value=parseInt(n.value,10)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.key&&(t.key=this.key),void 0!==this.value&&(t.value=this.value),t},t}(),T=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.participants&&(e.participants=i.participants.map(A.fromProto)),i.channel&&(e.channel=m(t.ConversationChannel,i.channel)),i.created&&(e.created=new Date(i.created)),i.updated&&(e.updated=new Date(i.updated)),i.originLocation&&(e.originLocation=m(t.PlatformLocation,i.originLocation)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.created&&null!==this.created&&(t.created="toApiJson"in this.created?this.created.toApiJson():this.created),void 0!==this.updated&&null!==this.updated&&(t.updated="toApiJson"in this.updated?this.updated.toApiJson():this.updated),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},n}(),S=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversation&&(i.conversation=l.fromProto(n.conversation)),n.participants&&(i.participants=n.participants.map(A.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),P=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.messages&&(i.messages=n.messages.map(d.fromProto)),n.lastSeen&&(i.lastSeen=new Date(n.lastSeen)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),void 0!==this.lastSeen&&null!==this.lastSeen&&(t.lastSeen="toApiJson"in this.lastSeen?this.lastSeen.toApiJson():this.lastSeen),t},t}(),M=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.key&&(t.key=this.key),void 0!==this.value&&(t.value=this.value),t},t}(),C=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),t},t}(),_=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),t},t}(),J=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversation&&(i.conversation=l.fromProto(n.conversation)),n.latestMessage&&(i.latestMessage=d.fromProto(n.latestMessage)),n.participants&&(i.participants=n.participants.map(A.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.latestMessage&&null!==this.latestMessage&&(t.latestMessage="toApiJson"in this.latestMessage?this.latestMessage.toApiJson():this.latestMessage),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),y=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversation&&(i.conversation=l.fromProto(n.conversation)),n.latestMessage&&(i.latestMessage=d.fromProto(n.latestMessage)),n.participants&&(i.participants=n.participants.map(A.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversation&&null!==this.conversation&&(t.conversation="toApiJson"in this.conversation?this.conversation.toApiJson():this.conversation),void 0!==this.latestMessage&&null!==this.latestMessage&&(t.latestMessage="toApiJson"in this.latestMessage?this.latestMessage.toApiJson():this.latestMessage),void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),N=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),t},t}(),R=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationIds&&(t.conversationIds=this.conversationIds),t},t}(),b=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversations&&(i.conversations=n.conversations.map(y.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),t},t}(),L=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationIds&&(t.conversationIds=this.conversationIds),t},t}(),j=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.messageCounts&&(i.messageCounts=n.messageCounts.map(I.fromProto)),n.counts&&(i.counts=Object.keys(n.counts).reduce((function(t,i){return t[i]=parseInt(n.counts[i],10),t}),{})),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageCounts&&null!==this.messageCounts&&(t.messageCounts="toApiJson"in this.messageCounts?this.messageCounts.toApiJson():this.messageCounts),void 0!==this.counts&&null!==this.counts&&(t.counts="toApiJson"in this.counts?this.counts.toApiJson():this.counts),t},t}(),D=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.messageIds&&(t.messageIds=this.messageIds),t},t}(),w=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.messages&&(i.messages=n.messages.map(d.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),t},t}(),G=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.participantIds&&(t.participantIds=this.participantIds),t},t}(),U=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.participants&&(i.participants=n.participants.map(A.fromProto)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.participants&&null!==this.participants&&(t.participants="toApiJson"in this.participants?this.participants.toApiJson():this.participants),t},t}(),F=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversationId&&(t.conversationId=this.conversationId),t},t}(),x=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.filters&&(i.filters=F.fromProto(n.filters)),n.pagingOptions&&(i.pagingOptions=B.fromProto(n.pagingOptions)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.filters&&null!==this.filters&&(t.filters="toApiJson"in this.filters?this.filters.toApiJson():this.filters),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},t}(),k=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.messages&&(i.messages=n.messages.map(d.fromProto)),n.pagingMetadata&&(i.pagingMetadata=K.fromProto(n.pagingMetadata)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.messages&&null!==this.messages&&(t.messages="toApiJson"in this.messages?this.messages.toApiJson():this.messages),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),H=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.location&&(e.location=m(t.PlatformLocation,i.location)),i.channel&&(e.channel=m(t.ConversationChannel,i.channel)),i.originLocation&&(e.originLocation=m(t.PlatformLocation,i.originLocation)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.internalParticipantId&&(t.internalParticipantId=this.internalParticipantId),void 0!==this.location&&(t.location=this.location),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.externalConversationId&&(t.externalConversationId=this.externalConversationId),void 0!==this.originLocation&&(t.originLocation=this.originLocation),void 0!==this.originLocationExternalId&&(t.originLocationExternalId=this.originLocationExternalId),t},n}(),q=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.filters&&(i.filters=H.fromProto(n.filters)),n.pagingOptions&&(i.pagingOptions=B.fromProto(n.pagingOptions)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.filters&&null!==this.filters&&(t.filters="toApiJson"in this.filters?this.filters.toApiJson():this.filters),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},t}(),Y=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversations&&(i.conversations=n.conversations.map(O.fromProto)),n.pagingMetadata&&(i.pagingMetadata=K.fromProto(n.pagingMetadata)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),V=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.identifier&&(e.identifier=m(t.MetadataIdentifier,i.identifier)),i.data&&(e.data=Object.keys(i.data).reduce((function(t,n){return t[n]=i.data[n],t}),{})),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.identifier&&(t.identifier=this.identifier),void 0!==this.data&&null!==this.data&&(t.data="toApiJson"in this.data?this.data.toApiJson():this.data),t},n}(),W=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.key&&(t.key=this.key),void 0!==this.value&&(t.value=this.value),t},t}(),B=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.cursor&&(t.cursor=this.cursor),void 0!==this.pageSize&&(t.pageSize=this.pageSize),t},t}(),K=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.nextCursor&&(t.nextCursor=this.nextCursor),void 0!==this.hasMore&&(t.hasMore=this.hasMore),t},t}(),z=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.channel&&(e.channel=m(t.ConversationChannel,i.channel)),i.type&&(e.type=m(t.MessageType,i.type)),i.location&&(e.location=m(t.PlatformLocation,i.location)),i.metadata&&(e.metadata=Object.keys(i.metadata).reduce((function(t,n){return t[n]=i.metadata[n],t}),{})),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.senderId&&(t.senderId=this.senderId),void 0!==this.recipientId&&(t.recipientId=this.recipientId),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.body&&(t.body=this.body),void 0!==this.channel&&(t.channel=this.channel),void 0!==this.type&&(t.type=this.type),void 0!==this.location&&(t.location=this.location),void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.metadata&&null!==this.metadata&&(t.metadata="toApiJson"in this.metadata?this.metadata.toApiJson():this.metadata),void 0!==this.media&&(t.media=this.media),t},n}(),Q=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.location&&(e.location=m(t.PlatformLocation,i.location)),i.pagingOptions&&(e.pagingOptions=B.fromProto(i.pagingOptions)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.partnerId&&(t.partnerId=this.partnerId),void 0!==this.accountGroupId&&(t.accountGroupId=this.accountGroupId),void 0!==this.location&&(t.location=this.location),void 0!==this.searchTerm&&(t.searchTerm=this.searchTerm),void 0!==this.pagingOptions&&null!==this.pagingOptions&&(t.pagingOptions="toApiJson"in this.pagingOptions?this.pagingOptions.toApiJson():this.pagingOptions),t},n}(),X=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n),n.conversations&&(i.conversations=n.conversations.map(J.fromProto)),n.pagingMetadata&&(i.pagingMetadata=K.fromProto(n.pagingMetadata)),i},t.prototype.toApiJson=function(){var t={};return void 0!==this.conversations&&null!==this.conversations&&(t.conversations="toApiJson"in this.conversations?this.conversations.toApiJson():this.conversations),void 0!==this.pagingMetadata&&null!==this.pagingMetadata&&(t.pagingMetadata="toApiJson"in this.pagingMetadata?this.pagingMetadata.toApiJson():this.pagingMetadata),t},t}(),Z=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.sender&&(e.sender=A.fromProto(i.sender)),i.recipient&&(e.recipient=A.fromProto(i.recipient)),i.type&&(e.type=m(t.MessageType,i.type)),i.metadata&&(e.metadata=i.metadata.map(V.fromProto)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.sender&&null!==this.sender&&(t.sender="toApiJson"in this.sender?this.sender.toApiJson():this.sender),void 0!==this.recipient&&null!==this.recipient&&(t.recipient="toApiJson"in this.recipient?this.recipient.toApiJson():this.recipient),void 0!==this.conversationId&&(t.conversationId=this.conversationId),void 0!==this.type&&(t.type=this.type),void 0!==this.body&&(t.body=this.body),void 0!==this.metadata&&null!==this.metadata&&(t.metadata="toApiJson"in this.metadata?this.metadata.toApiJson():this.metadata),t},n}(),$=function(){function t(t){t&&Object.assign(this,t)}return t.fromProto=function(n){var i=new t;return i=Object.assign(i,n)},t.prototype.toApiJson=function(){var t={};return void 0!==this.workflowId&&(t.workflowId=this.workflowId),t},t}(),tt=function(){function n(t){t&&Object.assign(this,t)}return n.fromProto=function(i){var e=new n;return e=Object.assign(e,i),i.status&&(e.status=m(t.MessageStatus,i.status)),e},n.prototype.toApiJson=function(){var t={};return void 0!==this.messageId&&(t.messageId=this.messageId),void 0!==this.participantId&&(t.participantId=this.participantId),void 0!==this.status&&(t.status=this.status),t},n}(),nt=function(){function t(t){this.environmentService=t}return t.prototype.host=function(){if(this._host)return this._host;switch(this.environmentService.getEnvironment()){case e.Environment.LOCAL:this._host="conversation-api.vendasta-local.com";break;case e.Environment.TEST:this._host="";break;case e.Environment.DEMO:this._host="conversation-demo.apigateway.co";break;case e.Environment.PROD:this._host="conversation-prod.apigateway.co"}return this._host},t.prototype.httpsHost=function(){if(this._httpsHost)return this._httpsHost;switch(this.environmentService.getEnvironment()){case e.Environment.LOCAL:this._httpsHost="conversation.vendasta-local.com";break;case e.Environment.TEST:this._httpsHost="";break;case e.Environment.DEMO:this._httpsHost="conversation-demo.apigateway.co";break;case e.Environment.PROD:this._httpsHost="conversation-prod.apigateway.co"}return this._httpsHost},t.prototype.hostWithScheme=function(){return(this.environmentService.getEnvironment()===e.Environment.LOCAL?"http://":"https://")+this.host()},t.prototype.httpsHostWithScheme=function(){return(this.environmentService.getEnvironment()===e.Environment.LOCAL?"http://":"https://")+this.httpsHost()},t}();nt.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new nt(n.ɵɵinject(e.EnvironmentService))},token:nt,providedIn:"root"}),nt.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],nt.ctorParameters=function(){return[{type:e.EnvironmentService}]};var it=function(){function t(t,n){this.http=t,this.hostService=n}return t.prototype.apiOptions=function(){return{headers:new i.HttpHeaders({"Content-Type":"application/json"}),withCredentials:!0}},t.prototype.sendMessage=function(t){var n=t.toApiJson?t:new Z(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/SendMessage",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return $.fromProto(t)})),o.share())},t.prototype.getMessage=function(t){var n=t.toApiJson?t:new N(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMessage",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return d.fromProto(t)})),o.share())},t.prototype.listMessages=function(t){var n=t.toApiJson?t:new x(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/ListMessages",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return k.fromProto(t)})),o.share())},t.prototype.deleteMessage=function(t){var n=t.toApiJson?t:new _(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/DeleteMessage",n.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.updateMessageStatus=function(t){var n=t.toApiJson?t:new tt(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/UpdateMessageStatus",n.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.lookupConversations=function(t){var n=t.toApiJson?t:new q(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/LookupConversations",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return Y.fromProto(t)})),o.share())},t.prototype.createConversation=function(t){var n=t.toApiJson?t:new T(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/CreateConversation",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return S.fromProto(t)})),o.share())},t.prototype.deleteConversation=function(t){var n=t.toApiJson?t:new C(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/DeleteConversation",n.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.receiveMessage=function(t){var n=t.toApiJson?t:new z(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/ReceiveMessage",n.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.getMultiMessages=function(t){var n=t.toApiJson?t:new D(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiMessages",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return w.fromProto(t)})),o.share())},t.prototype.createMultiMessages=function(t){var n=t.toApiJson?t:new P(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/CreateMultiMessages",n.toApiJson(),Object.assign(Object.assign({},this.apiOptions()),{observe:"response"}))},t.prototype.getMultiConversationDetails=function(t){var n=t.toApiJson?t:new R(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiConversationDetails",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return b.fromProto(t)})),o.share())},t.prototype.getMultiParticipants=function(t){var n=t.toApiJson?t:new G(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiParticipants",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return U.fromProto(t)})),o.share())},t.prototype.searchConversations=function(t){var n=t.toApiJson?t:new Q(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/SearchConversations",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return X.fromProto(t)})),o.share())},t.prototype.getMultiConversationMessageCount=function(t){var n=t.toApiJson?t:new L(t);return this.http.post(this.hostService.hostWithScheme()+"/conversation.v1.ConversationService/GetMultiConversationMessageCount",n.toApiJson(),this.apiOptions()).pipe(o.map((function(t){return j.fromProto(t)})),o.share())},t}();it.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new it(n.ɵɵinject(i.HttpClient),n.ɵɵinject(nt))},token:it,providedIn:"root"}),it.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],it.ctorParameters=function(){return[{type:i.HttpClient},{type:nt}]},t.Conversation=l,t.ConversationApiService=it,t.ConversationMessageCount=I,t.CreateConversationRequest=T,t.CreateConversationResponse=S,t.CreateMultiMessagesRequest=P,t.DeleteConversationRequest=C,t.DeleteMessageRequest=_,t.GetMessageRequest=N,t.GetMultiConversationDetailsRequest=R,t.GetMultiConversationDetailsResponse=b,t.GetMultiConversationDetailsResponseDetailedConversation=y,t.GetMultiConversationMessageCountRequest=L,t.GetMultiConversationMessageCountResponse=j,t.GetMultiConversationMessageCountResponseCountsEntry=E,t.GetMultiMessagesRequest=D,t.GetMultiMessagesResponse=w,t.GetMultiParticipantsRequest=G,t.GetMultiParticipantsResponse=U,t.ListMessagesRequest=x,t.ListMessagesRequestListMessagesFilters=F,t.ListMessagesResponse=k,t.LookupConversationsRequest=q,t.LookupConversationsRequestLookupConversationsFilters=H,t.LookupConversationsResponse=Y,t.LookupConversationsResponseConversations=O,t.Message=d,t.Metadata=V,t.MetadataDataEntry=M,t.PagedRequestOptions=B,t.PagedResponseMetadata=K,t.Participant=A,t.ParticipantMessageStatus=v,t.ReceiveMessageRequest=z,t.ReceiveMessageRequestMetadataEntry=W,t.SearchConversationsRequest=Q,t.SearchConversationsResponse=X,t.SearchConversationsResponseDetailedConversation=J,t.SendMessageRequest=Z,t.SendMessageResponse=$,t.UpdateMessageStatusRequest=tt,t.ɵa=nt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=vendasta-conversation.umd.min.js.map
|