@burgan-tech/morph-touch-runtime 0.0.2 → 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.
Files changed (261) hide show
  1. package/burgan-tech-morph-touch-runtime-0.0.4.tgz +0 -0
  2. package/{touch → morph-touch}/Functions/check-livekit-room-access.1.0.0.json +2 -2
  3. package/{touch → morph-touch}/Functions/check-livekit-room-access.http +1 -1
  4. package/{touch → morph-touch}/Functions/get-absence-entry.1.0.0.json +2 -2
  5. package/{touch → morph-touch}/Functions/get-advisor-stats.1.0.0.json +2 -2
  6. package/morph-touch/Functions/get-available-slots.1.0.0.json +30 -0
  7. package/{touch → morph-touch}/Functions/get-available-slots.http +4 -2
  8. package/morph-touch/Functions/get-chat-rooms.1.0.0.json +28 -0
  9. package/{touch → morph-touch}/Functions/get-chat-rooms.http +2 -2
  10. package/{touch → morph-touch}/Functions/get-customer-info.1.0.0.json +2 -2
  11. package/{touch → morph-touch}/Functions/get-matrix-sync.1.0.0.json +2 -2
  12. package/morph-touch/Functions/get-rezervations.1.0.0.json +26 -0
  13. package/{touch → morph-touch}/Functions/get-rezervations.http +2 -2
  14. package/{touch → morph-touch}/Functions/get-room-messages.1.0.0.json +2 -2
  15. package/{touch → morph-touch}/Functions/get-room-messages.http +1 -1
  16. package/{touch → morph-touch}/Functions/rezervation-transfer.http +1 -1
  17. package/{touch → morph-touch}/Functions/send-room-message.1.0.0.json +2 -2
  18. package/{touch → morph-touch}/Functions/src/GetAvailableSlotsMapping.csx +125 -1
  19. package/{touch → morph-touch}/Functions/src/GetChatRoomsMapping.csx +6 -7
  20. package/{touch → morph-touch}/Functions/src/GetRezervationsMapping.csx +12 -5
  21. package/{touch → morph-touch}/Schemas/absence-entry.1.0.0.json +3 -3
  22. package/{touch → morph-touch}/Schemas/advisor-chat-rooms.1.0.0.json +2 -2
  23. package/{touch → morph-touch}/Schemas/chat-room.1.0.0.json +2 -2
  24. package/morph-touch/Schemas/chat-room.1.1.0.json +132 -0
  25. package/morph-touch/Schemas/chat-room.1.2.0.json +174 -0
  26. package/{touch → morph-touch}/Schemas/notification-sender.1.0.0.json +2 -2
  27. package/{touch → morph-touch}/Schemas/portfolio-manager.1.0.0.json +2 -2
  28. package/{touch → morph-touch}/Schemas/rezervation.1.0.0.json +2 -2
  29. package/{touch → morph-touch}/Tasks/cancel-absence-entry-for-rezervation.1.0.0.json +2 -2
  30. package/{touch → morph-touch}/Tasks/check-already-completed-chat-room.1.0.0.json +3 -3
  31. package/{touch → morph-touch}/Tasks/check-duplicate-portfolio-manager.1.0.0.json +3 -3
  32. package/{touch → morph-touch}/Tasks/check-duplicate-rezervation.1.0.0.json +3 -3
  33. package/{touch → morph-touch}/Tasks/check-existing-permanent-chat-room.1.0.0.json +3 -3
  34. package/{touch → morph-touch}/Tasks/check-randevu-time.1.0.0.json +1 -1
  35. package/{touch → morph-touch}/Tasks/create-permanent-chat-room.1.0.0.json +1 -1
  36. package/{touch → morph-touch}/Tasks/determine-transfer-type.1.0.0.json +1 -1
  37. package/{touch → morph-touch}/Tasks/enrich-rezervations-for-transfer.1.0.0.json +3 -3
  38. package/{touch → morph-touch}/Tasks/execute-permanent-chatroom-update.1.0.0.json +3 -3
  39. package/{touch → morph-touch}/Tasks/execute-rez-chatroom-transfer.1.0.0.json +2 -2
  40. package/{touch → morph-touch}/Tasks/execute-rezervation-transfer.1.0.0.json +2 -2
  41. package/{touch → morph-touch}/Tasks/fetch-absence-entries-for-transfer.1.0.0.json +3 -3
  42. package/{touch → morph-touch}/Tasks/fetch-advisors-for-transfer.1.0.0.json +3 -3
  43. package/{touch → morph-touch}/Tasks/fetch-permanent-chatrooms-for-transfer.1.0.0.json +3 -3
  44. package/{touch → morph-touch}/Tasks/fetch-rez-chatrooms-for-transfer.1.0.0.json +3 -3
  45. package/{touch → morph-touch}/Tasks/fetch-rezervations-for-transfer.1.0.0.json +3 -3
  46. package/{touch → morph-touch}/Tasks/get-absence-entry-task.1.0.0.json +3 -3
  47. package/{touch → morph-touch}/Tasks/get-available-slots-http.1.0.0.json +2 -2
  48. package/{touch → morph-touch}/Tasks/get-available-slots.1.0.0.json +3 -3
  49. package/{touch → morph-touch}/Tasks/get-chat-room-data-for-rezervation.1.0.0.json +3 -3
  50. package/{touch → morph-touch}/Tasks/get-chat-token.1.0.0.json +1 -1
  51. package/{touch → morph-touch}/Tasks/get-matrix-room-messages.1.0.0.json +1 -1
  52. package/{touch → morph-touch}/Tasks/get-matrix-sync.1.0.0.json +1 -1
  53. package/{touch → morph-touch}/Tasks/get-rezervation-data-task.1.0.0.json +3 -3
  54. package/{touch → morph-touch}/Tasks/get-rezervation-state-task.1.0.0.json +3 -3
  55. package/{touch → morph-touch}/Tasks/get-rezervations-task.1.0.0.json +3 -3
  56. package/{touch → morph-touch}/Tasks/get-user-info-for-rezervation.1.0.0.json +1 -1
  57. package/{touch → morph-touch}/Tasks/get-video-call-url.1.0.0.json +1 -1
  58. package/{touch → morph-touch}/Tasks/invite-user-to-rezervation-room.1.0.0.json +1 -1
  59. package/{touch → morph-touch}/Tasks/join-chat-room-for-rezervation.1.0.0.json +1 -1
  60. package/{touch → morph-touch}/Tasks/join-matrix-room.1.0.0.json +1 -1
  61. package/{touch → morph-touch}/Tasks/join-user-to-room.1.0.0.json +1 -1
  62. package/{touch → morph-touch}/Tasks/merge-invited-user.1.0.0.json +1 -1
  63. package/{touch → morph-touch}/Tasks/merge-rezervation-update.1.0.0.json +1 -1
  64. package/{touch → morph-touch}/Tasks/merge-target-advisor-for-transfer.1.0.0.json +1 -1
  65. package/{touch → morph-touch}/Tasks/merge-update-body-for-randevu-update.1.0.0.json +1 -1
  66. package/{touch → morph-touch}/Tasks/merge-video-call-urls.1.0.0.json +1 -1
  67. package/{touch → morph-touch}/Tasks/query-chat-room-instances.1.0.0.json +3 -3
  68. package/{touch → morph-touch}/Tasks/remove-member-from-room.1.0.0.json +1 -1
  69. package/{touch → morph-touch}/Tasks/send-matrix-room-message.1.0.0.json +1 -1
  70. package/{touch → morph-touch}/Tasks/send-push-notification.1.0.0.json +1 -1
  71. package/{touch → morph-touch}/Tasks/send-sms-notification.1.0.0.json +1 -1
  72. package/{touch → morph-touch}/Tasks/set-chat-room-status-active.1.0.0.json +1 -1
  73. package/{touch → morph-touch}/Tasks/set-chat-room-status-deactive.1.0.0.json +1 -1
  74. package/morph-touch/Tasks/set-matrix-room-history-visibility.1.0.0.json +26 -0
  75. package/{touch → morph-touch}/Tasks/set-previous-advisor.1.0.0.json +1 -1
  76. package/{touch → morph-touch}/Tasks/set-user-from-headers-for-rezervation.1.0.0.json +1 -1
  77. package/{touch → morph-touch}/Tasks/start-absence-entry-for-rezervation.1.0.0.json +2 -2
  78. package/{touch → morph-touch}/Tasks/start-chat-room-for-rezervation.1.0.0.json +2 -2
  79. package/{touch → morph-touch}/Tasks/start-notification-sender.1.0.0.json +2 -2
  80. package/{touch → morph-touch}/Tasks/start-permanent-chat-room.1.0.0.json +2 -2
  81. package/{touch → morph-touch}/Tasks/start-transfer-from-absence-entry.1.0.0.json +2 -2
  82. package/{touch → morph-touch}/Tasks/start-video-call.1.0.0.json +2 -2
  83. package/morph-touch/Tasks/summarize-chat-openai.1.0.0.json +27 -0
  84. package/morph-touch/Tasks/test-get-rezervation-count-by-advisor.1.0.0.json +22 -0
  85. package/morph-touch/Tasks/test-get-rezervation-instances-after-date.1.0.0.json +24 -0
  86. package/{touch → morph-touch}/Tasks/trigger-chat-room-deactivate.1.0.0.json +2 -2
  87. package/{touch → morph-touch}/Tasks/trigger-chat-room-transfer.1.0.0.json +2 -2
  88. package/{touch → morph-touch}/Tasks/trigger-chat-room-update.1.0.0.json +2 -2
  89. package/{touch → morph-touch}/Tasks/trigger-rezervation-add-invited-participant.1.0.0.json +2 -2
  90. package/{touch → morph-touch}/Tasks/trigger-rezervation-apply-update.1.0.0.json +2 -2
  91. package/{touch → morph-touch}/Tasks/trigger-rezervation-to-in-meet.1.0.0.json +2 -2
  92. package/{touch → morph-touch}/Tasks/trigger-rezervation-video-call-update.1.0.0.json +2 -2
  93. package/{touch → morph-touch}/Tasks/validate-date-for-rezervation.1.0.0.json +1 -1
  94. package/{touch → morph-touch}/Tasks/validate-slot-for-rezervation.1.0.0.json +3 -3
  95. package/{touch → morph-touch}/Tasks/validate-transfer-availability.1.0.0.json +3 -3
  96. package/{touch → morph-touch}/Workflows/absence-entry.http +21 -21
  97. package/{touch → morph-touch}/Workflows/absence-entry.json +3 -3
  98. package/{touch → morph-touch}/Workflows/add-participant-to-rezervation.http +3 -3
  99. package/{touch → morph-touch}/Workflows/add-participant-to-rezervation.json +23 -24
  100. package/{touch → morph-touch}/Workflows/chat-room.http +10 -8
  101. package/{touch → morph-touch}/Workflows/chat-room.json +37 -24
  102. package/{touch → morph-touch}/Workflows/investment-advisor.json +2 -2
  103. package/{touch → morph-touch}/Workflows/notification-sender.http +13 -13
  104. package/{touch → morph-touch}/Workflows/notification-sender.json +5 -5
  105. package/{touch → morph-touch}/Workflows/portfolio-manager.json +2 -2
  106. package/{touch → morph-touch}/Workflows/randevu-update.http +6 -6
  107. package/{touch → morph-touch}/Workflows/rezervation-start.json +16 -16
  108. package/{touch → morph-touch}/Workflows/rezervation-transfer.json +125 -22
  109. package/{touch → morph-touch}/Workflows/rezervation-update.http +6 -6
  110. package/{touch → morph-touch}/Workflows/rezervation-update.json +19 -19
  111. package/{touch → morph-touch}/Workflows/rezervation.http +6 -6
  112. package/{touch → morph-touch}/Workflows/rezervation.json +121 -180
  113. package/{touch → morph-touch}/Workflows/src/CancelAbsenceEntryForRezervationMapping.csx +1 -1
  114. package/{touch → morph-touch}/Workflows/src/CancelAbsenceForRandevuUpdateMapping.csx +1 -1
  115. package/{touch → morph-touch}/Workflows/src/ChatRoomRemoveMapping.csx +22 -1
  116. package/{touch → morph-touch}/Workflows/src/ChatRoomTransferInviteMapping.csx +21 -0
  117. package/{touch → morph-touch}/Workflows/src/ChatRoomUpdateMapping.csx +21 -0
  118. package/{touch → morph-touch}/Workflows/src/CreateAbsenceEntryForRezervationMapping.csx +1 -1
  119. package/{touch → morph-touch}/Workflows/src/CreateAbsenceForRandevuUpdateMapping.csx +1 -1
  120. package/{touch → morph-touch}/Workflows/src/CreateChatRoomForRezervationMapping.csx +12 -2
  121. package/{touch → morph-touch}/Workflows/src/CreatePermanentChatRoomMapping.csx +50 -9
  122. package/morph-touch/Workflows/src/DeactivatePermanentChatRoomFromTransferMapping.csx +133 -0
  123. package/{touch → morph-touch}/Workflows/src/EnrichRezervationsForTransferMapping.csx +16 -3
  124. package/{touch → morph-touch}/Workflows/src/ExecutePermanentChatRoomUpdateMapping.csx +23 -18
  125. package/{touch → morph-touch}/Workflows/src/ExecuteRezChatRoomTransferMapping.csx +1 -1
  126. package/{touch → morph-touch}/Workflows/src/ExecuteTransferMapping.csx +15 -12
  127. package/{touch → morph-touch}/Workflows/src/FetchAdvisorsForTransferMapping.csx +55 -7
  128. package/{touch → morph-touch}/Workflows/src/FetchPermanentChatRoomsMapping.csx +65 -2
  129. package/morph-touch/Workflows/src/FetchRoomMessagesForSummaryMapping.csx +182 -0
  130. package/{touch → morph-touch}/Workflows/src/GetChatRoomDataForRezervationMapping.csx +2 -2
  131. package/{touch → morph-touch}/Workflows/src/GetRezervationDataForAddParticipantMapping.csx +1 -1
  132. package/{touch → morph-touch}/Workflows/src/GetRezervationDataForRandevuUpdateMapping.csx +1 -1
  133. package/{touch → morph-touch}/Workflows/src/GetRezervationDataMapping.csx +2 -2
  134. package/{touch → morph-touch}/Workflows/src/GetRezervationStateForRandevuUpdateMapping.csx +1 -1
  135. package/{touch → morph-touch}/Workflows/src/GetRezervationStateMapping.csx +2 -2
  136. package/{touch → morph-touch}/Workflows/src/InvitedUserNotAllowedRule.csx +1 -1
  137. package/{touch → morph-touch}/Workflows/src/JoinUserToRoomMapping.csx +22 -1
  138. package/morph-touch/Workflows/src/NoOpGetInstancesTestMapping.csx +19 -0
  139. package/morph-touch/Workflows/src/PermanentProcessNextTerminationRule.csx +51 -0
  140. package/{touch → morph-touch}/Workflows/src/SendPushNotificationMapping.csx +2 -2
  141. package/{touch → morph-touch}/Workflows/src/SendSmsNotificationMapping.csx +1 -1
  142. package/morph-touch/Workflows/src/SendSummaryToNewRoomMapping.csx +178 -0
  143. package/morph-touch/Workflows/src/SetRoomHistoryVisibilityMapping.csx +109 -0
  144. package/{touch → morph-touch}/Workflows/src/StartChatRoomForRezervationMapping.csx +4 -3
  145. package/{touch → morph-touch}/Workflows/src/StartGetChatTokenForRezervationMapping.csx +1 -1
  146. package/morph-touch/Workflows/src/StartNewPermanentChatRoomFromTransferMapping.csx +197 -0
  147. package/{touch → morph-touch}/Workflows/src/StartNotificationForAdvisorMapping.csx +1 -1
  148. package/{touch → morph-touch}/Workflows/src/StartNotificationForRezervationFromUserInfoMapping.csx +1 -1
  149. package/{touch → morph-touch}/Workflows/src/StartNotificationForUserMapping.csx +1 -1
  150. package/{touch → morph-touch}/Workflows/src/StartPermanentChatRoomMapping.csx +5 -2
  151. package/{touch → morph-touch}/Workflows/src/StartTransferFromAbsenceEntryMapping.csx +6 -14
  152. package/{touch → morph-touch}/Workflows/src/StateInMeetRule.csx +1 -1
  153. package/morph-touch/Workflows/src/SummarizeChatWithOpenAIMapping.csx +172 -0
  154. package/{touch → morph-touch}/Workflows/src/TriggerChatRoomDeactivateMapping.csx +1 -1
  155. package/{touch → morph-touch}/Workflows/src/TriggerChatRoomTransferMapping.csx +1 -1
  156. package/{touch → morph-touch}/Workflows/src/TriggerChatRoomUpdateMapping.csx +3 -3
  157. package/{touch → morph-touch}/Workflows/src/TriggerRezervationAddInvitedParticipantMapping.csx +1 -1
  158. package/{touch → morph-touch}/Workflows/src/TriggerRezervationApplyUpdateMapping.csx +1 -1
  159. package/{touch → morph-touch}/Workflows/src/TriggerRezervationToInMeetMapping.csx +1 -1
  160. package/{touch → morph-touch}/Workflows/src/TriggerRezervationVideoCallUpdateMapping.csx +1 -1
  161. package/{touch → morph-touch}/Workflows/src/ValidateSlotForRandevuUpdateMapping.csx +29 -1
  162. package/{touch → morph-touch}/Workflows/src/ValidateSlotForRezervationMapping.csx +29 -1
  163. package/{touch → morph-touch}/Workflows/src/ValidateTransferMapping.csx +2 -2
  164. package/{touch → morph-touch}/Workflows/start-chat.json +6 -6
  165. package/{touch → morph-touch}/Workflows/start-video-call.http +3 -3
  166. package/{touch → morph-touch}/Workflows/start-video-call.json +4 -4
  167. package/package.json +1 -1
  168. package/vnext.config.json +6 -6
  169. package/burgan-tech-morph-touch-runtime-0.0.2.tgz +0 -0
  170. package/touch/Functions/get-available-slots.1.0.0.json +0 -30
  171. package/touch/Functions/get-chat-rooms.1.0.0.json +0 -28
  172. package/touch/Functions/get-rezervations.1.0.0.json +0 -26
  173. /package/{touch → morph-touch}/Extensions/.gitkeep +0 -0
  174. /package/{touch → morph-touch}/Functions/.gitkeep +0 -0
  175. /package/{touch → morph-touch}/Functions/src/CheckLivekitRoomAccessMapping.csx +0 -0
  176. /package/{touch → morph-touch}/Functions/src/GetAbsenceEntryMapping.csx +0 -0
  177. /package/{touch → morph-touch}/Functions/src/GetAdvisorStatsMapping.csx +0 -0
  178. /package/{touch → morph-touch}/Functions/src/GetCustomerInfoMapping.csx +0 -0
  179. /package/{touch → morph-touch}/Functions/src/GetMatrixSyncMapping.csx +0 -0
  180. /package/{touch → morph-touch}/Functions/src/GetRoomMessagesMapping.csx +0 -0
  181. /package/{touch → morph-touch}/Functions/src/SendCancelNotificationMapping.csx +0 -0
  182. /package/{touch → morph-touch}/Functions/src/SendRoomMessageMapping.csx +0 -0
  183. /package/{touch → morph-touch}/Schemas/.gitkeep +0 -0
  184. /package/{touch → morph-touch}/Tasks/.gitkeep +0 -0
  185. /package/{touch → morph-touch}/Views/.gitkeep +0 -0
  186. /package/{touch → morph-touch}/Workflows/.gitkeep +0 -0
  187. /package/{touch → morph-touch}/Workflows/src/AllChatRoomsSuccessRule.csx +0 -0
  188. /package/{touch → morph-touch}/Workflows/src/AlwaysTrueRule.csx +0 -0
  189. /package/{touch → morph-touch}/Workflows/src/AnyChatRoomFailedRule.csx +0 -0
  190. /package/{touch → morph-touch}/Workflows/src/AutoProcessRule.csx +0 -0
  191. /package/{touch → morph-touch}/Workflows/src/BuildRezChatRoomPlanMapping.csx +0 -0
  192. /package/{touch → morph-touch}/Workflows/src/CanStartRezervationTimerMapping.csx +0 -0
  193. /package/{touch → morph-touch}/Workflows/src/CanStartTransferMapping.csx +0 -0
  194. /package/{touch → morph-touch}/Workflows/src/ChatRoomCreatedFailedRule.csx +0 -0
  195. /package/{touch → morph-touch}/Workflows/src/ChatRoomCreatedSuccessRule.csx +0 -0
  196. /package/{touch → morph-touch}/Workflows/src/ChatRoomTransferRemoveMapping.csx +0 -0
  197. /package/{touch → morph-touch}/Workflows/src/CheckAlreadyCompletedChatRoomMapping.csx +0 -0
  198. /package/{touch → morph-touch}/Workflows/src/CheckDuplicatePortfolioManagerMapping.csx +0 -0
  199. /package/{touch → morph-touch}/Workflows/src/CheckDuplicateRezervationMapping.csx +0 -0
  200. /package/{touch → morph-touch}/Workflows/src/CheckExistingPermanentChatRoomMapping.csx +0 -0
  201. /package/{touch → morph-touch}/Workflows/src/CheckRandevuTimeMapping.csx +0 -0
  202. /package/{touch → morph-touch}/Workflows/src/CheckRezervationStateActiveOrInMeetRule.csx +0 -0
  203. /package/{touch → morph-touch}/Workflows/src/CustomerControlToEndRule.csx +0 -0
  204. /package/{touch → morph-touch}/Workflows/src/DetermineTransferTypeMapping.csx +0 -0
  205. /package/{touch → morph-touch}/Workflows/src/FetchAbsenceEntriesForTransferMapping.csx +0 -0
  206. /package/{touch → morph-touch}/Workflows/src/FetchRezervationsForTransferMapping.csx +0 -0
  207. /package/{touch → morph-touch}/Workflows/src/GetChatTokenMapping.csx +0 -0
  208. /package/{touch → morph-touch}/Workflows/src/GetUserInfoForRezervationMapping.csx +0 -0
  209. /package/{touch → morph-touch}/Workflows/src/GetVideoCallUrlMapping.csx +0 -0
  210. /package/{touch → morph-touch}/Workflows/src/HasChangedAdvisorRule.csx +0 -0
  211. /package/{touch → morph-touch}/Workflows/src/HasChatIntegrationRule.csx +0 -0
  212. /package/{touch → morph-touch}/Workflows/src/HasExistingPermanentRoomRule.csx +0 -0
  213. /package/{touch → morph-touch}/Workflows/src/InviteAdvisorForRandevuUpdateMapping.csx +0 -0
  214. /package/{touch → morph-touch}/Workflows/src/InviteNewAdvisorToRezervationRoomMapping.csx +0 -0
  215. /package/{touch → morph-touch}/Workflows/src/InviteNewParticipantToRandevuRoomMapping.csx +0 -0
  216. /package/{touch → morph-touch}/Workflows/src/InvitedUserMergeMapping.csx +0 -0
  217. /package/{touch → morph-touch}/Workflows/src/InvitedUserNotInMeetRule.csx +0 -0
  218. /package/{touch → morph-touch}/Workflows/src/IsNotfSentRule.csx +0 -0
  219. /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForAddParticipantMapping.csx +0 -0
  220. /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForRandevuStartMapping.csx +0 -0
  221. /package/{touch → morph-touch}/Workflows/src/JoinChatRoomForRezervationMapping.csx +0 -0
  222. /package/{touch → morph-touch}/Workflows/src/JoinMatrixRoomMapping.csx +0 -0
  223. /package/{touch → morph-touch}/Workflows/src/LoginForAddParticipantChatMapping.csx +0 -0
  224. /package/{touch → morph-touch}/Workflows/src/LoginForRandevuStartChatMapping.csx +0 -0
  225. /package/{touch → morph-touch}/Workflows/src/MergeRezervationUpdateMapping.csx +0 -0
  226. /package/{touch → morph-touch}/Workflows/src/MergeTargetAdvisorForTransferMapping.csx +0 -0
  227. /package/{touch → morph-touch}/Workflows/src/MergeUpdateBodyForRandevuUpdateMapping.csx +0 -0
  228. /package/{touch → morph-touch}/Workflows/src/NoExistingPermanentRoomRule.csx +0 -0
  229. /package/{touch → morph-touch}/Workflows/src/NotificationCompleteAlwaysRule.csx +0 -0
  230. /package/{touch → morph-touch}/Workflows/src/NotificationCompleteFromPendingRule.csx +0 -0
  231. /package/{touch → morph-touch}/Workflows/src/NotificationCompleteFromSmsRule.csx +0 -0
  232. /package/{touch → morph-touch}/Workflows/src/NotificationPushFromPendingRule.csx +0 -0
  233. /package/{touch → morph-touch}/Workflows/src/NotificationPushFromSmsRule.csx +0 -0
  234. /package/{touch → morph-touch}/Workflows/src/NotificationSmsPendingRule.csx +0 -0
  235. /package/{touch → morph-touch}/Workflows/src/PermanentDoneRule.csx +0 -0
  236. /package/{touch → morph-touch}/Workflows/src/PermanentProcessNextRule.csx +0 -0
  237. /package/{touch → morph-touch}/Workflows/src/RezChatRoomProcessNextRule.csx +0 -0
  238. /package/{touch → morph-touch}/Workflows/src/RezChatRoomsDoneRule.csx +0 -0
  239. /package/{touch → morph-touch}/Workflows/src/SetChatRoomStatusActiveMapping.csx +0 -0
  240. /package/{touch → morph-touch}/Workflows/src/SetChatRoomStatusDeactiveMapping.csx +0 -0
  241. /package/{touch → morph-touch}/Workflows/src/SetPreviousAdvisorMapping.csx +0 -0
  242. /package/{touch → morph-touch}/Workflows/src/SetUserFromHeadersForRezervationMapping.csx +0 -0
  243. /package/{touch → morph-touch}/Workflows/src/SlotAvailableRule.csx +0 -0
  244. /package/{touch → morph-touch}/Workflows/src/SlotUnavailableRule.csx +0 -0
  245. /package/{touch → morph-touch}/Workflows/src/StartVideoCallCustomerSubFlowMapping.csx +0 -0
  246. /package/{touch → morph-touch}/Workflows/src/StartVideoCallForInvitedParticipantMapping.csx +0 -0
  247. /package/{touch → morph-touch}/Workflows/src/StartVideoCallForRandevuStartMapping.csx +0 -0
  248. /package/{touch → morph-touch}/Workflows/src/StartVideoCallStaffSubFlowMapping.csx +0 -0
  249. /package/{touch → morph-touch}/Workflows/src/StateActiveForUpdateRule.csx +0 -0
  250. /package/{touch → morph-touch}/Workflows/src/StateActiveRule.csx +0 -0
  251. /package/{touch → morph-touch}/Workflows/src/StateNotActiveForUpdateRule.csx +0 -0
  252. /package/{touch → morph-touch}/Workflows/src/StateNotActiveOrInMeetRule.csx +0 -0
  253. /package/{touch → morph-touch}/Workflows/src/StatusCustomerEnterRule.csx +0 -0
  254. /package/{touch → morph-touch}/Workflows/src/StatusStaffEnterRule.csx +0 -0
  255. /package/{touch → morph-touch}/Workflows/src/SyncWorkingHoursRule.csx +0 -0
  256. /package/{touch → morph-touch}/Workflows/src/TokenSuccessRule.csx +0 -0
  257. /package/{touch → morph-touch}/Workflows/src/TransferAllDoneRule.csx +0 -0
  258. /package/{touch → morph-touch}/Workflows/src/TransferHasInvalidRule.csx +0 -0
  259. /package/{touch → morph-touch}/Workflows/src/TransferProcessNextRule.csx +0 -0
  260. /package/{touch → morph-touch}/Workflows/src/ValidateDateForRezervationMapping.csx +0 -0
  261. /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 prefixedName = $"{instanceKey}";
