@@ -25,6 +25,7 @@ export const GrainBlock: BlockConfig = {
2525 { label : 'List Recordings' , id : 'grain_list_recordings' } ,
2626 { label : 'Get Recording' , id : 'grain_get_recording' } ,
2727 { label : 'Get Transcript' , id : 'grain_get_transcript' } ,
28+ { label : 'List Views' , id : 'grain_list_views' } ,
2829 { label : 'List Teams' , id : 'grain_list_teams' } ,
2930 { label : 'List Meeting Types' , id : 'grain_list_meeting_types' } ,
3031 { label : 'Create Webhook' , id : 'grain_create_hook' } ,
@@ -72,7 +73,7 @@ export const GrainBlock: BlockConfig = {
7273 placeholder : 'ISO8601 timestamp (e.g., 2024-01-01T00:00:00Z)' ,
7374 condition : {
7475 field : 'operation' ,
75- value : [ 'grain_list_recordings' , 'grain_create_hook' ] ,
76+ value : [ 'grain_list_recordings' ] ,
7677 } ,
7778 wandConfig : {
7879 enabled : true ,
@@ -96,7 +97,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
9697 placeholder : 'ISO8601 timestamp (e.g., 2024-01-01T00:00:00Z)' ,
9798 condition : {
9899 field : 'operation' ,
99- value : [ 'grain_list_recordings' , 'grain_create_hook' ] ,
100+ value : [ 'grain_list_recordings' ] ,
100101 } ,
101102 wandConfig : {
102103 enabled : true ,
@@ -125,7 +126,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
125126 value : ( ) => '' ,
126127 condition : {
127128 field : 'operation' ,
128- value : [ 'grain_list_recordings' , 'grain_create_hook' ] ,
129+ value : [ 'grain_list_recordings' ] ,
129130 } ,
130131 } ,
131132 // Title search
@@ -162,7 +163,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
162163 placeholder : 'Filter by team UUID (optional)' ,
163164 condition : {
164165 field : 'operation' ,
165- value : [ 'grain_list_recordings' , 'grain_create_hook' ] ,
166+ value : [ 'grain_list_recordings' ] ,
166167 } ,
167168 } ,
168169 // Meeting type ID filter
@@ -173,7 +174,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
173174 placeholder : 'Filter by meeting type UUID (optional)' ,
174175 condition : {
175176 field : 'operation' ,
176- value : [ 'grain_list_recordings' , 'grain_create_hook' ] ,
177+ value : [ 'grain_list_recordings' ] ,
177178 } ,
178179 } ,
179180 // Include highlights
@@ -183,7 +184,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
183184 type : 'switch' ,
184185 condition : {
185186 field : 'operation' ,
186- value : [ 'grain_list_recordings' , 'grain_get_recording' , 'grain_create_hook' ] ,
187+ value : [ 'grain_list_recordings' , 'grain_get_recording' ] ,
187188 } ,
188189 } ,
189190 // Include participants
@@ -193,7 +194,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
193194 type : 'switch' ,
194195 condition : {
195196 field : 'operation' ,
196- value : [ 'grain_list_recordings' , 'grain_get_recording' , 'grain_create_hook' ] ,
197+ value : [ 'grain_list_recordings' , 'grain_get_recording' ] ,
197198 } ,
198199 } ,
199200 // Include AI summary
@@ -203,7 +204,18 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
203204 type : 'switch' ,
204205 condition : {
205206 field : 'operation' ,
206- value : [ 'grain_list_recordings' , 'grain_get_recording' , 'grain_create_hook' ] ,
207+ value : [ 'grain_list_recordings' , 'grain_get_recording' ] ,
208+ } ,
209+ } ,
210+ {
211+ id : 'viewId' ,
212+ title : 'View ID' ,
213+ type : 'short-input' ,
214+ placeholder : 'Enter Grain view UUID' ,
215+ required : true ,
216+ condition : {
217+ field : 'operation' ,
218+ value : [ 'grain_create_hook' ] ,
207219 } ,
208220 } ,
209221 // Include calendar event (get_recording only)
@@ -271,6 +283,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
271283 'grain_list_recordings' ,
272284 'grain_get_recording' ,
273285 'grain_get_transcript' ,
286+ 'grain_list_views' ,
274287 'grain_list_teams' ,
275288 'grain_list_meeting_types' ,
276289 'grain_create_hook' ,
@@ -327,24 +340,21 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
327340
328341 case 'grain_list_teams' :
329342 case 'grain_list_meeting_types' :
343+ case 'grain_list_views' :
330344 case 'grain_list_hooks' :
331345 return baseParams
332346
333347 case 'grain_create_hook' :
334348 if ( ! params . hookUrl ?. trim ( ) ) {
335349 throw new Error ( 'Webhook URL is required.' )
336350 }
351+ if ( ! params . viewId ?. trim ( ) ) {
352+ throw new Error ( 'View ID is required.' )
353+ }
337354 return {
338355 ...baseParams ,
339356 hookUrl : params . hookUrl . trim ( ) ,
340- filterBeforeDatetime : params . beforeDatetime || undefined ,
341- filterAfterDatetime : params . afterDatetime || undefined ,
342- filterParticipantScope : params . participantScope || undefined ,
343- filterTeamId : params . teamId || undefined ,
344- filterMeetingTypeId : params . meetingTypeId || undefined ,
345- includeHighlights : params . includeHighlights || false ,
346- includeParticipants : params . includeParticipants || false ,
347- includeAiSummary : params . includeAiSummary || false ,
357+ viewId : params . viewId . trim ( ) ,
348358 }
349359
350360 case 'grain_delete_hook' :
@@ -367,6 +377,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
367377 apiKey : { type : 'string' , description : 'Grain API key (Personal Access Token)' } ,
368378 recordingId : { type : 'string' , description : 'Recording UUID' } ,
369379 cursor : { type : 'string' , description : 'Pagination cursor' } ,
380+ viewId : { type : 'string' , description : 'Grain view UUID for webhook subscriptions' } ,
370381 beforeDatetime : {
371382 type : 'string' ,
372383 description : 'Filter recordings before this ISO8601 timestamp' ,
@@ -416,6 +427,7 @@ Return ONLY the search term - no explanations, no quotes, no extra text.`,
416427 teamsList : { type : 'json' , description : 'Array of team objects' } ,
417428 // Meeting type outputs
418429 meetingTypes : { type : 'json' , description : 'Array of meeting type objects' } ,
430+ views : { type : 'json' , description : 'Array of Grain views' } ,
419431 // Hook outputs
420432 hooks : { type : 'json' , description : 'Array of webhook objects' } ,
421433 hook : { type : 'json' , description : 'Created webhook data' } ,
0 commit comments