@@ -214,7 +214,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
214214 } ,
215215 } ,
216216
217- // Categories (for posts only )
217+ // Categories (for posts)
218218 {
219219 id : 'categories' ,
220220 title : 'Categories' ,
@@ -223,11 +223,11 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
223223 mode : 'advanced' ,
224224 condition : {
225225 field : 'operation' ,
226- value : [ 'wordpress_create_post' , 'wordpress_update_post' ] ,
226+ value : [ 'wordpress_create_post' , 'wordpress_update_post' , 'wordpress_list_posts' ] ,
227227 } ,
228228 } ,
229229
230- // Tags (for posts only )
230+ // Tags (for posts)
231231 {
232232 id : 'tags' ,
233233 title : 'Tags' ,
@@ -236,10 +236,20 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
236236 mode : 'advanced' ,
237237 condition : {
238238 field : 'operation' ,
239- value : [ 'wordpress_create_post' , 'wordpress_update_post' ] ,
239+ value : [ 'wordpress_create_post' , 'wordpress_update_post' , 'wordpress_list_posts' ] ,
240240 } ,
241241 } ,
242242
243+ // List Posts: Author filter
244+ {
245+ id : 'listAuthor' ,
246+ title : 'Author ID' ,
247+ type : 'short-input' ,
248+ placeholder : 'Filter by author ID' ,
249+ mode : 'advanced' ,
250+ condition : { field : 'operation' , value : 'wordpress_list_posts' } ,
251+ } ,
252+
243253 // Featured Media ID
244254 {
245255 id : 'featuredMedia' ,
@@ -283,7 +293,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
283293 mode : 'advanced' ,
284294 condition : {
285295 field : 'operation' ,
286- value : [ 'wordpress_create_page' , 'wordpress_update_page' ] ,
296+ value : [ 'wordpress_create_page' , 'wordpress_update_page' , 'wordpress_list_pages' ] ,
287297 } ,
288298 } ,
289299
@@ -355,6 +365,14 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
355365 mode : 'advanced' ,
356366 condition : { field : 'operation' , value : 'wordpress_upload_media' } ,
357367 } ,
368+ {
369+ id : 'mediaDescription' ,
370+ title : 'Description' ,
371+ type : 'long-input' ,
372+ placeholder : 'Media description' ,
373+ mode : 'advanced' ,
374+ condition : { field : 'operation' , value : 'wordpress_upload_media' } ,
375+ } ,
358376 {
359377 id : 'mediaId' ,
360378 title : 'Media ID' ,
@@ -391,7 +409,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
391409 title : 'Post ID' ,
392410 type : 'short-input' ,
393411 placeholder : 'Post ID to comment on' ,
394- condition : { field : 'operation' , value : 'wordpress_create_comment' } ,
412+ condition : {
413+ field : 'operation' ,
414+ value : [ 'wordpress_create_comment' , 'wordpress_list_comments' ] ,
415+ } ,
395416 required : { field : 'operation' , value : 'wordpress_create_comment' } ,
396417 } ,
397418 {
@@ -405,6 +426,38 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
405426 } ,
406427 required : { field : 'operation' , value : 'wordpress_create_comment' } ,
407428 } ,
429+ {
430+ id : 'commentParent' ,
431+ title : 'Parent Comment ID' ,
432+ type : 'short-input' ,
433+ placeholder : 'Parent comment ID (for replies)' ,
434+ mode : 'advanced' ,
435+ condition : { field : 'operation' , value : 'wordpress_create_comment' } ,
436+ } ,
437+ {
438+ id : 'commentAuthorName' ,
439+ title : 'Author Name' ,
440+ type : 'short-input' ,
441+ placeholder : 'Comment author display name' ,
442+ mode : 'advanced' ,
443+ condition : { field : 'operation' , value : 'wordpress_create_comment' } ,
444+ } ,
445+ {
446+ id : 'commentAuthorEmail' ,
447+ title : 'Author Email' ,
448+ type : 'short-input' ,
449+ placeholder : 'Comment author email' ,
450+ mode : 'advanced' ,
451+ condition : { field : 'operation' , value : 'wordpress_create_comment' } ,
452+ } ,
453+ {
454+ id : 'commentAuthorUrl' ,
455+ title : 'Author URL' ,
456+ type : 'short-input' ,
457+ placeholder : 'Comment author URL' ,
458+ mode : 'advanced' ,
459+ condition : { field : 'operation' , value : 'wordpress_create_comment' } ,
460+ } ,
408461 {
409462 id : 'commentId' ,
410463 title : 'Comment ID' ,
@@ -571,7 +624,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
571624 required : { field : 'operation' , value : 'wordpress_search_content' } ,
572625 } ,
573626 {
574- id : 'searchType ' ,
627+ id : 'searchSubtype ' ,
575628 title : 'Content Type' ,
576629 type : 'dropdown' ,
577630 options : [
@@ -779,7 +832,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
779832 slug : params . slug ,
780833 categories : params . categories ,
781834 tags : params . tags ,
782- featuredMedia : params . featuredMedia ? Number ( params . featuredMedia ) : undefined ,
835+ featuredMedia :
836+ params . featuredMedia !== undefined && params . featuredMedia !== ''
837+ ? Number ( params . featuredMedia )
838+ : undefined ,
783839 }
784840 case 'wordpress_update_post' :
785841 return {
@@ -792,7 +848,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
792848 slug : params . slug ,
793849 categories : params . categories ,
794850 tags : params . tags ,
795- featuredMedia : params . featuredMedia ? Number ( params . featuredMedia ) : undefined ,
851+ featuredMedia :
852+ params . featuredMedia !== undefined && params . featuredMedia !== ''
853+ ? Number ( params . featuredMedia )
854+ : undefined ,
796855 }
797856 case 'wordpress_delete_post' :
798857 return {
@@ -816,6 +875,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
816875 order : params . order ,
817876 categories : params . categories ,
818877 tags : params . tags ,
878+ author :
879+ params . listAuthor !== undefined && params . listAuthor !== ''
880+ ? Number ( params . listAuthor )
881+ : undefined ,
819882 }
820883 case 'wordpress_create_page' :
821884 return {
@@ -825,9 +888,18 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
825888 status : params . status ,
826889 excerpt : params . excerpt ,
827890 slug : params . slug ,
828- parent : params . parent ? Number ( params . parent ) : undefined ,
829- menuOrder : params . menuOrder ? Number ( params . menuOrder ) : undefined ,
830- featuredMedia : params . featuredMedia ? Number ( params . featuredMedia ) : undefined ,
891+ parent :
892+ params . parent !== undefined && params . parent !== ''
893+ ? Number ( params . parent )
894+ : undefined ,
895+ menuOrder :
896+ params . menuOrder !== undefined && params . menuOrder !== ''
897+ ? Number ( params . menuOrder )
898+ : undefined ,
899+ featuredMedia :
900+ params . featuredMedia !== undefined && params . featuredMedia !== ''
901+ ? Number ( params . featuredMedia )
902+ : undefined ,
831903 }
832904 case 'wordpress_update_page' :
833905 return {
@@ -838,9 +910,18 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
838910 status : params . status ,
839911 excerpt : params . excerpt ,
840912 slug : params . slug ,
841- parent : params . parent ? Number ( params . parent ) : undefined ,
842- menuOrder : params . menuOrder ? Number ( params . menuOrder ) : undefined ,
843- featuredMedia : params . featuredMedia ? Number ( params . featuredMedia ) : undefined ,
913+ parent :
914+ params . parent !== undefined && params . parent !== ''
915+ ? Number ( params . parent )
916+ : undefined ,
917+ menuOrder :
918+ params . menuOrder !== undefined && params . menuOrder !== ''
919+ ? Number ( params . menuOrder )
920+ : undefined ,
921+ featuredMedia :
922+ params . featuredMedia !== undefined && params . featuredMedia !== ''
923+ ? Number ( params . featuredMedia )
924+ : undefined ,
844925 }
845926 case 'wordpress_delete_page' :
846927 return {
@@ -862,7 +943,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
862943 search : params . search ,
863944 orderBy : params . orderBy ,
864945 order : params . order ,
865- parent : params . parent ? Number ( params . parent ) : undefined ,
946+ parent :
947+ params . parent !== undefined && params . parent !== ''
948+ ? Number ( params . parent )
949+ : undefined ,
866950 }
867951 case 'wordpress_upload_media' :
868952 // file is the canonical param for both basic (fileUpload) and advanced modes
@@ -873,6 +957,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
873957 title : params . mediaTitle ,
874958 caption : params . caption ,
875959 altText : params . altText ,
960+ description : params . mediaDescription || undefined ,
876961 }
877962 case 'wordpress_get_media' :
878963 return {
@@ -899,6 +984,13 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
899984 ...baseParams ,
900985 postId : Number ( params . commentPostId ) ,
901986 content : params . commentContent ,
987+ parent :
988+ params . commentParent !== undefined && params . commentParent !== ''
989+ ? Number ( params . commentParent )
990+ : undefined ,
991+ authorName : params . commentAuthorName || undefined ,
992+ authorEmail : params . commentAuthorEmail || undefined ,
993+ authorUrl : params . commentAuthorUrl || undefined ,
902994 }
903995 case 'wordpress_list_comments' :
904996 return {
@@ -1019,7 +1111,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
10191111 query : params . query ,
10201112 perPage : params . perPage ? Number ( params . perPage ) : undefined ,
10211113 page : params . page ? Number ( params . page ) : undefined ,
1022- type : params . searchType || undefined ,
1114+ subtype : params . searchSubtype || undefined ,
10231115 }
10241116 default :
10251117 return baseParams
@@ -1040,6 +1132,7 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
10401132 slug : { type : 'string' , description : 'URL slug' } ,
10411133 categories : { type : 'string' , description : 'Category IDs (comma-separated)' } ,
10421134 tags : { type : 'string' , description : 'Tag IDs (comma-separated)' } ,
1135+ listAuthor : { type : 'string' , description : 'Filter posts by author ID' } ,
10431136 featuredMedia : { type : 'number' , description : 'Featured media ID' } ,
10441137 // Page inputs
10451138 pageId : { type : 'number' , description : 'Page ID' } ,
@@ -1051,11 +1144,16 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
10511144 mediaTitle : { type : 'string' , description : 'Media title' } ,
10521145 caption : { type : 'string' , description : 'Media caption' } ,
10531146 altText : { type : 'string' , description : 'Alt text' } ,
1147+ mediaDescription : { type : 'string' , description : 'Media description' } ,
10541148 mediaId : { type : 'number' , description : 'Media ID' } ,
10551149 mediaType : { type : 'string' , description : 'Media type filter' } ,
10561150 // Comment inputs
10571151 commentPostId : { type : 'number' , description : 'Post ID for comment' } ,
10581152 commentContent : { type : 'string' , description : 'Comment content' } ,
1153+ commentParent : { type : 'number' , description : 'Parent comment ID for replies' } ,
1154+ commentAuthorName : { type : 'string' , description : 'Comment author display name' } ,
1155+ commentAuthorEmail : { type : 'string' , description : 'Comment author email' } ,
1156+ commentAuthorUrl : { type : 'string' , description : 'Comment author URL' } ,
10591157 commentId : { type : 'number' , description : 'Comment ID' } ,
10601158 commentStatus : { type : 'string' , description : 'Comment status' } ,
10611159 // Category inputs
@@ -1074,7 +1172,10 @@ export const WordPressBlock: BlockConfig<WordPressResponse> = {
10741172 roles : { type : 'string' , description : 'User roles filter' } ,
10751173 // Search inputs
10761174 query : { type : 'string' , description : 'Search query' } ,
1077- searchType : { type : 'string' , description : 'Content type filter' } ,
1175+ searchSubtype : {
1176+ type : 'string' ,
1177+ description : 'Content subtype filter (post, page, attachment)' ,
1178+ } ,
10781179 // List inputs
10791180 perPage : { type : 'number' , description : 'Results per page' } ,
10801181 page : { type : 'number' , description : 'Page number' } ,
0 commit comments