@burgan-tech/morph-touch-runtime 0.0.3 → 0.0.5
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.5.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 +7 -7
- 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
|
@@ -26,7 +26,7 @@ public class CancelAbsenceEntryForRezervationMapping : ScriptBase, IMapping
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
triggerTask.SetDomain("touch");
|
|
29
|
+
triggerTask.SetDomain("morph-touch");
|
|
30
30
|
triggerTask.SetFlow("absence-entry");
|
|
31
31
|
triggerTask.SetKey(absenceEntryKey);
|
|
32
32
|
triggerTask.SetTransitionName("cancel");
|
|
@@ -25,7 +25,7 @@ public class CancelAbsenceForRandevuUpdateMapping : ScriptBase, IMapping
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
triggerTask.SetDomain("touch");
|
|
28
|
+
triggerTask.SetDomain("morph-touch");
|
|
29
29
|
triggerTask.SetFlow("absence-entry");
|
|
30
30
|
triggerTask.SetKey(absenceEntryKey);
|
|
31
31
|
triggerTask.SetTransitionName("cancel");
|
|
@@ -75,13 +75,16 @@ public class ChatRoomRemoveMapping : ScriptBase, IMapping
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
var memberWithoutArray = BuildMemberWithoutArray(members);
|
|
79
|
+
|
|
78
80
|
result.Data = new
|
|
79
81
|
{
|
|
80
82
|
user,
|
|
81
83
|
advisorType,
|
|
82
84
|
advisorId,
|
|
83
85
|
chatIntegration = new { roomId },
|
|
84
|
-
members = members
|
|
86
|
+
members = members,
|
|
87
|
+
memberWithoutArray = memberWithoutArray
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
return Task.FromResult(result);
|
|
@@ -101,4 +104,22 @@ public class ChatRoomRemoveMapping : ScriptBase, IMapping
|
|
|
101
104
|
catch { }
|
|
102
105
|
return null;
|
|
103
106
|
}
|
|
107
|
+
|
|
108
|
+
private static Dictionary<string, string> BuildMemberWithoutArray(IEnumerable<object> members)
|
|
109
|
+
{
|
|
110
|
+
var map = new Dictionary<string, string>();
|
|
111
|
+
if (members == null) return map;
|
|
112
|
+
foreach (dynamic m in members)
|
|
113
|
+
{
|
|
114
|
+
try
|
|
115
|
+
{
|
|
116
|
+
if (m == null) continue;
|
|
117
|
+
var mid = m.memberId?.ToString() ?? m.advisorId?.ToString();
|
|
118
|
+
if (string.IsNullOrWhiteSpace(mid)) continue;
|
|
119
|
+
map[mid] = m.role?.ToString() ?? "";
|
|
120
|
+
}
|
|
121
|
+
catch { }
|
|
122
|
+
}
|
|
123
|
+
return map;
|
|
124
|
+
}
|
|
104
125
|
}
|
|
@@ -79,6 +79,8 @@ public class ChatRoomTransferInviteMapping : ScriptBase, IMapping
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
var memberWithoutArray = BuildMemberWithoutArray(members);
|
|
83
|
+
|
|
82
84
|
result.Data = new
|
|
83
85
|
{
|
|
84
86
|
user,
|
|
@@ -86,6 +88,7 @@ public class ChatRoomTransferInviteMapping : ScriptBase, IMapping
|
|
|
86
88
|
advisorId = !string.IsNullOrWhiteSpace(newAdvisorId) ? newAdvisorId.Trim() : oldAdvisorId,
|
|
87
89
|
chatIntegration = new { roomId },
|
|
88
90
|
members = members,
|
|
91
|
+
memberWithoutArray = memberWithoutArray,
|
|
89
92
|
pendingJoinUserId = newAdvisorId
|
|
90
93
|
};
|
|
91
94
|
|
|
@@ -106,4 +109,22 @@ public class ChatRoomTransferInviteMapping : ScriptBase, IMapping
|
|
|
106
109
|
catch { }
|
|
107
110
|
return null;
|
|
108
111
|
}
|
|
112
|
+
|
|
113
|
+
private static Dictionary<string, string> BuildMemberWithoutArray(IEnumerable<object> members)
|
|
114
|
+
{
|
|
115
|
+
var map = new Dictionary<string, string>();
|
|
116
|
+
if (members == null) return map;
|
|
117
|
+
foreach (dynamic m in members)
|
|
118
|
+
{
|
|
119
|
+
try
|
|
120
|
+
{
|
|
121
|
+
if (m == null) continue;
|
|
122
|
+
var mid = m.memberId?.ToString() ?? m.advisorId?.ToString();
|
|
123
|
+
if (string.IsNullOrWhiteSpace(mid)) continue;
|
|
124
|
+
map[mid] = m.role?.ToString() ?? "";
|
|
125
|
+
}
|
|
126
|
+
catch { }
|
|
127
|
+
}
|
|
128
|
+
return map;
|
|
129
|
+
}
|
|
109
130
|
}
|
|
@@ -77,6 +77,8 @@ public class ChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
77
77
|
if (!string.IsNullOrWhiteSpace(newMemberId))
|
|
78
78
|
members.Add(new { memberId = newMemberId, role = "member" });
|
|
79
79
|
|
|
80
|
+
var memberWithoutArray = BuildMemberWithoutArray(members);
|
|
81
|
+
|
|
80
82
|
result.Data = new
|
|
81
83
|
{
|
|
82
84
|
user,
|
|
@@ -84,6 +86,7 @@ public class ChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
84
86
|
advisorId,
|
|
85
87
|
chatIntegration = new { roomId },
|
|
86
88
|
members = members,
|
|
89
|
+
memberWithoutArray = memberWithoutArray,
|
|
87
90
|
pendingJoinUserId = newMemberId
|
|
88
91
|
};
|
|
89
92
|
|
|
@@ -104,4 +107,22 @@ public class ChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
104
107
|
catch { }
|
|
105
108
|
return null;
|
|
106
109
|
}
|
|
110
|
+
|
|
111
|
+
private static Dictionary<string, string> BuildMemberWithoutArray(IEnumerable<object> members)
|
|
112
|
+
{
|
|
113
|
+
var map = new Dictionary<string, string>();
|
|
114
|
+
if (members == null) return map;
|
|
115
|
+
foreach (dynamic m in members)
|
|
116
|
+
{
|
|
117
|
+
try
|
|
118
|
+
{
|
|
119
|
+
if (m == null) continue;
|
|
120
|
+
var mid = m.memberId?.ToString() ?? m.advisorId?.ToString();
|
|
121
|
+
if (string.IsNullOrWhiteSpace(mid)) continue;
|
|
122
|
+
map[mid] = m.role?.ToString() ?? "";
|
|
123
|
+
}
|
|
124
|
+
catch { }
|
|
125
|
+
}
|
|
126
|
+
return map;
|
|
127
|
+
}
|
|
107
128
|
}
|
|
@@ -39,7 +39,7 @@ public class CreateAbsenceEntryForRezervationMapping : ScriptBase, IMapping
|
|
|
39
39
|
var endNorm = NormalizeDateTimeForKey(endDateTime);
|
|
40
40
|
var absenceEntryKey = $"rezervation-{advisorId}-{startNorm}-{endNorm}";
|
|
41
41
|
|
|
42
|
-
startTask.SetDomain("touch");
|
|
42
|
+
startTask.SetDomain("morph-touch");
|
|
43
43
|
startTask.SetFlow("absence-entry");
|
|
44
44
|
startTask.SetKey(absenceEntryKey);
|
|
45
45
|
startTask.SetBody(new
|
|
@@ -31,7 +31,7 @@ public class CreateAbsenceForRandevuUpdateMapping : ScriptBase, IMapping
|
|
|
31
31
|
var endNorm = NormalizeDateTimeForKey(endDateTime);
|
|
32
32
|
var absenceEntryKey = $"rezervation-{advisorId}-{startNorm}-{endNorm}";
|
|
33
33
|
|
|
34
|
-
startTask.SetDomain("touch");
|
|
34
|
+
startTask.SetDomain("morph-touch");
|
|
35
35
|
startTask.SetFlow("absence-entry");
|
|
36
36
|
startTask.SetKey(absenceEntryKey);
|
|
37
37
|
startTask.SetBody(new
|
|
@@ -29,8 +29,9 @@ public class CreateChatRoomForRezervationMapping : ScriptBase, IMapping
|
|
|
29
29
|
var user = data?.user?.ToString();
|
|
30
30
|
var advisorId = data?.advisor?.ToString();
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
var
|
|
32
|
+
var normalizedRoomName = NormalizeRoomName(instanceKey);
|
|
33
|
+
var prefixedName = normalizedRoomName;
|
|
34
|
+
var aliasName = normalizedRoomName;
|
|
34
35
|
var topic = $"Room created by {user}";
|
|
35
36
|
|
|
36
37
|
var inviteList = new List<string>();
|
|
@@ -119,4 +120,13 @@ public class CreateChatRoomForRezervationMapping : ScriptBase, IMapping
|
|
|
119
120
|
catch { }
|
|
120
121
|
return null;
|
|
121
122
|
}
|
|
123
|
+
|
|
124
|
+
private string NormalizeRoomName(string raw)
|
|
125
|
+
{
|
|
126
|
+
if (string.IsNullOrWhiteSpace(raw)) return string.Empty;
|
|
127
|
+
return raw.Trim()
|
|
128
|
+
.Replace("-", string.Empty)
|
|
129
|
+
.Replace(".", string.Empty)
|
|
130
|
+
.Replace(":", string.Empty);
|
|
131
|
+
}
|
|
122
132
|
}
|
|
@@ -12,6 +12,11 @@ using BBT.Workflow.Definitions;
|
|
|
12
12
|
/// </summary>
|
|
13
13
|
public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
14
14
|
{
|
|
15
|
+
private readonly HashSet<string> AllowedHistoryVisibility = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
|
16
|
+
{
|
|
17
|
+
"shared", "invited", "joined", "world_readable"
|
|
18
|
+
};
|
|
19
|
+
|
|
15
20
|
public async Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
|
|
16
21
|
{
|
|
17
22
|
var httpTask = task as HttpTask;
|
|
@@ -26,12 +31,20 @@ public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
26
31
|
|
|
27
32
|
var instanceKey = context.Instance?.Key;
|
|
28
33
|
var data = context.Instance?.Data;
|
|
29
|
-
var user = data
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
var
|
|
34
|
+
var user = GetString(data, "user");
|
|
35
|
+
var roomType = GetString(data, "roomType");
|
|
36
|
+
var randevuKey = GetString(data, "randevuKey");
|
|
37
|
+
var advisorType = GetString(data, "advisorType") ?? "pm";
|
|
38
|
+
var advisorId = GetString(data, "advisorId");
|
|
39
|
+
var historyVisibility = NormalizeHistoryVisibility(GetString(data, "historyVisibility")) ?? "invited";
|
|
40
|
+
|
|
41
|
+
var roomName = string.Equals(roomType, "rezervation", StringComparison.OrdinalIgnoreCase) &&
|
|
42
|
+
!string.IsNullOrWhiteSpace(randevuKey)
|
|
43
|
+
? randevuKey.Trim()
|
|
44
|
+
: (instanceKey ?? string.Empty);
|
|
45
|
+
var normalizedRoomName = NormalizeRoomName(roomName);
|
|
46
|
+
var prefixedName = normalizedRoomName;
|
|
47
|
+
var aliasName = normalizedRoomName;
|
|
35
48
|
var topic = $"Room created by {user}";
|
|
36
49
|
|
|
37
50
|
var inviteList = new List<string>();
|
|
@@ -53,9 +66,10 @@ public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
53
66
|
topic = topic,
|
|
54
67
|
preset = "private_chat",
|
|
55
68
|
visibility = "private",
|
|
56
|
-
initial_state = new[]
|
|
69
|
+
initial_state = new object[]
|
|
57
70
|
{
|
|
58
|
-
new { type = "m.room.join_rules", state_key = "", content = new { join_rule = "invite" } }
|
|
71
|
+
new { type = "m.room.join_rules", state_key = "", content = new { join_rule = "invite" } },
|
|
72
|
+
new { type = "m.room.history_visibility", state_key = "", content = new { history_visibility = historyVisibility } }
|
|
59
73
|
},
|
|
60
74
|
invite = inviteList
|
|
61
75
|
};
|
|
@@ -100,7 +114,14 @@ public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
100
114
|
if (!string.IsNullOrWhiteSpace(advisorId))
|
|
101
115
|
members.Add(new { memberId = advisorId, role = "advisor" });
|
|
102
116
|
|
|
117
|
+
var memberWithoutArray = new Dictionary<string, string>();
|
|
118
|
+
if (!string.IsNullOrWhiteSpace(user))
|
|
119
|
+
memberWithoutArray[user] = "owner";
|
|
120
|
+
if (!string.IsNullOrWhiteSpace(advisorId))
|
|
121
|
+
memberWithoutArray[advisorId] = "advisor";
|
|
122
|
+
|
|
103
123
|
string roomType = GetString(instanceData, "roomType");
|
|
124
|
+
string randevuKey = GetString(instanceData, "randevuKey");
|
|
104
125
|
string startDateTime = GetString(instanceData, "startDateTime");
|
|
105
126
|
string endDateTime = GetString(instanceData, "endDateTime");
|
|
106
127
|
|
|
@@ -113,10 +134,13 @@ public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
113
134
|
errorCode = (string)null
|
|
114
135
|
},
|
|
115
136
|
roomType,
|
|
137
|
+
randevuKey,
|
|
116
138
|
startDateTime,
|
|
117
139
|
endDateTime,
|
|
118
140
|
members = members,
|
|
119
|
-
|
|
141
|
+
memberWithoutArray = memberWithoutArray,
|
|
142
|
+
pendingJoinUserId = advisorId,
|
|
143
|
+
bodyData=bodyData
|
|
120
144
|
};
|
|
121
145
|
}
|
|
122
146
|
|
|
@@ -137,4 +161,21 @@ public class CreatePermanentChatRoomMapping : ScriptBase, IMapping
|
|
|
137
161
|
catch { }
|
|
138
162
|
return null;
|
|
139
163
|
}
|
|
164
|
+
|
|
165
|
+
private string NormalizeHistoryVisibility(string raw)
|
|
166
|
+
{
|
|
167
|
+
if (string.IsNullOrWhiteSpace(raw)) return null;
|
|
168
|
+
var lower = raw.Trim().ToLowerInvariant();
|
|
169
|
+
if (!AllowedHistoryVisibility.Contains(lower)) return null;
|
|
170
|
+
return lower;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
private string NormalizeRoomName(string raw)
|
|
174
|
+
{
|
|
175
|
+
if (string.IsNullOrWhiteSpace(raw)) return string.Empty;
|
|
176
|
+
return raw.Trim()
|
|
177
|
+
.Replace("-", string.Empty)
|
|
178
|
+
.Replace(".", string.Empty)
|
|
179
|
+
.Replace(":", string.Empty);
|
|
180
|
+
}
|
|
140
181
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 trigger-chat-room-deactivate DirectTriggerTask (Type 12) in the termination transfer loop.
|
|
10
|
+
/// Reads permanentRoomPlan[permanentProcessedIndex] and triggers 'deactivate' on the chat-room instance.
|
|
11
|
+
/// Does NOT increment permanentProcessedIndex — the subsequent StartNewPermanentChatRoomFromTransferMapping handles that.
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class DeactivatePermanentChatRoomFromTransferMapping : ScriptBase, IMapping
|
|
14
|
+
{
|
|
15
|
+
public Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
|
|
16
|
+
{
|
|
17
|
+
var triggerTask = task as DirectTriggerTask;
|
|
18
|
+
if (triggerTask == null)
|
|
19
|
+
throw new InvalidOperationException("Task must be a DirectTriggerTask");
|
|
20
|
+
|
|
21
|
+
var data = context.Instance?.Data;
|
|
22
|
+
if (data == null)
|
|
23
|
+
throw new InvalidOperationException("Instance data is required");
|
|
24
|
+
|
|
25
|
+
var permanentRoomPlan = data.permanentRoomPlan;
|
|
26
|
+
if (permanentRoomPlan == null)
|
|
27
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true, reason = "no-permanentRoomPlan" } });
|
|
28
|
+
|
|
29
|
+
int processedIndex = 0;
|
|
30
|
+
if (HasProperty(data, "permanentProcessedIndex"))
|
|
31
|
+
int.TryParse(data.permanentProcessedIndex?.ToString() ?? "0", out processedIndex);
|
|
32
|
+
|
|
33
|
+
var items = permanentRoomPlan as IEnumerable<object>;
|
|
34
|
+
if (items == null)
|
|
35
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
36
|
+
|
|
37
|
+
var itemsList = items.ToList();
|
|
38
|
+
if (processedIndex >= itemsList.Count)
|
|
39
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
40
|
+
|
|
41
|
+
dynamic currentItem = itemsList[processedIndex];
|
|
42
|
+
var chatRoomKey = currentItem?.chatRoomKey?.ToString();
|
|
43
|
+
|
|
44
|
+
if (string.IsNullOrEmpty(chatRoomKey))
|
|
45
|
+
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
46
|
+
|
|
47
|
+
triggerTask.SetDomain("morph-touch");
|
|
48
|
+
triggerTask.SetFlow("chat-room");
|
|
49
|
+
triggerTask.SetKey(chatRoomKey);
|
|
50
|
+
triggerTask.SetTransitionName("deactivate");
|
|
51
|
+
triggerTask.SetBody(new Dictionary<string, object>());
|
|
52
|
+
|
|
53
|
+
return Task.FromResult(new ScriptResponse());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public Task<ScriptResponse> OutputHandler(ScriptContext context)
|
|
57
|
+
{
|
|
58
|
+
var data = context.Instance?.Data;
|
|
59
|
+
bool success = context.Body?.isSuccess == true;
|
|
60
|
+
|
|
61
|
+
var result = new Dictionary<string, object>();
|
|
62
|
+
CopyIfPresent(result, data, "transferPlan");
|
|
63
|
+
CopyIfPresent(result, data, "validationResult");
|
|
64
|
+
CopyIfPresent(result, data, "sourceAdvisorId");
|
|
65
|
+
CopyIfPresent(result, data, "advisorType");
|
|
66
|
+
CopyIfPresent(result, data, "startDate");
|
|
67
|
+
CopyIfPresent(result, data, "endDate");
|
|
68
|
+
CopyIfPresent(result, data, "transferType");
|
|
69
|
+
CopyIfPresent(result, data, "enrichedRezervations");
|
|
70
|
+
CopyIfPresent(result, data, "rezChatRoomPlan");
|
|
71
|
+
CopyIfPresent(result, data, "permanentRoomPlan");
|
|
72
|
+
CopyIfPresent(result, data, "permanentChatRooms");
|
|
73
|
+
CopyIfPresent(result, data, "permanentProcessedIndex");
|
|
74
|
+
|
|
75
|
+
result["lastPermanentDeactivateSuccess"] = success;
|
|
76
|
+
|
|
77
|
+
string roomId = LookupRoomId(data);
|
|
78
|
+
if (!string.IsNullOrWhiteSpace(roomId))
|
|
79
|
+
result["lastDeactivatedRoomId"] = roomId;
|
|
80
|
+
|
|
81
|
+
return Task.FromResult(new ScriptResponse { Data = result });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private string LookupRoomId(dynamic data)
|
|
85
|
+
{
|
|
86
|
+
if (data == null) return null;
|
|
87
|
+
try
|
|
88
|
+
{
|
|
89
|
+
var permanentRoomPlan = data.permanentRoomPlan;
|
|
90
|
+
if (permanentRoomPlan == null) return null;
|
|
91
|
+
|
|
92
|
+
int processedIndex = 0;
|
|
93
|
+
if (HasProperty(data, "permanentProcessedIndex"))
|
|
94
|
+
int.TryParse(data.permanentProcessedIndex?.ToString() ?? "0", out processedIndex);
|
|
95
|
+
|
|
96
|
+
var items = permanentRoomPlan as IEnumerable<object>;
|
|
97
|
+
if (items == null) return null;
|
|
98
|
+
|
|
99
|
+
var itemsList = items.ToList();
|
|
100
|
+
if (processedIndex >= itemsList.Count) return null;
|
|
101
|
+
|
|
102
|
+
dynamic currentItem = itemsList[processedIndex];
|
|
103
|
+
var chatRoomKey = currentItem?.chatRoomKey?.ToString();
|
|
104
|
+
if (string.IsNullOrEmpty(chatRoomKey)) return null;
|
|
105
|
+
|
|
106
|
+
if (!HasProperty(data, "permanentChatRooms") || data.permanentChatRooms == null)
|
|
107
|
+
return null;
|
|
108
|
+
|
|
109
|
+
foreach (var room in data.permanentChatRooms)
|
|
110
|
+
{
|
|
111
|
+
var key = room?.chatRoomKey?.ToString();
|
|
112
|
+
if (string.Equals(key, chatRoomKey, StringComparison.OrdinalIgnoreCase))
|
|
113
|
+
return room?.roomId?.ToString();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch { }
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private void CopyIfPresent(Dictionary<string, object> target, dynamic source, string name)
|
|
121
|
+
{
|
|
122
|
+
if (source == null) return;
|
|
123
|
+
try
|
|
124
|
+
{
|
|
125
|
+
if (HasProperty(source, name))
|
|
126
|
+
{
|
|
127
|
+
var v = GetPropertyValue(source, name);
|
|
128
|
+
if (v != null) target[name] = v;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch { }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -43,8 +43,8 @@ public class EnrichRezervationsForTransferMapping : ScriptBase, IMapping
|
|
|
43
43
|
"{\"currentState\":{\"eq\":\"in-meet\"}}" +
|
|
44
44
|
"]}",
|
|
45
45
|
"{\"status\":{\"eq\":\"A\"}}",
|
|
46
|
-
"{\"attributes\":{\"startDateTime\":{\"
|
|
47
|
-
"{\"attributes\":{\"endDateTime\":{\"
|
|
46
|
+
"{\"attributes\":{\"startDateTime\":{\"dgt\":\"" + startDate + "\"}}}",
|
|
47
|
+
"{\"attributes\":{\"endDateTime\":{\"dlt\":\"" + endDate + "\"}}}"
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var filterJson = "{\"and\":[" + string.Join(",", conditions) + "]}";
|
|
@@ -226,7 +226,20 @@ public class EnrichRezervationsForTransferMapping : ScriptBase, IMapping
|
|
|
226
226
|
result["enrichedRezervations"] = enriched;
|
|
227
227
|
result["rezervations"] = new List<object>();
|
|
228
228
|
result["absenceEntries"] = new List<object>();
|
|
229
|
-
|
|
229
|
+
// Preserve keys from fetch-advisors-for-transfer (previously cleared, so GET instances always showed []).
|
|
230
|
+
var preservedAdvisorKeys = new List<string>();
|
|
231
|
+
var incomingKeys = data?.allAdvisorKeys;
|
|
232
|
+
if (incomingKeys != null)
|
|
233
|
+
{
|
|
234
|
+
foreach (var ak in incomingKeys)
|
|
235
|
+
{
|
|
236
|
+
if (ak == null) continue;
|
|
237
|
+
var s = ak.ToString();
|
|
238
|
+
if (!string.IsNullOrEmpty(s))
|
|
239
|
+
preservedAdvisorKeys.Add(s);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
result["allAdvisorKeys"] = preservedAdvisorKeys;
|
|
230
243
|
|
|
231
244
|
return Task.FromResult(new ScriptResponse
|
|
232
245
|
{
|
|
@@ -8,8 +8,7 @@ using BBT.Workflow.Definitions;
|
|
|
8
8
|
/// <summary>
|
|
9
9
|
/// Mapping for execute-permanent-chatroom-update DirectTriggerTask (Type 12).
|
|
10
10
|
/// Processes one permanent chat room at a time from permanentRoomPlan.
|
|
11
|
-
///
|
|
12
|
-
/// Annual Leave (transferType == "annual-leave") → triggers 'update' transition (add new advisor, keep old).
|
|
11
|
+
/// Triggers chat-room 'update' (new advisor + historyVisibility) for both annual-leave and termination.
|
|
13
12
|
/// </summary>
|
|
14
13
|
public class ExecutePermanentChatRoomUpdateMapping : ScriptBase, IMapping
|
|
15
14
|
{
|
|
@@ -42,26 +41,16 @@ public class ExecutePermanentChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
42
41
|
dynamic currentItem = itemsList[processedIndex];
|
|
43
42
|
var chatRoomKey = currentItem?.chatRoomKey?.ToString();
|
|
44
43
|
var targetAdvisor = currentItem?.targetAdvisor?.ToString();
|
|
44
|
+
var historyVisibility = NormalizeHistoryVisibility(GetString(currentItem, "historyVisibility"));
|
|
45
45
|
|
|
46
46
|
if (string.IsNullOrEmpty(chatRoomKey) || string.IsNullOrEmpty(targetAdvisor))
|
|
47
47
|
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
triggerTask.SetDomain("touch");
|
|
49
|
+
triggerTask.SetDomain("morph-touch");
|
|
52
50
|
triggerTask.SetFlow("chat-room");
|
|
53
51
|
triggerTask.SetKey(chatRoomKey);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
triggerTask.SetTransitionName("transfer");
|
|
58
|
-
triggerTask.SetBody(new { newAdvisorId = targetAdvisor });
|
|
59
|
-
}
|
|
60
|
-
else
|
|
61
|
-
{
|
|
62
|
-
triggerTask.SetTransitionName("update");
|
|
63
|
-
triggerTask.SetBody(new { newMemberId = targetAdvisor });
|
|
64
|
-
}
|
|
52
|
+
triggerTask.SetTransitionName("update");
|
|
53
|
+
triggerTask.SetBody(new { newMemberId = targetAdvisor, historyVisibility });
|
|
65
54
|
|
|
66
55
|
return Task.FromResult(new ScriptResponse());
|
|
67
56
|
}
|
|
@@ -69,7 +58,8 @@ public class ExecutePermanentChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
69
58
|
public Task<ScriptResponse> OutputHandler(ScriptContext context)
|
|
70
59
|
{
|
|
71
60
|
var data = context.Instance?.Data;
|
|
72
|
-
|
|
61
|
+
|
|
62
|
+
bool success = context.Body?.isSuccess == true;
|
|
73
63
|
|
|
74
64
|
int processedIndex = 0;
|
|
75
65
|
if (data != null && HasProperty(data, "permanentProcessedIndex"))
|
|
@@ -87,12 +77,27 @@ public class ExecutePermanentChatRoomUpdateMapping : ScriptBase, IMapping
|
|
|
87
77
|
CopyIfPresent(result, data, "rezChatRoomPlan");
|
|
88
78
|
CopyIfPresent(result, data, "permanentRoomPlan");
|
|
89
79
|
CopyIfPresent(result, data, "permanentChatRooms");
|
|
90
|
-
|
|
80
|
+
|
|
81
|
+
if (success)
|
|
82
|
+
result["permanentProcessedIndex"] = processedIndex + 1;
|
|
83
|
+
else
|
|
84
|
+
CopyIfPresent(result, data, "permanentProcessedIndex");
|
|
85
|
+
|
|
91
86
|
result["lastPermanentChatRoomSuccess"] = success;
|
|
92
87
|
|
|
93
88
|
return Task.FromResult(new ScriptResponse { Data = result });
|
|
94
89
|
}
|
|
95
90
|
|
|
91
|
+
private static string NormalizeHistoryVisibility(string raw)
|
|
92
|
+
{
|
|
93
|
+
if (string.IsNullOrWhiteSpace(raw))
|
|
94
|
+
return "shared";
|
|
95
|
+
var lower = raw.Trim().ToLowerInvariant();
|
|
96
|
+
if (lower == "shared" || lower == "invited" || lower == "joined" || lower == "world_readable")
|
|
97
|
+
return lower;
|
|
98
|
+
return "shared";
|
|
99
|
+
}
|
|
100
|
+
|
|
96
101
|
private string GetString(dynamic obj, string name)
|
|
97
102
|
{
|
|
98
103
|
if (obj == null) return null;
|
|
@@ -44,7 +44,7 @@ public class ExecuteRezChatRoomTransferMapping : ScriptBase, IMapping
|
|
|
44
44
|
if (string.IsNullOrEmpty(chatRoomKey) || string.IsNullOrEmpty(targetAdvisor))
|
|
45
45
|
return Task.FromResult(new ScriptResponse { Data = new { skipped = true } });
|
|
46
46
|
|
|
47
|
-
triggerTask.SetDomain("touch");
|
|
47
|
+
triggerTask.SetDomain("morph-touch");
|
|
48
48
|
triggerTask.SetFlow("chat-room");
|
|
49
49
|
triggerTask.SetKey(chatRoomKey);
|
|
50
50
|
triggerTask.SetTransitionName("transfer");
|
|
@@ -8,7 +8,8 @@ using BBT.Workflow.Definitions;
|
|
|
8
8
|
/// <summary>
|
|
9
9
|
/// Mapping for execute-rezervation-transfer task (StartTask - Type 11).
|
|
10
10
|
/// Processes ONE transfer item at a time using processedIndex counter.
|
|
11
|
-
/// Each invocation starts
|
|
11
|
+
/// Each invocation starts an add-participant-to-rezervation subflow for a single rezervation.
|
|
12
|
+
/// transferPlan.targetAdvisor is reused as the invited participant Matrix user id (newUserId).
|
|
12
13
|
/// The self-loop pattern in validating state calls this repeatedly until all items are processed.
|
|
13
14
|
///
|
|
14
15
|
/// IMPORTANT: processedIndex increment happens in OutputHandler.
|
|
@@ -46,22 +47,22 @@ public class ExecuteTransferMapping : ScriptBase, IMapping
|
|
|
46
47
|
|
|
47
48
|
dynamic currentItem = itemsList[processedIndex];
|
|
48
49
|
var rezervationKey = currentItem.rezervationKey?.ToString();
|
|
49
|
-
|
|
50
|
+
// Schema field name kept for UI/validation; value is the new participant Matrix user id.
|
|
51
|
+
var newUserId = currentItem.targetAdvisor?.ToString();
|
|
50
52
|
|
|
51
|
-
if (string.IsNullOrEmpty(rezervationKey) || string.IsNullOrEmpty(
|
|
53
|
+
if (string.IsNullOrEmpty(rezervationKey) || string.IsNullOrEmpty(newUserId))
|
|
52
54
|
return Task.FromResult(new ScriptResponse { Data = new { transferSkipped = true } });
|
|
53
55
|
|
|
54
56
|
var parentKey = context.Instance?.Key ?? DateTime.UtcNow.Ticks.ToString();
|
|
55
57
|
var instanceKey = CreateShortKey(parentKey, rezervationKey);
|
|
56
58
|
|
|
57
|
-
startTask.SetDomain("touch");
|
|
58
|
-
startTask.SetFlow("rezervation
|
|
59
|
+
startTask.SetDomain("morph-touch");
|
|
60
|
+
startTask.SetFlow("add-participant-to-rezervation");
|
|
59
61
|
startTask.SetKey(instanceKey);
|
|
60
62
|
startTask.SetBody(new
|
|
61
63
|
{
|
|
62
64
|
randevuKey = rezervationKey,
|
|
63
|
-
|
|
64
|
-
autoProcess = true
|
|
65
|
+
newUserId = newUserId
|
|
65
66
|
});
|
|
66
67
|
|
|
67
68
|
return Task.FromResult(new ScriptResponse
|
|
@@ -70,7 +71,8 @@ public class ExecuteTransferMapping : ScriptBase, IMapping
|
|
|
70
71
|
{
|
|
71
72
|
processedIndex = processedIndex + 1,
|
|
72
73
|
currentTransferKey = rezervationKey,
|
|
73
|
-
|
|
74
|
+
currentNewUserId = newUserId,
|
|
75
|
+
currentTargetAdvisor = newUserId
|
|
74
76
|
}
|
|
75
77
|
});
|
|
76
78
|
}
|
|
@@ -88,7 +90,7 @@ public class ExecuteTransferMapping : ScriptBase, IMapping
|
|
|
88
90
|
|
|
89
91
|
var transferPlan = data?.transferPlan;
|
|
90
92
|
string currentTransferKey = null;
|
|
91
|
-
string
|
|
93
|
+
string currentNewUserId = null;
|
|
92
94
|
|
|
93
95
|
if (transferPlan != null)
|
|
94
96
|
{
|
|
@@ -100,7 +102,7 @@ public class ExecuteTransferMapping : ScriptBase, IMapping
|
|
|
100
102
|
{
|
|
101
103
|
dynamic currentItem = itemsList[processedIndex];
|
|
102
104
|
currentTransferKey = currentItem?.rezervationKey?.ToString();
|
|
103
|
-
|
|
105
|
+
currentNewUserId = currentItem?.targetAdvisor?.ToString();
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
}
|
|
@@ -116,9 +118,10 @@ public class ExecuteTransferMapping : ScriptBase, IMapping
|
|
|
116
118
|
CopyIfPresent(result, data, "enrichedRezervations");
|
|
117
119
|
result["processedIndex"] = processedIndex + 1;
|
|
118
120
|
result["currentTransferKey"] = currentTransferKey;
|
|
119
|
-
result["
|
|
121
|
+
result["currentNewUserId"] = currentNewUserId;
|
|
122
|
+
result["currentTargetAdvisor"] = currentNewUserId;
|
|
120
123
|
result["lastTransferSuccess"] = success;
|
|
121
|
-
result["lastTransferError"] = !success ? (context.Body?.errorMessage?.ToString() ?? "
|
|
124
|
+
result["lastTransferError"] = !success ? (context.Body?.errorMessage?.ToString() ?? "Add participant execution failed") : null;
|
|
122
125
|
|
|
123
126
|
return Task.FromResult(new ScriptResponse
|
|
124
127
|
{
|