Commit 9c97b2a
feat: add usernameInOrg field to webhook organizer payload for organization users (calcom#23246)
* feat: add usernameInOrg field to webhook organizer payload for organization users
- Add usernameInOrg field to CalendarEventBuilder organizer interface
- Update handleNewBooking to pass organizerOrganizationProfile.username as usernameInOrg
- Include usernameInOrg in webhook payload generation (sendPayload.ts)
- Add webhook form variable for usernameInOrg with translation
- Update Person type to include usernameInOrg field
- Add test case for organization user webhook verification
- Maintain backward compatibility by keeping existing username field unchanged
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* feat: add usernameInOrg to additional webhook sending locations
- Update handleCancelBooking.ts to include usernameInOrg in organizer payload
- Update confirm.handler.ts to include usernameInOrg for booking confirmations
- Update getBooking.ts to include usernameInOrg in payment-related webhooks
- Maintain backward compatibility with existing username field
- All webhook sending locations now include organization profile username
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fixes
* Add subteam event test for usernameInOrg
* fix eslitn issues
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 1e226a4 commit 9c97b2a
14 files changed
Lines changed: 581 additions & 243 deletions
File tree
- apps/web
- public/static/locales/en
- test/utils/bookingScenario
- packages
- features
- bookings/lib
- handleCancelBooking/test
- handleNewBooking/test
- team-bookings
- payment
- webhooks
- components
- lib
- trpc/server/routers/viewer/bookings
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3677 | 3677 | | |
3678 | 3678 | | |
3679 | 3679 | | |
| 3680 | + | |
| 3681 | + | |
3680 | 3682 | | |
3681 | 3683 | | |
3682 | 3684 | | |
| |||
Lines changed: 191 additions & 168 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
| 1034 | + | |
1034 | 1035 | | |
1035 | 1036 | | |
1036 | 1037 | | |
| |||
1039 | 1040 | | |
1040 | 1041 | | |
1041 | 1042 | | |
1042 | | - | |
| 1043 | + | |
1043 | 1044 | | |
1044 | 1045 | | |
1045 | 1046 | | |
| |||
1048 | 1049 | | |
1049 | 1050 | | |
1050 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1051 | 1057 | | |
1052 | 1058 | | |
1053 | 1059 | | |
| |||
1073 | 1079 | | |
1074 | 1080 | | |
1075 | 1081 | | |
| 1082 | + | |
1076 | 1083 | | |
1077 | 1084 | | |
1078 | 1085 | | |
| |||
1103 | 1110 | | |
1104 | 1111 | | |
1105 | 1112 | | |
| 1113 | + | |
1106 | 1114 | | |
1107 | 1115 | | |
1108 | 1116 | | |
| |||
1144 | 1152 | | |
1145 | 1153 | | |
1146 | 1154 | | |
| 1155 | + | |
1147 | 1156 | | |
1148 | 1157 | | |
1149 | 1158 | | |
1150 | 1159 | | |
1151 | 1160 | | |
1152 | | - | |
| 1161 | + | |
1153 | 1162 | | |
1154 | 1163 | | |
1155 | 1164 | | |
1156 | 1165 | | |
1157 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1158 | 1172 | | |
1159 | 1173 | | |
1160 | 1174 | | |
1161 | 1175 | | |
| 1176 | + | |
1162 | 1177 | | |
1163 | 1178 | | |
1164 | 1179 | | |
| |||
1387 | 1402 | | |
1388 | 1403 | | |
1389 | 1404 | | |
1390 | | - | |
1391 | 1405 | | |
1392 | 1406 | | |
1393 | 1407 | | |
1394 | 1408 | | |
1395 | 1409 | | |
1396 | 1410 | | |
1397 | | - | |
1398 | 1411 | | |
1399 | 1412 | | |
1400 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| |||
Lines changed: 126 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | 387 | | |
395 | 388 | | |
396 | 389 | | |
| |||
786 | 779 | | |
787 | 780 | | |
788 | 781 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | 782 | | |
797 | 783 | | |
798 | 784 | | |
| |||
831 | 817 | | |
832 | 818 | | |
833 | 819 | | |
834 | | - | |
835 | 820 | | |
836 | 821 | | |
837 | 822 | | |
| |||
942 | 927 | | |
943 | 928 | | |
944 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
945 | 1056 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | | - | |
1212 | 1211 | | |
1213 | 1212 | | |
1214 | 1213 | | |
| |||
1268 | 1267 | | |
1269 | 1268 | | |
1270 | 1269 | | |
| 1270 | + | |
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
| |||
0 commit comments