@burgan-tech/morph-touch-runtime 0.0.3 → 0.0.4
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/burgan-tech-morph-touch-runtime-0.0.4.tgz +0 -0
- package/{touch → morph-touch}/Functions/check-livekit-room-access.1.0.0.json +2 -2
- package/{touch → morph-touch}/Functions/check-livekit-room-access.http +1 -1
- package/{touch → morph-touch}/Functions/get-absence-entry.1.0.0.json +2 -2
- package/{touch → morph-touch}/Functions/get-advisor-stats.1.0.0.json +2 -2
- package/morph-touch/Functions/get-available-slots.1.0.0.json +30 -0
- package/{touch → morph-touch}/Functions/get-available-slots.http +4 -2
- package/morph-touch/Functions/get-chat-rooms.1.0.0.json +28 -0
- package/{touch → morph-touch}/Functions/get-chat-rooms.http +2 -2
- package/{touch → morph-touch}/Functions/get-customer-info.1.0.0.json +2 -2
- package/{touch → morph-touch}/Functions/get-matrix-sync.1.0.0.json +2 -2
- package/morph-touch/Functions/get-rezervations.1.0.0.json +26 -0
- package/{touch → morph-touch}/Functions/get-rezervations.http +2 -2
- package/{touch → morph-touch}/Functions/get-room-messages.1.0.0.json +2 -2
- package/{touch → morph-touch}/Functions/get-room-messages.http +1 -1
- package/{touch → morph-touch}/Functions/rezervation-transfer.http +1 -1
- package/{touch → morph-touch}/Functions/send-room-message.1.0.0.json +2 -2
- package/{touch → morph-touch}/Functions/src/GetAvailableSlotsMapping.csx +125 -1
- package/{touch → morph-touch}/Functions/src/GetChatRoomsMapping.csx +6 -7
- package/{touch → morph-touch}/Functions/src/GetRezervationsMapping.csx +12 -5
- package/{touch → morph-touch}/Schemas/absence-entry.1.0.0.json +3 -3
- package/{touch → morph-touch}/Schemas/advisor-chat-rooms.1.0.0.json +2 -2
- package/{touch → morph-touch}/Schemas/chat-room.1.0.0.json +2 -2
- package/morph-touch/Schemas/chat-room.1.1.0.json +132 -0
- package/morph-touch/Schemas/chat-room.1.2.0.json +174 -0
- package/{touch → morph-touch}/Schemas/notification-sender.1.0.0.json +2 -2
- package/{touch → morph-touch}/Schemas/portfolio-manager.1.0.0.json +2 -2
- package/{touch → morph-touch}/Schemas/rezervation.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/cancel-absence-entry-for-rezervation.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/check-already-completed-chat-room.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/check-duplicate-portfolio-manager.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/check-duplicate-rezervation.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/check-existing-permanent-chat-room.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/check-randevu-time.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/create-permanent-chat-room.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/determine-transfer-type.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/enrich-rezervations-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/execute-permanent-chatroom-update.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/execute-rez-chatroom-transfer.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/execute-rezervation-transfer.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/fetch-absence-entries-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/fetch-advisors-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/fetch-permanent-chatrooms-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/fetch-rez-chatrooms-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/fetch-rezervations-for-transfer.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-absence-entry-task.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-available-slots-http.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/get-available-slots.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-chat-room-data-for-rezervation.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-chat-token.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/get-matrix-room-messages.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/get-matrix-sync.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/get-rezervation-data-task.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-rezervation-state-task.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-rezervations-task.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/get-user-info-for-rezervation.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/get-video-call-url.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/invite-user-to-rezervation-room.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/join-chat-room-for-rezervation.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/join-matrix-room.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/join-user-to-room.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/merge-invited-user.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/merge-rezervation-update.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/merge-target-advisor-for-transfer.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/merge-update-body-for-randevu-update.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/merge-video-call-urls.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/query-chat-room-instances.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/remove-member-from-room.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/send-matrix-room-message.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/send-push-notification.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/send-sms-notification.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/set-chat-room-status-active.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/set-chat-room-status-deactive.1.0.0.json +1 -1
- package/morph-touch/Tasks/set-matrix-room-history-visibility.1.0.0.json +26 -0
- package/{touch → morph-touch}/Tasks/set-previous-advisor.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/set-user-from-headers-for-rezervation.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/start-absence-entry-for-rezervation.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/start-chat-room-for-rezervation.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/start-notification-sender.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/start-permanent-chat-room.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/start-transfer-from-absence-entry.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/start-video-call.1.0.0.json +2 -2
- package/morph-touch/Tasks/summarize-chat-openai.1.0.0.json +27 -0
- package/morph-touch/Tasks/test-get-rezervation-count-by-advisor.1.0.0.json +22 -0
- package/morph-touch/Tasks/test-get-rezervation-instances-after-date.1.0.0.json +24 -0
- package/{touch → morph-touch}/Tasks/trigger-chat-room-deactivate.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-chat-room-transfer.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-chat-room-update.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-rezervation-add-invited-participant.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-rezervation-apply-update.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-rezervation-to-in-meet.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/trigger-rezervation-video-call-update.1.0.0.json +2 -2
- package/{touch → morph-touch}/Tasks/validate-date-for-rezervation.1.0.0.json +1 -1
- package/{touch → morph-touch}/Tasks/validate-slot-for-rezervation.1.0.0.json +3 -3
- package/{touch → morph-touch}/Tasks/validate-transfer-availability.1.0.0.json +3 -3
- package/{touch → morph-touch}/Workflows/absence-entry.http +21 -21
- package/{touch → morph-touch}/Workflows/absence-entry.json +3 -3
- package/{touch → morph-touch}/Workflows/add-participant-to-rezervation.http +3 -3
- package/{touch → morph-touch}/Workflows/add-participant-to-rezervation.json +23 -24
- package/{touch → morph-touch}/Workflows/chat-room.http +10 -8
- package/{touch → morph-touch}/Workflows/chat-room.json +37 -24
- package/{touch → morph-touch}/Workflows/investment-advisor.json +2 -2
- package/{touch → morph-touch}/Workflows/notification-sender.http +13 -13
- package/{touch → morph-touch}/Workflows/notification-sender.json +5 -5
- package/{touch → morph-touch}/Workflows/portfolio-manager.json +2 -2
- package/{touch → morph-touch}/Workflows/randevu-update.http +6 -6
- package/{touch → morph-touch}/Workflows/rezervation-start.json +16 -16
- package/{touch → morph-touch}/Workflows/rezervation-transfer.json +125 -22
- package/{touch → morph-touch}/Workflows/rezervation-update.http +6 -6
- package/{touch → morph-touch}/Workflows/rezervation-update.json +19 -19
- package/{touch → morph-touch}/Workflows/rezervation.http +6 -6
- package/{touch → morph-touch}/Workflows/rezervation.json +121 -180
- package/{touch → morph-touch}/Workflows/src/CancelAbsenceEntryForRezervationMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/CancelAbsenceForRandevuUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/ChatRoomRemoveMapping.csx +22 -1
- package/{touch → morph-touch}/Workflows/src/ChatRoomTransferInviteMapping.csx +21 -0
- package/{touch → morph-touch}/Workflows/src/ChatRoomUpdateMapping.csx +21 -0
- package/{touch → morph-touch}/Workflows/src/CreateAbsenceEntryForRezervationMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/CreateAbsenceForRandevuUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/CreateChatRoomForRezervationMapping.csx +12 -2
- package/{touch → morph-touch}/Workflows/src/CreatePermanentChatRoomMapping.csx +50 -9
- package/morph-touch/Workflows/src/DeactivatePermanentChatRoomFromTransferMapping.csx +133 -0
- package/{touch → morph-touch}/Workflows/src/EnrichRezervationsForTransferMapping.csx +16 -3
- package/{touch → morph-touch}/Workflows/src/ExecutePermanentChatRoomUpdateMapping.csx +23 -18
- package/{touch → morph-touch}/Workflows/src/ExecuteRezChatRoomTransferMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/ExecuteTransferMapping.csx +15 -12
- package/{touch → morph-touch}/Workflows/src/FetchAdvisorsForTransferMapping.csx +55 -7
- package/{touch → morph-touch}/Workflows/src/FetchPermanentChatRoomsMapping.csx +65 -2
- package/morph-touch/Workflows/src/FetchRoomMessagesForSummaryMapping.csx +182 -0
- package/{touch → morph-touch}/Workflows/src/GetChatRoomDataForRezervationMapping.csx +2 -2
- package/{touch → morph-touch}/Workflows/src/GetRezervationDataForAddParticipantMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/GetRezervationDataForRandevuUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/GetRezervationDataMapping.csx +2 -2
- package/{touch → morph-touch}/Workflows/src/GetRezervationStateForRandevuUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/GetRezervationStateMapping.csx +2 -2
- package/{touch → morph-touch}/Workflows/src/InvitedUserNotAllowedRule.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/JoinUserToRoomMapping.csx +22 -1
- package/morph-touch/Workflows/src/NoOpGetInstancesTestMapping.csx +19 -0
- package/morph-touch/Workflows/src/PermanentProcessNextTerminationRule.csx +51 -0
- package/{touch → morph-touch}/Workflows/src/SendPushNotificationMapping.csx +2 -2
- package/{touch → morph-touch}/Workflows/src/SendSmsNotificationMapping.csx +1 -1
- package/morph-touch/Workflows/src/SendSummaryToNewRoomMapping.csx +178 -0
- package/morph-touch/Workflows/src/SetRoomHistoryVisibilityMapping.csx +109 -0
- package/{touch → morph-touch}/Workflows/src/StartChatRoomForRezervationMapping.csx +4 -3
- package/{touch → morph-touch}/Workflows/src/StartGetChatTokenForRezervationMapping.csx +1 -1
- package/morph-touch/Workflows/src/StartNewPermanentChatRoomFromTransferMapping.csx +197 -0
- package/{touch → morph-touch}/Workflows/src/StartNotificationForAdvisorMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/StartNotificationForRezervationFromUserInfoMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/StartNotificationForUserMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/StartPermanentChatRoomMapping.csx +5 -2
- package/{touch → morph-touch}/Workflows/src/StartTransferFromAbsenceEntryMapping.csx +6 -14
- package/{touch → morph-touch}/Workflows/src/StateInMeetRule.csx +1 -1
- package/morph-touch/Workflows/src/SummarizeChatWithOpenAIMapping.csx +172 -0
- package/{touch → morph-touch}/Workflows/src/TriggerChatRoomDeactivateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/TriggerChatRoomTransferMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/TriggerChatRoomUpdateMapping.csx +3 -3
- package/{touch → morph-touch}/Workflows/src/TriggerRezervationAddInvitedParticipantMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/TriggerRezervationApplyUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/TriggerRezervationToInMeetMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/TriggerRezervationVideoCallUpdateMapping.csx +1 -1
- package/{touch → morph-touch}/Workflows/src/ValidateSlotForRandevuUpdateMapping.csx +29 -1
- package/{touch → morph-touch}/Workflows/src/ValidateSlotForRezervationMapping.csx +29 -1
- package/{touch → morph-touch}/Workflows/src/ValidateTransferMapping.csx +2 -2
- package/{touch → morph-touch}/Workflows/start-chat.json +6 -6
- package/{touch → morph-touch}/Workflows/start-video-call.http +3 -3
- package/{touch → morph-touch}/Workflows/start-video-call.json +4 -4
- package/package.json +1 -1
- package/vnext.config.json +6 -6
- package/burgan-tech-morph-touch-runtime-0.0.3.tgz +0 -0
- package/touch/Functions/get-available-slots.1.0.0.json +0 -30
- package/touch/Functions/get-chat-rooms.1.0.0.json +0 -28
- package/touch/Functions/get-rezervations.1.0.0.json +0 -26
- /package/{touch → morph-touch}/Extensions/.gitkeep +0 -0
- /package/{touch → morph-touch}/Functions/.gitkeep +0 -0
- /package/{touch → morph-touch}/Functions/src/CheckLivekitRoomAccessMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/GetAbsenceEntryMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/GetAdvisorStatsMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/GetCustomerInfoMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/GetMatrixSyncMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/GetRoomMessagesMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/SendCancelNotificationMapping.csx +0 -0
- /package/{touch → morph-touch}/Functions/src/SendRoomMessageMapping.csx +0 -0
- /package/{touch → morph-touch}/Schemas/.gitkeep +0 -0
- /package/{touch → morph-touch}/Tasks/.gitkeep +0 -0
- /package/{touch → morph-touch}/Views/.gitkeep +0 -0
- /package/{touch → morph-touch}/Workflows/.gitkeep +0 -0
- /package/{touch → morph-touch}/Workflows/src/AllChatRoomsSuccessRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/AlwaysTrueRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/AnyChatRoomFailedRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/AutoProcessRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/BuildRezChatRoomPlanMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CanStartRezervationTimerMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CanStartTransferMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/ChatRoomCreatedFailedRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/ChatRoomCreatedSuccessRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/ChatRoomTransferRemoveMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckAlreadyCompletedChatRoomMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckDuplicatePortfolioManagerMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckDuplicateRezervationMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckExistingPermanentChatRoomMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckRandevuTimeMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CheckRezervationStateActiveOrInMeetRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/CustomerControlToEndRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/DetermineTransferTypeMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/FetchAbsenceEntriesForTransferMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/FetchRezervationsForTransferMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/GetChatTokenMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/GetUserInfoForRezervationMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/GetVideoCallUrlMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/HasChangedAdvisorRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/HasChatIntegrationRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/HasExistingPermanentRoomRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/InviteAdvisorForRandevuUpdateMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/InviteNewAdvisorToRezervationRoomMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/InviteNewParticipantToRandevuRoomMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/InvitedUserMergeMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/InvitedUserNotInMeetRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/IsNotfSentRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForAddParticipantMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForRandevuStartMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForRezervationMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/JoinMatrixRoomMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/LoginForAddParticipantChatMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/LoginForRandevuStartChatMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/MergeRezervationUpdateMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/MergeTargetAdvisorForTransferMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/MergeUpdateBodyForRandevuUpdateMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NoExistingPermanentRoomRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationCompleteAlwaysRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationCompleteFromPendingRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationCompleteFromSmsRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationPushFromPendingRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationPushFromSmsRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/NotificationSmsPendingRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/PermanentDoneRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/PermanentProcessNextRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/RezChatRoomProcessNextRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/RezChatRoomsDoneRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SetChatRoomStatusActiveMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SetChatRoomStatusDeactiveMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SetPreviousAdvisorMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SetUserFromHeadersForRezervationMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SlotAvailableRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SlotUnavailableRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StartVideoCallCustomerSubFlowMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StartVideoCallForInvitedParticipantMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StartVideoCallForRandevuStartMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StartVideoCallStaffSubFlowMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StateActiveForUpdateRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StateActiveRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StateNotActiveForUpdateRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StateNotActiveOrInMeetRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StatusCustomerEnterRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/StatusStaffEnterRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/SyncWorkingHoursRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/TokenSuccessRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/TransferAllDoneRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/TransferHasInvalidRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/TransferProcessNextRule.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/ValidateDateForRezervationMapping.csx +0 -0
- /package/{touch → morph-touch}/Workflows/src/VideoCallUrlUpdateMergeMapping.csx +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using System.Threading.Tasks;
|
|
5
|
+
using BBT.Workflow.Scripting;
|
|
6
|
+
using BBT.Workflow.Definitions;
|
|
7
|
+
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// Mapping for send-matrix-room-message HttpTask (Type 6) in the termination transfer loop.
|
|
10
|
+
/// Sends the AI-generated chatSummary as the first message in the newly created room.
|
|
11
|
+
/// Skips gracefully if no summary is available -- transfer is never blocked.
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class SendSummaryToNewRoomMapping : ScriptBase, IMapping
|
|
14
|
+
{
|
|
15
|
+
public async Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
|
|
16
|
+
{
|
|
17
|
+
var httpTask = task as HttpTask;
|
|
18
|
+
if (httpTask == null)
|
|
19
|
+
throw new InvalidOperationException("Task must be an HttpTask");
|
|
20
|
+
|
|
21
|
+
var data = context.Instance?.Data;
|
|
22
|
+
if (data == null)
|
|
23
|
+
return new ScriptResponse { Data = new { skipped = true, reason = "no-instance-data" } };
|
|
24
|
+
|
|
25
|
+
var chatSummary = GetString(data, "chatSummary");
|
|
26
|
+
if (string.IsNullOrWhiteSpace(chatSummary))
|
|
27
|
+
return new ScriptResponse { Data = new { skipped = true, reason = "no-chatSummary" } };
|
|
28
|
+
|
|
29
|
+
var newRoomId = GetString(data, "newRoomId");
|
|
30
|
+
if (string.IsNullOrWhiteSpace(newRoomId))
|
|
31
|
+
return new ScriptResponse { Data = new { skipped = true, reason = "no-newRoomId" } };
|
|
32
|
+
|
|
33
|
+
string user = null;
|
|
34
|
+
var permanentRoomPlan = data.permanentRoomPlan;
|
|
35
|
+
if (permanentRoomPlan != null)
|
|
36
|
+
{
|
|
37
|
+
int processedIndex = 0;
|
|
38
|
+
if (HasProperty(data, "permanentProcessedIndex"))
|
|
39
|
+
int.TryParse(data.permanentProcessedIndex?.ToString() ?? "0", out processedIndex);
|
|
40
|
+
|
|
41
|
+
var items = permanentRoomPlan as IEnumerable<object>;
|
|
42
|
+
if (items != null)
|
|
43
|
+
{
|
|
44
|
+
var itemsList = items.ToList();
|
|
45
|
+
if (processedIndex < itemsList.Count)
|
|
46
|
+
{
|
|
47
|
+
dynamic currentItem = itemsList[processedIndex];
|
|
48
|
+
var chatRoomKey = currentItem?.chatRoomKey?.ToString();
|
|
49
|
+
if (!string.IsNullOrEmpty(chatRoomKey))
|
|
50
|
+
user = LookupUser(data, chatRoomKey);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (string.IsNullOrWhiteSpace(user))
|
|
56
|
+
return new ScriptResponse { Data = new { skipped = true, reason = "no-user" } };
|
|
57
|
+
|
|
58
|
+
var matrixBaseUrl = await GetSecretAsync("vnext-secret", "workflow-secret", "MatrixBaseUrl");
|
|
59
|
+
if (string.IsNullOrWhiteSpace(matrixBaseUrl))
|
|
60
|
+
return new ScriptResponse { Data = new { skipped = true, reason = "no-MatrixBaseUrl" } };
|
|
61
|
+
|
|
62
|
+
var txnId = Guid.NewGuid().ToString("N");
|
|
63
|
+
var fullUrl = matrixBaseUrl.TrimEnd('/') +
|
|
64
|
+
"/_matrix/client/v3/rooms/" + Uri.EscapeDataString(newRoomId) +
|
|
65
|
+
"/send/m.room.message/" + txnId;
|
|
66
|
+
|
|
67
|
+
httpTask.SetUrl(fullUrl);
|
|
68
|
+
httpTask.SetHeaders(new Dictionary<string, string>
|
|
69
|
+
{
|
|
70
|
+
["Content-Type"] = "application/json",
|
|
71
|
+
["Accept"] = "application/json",
|
|
72
|
+
["X-Matrix-User"] = user
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
var messageBody =
|
|
76
|
+
"Onceki danisman ile yapilan gorusme ozeti:\n\n" +
|
|
77
|
+
chatSummary + "\n\n" +
|
|
78
|
+
"---\n" +
|
|
79
|
+
"Bu ozet otomatik olarak olusturulmustur.";
|
|
80
|
+
|
|
81
|
+
httpTask.SetBody(new
|
|
82
|
+
{
|
|
83
|
+
msgtype = "m.text",
|
|
84
|
+
body = messageBody
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
return new ScriptResponse();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public Task<ScriptResponse> OutputHandler(ScriptContext context)
|
|
91
|
+
{
|
|
92
|
+
var data = context.Instance?.Data;
|
|
93
|
+
var result = new Dictionary<string, object>();
|
|
94
|
+
CopyAllFields(result, data);
|
|
95
|
+
|
|
96
|
+
try
|
|
97
|
+
{
|
|
98
|
+
var response = context.Body;
|
|
99
|
+
var bodyData = response?.data;
|
|
100
|
+
string errcode = GetString(bodyData, "errcode");
|
|
101
|
+
|
|
102
|
+
result["sendSummarySuccess"] = string.IsNullOrEmpty(errcode);
|
|
103
|
+
}
|
|
104
|
+
catch
|
|
105
|
+
{
|
|
106
|
+
result["sendSummarySuccess"] = false;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return Task.FromResult(new ScriptResponse { Data = result });
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private string LookupUser(dynamic data, string chatRoomKey)
|
|
113
|
+
{
|
|
114
|
+
if (!HasProperty(data, "permanentChatRooms") || data.permanentChatRooms == null)
|
|
115
|
+
return null;
|
|
116
|
+
|
|
117
|
+
foreach (var room in data.permanentChatRooms)
|
|
118
|
+
{
|
|
119
|
+
var key = GetString(room, "chatRoomKey");
|
|
120
|
+
if (string.Equals(key, chatRoomKey, StringComparison.OrdinalIgnoreCase))
|
|
121
|
+
return GetString(room, "user");
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private string GetString(dynamic obj, string name)
|
|
127
|
+
{
|
|
128
|
+
if (obj == null) return null;
|
|
129
|
+
try
|
|
130
|
+
{
|
|
131
|
+
if (HasProperty(obj, name))
|
|
132
|
+
{
|
|
133
|
+
var v = GetPropertyValue(obj, name);
|
|
134
|
+
return v?.ToString()?.Trim();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch { }
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private void CopyAllFields(Dictionary<string, object> result, dynamic data)
|
|
142
|
+
{
|
|
143
|
+
CopyIfPresent(result, data, "transferPlan");
|
|
144
|
+
CopyIfPresent(result, data, "validationResult");
|
|
145
|
+
CopyIfPresent(result, data, "sourceAdvisorId");
|
|
146
|
+
CopyIfPresent(result, data, "advisorType");
|
|
147
|
+
CopyIfPresent(result, data, "startDate");
|
|
148
|
+
CopyIfPresent(result, data, "endDate");
|
|
149
|
+
CopyIfPresent(result, data, "transferType");
|
|
150
|
+
CopyIfPresent(result, data, "enrichedRezervations");
|
|
151
|
+
CopyIfPresent(result, data, "rezChatRoomPlan");
|
|
152
|
+
CopyIfPresent(result, data, "permanentRoomPlan");
|
|
153
|
+
CopyIfPresent(result, data, "permanentChatRooms");
|
|
154
|
+
CopyIfPresent(result, data, "permanentProcessedIndex");
|
|
155
|
+
CopyIfPresent(result, data, "lastPermanentDeactivateSuccess");
|
|
156
|
+
CopyIfPresent(result, data, "lastDeactivatedRoomId");
|
|
157
|
+
CopyIfPresent(result, data, "lastRoomMessages");
|
|
158
|
+
CopyIfPresent(result, data, "lastRoomMessagesSuccess");
|
|
159
|
+
CopyIfPresent(result, data, "chatSummary");
|
|
160
|
+
CopyIfPresent(result, data, "chatSummarySuccess");
|
|
161
|
+
CopyIfPresent(result, data, "newRoomId");
|
|
162
|
+
CopyIfPresent(result, data, "lastPermanentChatRoomSuccess");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
private void CopyIfPresent(Dictionary<string, object> target, dynamic source, string name)
|
|
166
|
+
{
|
|
167
|
+
if (source == null) return;
|
|
168
|
+
try
|
|
169
|
+
{
|
|
170
|
+
if (HasProperty(source, name))
|
|
171
|
+
{
|
|
172
|
+
var v = GetPropertyValue(source, name);
|
|
173
|
+
if (v != null) target[name] = v;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch { }
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Threading.Tasks;
|
|
4
|
+
using BBT.Workflow.Scripting;
|
|
5
|
+
using BBT.Workflow.Definitions;
|
|
6
|
+
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// Mapping for set-matrix-room-history-visibility HttpTask (Type 6) in chat-room update transition.
|
|
9
|
+
/// Runs before invite: sets m.room.history_visibility when transition provides historyVisibility.
|
|
10
|
+
/// When absent/empty: no-op GET /_matrix/client/v3/versions (harmless) so the HTTP step still succeeds.
|
|
11
|
+
/// X-Matrix-User = room owner (user). MatrixBaseUrl from Vault.
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class SetRoomHistoryVisibilityMapping : ScriptBase, IMapping
|
|
14
|
+
{
|
|
15
|
+
private static readonly HashSet<string> Allowed = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
|
16
|
+
{
|
|
17
|
+
"shared", "invited", "joined", "world_readable"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
public async Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
|
|
21
|
+
{
|
|
22
|
+
var httpTask = task as HttpTask;
|
|
23
|
+
if (httpTask == null)
|
|
24
|
+
throw new InvalidOperationException("Task must be an HttpTask");
|
|
25
|
+
|
|
26
|
+
var data = context.Instance?.Data;
|
|
27
|
+
var user = GetString(data, "user");
|
|
28
|
+
var chatIntegration = data?.chatIntegration;
|
|
29
|
+
var roomId = GetString(chatIntegration, "roomId");
|
|
30
|
+
|
|
31
|
+
var matrixBaseUrl = await GetSecretAsync("vnext-secret", "workflow-secret", "MatrixBaseUrl");
|
|
32
|
+
if (string.IsNullOrWhiteSpace(matrixBaseUrl))
|
|
33
|
+
throw new InvalidOperationException("MatrixBaseUrl secret is required");
|
|
34
|
+
var baseTrim = matrixBaseUrl.TrimEnd('/');
|
|
35
|
+
|
|
36
|
+
var raw = GetString(data, "historyVisibility");
|
|
37
|
+
var hv = NormalizeHistoryVisibility(raw);
|
|
38
|
+
|
|
39
|
+
if (string.IsNullOrWhiteSpace(roomId) || string.IsNullOrWhiteSpace(user))
|
|
40
|
+
return new ScriptResponse();
|
|
41
|
+
|
|
42
|
+
if (string.IsNullOrEmpty(hv))
|
|
43
|
+
{
|
|
44
|
+
TrySetHttpMethod(httpTask, "GET");
|
|
45
|
+
httpTask.SetUrl(baseTrim + "/_matrix/client/v3/versions");
|
|
46
|
+
httpTask.SetHeaders(new Dictionary<string, string>
|
|
47
|
+
{
|
|
48
|
+
["Accept"] = "application/json",
|
|
49
|
+
["X-Matrix-User"] = user
|
|
50
|
+
});
|
|
51
|
+
return new ScriptResponse();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
TrySetHttpMethod(httpTask, "PUT");
|
|
55
|
+
var fullUrl = baseTrim + "/_matrix/client/v3/rooms/" + Uri.EscapeDataString(roomId) + "/state/m.room.history_visibility/";
|
|
56
|
+
httpTask.SetUrl(fullUrl);
|
|
57
|
+
httpTask.SetHeaders(new Dictionary<string, string>
|
|
58
|
+
{
|
|
59
|
+
["Content-Type"] = "application/json",
|
|
60
|
+
["Accept"] = "application/json",
|
|
61
|
+
["X-Matrix-User"] = user
|
|
62
|
+
});
|
|
63
|
+
httpTask.SetBody(new { history_visibility = hv });
|
|
64
|
+
|
|
65
|
+
return new ScriptResponse();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public Task<ScriptResponse> OutputHandler(ScriptContext context)
|
|
69
|
+
{
|
|
70
|
+
return Task.FromResult(new ScriptResponse());
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private static string NormalizeHistoryVisibility(string raw)
|
|
74
|
+
{
|
|
75
|
+
// UI can omit historyVisibility; default to shared to keep flow step successful.
|
|
76
|
+
if (string.IsNullOrWhiteSpace(raw)) return "shared";
|
|
77
|
+
var lower = raw.Trim().ToLowerInvariant();
|
|
78
|
+
if (!Allowed.Contains(lower)) return null;
|
|
79
|
+
return lower;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private static void TrySetHttpMethod(HttpTask httpTask, string method)
|
|
83
|
+
{
|
|
84
|
+
if (httpTask == null || string.IsNullOrEmpty(method)) return;
|
|
85
|
+
try
|
|
86
|
+
{
|
|
87
|
+
dynamic ht = httpTask;
|
|
88
|
+
ht.SetMethod(method);
|
|
89
|
+
}
|
|
90
|
+
catch
|
|
91
|
+
{
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private string GetString(dynamic obj, string name)
|
|
96
|
+
{
|
|
97
|
+
if (obj == null) return null;
|
|
98
|
+
try
|
|
99
|
+
{
|
|
100
|
+
if (HasProperty(obj, name))
|
|
101
|
+
{
|
|
102
|
+
var v = GetPropertyValue(obj, name);
|
|
103
|
+
return v?.ToString();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch { }
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -32,15 +32,16 @@ public class StartChatRoomForRezervationMapping : ScriptBase, IMapping
|
|
|
32
32
|
string.IsNullOrWhiteSpace(startDateTime) || string.IsNullOrWhiteSpace(endDateTime))
|
|
33
33
|
throw new InvalidOperationException("user, advisor, startDateTime and endDateTime are required");
|
|
34
34
|
|
|
35
|
-
var chatRoomKey =
|
|
35
|
+
var chatRoomKey = NormalizeForKey(randevuKey);
|
|
36
36
|
|
|
37
|
-
startTask.SetDomain("touch");
|
|
37
|
+
startTask.SetDomain("morph-touch");
|
|
38
38
|
startTask.SetFlow("chat-room");
|
|
39
39
|
startTask.SetKey(chatRoomKey);
|
|
40
40
|
startTask.SetSync(true);
|
|
41
41
|
startTask.SetBody(new
|
|
42
42
|
{
|
|
43
43
|
roomType = "rezervation",
|
|
44
|
+
randevuKey,
|
|
44
45
|
user,
|
|
45
46
|
advisorId = advisor,
|
|
46
47
|
advisorType = "IA",
|
|
@@ -62,7 +63,7 @@ public class StartChatRoomForRezervationMapping : ScriptBase, IMapping
|
|
|
62
63
|
if (string.IsNullOrWhiteSpace(key))
|
|
63
64
|
{
|
|
64
65
|
var randevuKey = GetString(context.Instance?.Data, "randevuKey");
|
|
65
|
-
key =
|
|
66
|
+
key = NormalizeForKey(randevuKey ?? "");
|
|
66
67
|
}
|
|
67
68
|
response.Data = new { chatRoomInstanceKey = key };
|
|
68
69
|
}
|
|
@@ -32,7 +32,7 @@ public class StartGetChatTokenForRezervationMapping : ScriptBase, IMapping
|
|
|
32
32
|
|
|
33
33
|
var subprocessKey = $"{instanceKey}-token-{status}";
|
|
34
34
|
|
|
35
|
-
startTask.SetDomain("touch");
|
|
35
|
+
startTask.SetDomain("morph-touch");
|
|
36
36
|
startTask.SetFlow("start-video-call");
|
|
37
37
|
startTask.SetKey(subprocessKey);
|
|
38
38
|
startTask.SetBody(new
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using System.Threading.Tasks;
|
|
5
|
+
using BBT.Workflow.Scripting;
|
|
6
|
+
using BBT.Workflow.Definitions;
|
|
7
|
+
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// Mapping for start-permanent-chat-room StartTask (Type 11) in the termination transfer loop.
|
|
10
|
+
/// Reads permanentRoomPlan[permanentProcessedIndex] to get chatRoomKey and targetAdvisor,
|
|
11
|
+
/// looks up user and advisorType from permanentChatRooms, then starts a new chat-room instance.
|
|
12
|
+
/// Increments permanentProcessedIndex on success.
|
|
13
|
+
/// </summary>
|
|
14
|
+
public class StartNewPermanentChatRoomFromTransferMapping : ScriptBase, IMapping
|
|
15
|
+
{
|
|
16
|
+
public Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
|
|
17
|
+
{
|
|
18
|
+
var startTask = task as StartTask;
|
|
19
|
+
if (startTask == null)
|
|
20
|
+
throw new InvalidOperationException("Task must be a StartTask");
|
|
21
|
+
|
|
22
|
+
var data = context.Instance?.Data;
|
|
23
|
+
if (data == null)
|
|
24
|
+
throw new InvalidOperationException("Instance data is required");
|
|
25
|
+
|
|
26
|
+
var permanentRoomPlan = data.permanentRoomPlan;
|
|
27
|
+
if (permanentRoomPlan == null)
|
|
28
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "no-permanentRoomPlan" } });
|
|
29
|
+
|
|
30
|
+
int processedIndex = 0;
|
|
31
|
+
if (HasProperty(data, "permanentProcessedIndex"))
|
|
32
|
+
int.TryParse(data.permanentProcessedIndex?.ToString() ?? "0", out processedIndex);
|
|
33
|
+
|
|
34
|
+
var items = permanentRoomPlan as IEnumerable<object>;
|
|
35
|
+
if (items == null)
|
|
36
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
37
|
+
|
|
38
|
+
var itemsList = items.ToList();
|
|
39
|
+
if (processedIndex >= itemsList.Count)
|
|
40
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
41
|
+
|
|
42
|
+
dynamic currentItem = itemsList[processedIndex];
|
|
43
|
+
var chatRoomKey = currentItem?.chatRoomKey?.ToString();
|
|
44
|
+
var targetAdvisor = currentItem?.targetAdvisor?.ToString();
|
|
45
|
+
|
|
46
|
+
if (string.IsNullOrEmpty(chatRoomKey) || string.IsNullOrEmpty(targetAdvisor))
|
|
47
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
48
|
+
|
|
49
|
+
string user = null;
|
|
50
|
+
string advisorType = null;
|
|
51
|
+
LookupRoomDetails(data, chatRoomKey, out user, out advisorType);
|
|
52
|
+
|
|
53
|
+
if (string.IsNullOrWhiteSpace(user))
|
|
54
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "user-not-found-for-" + chatRoomKey } });
|
|
55
|
+
|
|
56
|
+
if (string.IsNullOrWhiteSpace(advisorType))
|
|
57
|
+
advisorType = "IA";
|
|
58
|
+
|
|
59
|
+
var newChatRoomKey = NormalizeForKey(user) + "-" + NormalizeForKey(advisorType) + "-" + NormalizeForKey(targetAdvisor);
|
|
60
|
+
|
|
61
|
+
startTask.SetDomain("morph-touch");
|
|
62
|
+
startTask.SetFlow("chat-room");
|
|
63
|
+
startTask.SetKey(newChatRoomKey);
|
|
64
|
+
startTask.SetSync(true);
|
|
65
|
+
startTask.SetBody(new
|
|
66
|
+
{
|
|
67
|
+
user,
|
|
68
|
+
advisorType,
|
|
69
|
+
advisorId = targetAdvisor,
|
|
70
|
+
roomType = "permanent"
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
return Task.FromResult(new ScriptResponse());
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public Task<ScriptResponse> OutputHandler(ScriptContext context)
|
|
77
|
+
{
|
|
78
|
+
var data = context.Instance?.Data;
|
|
79
|
+
bool success = context.Body?.isSuccess == true;
|
|
80
|
+
|
|
81
|
+
int processedIndex = 0;
|
|
82
|
+
if (data != null && HasProperty(data, "permanentProcessedIndex"))
|
|
83
|
+
int.TryParse(data.permanentProcessedIndex?.ToString() ?? "0", out processedIndex);
|
|
84
|
+
|
|
85
|
+
var result = new Dictionary<string, object>();
|
|
86
|
+
CopyIfPresent(result, data, "transferPlan");
|
|
87
|
+
CopyIfPresent(result, data, "validationResult");
|
|
88
|
+
CopyIfPresent(result, data, "sourceAdvisorId");
|
|
89
|
+
CopyIfPresent(result, data, "advisorType");
|
|
90
|
+
CopyIfPresent(result, data, "startDate");
|
|
91
|
+
CopyIfPresent(result, data, "endDate");
|
|
92
|
+
CopyIfPresent(result, data, "transferType");
|
|
93
|
+
CopyIfPresent(result, data, "enrichedRezervations");
|
|
94
|
+
CopyIfPresent(result, data, "rezChatRoomPlan");
|
|
95
|
+
CopyIfPresent(result, data, "permanentRoomPlan");
|
|
96
|
+
CopyIfPresent(result, data, "permanentChatRooms");
|
|
97
|
+
CopyIfPresent(result, data, "lastPermanentDeactivateSuccess");
|
|
98
|
+
CopyIfPresent(result, data, "lastDeactivatedRoomId");
|
|
99
|
+
CopyIfPresent(result, data, "lastRoomMessages");
|
|
100
|
+
CopyIfPresent(result, data, "lastRoomMessagesSuccess");
|
|
101
|
+
CopyIfPresent(result, data, "chatSummary");
|
|
102
|
+
CopyIfPresent(result, data, "chatSummarySuccess");
|
|
103
|
+
|
|
104
|
+
if (success)
|
|
105
|
+
result["permanentProcessedIndex"] = processedIndex + 1;
|
|
106
|
+
else
|
|
107
|
+
CopyIfPresent(result, data, "permanentProcessedIndex");
|
|
108
|
+
|
|
109
|
+
result["lastPermanentChatRoomSuccess"] = success;
|
|
110
|
+
|
|
111
|
+
string newRoomId = ExtractNewRoomId(context);
|
|
112
|
+
if (!string.IsNullOrWhiteSpace(newRoomId))
|
|
113
|
+
result["newRoomId"] = newRoomId;
|
|
114
|
+
|
|
115
|
+
return Task.FromResult(new ScriptResponse { Data = result });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
private string ExtractNewRoomId(ScriptContext context)
|
|
119
|
+
{
|
|
120
|
+
try
|
|
121
|
+
{
|
|
122
|
+
var body = context.Body;
|
|
123
|
+
if (body == null) return null;
|
|
124
|
+
|
|
125
|
+
if (HasProperty(body, "data") && body.data != null)
|
|
126
|
+
{
|
|
127
|
+
var responseData = body.data;
|
|
128
|
+
if (HasProperty(responseData, "chatIntegration") && responseData.chatIntegration != null)
|
|
129
|
+
{
|
|
130
|
+
var integration = responseData.chatIntegration;
|
|
131
|
+
if (HasProperty(integration, "roomId"))
|
|
132
|
+
return integration.roomId?.ToString();
|
|
133
|
+
}
|
|
134
|
+
if (HasProperty(responseData, "roomId"))
|
|
135
|
+
return responseData.roomId?.ToString();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch { }
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/// <summary>Finds user and advisorType from the permanentChatRooms array by matching chatRoomKey.</summary>
|
|
143
|
+
private void LookupRoomDetails(dynamic data, string chatRoomKey, out string user, out string advisorType)
|
|
144
|
+
{
|
|
145
|
+
user = null;
|
|
146
|
+
advisorType = null;
|
|
147
|
+
|
|
148
|
+
if (data == null || !HasProperty(data, "permanentChatRooms") || data.permanentChatRooms == null)
|
|
149
|
+
return;
|
|
150
|
+
|
|
151
|
+
foreach (var room in data.permanentChatRooms)
|
|
152
|
+
{
|
|
153
|
+
var key = GetString(room, "chatRoomKey");
|
|
154
|
+
if (string.Equals(key, chatRoomKey, StringComparison.OrdinalIgnoreCase))
|
|
155
|
+
{
|
|
156
|
+
user = GetString(room, "user");
|
|
157
|
+
advisorType = GetString(room, "advisorType");
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
private string GetString(dynamic obj, string name)
|
|
164
|
+
{
|
|
165
|
+
if (obj == null) return null;
|
|
166
|
+
try
|
|
167
|
+
{
|
|
168
|
+
if (HasProperty(obj, name))
|
|
169
|
+
{
|
|
170
|
+
var v = GetPropertyValue(obj, name);
|
|
171
|
+
return v?.ToString()?.Trim();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch { }
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
private string NormalizeForKey(string value)
|
|
179
|
+
{
|
|
180
|
+
if (string.IsNullOrEmpty(value)) return value ?? "";
|
|
181
|
+
return value.Replace(":", "-").Replace(" ", "-").Replace("@", "-");
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
private void CopyIfPresent(Dictionary<string, object> target, dynamic source, string name)
|
|
185
|
+
{
|
|
186
|
+
if (source == null) return;
|
|
187
|
+
try
|
|
188
|
+
{
|
|
189
|
+
if (HasProperty(source, name))
|
|
190
|
+
{
|
|
191
|
+
var v = GetPropertyValue(source, name);
|
|
192
|
+
if (v != null) target[name] = v;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch { }
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -31,7 +31,7 @@ public class StartNotificationForAdvisorMapping : ScriptBase, IMapping
|
|
|
31
31
|
|
|
32
32
|
var notificationKey = "notification-advisor-" + NormalizeForKey(instanceKey);
|
|
33
33
|
|
|
34
|
-
startTask.SetDomain("touch");
|
|
34
|
+
startTask.SetDomain("morph-touch");
|
|
35
35
|
startTask.SetFlow("notification-sender");
|
|
36
36
|
startTask.SetKey(notificationKey);
|
|
37
37
|
|
package/{touch → morph-touch}/Workflows/src/StartNotificationForRezervationFromUserInfoMapping.csx
RENAMED
|
@@ -27,7 +27,7 @@ public class StartNotificationForRezervationFromUserInfoMapping : ScriptBase, IM
|
|
|
27
27
|
var instanceKey = context.Instance?.Key ?? "unknown";
|
|
28
28
|
var notificationKey = "notification-user-" + NormalizeForKey(instanceKey);
|
|
29
29
|
|
|
30
|
-
startTask.SetDomain("touch");
|
|
30
|
+
startTask.SetDomain("morph-touch");
|
|
31
31
|
startTask.SetFlow("notification-sender");
|
|
32
32
|
startTask.SetKey(notificationKey);
|
|
33
33
|
|
|
@@ -31,7 +31,7 @@ public class StartNotificationForUserMapping : ScriptBase, IMapping
|
|
|
31
31
|
|
|
32
32
|
var notificationKey = "notification-user-" + NormalizeForKey(instanceKey);
|
|
33
33
|
|
|
34
|
-
startTask.SetDomain("touch");
|
|
34
|
+
startTask.SetDomain("morph-touch");
|
|
35
35
|
startTask.SetFlow("notification-sender");
|
|
36
36
|
startTask.SetKey(notificationKey);
|
|
37
37
|
|
|
@@ -31,9 +31,12 @@ public class StartPermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
31
31
|
if (string.IsNullOrWhiteSpace(advisorType))
|
|
32
32
|
advisorType = "IA";
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var keyOverride = GetString(data, "chatRoomInstanceKey");
|
|
35
|
+
var chatRoomKey = !string.IsNullOrWhiteSpace(keyOverride)
|
|
36
|
+
? keyOverride.Trim()
|
|
37
|
+
: NormalizeForKey(user) + "-" + NormalizeForKey(advisorType);
|
|
35
38
|
|
|
36
|
-
startTask.SetDomain("touch");
|
|
39
|
+
startTask.SetDomain("morph-touch");
|
|
37
40
|
startTask.SetFlow("chat-room");
|
|
38
41
|
startTask.SetKey(chatRoomKey);
|
|
39
42
|
startTask.SetSync(true);
|
|
@@ -7,6 +7,7 @@ using BBT.Workflow.Definitions;
|
|
|
7
7
|
/// Mapping for start-transfer-from-absence-entry StartTask (Type 11).
|
|
8
8
|
/// Conditionally starts a rezervation-transfer subflow when absenceType is personal-leave.
|
|
9
9
|
/// Determines transfer type: annual-leave (endDateTime present) or termination (endDateTime null).
|
|
10
|
+
/// advisorType must be set on instance data (e.g. portfolio-manager, investment-advisor); not derived from advisor id.
|
|
10
11
|
/// </summary>
|
|
11
12
|
public class StartTransferFromAbsenceEntryMapping : ScriptBase, IMapping
|
|
12
13
|
{
|
|
@@ -28,19 +29,21 @@ public class StartTransferFromAbsenceEntryMapping : ScriptBase, IMapping
|
|
|
28
29
|
if (string.IsNullOrEmpty(advisor))
|
|
29
30
|
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "no-advisor" } });
|
|
30
31
|
|
|
32
|
+
var advisorType = GetString(data, "advisorType");
|
|
33
|
+
if (string.IsNullOrEmpty(advisorType))
|
|
34
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "no-advisorType" } });
|
|
35
|
+
|
|
31
36
|
var startDateTime = GetString(data, "startDateTime");
|
|
32
37
|
if (string.IsNullOrEmpty(startDateTime))
|
|
33
38
|
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "no-startDateTime" } });
|
|
34
39
|
|
|
35
40
|
var endDateTime = GetString(data, "endDateTime");
|
|
36
|
-
|
|
37
|
-
var advisorType = ExtractAdvisorType(advisor);
|
|
38
41
|
var transferType = string.IsNullOrEmpty(endDateTime) ? "termination" : "annual-leave";
|
|
39
42
|
|
|
40
43
|
var safeStart = startDateTime.Replace(":", "-");
|
|
41
44
|
var transferKey = $"transfer-leave-{advisor}-{safeStart}";
|
|
42
45
|
|
|
43
|
-
startTask.SetDomain("touch");
|
|
46
|
+
startTask.SetDomain("morph-touch");
|
|
44
47
|
startTask.SetFlow("rezervation-transfer");
|
|
45
48
|
startTask.SetKey(transferKey);
|
|
46
49
|
|
|
@@ -66,17 +69,6 @@ public class StartTransferFromAbsenceEntryMapping : ScriptBase, IMapping
|
|
|
66
69
|
return Task.FromResult(new ScriptResponse());
|
|
67
70
|
}
|
|
68
71
|
|
|
69
|
-
private string ExtractAdvisorType(string advisor)
|
|
70
|
-
{
|
|
71
|
-
if (string.IsNullOrEmpty(advisor)) return null;
|
|
72
|
-
var parts = advisor.Split('.');
|
|
73
|
-
if (parts.Length >= 3)
|
|
74
|
-
return parts[1];
|
|
75
|
-
if (parts.Length == 2)
|
|
76
|
-
return parts[0];
|
|
77
|
-
return advisor;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
72
|
private string GetString(dynamic obj, string name)
|
|
81
73
|
{
|
|
82
74
|
if (obj == null) return null;
|
|
@@ -9,6 +9,6 @@ public class StateInMeetRule : ScriptBase, IConditionMapping
|
|
|
9
9
|
public Task<bool> Handler(ScriptContext context)
|
|
10
10
|
{
|
|
11
11
|
var state = context.Instance?.Data?.state?.ToString()?.Trim();
|
|
12
|
-
return Task.FromResult(state == "in-meet");
|
|
12
|
+
return Task.FromResult(state == "in-meet"||state == "active");
|
|
13
13
|
}
|
|
14
14
|
}
|