@trii/types 2.11.4 → 3.0.0-preview.2
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/dist/Automations/Events/Event.d.ts +3 -3
- package/dist/Common/Messages/EmailQueue.d.ts +53 -0
- package/dist/Common/Messages/EmailQueue.js +41 -0
- package/dist/Common/Messages/EmailUnsubscribe.d.ts +19 -0
- package/dist/Common/Messages/EmailUnsubscribe.js +61 -0
- package/dist/Common/Messages/Message.d.ts +213 -45
- package/dist/Common/Messages/Message.js +45 -1
- package/dist/Common/Messages/MessageIdentityIndex.d.ts +19 -0
- package/dist/Common/Messages/MessageModel.d.ts +72 -0
- package/dist/Common/Messages/MessageModel.js +56 -0
- package/dist/Common/Messages/SendOperation.d.ts +157 -0
- package/dist/Common/Messages/SendOperation.js +17 -0
- package/dist/Common/Messages/index.d.ts +5 -0
- package/dist/Common/Messages/index.js +5 -0
- package/dist/Common/Variables.d.ts +22 -0
- package/dist/Common/Variables.js +7 -0
- package/dist/Common/index.d.ts +1 -0
- package/dist/Common/index.js +2 -1
- package/dist/Contacts/BusinessModel.d.ts +53 -0
- package/dist/Contacts/BusinessModel.js +10 -0
- package/dist/Contacts/ChannelIdentityModel.d.ts +116 -0
- package/dist/Contacts/ChannelIdentityModel.js +54 -0
- package/dist/Contacts/CommunicationEndpoint.d.ts +9 -9
- package/dist/Contacts/IdentityErrors.d.ts +42 -0
- package/dist/Contacts/IdentityErrors.js +10 -0
- package/dist/Contacts/IdentityEvents.d.ts +60 -0
- package/dist/Contacts/IdentityPolicyChange.d.ts +51 -0
- package/dist/Contacts/IdentityPolicyChange.js +12 -0
- package/dist/Contacts/Note.d.ts +24 -0
- package/dist/Contacts/Note.js +2 -0
- package/dist/Contacts/contacts.d.ts +92 -31
- package/dist/Contacts/contacts.js +2 -0
- package/dist/Contacts/index.d.ts +5 -0
- package/dist/Contacts/index.js +5 -0
- package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +2 -2
- package/dist/Conversations/Conversation.d.ts +49 -12
- package/dist/Conversations/Conversation.js +5 -1
- package/dist/Conversations/ConversationAssociationEvents.d.ts +22 -0
- package/dist/Conversations/ConversationAssociationEvents.js +8 -0
- package/dist/Conversations/Routing.d.ts +10 -10
- package/dist/Conversations/index.d.ts +1 -0
- package/dist/Conversations/index.js +1 -0
- package/dist/Events/DomainEventTypes.d.ts +23 -23
- package/dist/Marketing/Subscriber.d.ts +34 -2
- package/dist/Media/MediaApi.d.ts +49 -0
- package/dist/Media/MediaAsset.d.ts +156 -0
- package/dist/Media/MediaAsset.js +66 -0
- package/dist/Media/index.d.ts +2 -0
- package/dist/{src/Accounts → Media}/index.js +2 -2
- package/dist/Spaces/spaces.d.ts +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
- package/dist/Conversations/InboxCounters.d.ts +0 -18
- package/dist/Conversations/InboxMongo.d.ts +0 -154
- package/dist/Conversations/InboxMongo.js +0 -128
- package/dist/Conversations/InboxProjection.d.ts +0 -162
- package/dist/src/AI/Credential.d.ts +0 -13
- package/dist/src/AI/Documents/Document.d.ts +0 -36
- package/dist/src/AI/Documents/Document.js +0 -15
- package/dist/src/AI/Documents/Store.d.ts +0 -25
- package/dist/src/AI/Documents/Store.js +0 -10
- package/dist/src/AI/Map.d.ts +0 -13
- package/dist/src/AI/Map.js +0 -2
- package/dist/src/AI/Provider.d.ts +0 -6
- package/dist/src/AI/Provider.js +0 -2
- package/dist/src/AI/Threads/API.d.ts +0 -55
- package/dist/src/AI/Threads/API.js +0 -2
- package/dist/src/AI/Threads/Message.d.ts +0 -61
- package/dist/src/AI/Threads/Message.js +0 -2
- package/dist/src/AI/Threads/Thread.d.ts +0 -22
- package/dist/src/AI/Threads/Thread.js +0 -2
- package/dist/src/AI/Threads/index.d.ts +0 -3
- package/dist/src/AI/Threads/index.js +0 -19
- package/dist/src/AI/aiModuleStatus.d.ts +0 -3
- package/dist/src/AI/aiModuleStatus.js +0 -2
- package/dist/src/AI/index.d.ts +0 -4
- package/dist/src/AI/index.js +0 -20
- package/dist/src/Accounts/accounts.d.ts +0 -88
- package/dist/src/Accounts/accounts.js +0 -24
- package/dist/src/Accounts/device.d.ts +0 -31
- package/dist/src/Accounts/device.js +0 -19
- package/dist/src/Accounts/index.d.ts +0 -2
- package/dist/src/ApiResponses/index.d.ts +0 -9
- package/dist/src/ApiResponses/index.js +0 -2
- package/dist/src/AuditLogs/auditLog.d.ts +0 -9
- package/dist/src/AuditLogs/auditLog.js +0 -2
- package/dist/src/AuditLogs/auditLogType.d.ts +0 -5
- package/dist/src/AuditLogs/auditLogType.js +0 -9
- package/dist/src/AuditLogs/index.d.ts +0 -2
- package/dist/src/AuditLogs/index.js +0 -18
- package/dist/src/Calendar/Calendar.d.ts +0 -18
- package/dist/src/Calendar/Calendar.js +0 -2
- package/dist/src/Calendar/Common.d.ts +0 -77
- package/dist/src/Calendar/Common.js +0 -16
- package/dist/src/Calendar/Event.d.ts +0 -64
- package/dist/src/Calendar/Event.js +0 -16
- package/dist/src/Calendar/Events.d.ts +0 -61
- package/dist/src/Calendar/Events.js +0 -5
- package/dist/src/Calendar/Task.d.ts +0 -12
- package/dist/src/Calendar/Task.js +0 -2
- package/dist/src/Calendar/Tasks.d.ts +0 -18
- package/dist/src/Calendar/Tasks.js +0 -5
- package/dist/src/Calendar/index.d.ts +0 -3
- package/dist/src/Calendar/index.js +0 -19
- package/dist/src/Calls/Audio.d.ts +0 -17
- package/dist/src/Calls/Audio.js +0 -8
- package/dist/src/Calls/Call.d.ts +0 -59
- package/dist/src/Calls/Call.js +0 -25
- package/dist/src/Calls/Codecs.d.ts +0 -5
- package/dist/src/Calls/Codecs.js +0 -21
- package/dist/src/Calls/Extension.d.ts +0 -24
- package/dist/src/Calls/Extension.js +0 -2
- package/dist/src/Calls/Options.d.ts +0 -5
- package/dist/src/Calls/Options.js +0 -2
- package/dist/src/Calls/Queue.d.ts +0 -52
- package/dist/src/Calls/Queue.js +0 -12
- package/dist/src/Calls/RingGroup.d.ts +0 -46
- package/dist/src/Calls/RingGroup.js +0 -27
- package/dist/src/Calls/Transport.d.ts +0 -6
- package/dist/src/Calls/Transport.js +0 -11
- package/dist/src/Calls/Trunk.d.ts +0 -31
- package/dist/src/Calls/Trunk.js +0 -2
- package/dist/src/Calls/index.d.ts +0 -6
- package/dist/src/Calls/index.js +0 -22
- package/dist/src/Collections/Api.d.ts +0 -41
- package/dist/src/Collections/Api.js +0 -2
- package/dist/src/Collections/Commission.d.ts +0 -52
- package/dist/src/Collections/Commission.js +0 -10
- package/dist/src/Collections/Common.d.ts +0 -78
- package/dist/src/Collections/Common.js +0 -39
- package/dist/src/Collections/Dashboard.d.ts +0 -27
- package/dist/src/Collections/Dashboard.js +0 -2
- package/dist/src/Collections/Debt.d.ts +0 -97
- package/dist/src/Collections/Debt.js +0 -12
- package/dist/src/Collections/Interest.d.ts +0 -38
- package/dist/src/Collections/Interest.js +0 -25
- package/dist/src/Collections/Payment.d.ts +0 -87
- package/dist/src/Collections/Payment.js +0 -21
- package/dist/src/Collections/PaymentPlan.d.ts +0 -87
- package/dist/src/Collections/PaymentPlan.js +0 -21
- package/dist/src/Collections/PaymentPlanConfiguration.d.ts +0 -100
- package/dist/src/Collections/PaymentPlanConfiguration.js +0 -34
- package/dist/src/Collections/Portfolio.d.ts +0 -52
- package/dist/src/Collections/Portfolio.js +0 -12
- package/dist/src/Collections/Promise.d.ts +0 -49
- package/dist/src/Collections/Promise.js +0 -25
- package/dist/src/Collections/index.d.ts +0 -11
- package/dist/src/Collections/index.js +0 -27
- package/dist/src/Common/API/AuthApiKey.d.ts +0 -5
- package/dist/src/Common/API/AuthApiKey.js +0 -2
- package/dist/src/Common/API/AuthBasic.d.ts +0 -4
- package/dist/src/Common/API/AuthBasic.js +0 -2
- package/dist/src/Common/API/AuthBearer.d.ts +0 -5
- package/dist/src/Common/API/AuthBearer.js +0 -2
- package/dist/src/Common/API/AuthType.d.ts +0 -6
- package/dist/src/Common/API/AuthType.js +0 -10
- package/dist/src/Common/API/Method.d.ts +0 -4
- package/dist/src/Common/API/Method.js +0 -8
- package/dist/src/Common/API/index.d.ts +0 -5
- package/dist/src/Common/API/index.js +0 -21
- package/dist/src/Common/Channels/Channel.d.ts +0 -99
- package/dist/src/Common/Channels/Channel.js +0 -20
- package/dist/src/Common/Channels/ChannelAccount.d.ts +0 -35
- package/dist/src/Common/Channels/ChannelAccount.js +0 -17
- package/dist/src/Common/Channels/ChannelType.d.ts +0 -24
- package/dist/src/Common/Channels/ChannelType.js +0 -28
- package/dist/src/Common/Channels/Email.d.ts +0 -62
- package/dist/src/Common/Channels/Email.js +0 -36
- package/dist/src/Common/Channels/Facebook.d.ts +0 -25
- package/dist/src/Common/Channels/Facebook.js +0 -6
- package/dist/src/Common/Channels/Form.d.ts +0 -118
- package/dist/src/Common/Channels/Form.js +0 -32
- package/dist/src/Common/Channels/GoogleBusiness.d.ts +0 -20
- package/dist/src/Common/Channels/GoogleBusiness.js +0 -9
- package/dist/src/Common/Channels/Instagram.d.ts +0 -29
- package/dist/src/Common/Channels/Instagram.js +0 -14
- package/dist/src/Common/Channels/MercadoLibre.d.ts +0 -27
- package/dist/src/Common/Channels/MercadoLibre.js +0 -9
- package/dist/src/Common/Channels/Pbx.d.ts +0 -2
- package/dist/src/Common/Channels/Pbx.js +0 -6
- package/dist/src/Common/Channels/Permission.d.ts +0 -6
- package/dist/src/Common/Channels/Permission.js +0 -6
- package/dist/src/Common/Channels/RCS.d.ts +0 -37
- package/dist/src/Common/Channels/RCS.js +0 -9
- package/dist/src/Common/Channels/Sip.d.ts +0 -2
- package/dist/src/Common/Channels/Sip.js +0 -6
- package/dist/src/Common/Channels/Sms.d.ts +0 -46
- package/dist/src/Common/Channels/Sms.js +0 -16
- package/dist/src/Common/Channels/WebChat.d.ts +0 -62
- package/dist/src/Common/Channels/WebChat.js +0 -19
- package/dist/src/Common/Channels/WhatsApp.d.ts +0 -89
- package/dist/src/Common/Channels/WhatsApp.js +0 -18
- package/dist/src/Common/Channels/index.d.ts +0 -16
- package/dist/src/Common/Channels/index.js +0 -32
- package/dist/src/Common/EventsQueue/Data/postComment.d.ts +0 -26
- package/dist/src/Common/EventsQueue/Data/postComment.js +0 -2
- package/dist/src/Common/EventsQueue/EmailTemplate.d.ts +0 -10
- package/dist/src/Common/EventsQueue/EmailTemplate.js +0 -2
- package/dist/src/Common/EventsQueue/EventQueue.d.ts +0 -13
- package/dist/src/Common/EventsQueue/EventQueue.js +0 -2
- package/dist/src/Common/EventsQueue/UserUpdate.d.ts +0 -8
- package/dist/src/Common/EventsQueue/UserUpdate.js +0 -2
- package/dist/src/Common/EventsQueue/index.d.ts +0 -3
- package/dist/src/Common/EventsQueue/index.js +0 -19
- package/dist/src/Common/Logs/Log.d.ts +0 -18
- package/dist/src/Common/Logs/Log.js +0 -13
- package/dist/src/Common/Logs/index.d.ts +0 -1
- package/dist/src/Common/Logs/index.js +0 -17
- package/dist/src/Common/Messages/MediaFile.d.ts +0 -5
- package/dist/src/Common/Messages/MediaFile.js +0 -2
- package/dist/src/Common/Messages/Message.d.ts +0 -423
- package/dist/src/Common/Messages/Message.js +0 -62
- package/dist/src/Common/Messages/Template.d.ts +0 -86
- package/dist/src/Common/Messages/Template.js +0 -26
- package/dist/src/Common/Messages/index.d.ts +0 -3
- package/dist/src/Common/Messages/index.js +0 -19
- package/dist/src/Common/Notifications/Notification.d.ts +0 -19
- package/dist/src/Common/Notifications/Notification.js +0 -10
- package/dist/src/Common/Notifications/UserNotificationsConfig.d.ts +0 -33
- package/dist/src/Common/Notifications/UserNotificationsConfig.js +0 -18
- package/dist/src/Common/Notifications/index.d.ts +0 -2
- package/dist/src/Common/Notifications/index.js +0 -18
- package/dist/src/Common/Schedules/Schedules.d.ts +0 -32
- package/dist/src/Common/Schedules/Schedules.js +0 -2
- package/dist/src/Common/Schedules/index.d.ts +0 -1
- package/dist/src/Common/Schedules/index.js +0 -17
- package/dist/src/Common/index.d.ts +0 -6
- package/dist/src/Common/index.js +0 -42
- package/dist/src/Contacts/DuplicateContact.d.ts +0 -11
- package/dist/src/Contacts/DuplicateContact.js +0 -2
- package/dist/src/Contacts/File.d.ts +0 -17
- package/dist/src/Contacts/File.js +0 -2
- package/dist/src/Contacts/Import.d.ts +0 -18
- package/dist/src/Contacts/Import.js +0 -2
- package/dist/src/Contacts/Label.d.ts +0 -9
- package/dist/src/Contacts/Label.js +0 -2
- package/dist/src/Contacts/Note.d.ts +0 -15
- package/dist/src/Contacts/Note.js +0 -2
- package/dist/src/Contacts/Relationship.d.ts +0 -28
- package/dist/src/Contacts/Relationship.js +0 -16
- package/dist/src/Contacts/contacts.d.ts +0 -269
- package/dist/src/Contacts/contacts.js +0 -54
- package/dist/src/Contacts/index.d.ts +0 -9
- package/dist/src/Contacts/index.js +0 -25
- package/dist/src/Contacts/options.d.ts +0 -5
- package/dist/src/Contacts/options.js +0 -2
- package/dist/src/Contacts/segments.d.ts +0 -52
- package/dist/src/Contacts/segments.js +0 -53
- package/dist/src/Conversations/Conversation.d.ts +0 -167
- package/dist/src/Conversations/Conversation.js +0 -56
- package/dist/src/Conversations/DashBoard/dashboard.d.ts +0 -115
- package/dist/src/Conversations/DashBoard/dashboard.js +0 -65
- package/dist/src/Conversations/DashBoard/dashboardChannels.d.ts +0 -5
- package/dist/src/Conversations/DashBoard/dashboardChannels.js +0 -6
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
- package/dist/src/Conversations/DashBoard/dashboardMessages.d.ts +0 -13
- package/dist/src/Conversations/DashBoard/dashboardMessages.js +0 -9
- package/dist/src/Conversations/Ending.d.ts +0 -17
- package/dist/src/Conversations/Ending.js +0 -2
- package/dist/src/Conversations/Flows/Definitions.d.ts +0 -10
- package/dist/src/Conversations/Flows/Definitions.js +0 -2
- package/dist/src/Conversations/Flows/Flow.d.ts +0 -222
- package/dist/src/Conversations/Flows/Flow.js +0 -50
- package/dist/src/Conversations/Flows/FlowInfo.d.ts +0 -9
- package/dist/src/Conversations/Flows/FlowInfo.js +0 -2
- package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +0 -179
- package/dist/src/Conversations/Flows/Workflows/Workflow.js +0 -48
- package/dist/src/Conversations/Flows/Workflows/index.d.ts +0 -1
- package/dist/src/Conversations/Flows/Workflows/index.js +0 -17
- package/dist/src/Conversations/Flows/index.d.ts +0 -4
- package/dist/src/Conversations/Flows/index.js +0 -20
- package/dist/src/Conversations/Groups/Group.d.ts +0 -23
- package/dist/src/Conversations/Groups/Group.js +0 -8
- package/dist/src/Conversations/Label.d.ts +0 -10
- package/dist/src/Conversations/Label.js +0 -2
- package/dist/src/Conversations/QuickResponse.d.ts +0 -34
- package/dist/src/Conversations/QuickResponse.js +0 -2
- package/dist/src/Conversations/SocialWalls.d.ts +0 -72
- package/dist/src/Conversations/SocialWalls.js +0 -2
- package/dist/src/Conversations/Survey.d.ts +0 -19
- package/dist/src/Conversations/Survey.js +0 -9
- package/dist/src/Conversations/WebHook.d.ts +0 -22
- package/dist/src/Conversations/WebHook.js +0 -2
- package/dist/src/Conversations/index.d.ts +0 -13
- package/dist/src/Conversations/index.js +0 -52
- package/dist/src/Docs/Document.d.ts +0 -58
- package/dist/src/Docs/Document.js +0 -29
- package/dist/src/Docs/Store.d.ts +0 -37
- package/dist/src/Docs/Store.js +0 -17
- package/dist/src/Docs/index.d.ts +0 -2
- package/dist/src/Docs/index.js +0 -18
- package/dist/src/Marketing/Campaign.d.ts +0 -69
- package/dist/src/Marketing/Campaign.js +0 -30
- package/dist/src/Marketing/Dashboard.d.ts +0 -48
- package/dist/src/Marketing/Dashboard.js +0 -2
- package/dist/src/Marketing/Options.d.ts +0 -12
- package/dist/src/Marketing/Options.js +0 -9
- package/dist/src/Marketing/Template.d.ts +0 -19
- package/dist/src/Marketing/Template.js +0 -8
- package/dist/src/Marketing/index.d.ts +0 -4
- package/dist/src/Marketing/index.js +0 -20
- package/dist/src/PublicAPI/apiKey.d.ts +0 -12
- package/dist/src/PublicAPI/apiKey.js +0 -2
- package/dist/src/Reports/ScheduledReport.d.ts +0 -205
- package/dist/src/Reports/ScheduledReport.js +0 -57
- package/dist/src/Reports/aiReport.d.ts +0 -20
- package/dist/src/Reports/aiReport.js +0 -2
- package/dist/src/Reports/apiResult.d.ts +0 -5
- package/dist/src/Reports/apiResult.js +0 -2
- package/dist/src/Reports/index.d.ts +0 -3
- package/dist/src/Reports/index.js +0 -19
- package/dist/src/Sales/Api.d.ts +0 -40
- package/dist/src/Sales/Api.js +0 -2
- package/dist/src/Sales/Common.d.ts +0 -72
- package/dist/src/Sales/Common.js +0 -31
- package/dist/src/Sales/Dashboard.d.ts +0 -25
- package/dist/src/Sales/Dashboard.js +0 -2
- package/dist/src/Sales/Lead.d.ts +0 -99
- package/dist/src/Sales/Lead.js +0 -8
- package/dist/src/Sales/index.d.ts +0 -4
- package/dist/src/Sales/index.js +0 -20
- package/dist/src/Security/Security.d.ts +0 -5
- package/dist/src/Security/Security.js +0 -2
- package/dist/src/Security/index.d.ts +0 -1
- package/dist/src/Security/index.js +0 -17
- package/dist/src/Shop/Cart/cart.d.ts +0 -19
- package/dist/src/Shop/Cart/cart.js +0 -2
- package/dist/src/Shop/index.d.ts +0 -1
- package/dist/src/Shop/index.js +0 -17
- package/dist/src/Spaces/Dashboard.d.ts +0 -4
- package/dist/src/Spaces/Dashboard.js +0 -2
- package/dist/src/Spaces/index.d.ts +0 -2
- package/dist/src/Spaces/index.js +0 -18
- package/dist/src/Spaces/spaces.d.ts +0 -104
- package/dist/src/Spaces/spaces.js +0 -85
- package/dist/src/Tickets/AI.d.ts +0 -400
- package/dist/src/Tickets/AI.js +0 -113
- package/dist/src/Tickets/AdvancedApi.d.ts +0 -486
- package/dist/src/Tickets/AdvancedApi.js +0 -108
- package/dist/src/Tickets/Api.d.ts +0 -62
- package/dist/src/Tickets/Api.js +0 -8
- package/dist/src/Tickets/Approval.d.ts +0 -139
- package/dist/src/Tickets/Approval.js +0 -30
- package/dist/src/Tickets/Automation.d.ts +0 -237
- package/dist/src/Tickets/Automation.js +0 -74
- package/dist/src/Tickets/Category.d.ts +0 -53
- package/dist/src/Tickets/Category.js +0 -2
- package/dist/src/Tickets/Common.d.ts +0 -90
- package/dist/src/Tickets/Common.js +0 -38
- package/dist/src/Tickets/Conversation.d.ts +0 -68
- package/dist/src/Tickets/Conversation.js +0 -30
- package/dist/src/Tickets/Dashboard.d.ts +0 -408
- package/dist/src/Tickets/Dashboard.js +0 -206
- package/dist/src/Tickets/Fields.d.ts +0 -133
- package/dist/src/Tickets/Fields.js +0 -44
- package/dist/src/Tickets/Layouts.d.ts +0 -63
- package/dist/src/Tickets/Layouts.js +0 -22
- package/dist/src/Tickets/Routing.d.ts +0 -290
- package/dist/src/Tickets/Routing.js +0 -87
- package/dist/src/Tickets/Satisfaction.d.ts +0 -31
- package/dist/src/Tickets/Satisfaction.js +0 -9
- package/dist/src/Tickets/Security.d.ts +0 -302
- package/dist/src/Tickets/Security.js +0 -107
- package/dist/src/Tickets/SelfService.d.ts +0 -255
- package/dist/src/Tickets/SelfService.js +0 -56
- package/dist/src/Tickets/Sla.d.ts +0 -253
- package/dist/src/Tickets/Sla.js +0 -73
- package/dist/src/Tickets/Task.d.ts +0 -122
- package/dist/src/Tickets/Task.js +0 -17
- package/dist/src/Tickets/Ticket.d.ts +0 -133
- package/dist/src/Tickets/Ticket.js +0 -2
- package/dist/src/Tickets/Views.d.ts +0 -77
- package/dist/src/Tickets/Views.js +0 -23
- package/dist/src/Tickets/Workflow.d.ts +0 -109
- package/dist/src/Tickets/Workflow.js +0 -44
- package/dist/src/Tickets/index.d.ts +0 -20
- package/dist/src/Tickets/index.js +0 -36
- package/dist/src/Users/Signature.d.ts +0 -74
- package/dist/src/Users/Signature.js +0 -2
- package/dist/src/Users/UserActivitySummary.d.ts +0 -5
- package/dist/src/Users/UserActivitySummary.js +0 -2
- package/dist/src/Users/UserProfile.d.ts +0 -97
- package/dist/src/Users/UserProfile.js +0 -5
- package/dist/src/Users/UserTrii.d.ts +0 -102
- package/dist/src/Users/UserTrii.js +0 -10
- package/dist/src/Users/UserType.d.ts +0 -10
- package/dist/src/Users/UserType.js +0 -13
- package/dist/src/Users/index.d.ts +0 -5
- package/dist/src/Users/index.js +0 -21
- package/dist/src/index.d.ts +0 -20
- package/dist/src/index.js +0 -56
- /package/dist/{Conversations/InboxCounters.js → Common/Messages/MessageIdentityIndex.js} +0 -0
- /package/dist/{Conversations/InboxProjection.js → Contacts/IdentityEvents.js} +0 -0
- /package/dist/{src/AI/Credential.js → Media/MediaApi.js} +0 -0
|
@@ -9,25 +9,25 @@ export declare enum CommunicationEndpointKind {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const providerIdentityNamespaces: {
|
|
11
11
|
readonly meta: {
|
|
12
|
-
readonly instagramUser:
|
|
13
|
-
readonly messengerUser:
|
|
14
|
-
readonly whatsappUser:
|
|
12
|
+
readonly instagramUser: "instagram_user";
|
|
13
|
+
readonly messengerUser: "messenger_user";
|
|
14
|
+
readonly whatsappUser: "whatsapp_user";
|
|
15
15
|
};
|
|
16
16
|
readonly telegram: {
|
|
17
|
-
readonly user:
|
|
18
|
-
readonly chat:
|
|
17
|
+
readonly user: "user";
|
|
18
|
+
readonly chat: "chat";
|
|
19
19
|
};
|
|
20
20
|
readonly trii: {
|
|
21
|
-
readonly webchatVisitor:
|
|
21
|
+
readonly webchatVisitor: "webchat_visitor";
|
|
22
22
|
};
|
|
23
23
|
readonly mercadolibre: {
|
|
24
|
-
readonly buyer:
|
|
24
|
+
readonly buyer: "buyer";
|
|
25
25
|
};
|
|
26
26
|
readonly google: {
|
|
27
|
-
readonly businessMessagesUser:
|
|
27
|
+
readonly businessMessagesUser: "business_messages_user";
|
|
28
28
|
};
|
|
29
29
|
readonly openMessaging: {
|
|
30
|
-
readonly user:
|
|
30
|
+
readonly user: "open_messaging_user";
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
export type KnownIdentityProvider = keyof typeof providerIdentityNamespaces;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IdentityOperationStatus, IdentityOperationType } from './ChannelIdentityModel';
|
|
2
|
+
/**
|
|
3
|
+
* Códigos de error de identidades y vínculos (plan §15.25 ER2). Pending no es un error: es 202 con
|
|
4
|
+
* IdentityOperationAccepted.
|
|
5
|
+
*/
|
|
6
|
+
export type IdentityErrorCode =
|
|
7
|
+
/** 409, no reintentable: la identidad ya tiene un contacto activo y el espacio es exclusivo (D15). */
|
|
8
|
+
'identity_linked_to_other_contact'
|
|
9
|
+
/** 409, no reintentable: conflicto heredado (linkState = conflict); lo resuelve un admin. */
|
|
10
|
+
| 'identity_in_conflict'
|
|
11
|
+
/** 503, reintentable: espacio en ventana de mantenimiento; sin duración prometida. */
|
|
12
|
+
| 'space_in_maintenance'
|
|
13
|
+
/** 409, reintentable: otra operación tiene tomada la identidad. */
|
|
14
|
+
| 'identity_operation_in_progress';
|
|
15
|
+
/** Estado HTTP y si se puede reintentar, por código (ER2). */
|
|
16
|
+
export declare const IDENTITY_ERROR_HTTP: Readonly<Record<IdentityErrorCode, {
|
|
17
|
+
status: number;
|
|
18
|
+
retryable: boolean;
|
|
19
|
+
}>>;
|
|
20
|
+
/** Error de identidades y vínculos (ER1): ProblemDetails (RFC 7807, application/problem+json) con campos extra. */
|
|
21
|
+
export interface IdentityProblem {
|
|
22
|
+
type: string;
|
|
23
|
+
title: string;
|
|
24
|
+
status: number;
|
|
25
|
+
detail?: string | null;
|
|
26
|
+
instance?: string | null;
|
|
27
|
+
code: IdentityErrorCode;
|
|
28
|
+
retryable: boolean;
|
|
29
|
+
channelIdentityId?: string;
|
|
30
|
+
/** Solo identity_linked_to_other_contact y solo con permiso para ver ese contacto. */
|
|
31
|
+
currentOwnerId?: string;
|
|
32
|
+
/** Solo identity_operation_in_progress. */
|
|
33
|
+
operationId?: string;
|
|
34
|
+
/** Solo space_in_maintenance (SpaceMaintenance.reason). */
|
|
35
|
+
maintenanceReason?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Respuesta 202 de una mutación que quedó pending (ER2): nunca éxito prematuro. */
|
|
38
|
+
export interface IdentityOperationAccepted {
|
|
39
|
+
operationId: string;
|
|
40
|
+
type: IdentityOperationType;
|
|
41
|
+
status: IdentityOperationStatus;
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IDENTITY_ERROR_HTTP = void 0;
|
|
4
|
+
/** Estado HTTP y si se puede reintentar, por código (ER2). */
|
|
5
|
+
exports.IDENTITY_ERROR_HTTP = {
|
|
6
|
+
identity_linked_to_other_contact: { status: 409, retryable: false },
|
|
7
|
+
identity_in_conflict: { status: 409, retryable: false },
|
|
8
|
+
space_in_maintenance: { status: 503, retryable: true },
|
|
9
|
+
identity_operation_in_progress: { status: 409, retryable: true },
|
|
10
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CrmEntityType } from './BusinessModel';
|
|
2
|
+
import type { IContactIdentityLink, ChannelIdentityMergeReason } from './ChannelIdentityModel';
|
|
3
|
+
/** Familia identidad↔dueño (CI-D10, §15.20 EV1). Outbox de la base Contacts (EV4). */
|
|
4
|
+
export type IdentityEventType = 'identity_link.added' | 'identity_link.updated' | 'identity_link.removed' | 'identity_link.moved' | 'channel_identity.keys_changed' | 'channel_identity.merged' | 'channel_identity.status_changed';
|
|
5
|
+
/** Dueño tipado de un vínculo. */
|
|
6
|
+
export interface IdentityOwnerRef {
|
|
7
|
+
entityType: CrmEntityType;
|
|
8
|
+
entityId: string;
|
|
9
|
+
}
|
|
10
|
+
/** identity_link.added / updated / removed (aggregate = dueño). */
|
|
11
|
+
export interface IdentityLinkEventPayload {
|
|
12
|
+
owner: IdentityOwnerRef;
|
|
13
|
+
channelIdentityId: string;
|
|
14
|
+
/** Vínculo después del cambio; null en removed. */
|
|
15
|
+
link?: IContactIdentityLink | null;
|
|
16
|
+
/** En updated: campos que cambiaron. */
|
|
17
|
+
changedFields: string[];
|
|
18
|
+
actor: string;
|
|
19
|
+
occurredAt: Date;
|
|
20
|
+
operationId?: string | null;
|
|
21
|
+
aggregateVersion: number;
|
|
22
|
+
}
|
|
23
|
+
/** identity_link.moved (aggregate = identidad). */
|
|
24
|
+
export interface IdentityLinkMovedEventPayload {
|
|
25
|
+
channelIdentityId: string;
|
|
26
|
+
from: IdentityOwnerRef;
|
|
27
|
+
to: IdentityOwnerRef;
|
|
28
|
+
actor: string;
|
|
29
|
+
occurredAt: Date;
|
|
30
|
+
operationId?: string | null;
|
|
31
|
+
aggregateVersion: number;
|
|
32
|
+
}
|
|
33
|
+
export interface ChannelIdentityKeysChangedEventPayload {
|
|
34
|
+
channelIdentityId: string;
|
|
35
|
+
addedKeys: string[];
|
|
36
|
+
removedKeys: string[];
|
|
37
|
+
actor: string;
|
|
38
|
+
occurredAt: Date;
|
|
39
|
+
operationId?: string | null;
|
|
40
|
+
aggregateVersion: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ChannelIdentityMergedEventPayload {
|
|
43
|
+
sourceId: string;
|
|
44
|
+
targetId: string;
|
|
45
|
+
mergeReason: ChannelIdentityMergeReason | (string & {});
|
|
46
|
+
movedKeys: string[];
|
|
47
|
+
actor: string;
|
|
48
|
+
occurredAt: Date;
|
|
49
|
+
operationId?: string | null;
|
|
50
|
+
aggregateVersion: number;
|
|
51
|
+
}
|
|
52
|
+
export interface ChannelIdentityStatusChangedEventPayload {
|
|
53
|
+
channelIdentityId: string;
|
|
54
|
+
fromStatus: string;
|
|
55
|
+
toStatus: string;
|
|
56
|
+
actor: string;
|
|
57
|
+
occurredAt: Date;
|
|
58
|
+
operationId?: string | null;
|
|
59
|
+
aggregateVersion: number;
|
|
60
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Common } from "../index";
|
|
2
|
+
/** Colecciones de la base de trii-admin para el cambio de opción D15 (plan §15.25 ER5). */
|
|
3
|
+
export declare const IDENTITY_POLICY_COLLECTIONS: {
|
|
4
|
+
readonly IdentityPolicyChanges: "IdentityPolicyChanges";
|
|
5
|
+
readonly IdentityPolicyConflicts: "IdentityPolicyConflicts";
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Estados de un cambio de opción D15 (ER3). scheduled: cancelable. running: en ventana de mantenimiento.
|
|
9
|
+
* interrupted: falló el recálculo; el espacio sigue en mantenimiento y un admin reanuda desde checkpoint.
|
|
10
|
+
* canceled: solo desde scheduled.
|
|
11
|
+
*/
|
|
12
|
+
export type IdentityPolicyChangeStatus = 'scheduled' | 'running' | 'interrupted' | 'completed' | 'canceled';
|
|
13
|
+
export declare function isTerminalIdentityPolicyChangeStatus(status: IdentityPolicyChangeStatus): boolean;
|
|
14
|
+
export interface IdentityPolicyChangeProgress {
|
|
15
|
+
processed: number;
|
|
16
|
+
total: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Cambio de allowDuplicateContactChannels en ventana de mantenimiento (N19, ER3). Lo escribe y expone solo
|
|
20
|
+
* trii-admin-api (ER5); Space.maintenance sigue siendo la señal para los writers. Conflictos aparte, paginados (ER4).
|
|
21
|
+
*/
|
|
22
|
+
export interface IdentityPolicyChange {
|
|
23
|
+
changeId: string;
|
|
24
|
+
spaceId: string;
|
|
25
|
+
/** Valor destino (false = exclusivo para personas). */
|
|
26
|
+
allowDuplicateContactChannels: boolean;
|
|
27
|
+
status: IdentityPolicyChangeStatus;
|
|
28
|
+
scheduledAt?: Date | null;
|
|
29
|
+
startedAt?: Date | null;
|
|
30
|
+
completedAt?: Date | null;
|
|
31
|
+
/** userId del admin. */
|
|
32
|
+
actor: string;
|
|
33
|
+
progress: IdentityPolicyChangeProgress;
|
|
34
|
+
conflictCount: number;
|
|
35
|
+
/** Solo admins. */
|
|
36
|
+
lastError?: string | null;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
40
|
+
/** Identidad en conflict tras pasar a exclusivo (ER4). GET .../IdentityPolicyChanges/{changeId}/Conflicts, por cursor. */
|
|
41
|
+
export interface IdentityPolicyConflict {
|
|
42
|
+
changeId: string;
|
|
43
|
+
spaceId: string;
|
|
44
|
+
channelIdentityId: string;
|
|
45
|
+
channelType: Common.Channels.ChannelType;
|
|
46
|
+
/** Clave principal (formato común). */
|
|
47
|
+
key: string;
|
|
48
|
+
displayValue?: string | null;
|
|
49
|
+
/** Personas activas vinculadas (2 o más). */
|
|
50
|
+
ownerContactIds: string[];
|
|
51
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IDENTITY_POLICY_COLLECTIONS = void 0;
|
|
4
|
+
exports.isTerminalIdentityPolicyChangeStatus = isTerminalIdentityPolicyChangeStatus;
|
|
5
|
+
/** Colecciones de la base de trii-admin para el cambio de opción D15 (plan §15.25 ER5). */
|
|
6
|
+
exports.IDENTITY_POLICY_COLLECTIONS = {
|
|
7
|
+
IdentityPolicyChanges: 'IdentityPolicyChanges',
|
|
8
|
+
IdentityPolicyConflicts: 'IdentityPolicyConflicts',
|
|
9
|
+
};
|
|
10
|
+
function isTerminalIdentityPolicyChangeStatus(status) {
|
|
11
|
+
return status === 'completed' || status === 'canceled';
|
|
12
|
+
}
|
package/dist/Contacts/Note.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { UserInfo } from "../Users/UserTrii";
|
|
2
|
+
import type { CrmEntityType } from "./BusinessModel";
|
|
3
|
+
import type { IMessage } from "../Common/Messages/Message";
|
|
4
|
+
/** Nota de persona o empresa (colección "Notes", §15.19). Las notas de conversación siguen siendo IMessage kind = note. */
|
|
2
5
|
export interface INote {
|
|
3
6
|
id: string;
|
|
4
7
|
spaceId: string;
|
|
8
|
+
/** Tipo de dueño (NT1). Obligatorio en notas nuevas. */
|
|
9
|
+
entityType?: CrmEntityType;
|
|
10
|
+
/** Id del dueño. Obligatorio en notas nuevas. */
|
|
11
|
+
entityId?: string;
|
|
12
|
+
/** Legacy: igual a entityId si el dueño es persona; vacío en notas de empresa. Se retira en E7. */
|
|
5
13
|
contactId: string;
|
|
6
14
|
title: string;
|
|
7
15
|
text: string;
|
|
@@ -13,3 +21,19 @@ export interface INote {
|
|
|
13
21
|
deletedAt?: Date;
|
|
14
22
|
deletedBy?: string;
|
|
15
23
|
}
|
|
24
|
+
export type EntityHistorySourceType = 'message' | 'note';
|
|
25
|
+
/** Elemento del historial combinado de una ficha (NT3, N08), ya deduplicado y autorizado. */
|
|
26
|
+
export interface EntityHistoryItem {
|
|
27
|
+
sourceType: EntityHistorySourceType;
|
|
28
|
+
timestamp: Date;
|
|
29
|
+
/** Id del mensaje o de la nota. */
|
|
30
|
+
id: string;
|
|
31
|
+
message?: IMessage | null;
|
|
32
|
+
note?: INote | null;
|
|
33
|
+
}
|
|
34
|
+
/** Página del historial combinado (hasta 50 elementos lógicos); nextCursor opaco, null si no hay más. */
|
|
35
|
+
export interface EntityHistoryPage {
|
|
36
|
+
items: EntityHistoryItem[];
|
|
37
|
+
nextCursor?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export declare const ENTITY_HISTORY_PAGE_SIZE = 50;
|
package/dist/Contacts/Note.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Common } from "../index";
|
|
2
|
+
import type { IContactBusinessLink } from "./BusinessModel";
|
|
3
|
+
import type { ChannelIdentityStatus, ChannelIdentityMergeReason, ChannelIdentityCreationSource, IChannelIdentityKeyDetail, IContactIdentityLink } from "./ChannelIdentityModel";
|
|
2
4
|
export interface IContactInfo {
|
|
3
5
|
id: string;
|
|
4
6
|
name: string;
|
|
5
7
|
imageUrl?: string;
|
|
6
8
|
isBusiness: boolean | false;
|
|
7
|
-
contactAddresses:
|
|
9
|
+
contactAddresses: IContactAddress[];
|
|
8
10
|
businessName?: string;
|
|
9
11
|
businessId?: string;
|
|
10
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Empresa (colección "Businesses", plan §15.15). Canales de contacto solo por identities (B10/B18);
|
|
15
|
+
* la relación con personas vive en IContact.businessLinks (B4).
|
|
16
|
+
*/
|
|
11
17
|
export interface IBusiness {
|
|
12
18
|
id: string;
|
|
13
19
|
spaceId: string;
|
|
@@ -15,17 +21,10 @@ export interface IBusiness {
|
|
|
15
21
|
name: string;
|
|
16
22
|
imageUrl: string;
|
|
17
23
|
ownerUserId?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
ims_instagram: IChannelIdentity[];
|
|
23
|
-
ims_facebook: IChannelIdentity[];
|
|
24
|
-
ims_webchat: IChannelIdentity[];
|
|
25
|
-
ims_whatsapp: IChannelIdentity[];
|
|
26
|
-
ims_mercadolibre: IChannelIdentity[];
|
|
27
|
-
ims_rcs: IChannelIdentity[];
|
|
28
|
-
ims_openmessaging: IChannelIdentity[];
|
|
24
|
+
/** Vínculos confirmados con ChannelIdentities (K6). Único canal de contacto de la empresa (B10/B18). */
|
|
25
|
+
identities?: IContactIdentityLink[];
|
|
26
|
+
/** Revisión del agregado; aggregateVersion de identity_link.* de la empresa (EV3). */
|
|
27
|
+
revision?: number | null;
|
|
29
28
|
address1: IContactPostalAddress;
|
|
30
29
|
address2: IContactPostalAddress;
|
|
31
30
|
tags: IContactTag[];
|
|
@@ -58,17 +57,23 @@ export interface IContact {
|
|
|
58
57
|
ownerUserId?: string;
|
|
59
58
|
businessId?: string;
|
|
60
59
|
businessName?: string;
|
|
61
|
-
phones:
|
|
62
|
-
emails:
|
|
63
|
-
/**
|
|
60
|
+
phones: IContactAddress[];
|
|
61
|
+
emails: IContactAddress[];
|
|
62
|
+
/** @deprecated Reemplazado por IContactIdentityLink.portalLoginEnabled (§15.16 P1). */
|
|
64
63
|
customerPortalLogin?: string;
|
|
65
|
-
ims_instagram:
|
|
66
|
-
ims_facebook:
|
|
67
|
-
ims_webchat:
|
|
68
|
-
ims_whatsapp:
|
|
69
|
-
ims_mercadolibre:
|
|
70
|
-
ims_rcs:
|
|
71
|
-
ims_openmessaging:
|
|
64
|
+
ims_instagram: IContactAddress[];
|
|
65
|
+
ims_facebook: IContactAddress[];
|
|
66
|
+
ims_webchat: IContactAddress[];
|
|
67
|
+
ims_whatsapp: IContactAddress[];
|
|
68
|
+
ims_mercadolibre: IContactAddress[];
|
|
69
|
+
ims_rcs: IContactAddress[];
|
|
70
|
+
ims_openmessaging: IContactAddress[];
|
|
71
|
+
/** Vínculos confirmados con ChannelIdentities (channelIdentityModelVersion 2; K6). Ausente en espacios legacy. */
|
|
72
|
+
identities?: IContactIdentityLink[];
|
|
73
|
+
/** Vínculos persona→empresa (B4–B7, B12, B15–B17). Ausente en espacios legacy (siguen con businessId/businessName). */
|
|
74
|
+
businessLinks?: IContactBusinessLink[];
|
|
75
|
+
/** Revisión del agregado para escrituras condicionales y aggregateVersion de eventos (R04). */
|
|
76
|
+
revision?: number | null;
|
|
72
77
|
address1: IContactPostalAddress;
|
|
73
78
|
address2: IContactPostalAddress;
|
|
74
79
|
tags: IContactTag[];
|
|
@@ -95,7 +100,9 @@ export declare enum ContactOrigin {
|
|
|
95
100
|
IMPORT = 1,
|
|
96
101
|
CALL = 2,
|
|
97
102
|
TICKET = 3,
|
|
98
|
-
FORM = 4
|
|
103
|
+
FORM = 4,
|
|
104
|
+
/** Alta desde el portal de clientes (§15.16 P4). */
|
|
105
|
+
PORTAL = 5
|
|
99
106
|
}
|
|
100
107
|
export interface IContactPostalAddress {
|
|
101
108
|
street: string;
|
|
@@ -169,14 +176,13 @@ export declare enum ContactField_type {
|
|
|
169
176
|
LIST_OBJECT = 32
|
|
170
177
|
}
|
|
171
178
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* propiedades que la referencian (contactAddresses, contactAddress, contactAddressId, emails, phones, ims_*)
|
|
176
|
-
* no cambian.
|
|
179
|
+
* @deprecated Forma legacy (colección "ContactAddresses" y copias embebidas: phones/emails/ims_*,
|
|
180
|
+
* IContactInfo.contactAddresses, MessageEmail to/cc/bcc, WhatsAppGroupMember.contactAddress).
|
|
181
|
+
* Vigente en espacios con channelIdentityModelVersion ausente o 1. El modelo nuevo es IChannelIdentity. Se retira en E7.
|
|
177
182
|
*/
|
|
178
|
-
export interface
|
|
183
|
+
export interface IContactAddress {
|
|
179
184
|
id: string;
|
|
185
|
+
spaceId?: string;
|
|
180
186
|
channelType: Common.Channels.ChannelType;
|
|
181
187
|
/**
|
|
182
188
|
* No es un id del canal de Trii.
|
|
@@ -195,14 +201,69 @@ export interface IChannelIdentity {
|
|
|
195
201
|
note: string;
|
|
196
202
|
isVerified: boolean;
|
|
197
203
|
isFavorite: boolean;
|
|
204
|
+
isGroup?: boolean;
|
|
205
|
+
dateLastMsgIn?: Date;
|
|
206
|
+
dateLastMsgOut?: Date;
|
|
207
|
+
channelActivities?: ContactAddressChannelActivity[];
|
|
208
|
+
subscriptionsAllowed: string[];
|
|
209
|
+
subscriptionsRejected: string[];
|
|
210
|
+
complaintEmails?: string[];
|
|
211
|
+
createdAt: Date;
|
|
212
|
+
verifiedAt?: Date | null;
|
|
213
|
+
verifiedBy?: string | null;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* ChannelIdentity = identidad externa en un canal (email, teléfono, PSID de FB, IGSID, bsuid de WhatsApp…).
|
|
217
|
+
* Existe sin contacto y puede estar vinculada a 0..N contactos.
|
|
218
|
+
* Documento de la colección "ChannelIdentities" (espacios con channelIdentityModelVersion 2; plan §15.14).
|
|
219
|
+
* Mismo id que en ContactAddresses al migrar. La forma legacy ("ContactAddresses" y sus copias embebidas)
|
|
220
|
+
* es IContactAddress (K7 revisado: dos tipos).
|
|
221
|
+
*/
|
|
222
|
+
export interface IChannelIdentity {
|
|
223
|
+
id: string;
|
|
224
|
+
spaceId?: string;
|
|
225
|
+
channelType: Common.Channels.ChannelType;
|
|
226
|
+
/** Ver ChannelIdentityStatus. */
|
|
227
|
+
status?: ChannelIdentityStatus;
|
|
228
|
+
/** Namespace de la clave principal (ver CHANNEL_IDENTITY_NAMESPACES). */
|
|
229
|
+
identityNamespace?: string;
|
|
230
|
+
/** Alcance externo de la clave principal (página, cuenta, portfolio). Ausente = sin scope. */
|
|
231
|
+
scope?: string | null;
|
|
232
|
+
/** Valor normalizado de la clave principal. Las búsquedas por clave usan keys. */
|
|
233
|
+
normalizedValue?: string;
|
|
234
|
+
normalizationVersion?: number;
|
|
235
|
+
displayValue?: string;
|
|
236
|
+
/** Todas las claves "namespace|scope|valor" (buildChannelIdentityKey). Índice único {spaceId, keys}. */
|
|
237
|
+
keys?: string[];
|
|
238
|
+
keyDetails?: IChannelIdentityKeyDetail[];
|
|
239
|
+
/** WHATSAPP/RCS: identidad PHONE del mismo E.164. */
|
|
240
|
+
phoneIdentityId?: string;
|
|
241
|
+
/** status merged: identidad que la absorbió. Canonizar antes de leer claves. */
|
|
242
|
+
mergedIntoId?: string;
|
|
243
|
+
mergeReason?: ChannelIdentityMergeReason;
|
|
244
|
+
mergedAt?: Date;
|
|
245
|
+
/** Origen (M01). Se fija solo al insertar. Distinto de keyDetails.source. */
|
|
246
|
+
creationSource?: ChannelIdentityCreationSource;
|
|
247
|
+
/** userId del actor autenticado, nunca tomado del payload. */
|
|
248
|
+
createdBy?: string;
|
|
249
|
+
updatedAt?: Date;
|
|
250
|
+
/** Revisión del documento; aggregateVersion de channel_identity.* (EV3). */
|
|
251
|
+
revision?: number | null;
|
|
252
|
+
profileName: string;
|
|
253
|
+
profileUrl: string;
|
|
254
|
+
profileUrlDate?: Date;
|
|
255
|
+
telInfo?: IContactTelInfo;
|
|
256
|
+
isVerified: boolean;
|
|
257
|
+
isGroup?: boolean;
|
|
198
258
|
dateLastMsgIn?: Date;
|
|
199
259
|
dateLastMsgOut?: Date;
|
|
200
260
|
channelActivities?: ContactAddressChannelActivity[];
|
|
201
261
|
subscriptionsAllowed: string[];
|
|
202
262
|
subscriptionsRejected: string[];
|
|
263
|
+
complaintEmails?: string[];
|
|
203
264
|
createdAt: Date;
|
|
204
|
-
verifiedAt?: Date;
|
|
205
|
-
verifiedBy?: string;
|
|
265
|
+
verifiedAt?: Date | null;
|
|
266
|
+
verifiedBy?: string | null;
|
|
206
267
|
}
|
|
207
268
|
export interface ContactAddressChannelActivity {
|
|
208
269
|
externalChannelId: string;
|
|
@@ -8,6 +8,8 @@ var ContactOrigin;
|
|
|
8
8
|
ContactOrigin[ContactOrigin["CALL"] = 2] = "CALL";
|
|
9
9
|
ContactOrigin[ContactOrigin["TICKET"] = 3] = "TICKET";
|
|
10
10
|
ContactOrigin[ContactOrigin["FORM"] = 4] = "FORM";
|
|
11
|
+
/** Alta desde el portal de clientes (§15.16 P4). */
|
|
12
|
+
ContactOrigin[ContactOrigin["PORTAL"] = 5] = "PORTAL";
|
|
11
13
|
})(ContactOrigin || (exports.ContactOrigin = ContactOrigin = {}));
|
|
12
14
|
var ContactField_Item_Type;
|
|
13
15
|
(function (ContactField_Item_Type) {
|
package/dist/Contacts/index.d.ts
CHANGED
|
@@ -9,3 +9,8 @@ export * from './options';
|
|
|
9
9
|
export * from './DuplicateContact';
|
|
10
10
|
export * from './CommunicationEndpoint';
|
|
11
11
|
export * from './CommunicationMethod';
|
|
12
|
+
export * from './ChannelIdentityModel';
|
|
13
|
+
export * from './BusinessModel';
|
|
14
|
+
export * from './IdentityEvents';
|
|
15
|
+
export * from './IdentityErrors';
|
|
16
|
+
export * from './IdentityPolicyChange';
|
package/dist/Contacts/index.js
CHANGED
|
@@ -25,3 +25,8 @@ __exportStar(require("./options"), exports);
|
|
|
25
25
|
__exportStar(require("./DuplicateContact"), exports);
|
|
26
26
|
__exportStar(require("./CommunicationEndpoint"), exports);
|
|
27
27
|
__exportStar(require("./CommunicationMethod"), exports);
|
|
28
|
+
__exportStar(require("./ChannelIdentityModel"), exports);
|
|
29
|
+
__exportStar(require("./BusinessModel"), exports);
|
|
30
|
+
__exportStar(require("./IdentityEvents"), exports);
|
|
31
|
+
__exportStar(require("./IdentityErrors"), exports);
|
|
32
|
+
__exportStar(require("./IdentityPolicyChange"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConversationClassificationEvaluationStatus } from './ConversationClassificationEvaluation';
|
|
2
2
|
export declare const CONVERSATION_CLASSIFICATION_EVENT_TYPES: {
|
|
3
|
-
readonly CONVERSATION_RESOLVED_FOR_EVALUATION:
|
|
4
|
-
readonly EVALUATION_FINISHED:
|
|
3
|
+
readonly CONVERSATION_RESOLVED_FOR_EVALUATION: "conversation.resolved-for-classification";
|
|
4
|
+
readonly EVALUATION_FINISHED: "conversation.classification-evaluation-finished";
|
|
5
5
|
};
|
|
6
6
|
export declare const CONVERSATION_CLASSIFICATION_EVENT_SCHEMA_VERSION: 1;
|
|
7
7
|
/**
|
|
@@ -6,7 +6,7 @@ import type { ConversationSlaSnapshot, ConversationSlaStatus } from './Conversat
|
|
|
6
6
|
import { ILabel } from "./Label";
|
|
7
7
|
import { GroupInfo } from "./Groups/Group";
|
|
8
8
|
import { Channels } from "../Common/index";
|
|
9
|
-
import {
|
|
9
|
+
import { IContactAddress, IContactInfo } from "../Contacts/contacts";
|
|
10
10
|
import { IEnding } from "./Ending";
|
|
11
11
|
import { ChatType } from "../Chats/Chat";
|
|
12
12
|
import { TransferConversationCommand, TransferConversationResult } from "./Transfer";
|
|
@@ -62,6 +62,14 @@ export interface IConversation {
|
|
|
62
62
|
contacts?: ConversationContact[];
|
|
63
63
|
/** Contactos descartados por un agente; no se vuelven a sugerir ni asociar. Solo en el detalle. */
|
|
64
64
|
dismissedContactIds?: string[];
|
|
65
|
+
/** Empresas asociadas (0..N, §15.18 CV1), independientes de contacts. */
|
|
66
|
+
businesses?: ConversationBusiness[];
|
|
67
|
+
/** Empresas descartadas por un agente; no se vuelven a asociar automáticamente. */
|
|
68
|
+
dismissedBusinessIds?: string[];
|
|
69
|
+
/** Candidatas sin asociar: limit_reached o ambiguous (CV2/CV3). Máximo CONVERSATION_MAX_PENDING_ASSOCIATIONS. */
|
|
70
|
+
pendingAssociations?: ConversationPendingAssociation[];
|
|
71
|
+
/** Candidatas que no entraron en pendingAssociations. */
|
|
72
|
+
pendingAssociationsOverflow?: number;
|
|
65
73
|
channelInfo: Channels.IChannelInfo;
|
|
66
74
|
status: ConversationStatus;
|
|
67
75
|
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
@@ -139,17 +147,26 @@ export type InteractionKind = 'private' | 'wall_post' | 'comment' | 'mention';
|
|
|
139
147
|
export declare const CONVERSATION_MAX_ADDRESSES = 50;
|
|
140
148
|
/** Límite de contactos por conversación. */
|
|
141
149
|
export declare const CONVERSATION_MAX_CONTACTS = 50;
|
|
150
|
+
/** Límite de empresas por conversación. */
|
|
151
|
+
export declare const CONVERSATION_MAX_BUSINESSES = 50;
|
|
152
|
+
/** Límite de candidatas guardadas en pendingAssociations. */
|
|
153
|
+
export declare const CONVERSATION_MAX_PENDING_ASSOCIATIONS = 50;
|
|
154
|
+
/** Origen de una asociación de contacto o empresa. */
|
|
142
155
|
export type ConversationContactOrigin = 'auto_match' | 'manual' | 'migration';
|
|
143
156
|
/** Dirección externa que participa del hilo. Snapshot de IChannelIdentity. */
|
|
144
157
|
export interface ConversationAddress {
|
|
145
|
-
/**
|
|
158
|
+
/** Id de la identidad (mismo id en ContactAddresses y ChannelIdentities, según el modelo del espacio). */
|
|
146
159
|
channelIdentityId: string;
|
|
147
160
|
channelType: Channels.ChannelType;
|
|
148
|
-
/**
|
|
161
|
+
/** Para mostrar y compatibilidad legacy (SN1). No es clave de búsqueda: usar key/observedKey. No aplicar lowercase (NZ8). */
|
|
149
162
|
address: string;
|
|
150
163
|
/** Texto recibido, para mostrar. */
|
|
151
164
|
originalAddress?: string | null;
|
|
152
165
|
displayName?: string | null;
|
|
166
|
+
/** Clave principal de la identidad (namespace|scope|valor), copia de lectura refrescada (§15.24 SN1/SN2). Null en legacy hasta migrar (SN3). */
|
|
167
|
+
key?: string | null;
|
|
168
|
+
/** Clave por la que la dirección entró al hilo; inmutable, para re-resolver tras fusiones (SN2). Null en legacy hasta migrar. */
|
|
169
|
+
observedKey?: string | null;
|
|
153
170
|
/** Cuándo la dirección entró a esta conversación. Se escribe una vez; la actividad vive en IChannelIdentity. */
|
|
154
171
|
addedAt: Date;
|
|
155
172
|
}
|
|
@@ -165,6 +182,26 @@ export interface ConversationContact {
|
|
|
165
182
|
/** userId del agente; null para auto_match y migración. */
|
|
166
183
|
associatedBy?: string | null;
|
|
167
184
|
}
|
|
185
|
+
/** Empresa del CRM asociada a la conversación (CV1). Misma forma que ConversationContact. */
|
|
186
|
+
export interface ConversationBusiness {
|
|
187
|
+
businessId: string;
|
|
188
|
+
name?: string | null;
|
|
189
|
+
imageUrl?: string | null;
|
|
190
|
+
origin: ConversationContactOrigin | (string & {});
|
|
191
|
+
viaChannelIdentityIds: string[];
|
|
192
|
+
associatedAt: Date;
|
|
193
|
+
/** userId del agente; null para auto_match y migración. */
|
|
194
|
+
associatedBy?: string | null;
|
|
195
|
+
}
|
|
196
|
+
export type ConversationPendingAssociationReason = 'limit_reached' | 'ambiguous';
|
|
197
|
+
/** Candidata sin asociar guardada en la conversación (CV2/CV3). */
|
|
198
|
+
export interface ConversationPendingAssociation {
|
|
199
|
+
entityType: 'contact' | 'business';
|
|
200
|
+
entityId: string;
|
|
201
|
+
viaChannelIdentityIds: string[];
|
|
202
|
+
reason: ConversationPendingAssociationReason | (string & {});
|
|
203
|
+
detectedAt: Date;
|
|
204
|
+
}
|
|
168
205
|
/** Límite de claves en ConversationExternalThread.keys. */
|
|
169
206
|
export declare const CONVERSATION_EXTERNAL_THREAD_MAX_KEYS = 200;
|
|
170
207
|
/**
|
|
@@ -197,7 +234,7 @@ export interface IWhatsAppGroupInfo {
|
|
|
197
234
|
description: string;
|
|
198
235
|
}
|
|
199
236
|
export interface IWhatsAppGroupMember {
|
|
200
|
-
contactAddress:
|
|
237
|
+
contactAddress: IContactAddress;
|
|
201
238
|
contactId: string;
|
|
202
239
|
name: string;
|
|
203
240
|
contactInfo: IContactInfo;
|
|
@@ -396,7 +433,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
396
433
|
offerExpiresAt?: never;
|
|
397
434
|
assignedAt?: never;
|
|
398
435
|
acceptedAt?: never;
|
|
399
|
-
} |
|
|
436
|
+
} | QueuedConversationAssignmentBase & {
|
|
400
437
|
status: 'queued' | 'routing';
|
|
401
438
|
initialChannelOwnerUserId?: ID;
|
|
402
439
|
owner: NoConversationOwner;
|
|
@@ -404,7 +441,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
404
441
|
offerExpiresAt?: never;
|
|
405
442
|
assignedAt?: never;
|
|
406
443
|
acceptedAt?: never;
|
|
407
|
-
}
|
|
444
|
+
} | QueuedConversationAssignmentBase & {
|
|
408
445
|
status: 'offered';
|
|
409
446
|
owner: UserConversationOwner;
|
|
410
447
|
offeredAt: Date;
|
|
@@ -412,14 +449,14 @@ export type ConversationAssignmentSnapshot = {
|
|
|
412
449
|
offerExpiresAt: Date;
|
|
413
450
|
assignedAt?: never;
|
|
414
451
|
acceptedAt?: never;
|
|
415
|
-
}
|
|
452
|
+
} | QueuedConversationAssignmentBase & {
|
|
416
453
|
status: 'assigned';
|
|
417
454
|
owner: UserConversationOwner;
|
|
418
455
|
offeredAt?: null;
|
|
419
456
|
offerExpiresAt?: null;
|
|
420
457
|
assignedAt: Date;
|
|
421
458
|
acceptedAt?: never;
|
|
422
|
-
}
|
|
459
|
+
} | QueuedConversationAssignmentBase & {
|
|
423
460
|
status: 'accepted';
|
|
424
461
|
owner: UserConversationOwner;
|
|
425
462
|
/** Present after accepting an offer; absent/null when taking work directly. */
|
|
@@ -427,7 +464,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
427
464
|
offerExpiresAt?: null;
|
|
428
465
|
assignedAt: Date;
|
|
429
466
|
acceptedAt: Date;
|
|
430
|
-
}
|
|
467
|
+
};
|
|
431
468
|
export type ActorType = 'user' | 'contact' | 'bot' | 'flow' | 'system';
|
|
432
469
|
export type ParticipantRole = 'owner' | 'collaborator' | 'follower' | 'mentioned' | 'supervisor' | 'bot' | 'flow' | 'historical';
|
|
433
470
|
export type ConversationEventType = 'conversation_created' | 'queued' | 'assigned' | 'accepted' | 'transferred' | 'consult_requested' | 'collaborator_added' | 'participant_added' | 'participant_removed' | 'participation_abandoned' | 'follow_started' | 'follow_stopped' | 'message_sent' | 'message_received' | 'internal_note_added' | 'bot_started' | 'bot_finished' | 'flow_started' | 'flow_finished' | 'status_changed' | 'resolved' | 'reopened' | 'sla_warning' | 'sla_breached' | 'sla_started' | 'sla_paused' | 'sla_resumed' | 'sla_met' | 'sla_overridden';
|
|
@@ -461,15 +498,15 @@ interface ConversationSubscriptionBase {
|
|
|
461
498
|
* A subscription is persistent product intent. Assignment or participation
|
|
462
499
|
* visibility must not create it unless an explicit auto-follow policy applies.
|
|
463
500
|
*/
|
|
464
|
-
export type ConversationSubscription =
|
|
501
|
+
export type ConversationSubscription = ConversationSubscriptionBase & {
|
|
465
502
|
status: 'following';
|
|
466
503
|
followedAt: Date;
|
|
467
504
|
unfollowedAt?: never;
|
|
468
|
-
}
|
|
505
|
+
} | ConversationSubscriptionBase & {
|
|
469
506
|
status: 'unfollowed';
|
|
470
507
|
followedAt: Date;
|
|
471
508
|
unfollowedAt: Date;
|
|
472
|
-
}
|
|
509
|
+
};
|
|
473
510
|
export interface PutConversationSubscriptionRequest {
|
|
474
511
|
expectedVersion?: number;
|
|
475
512
|
notifications: ConversationSubscriptionNotifications;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConversationStatus = exports.AssignMethod = exports.ConversationDirection = exports.ConversationBotStatus = exports.CONVERSATION_EXTERNAL_THREAD_MAX_KEYS = exports.CONVERSATION_MAX_CONTACTS = exports.CONVERSATION_MAX_ADDRESSES = void 0;
|
|
3
|
+
exports.ConversationStatus = exports.AssignMethod = exports.ConversationDirection = exports.ConversationBotStatus = exports.CONVERSATION_EXTERNAL_THREAD_MAX_KEYS = exports.CONVERSATION_MAX_PENDING_ASSOCIATIONS = exports.CONVERSATION_MAX_BUSINESSES = exports.CONVERSATION_MAX_CONTACTS = exports.CONVERSATION_MAX_ADDRESSES = void 0;
|
|
4
4
|
// export enum ConversationContextType {
|
|
5
5
|
// TICKET = 'TICKET',
|
|
6
6
|
// CONVERSATION = 'CONVERSATION',
|
|
@@ -18,6 +18,10 @@ exports.ConversationStatus = exports.AssignMethod = exports.ConversationDirectio
|
|
|
18
18
|
exports.CONVERSATION_MAX_ADDRESSES = 50;
|
|
19
19
|
/** Límite de contactos por conversación. */
|
|
20
20
|
exports.CONVERSATION_MAX_CONTACTS = 50;
|
|
21
|
+
/** Límite de empresas por conversación. */
|
|
22
|
+
exports.CONVERSATION_MAX_BUSINESSES = 50;
|
|
23
|
+
/** Límite de candidatas guardadas en pendingAssociations. */
|
|
24
|
+
exports.CONVERSATION_MAX_PENDING_ASSOCIATIONS = 50;
|
|
21
25
|
/** Límite de claves en ConversationExternalThread.keys. */
|
|
22
26
|
exports.CONVERSATION_EXTERNAL_THREAD_MAX_KEYS = 200;
|
|
23
27
|
/** @deprecated Estado legacy. Usar ConversationAutomationStatus para ejecuciones nuevas. */
|