33
- var aliasName = $"{instanceKey}";
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?.user?.ToString();
30
- var advisorType = data?.advisorType?.ToString() ?? "pm";
31
- var advisorId = data?.advisorId?.ToString();
32
-
33
- var prefixedName = $"{instanceKey}";
34
- var aliasName = $"{instanceKey}";
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
- pendingJoinUserId = advisorId
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\":{\"gte\":\"" + startDate + "\"}}}",
47
- "{\"attributes\":{\"endDateTime\":{\"lte\":\"" + endDate + "\"}}}"
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
- result["allAdvisorKeys"] = new List<string>();
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
- /// Termination (transferType == "termination") triggers 'transfer' transition (old advisor out, new in).
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
- var transferType = GetString(data, "transferType");
50
-
51
- triggerTask.SetDomain("touch");
49
+ triggerTask.SetDomain("morph-touch");
52
50
  triggerTask.SetFlow("chat-room");
53
51
  triggerTask.SetKey(chatRoomKey);
54
-
55
- if (transferType == "termination")
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
- var success = context.Body?.isSuccess == true;
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
- result["permanentProcessedIndex"] = processedIndex + 1;
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 a rezervation-update subflow instance for a single rezervation.
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
- var targetAdvisor = currentItem.targetAdvisor?.ToString();
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(targetAdvisor))
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-update");
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
- targetAdvisor = targetAdvisor,
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
- currentTargetAdvisor = targetAdvisor
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 currentTargetAdvisor = null;
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
- currentTargetAdvisor = currentItem?.targetAdvisor?.ToString();
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["currentTargetAdvisor"] = currentTargetAdvisor;
121
+ result["currentNewUserId"] = currentNewUserId;
122
+ result["currentTargetAdvisor"] = currentNewUserId;
120
123
  result["lastTransferSuccess"] = success;
121
- result["lastTransferError"] = !success ? (context.Body?.errorMessage?.ToString() ?? "Transfer execution failed") : null;
124
+ result["lastTransferError"] = !success ? (context.Body?.errorMessage?.ToString() ?? "Add participant execution failed") : null;
122
125
 
123
126
  return Task.FromResult(new ScriptResponse
124
127
  {