@@ -73,6 +73,8 @@ const ID_TO_PARAM: Record<string, string> = {
7373 ci_query : 'query' ,
7474 sr_platform : 'platform' ,
7575 sr_mode : 'mode' ,
76+ sr_query : 'query' ,
77+ sr_url : 'url' ,
7678}
7779
7880/** Per operation, the sub-block that carries the API's `action`. */
@@ -118,7 +120,7 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
118120 [ SOCIAL ] : [
119121 { text : 'Get' , field : 'sr_mode' , core : true } ,
120122 { text : 'on' , field : 'sr_platform' , core : true } ,
121- { text : 'for' , field : [ 'query ' , 'handle' , 'url ' ] } ,
123+ { text : 'for' , field : [ 'sr_query ' , 'handle' , 'sr_url ' ] } ,
122124 ] ,
123125 [ MARKET ] : [
124126 { text : 'Get' , field : 'md_action' , core : true } ,
@@ -144,7 +146,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
144146 value : ( ) => PEOPLE ,
145147 } ,
146148
147- // --- Find Prospects ---
148149 {
149150 id : 'ps_action' ,
150151 title : 'Action' ,
@@ -273,7 +274,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
273274 } ,
274275 } ,
275276
276- // --- Company Intelligence ---
277277 {
278278 id : 'ci_action' ,
279279 title : 'Company Report' ,
@@ -306,7 +306,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
306306 mode : 'advanced' ,
307307 } ,
308308
309- // --- Keywords and SEO ---
310309 {
311310 id : 'seo_action' ,
312311 title : 'SEO Report' ,
@@ -344,7 +343,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
344343 } ,
345344 } ,
346345
347- // --- Web Research ---
348346 {
349347 id : 'wr_action' ,
350348 title : 'Action' ,
@@ -371,7 +369,7 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
371369 placeholder : 'Search phrase or question' ,
372370 condition : {
373371 field : 'operation' ,
374- value : [ WEB , SOCIAL ] ,
372+ value : WEB ,
375373 and : { field : 'wr_action' , value : [ 'scrape' , 'similar' ] , not : true } ,
376374 } ,
377375 required : {
@@ -387,7 +385,7 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
387385 placeholder : 'https://example.com/page' ,
388386 condition : {
389387 field : 'operation' ,
390- value : [ WEB , SOCIAL ] ,
388+ value : WEB ,
391389 and : { field : 'wr_action' , value : [ 'scrape' , 'similar' ] } ,
392390 } ,
393391 required : {
@@ -405,7 +403,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
405403 mode : 'advanced' ,
406404 } ,
407405
408- // --- Social Media Search ---
409406 {
410407 id : 'sr_platform' ,
411408 title : 'Platform' ,
@@ -436,6 +433,30 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
436433 value : ( ) => 'search' ,
437434 condition : { field : 'operation' , value : SOCIAL } ,
438435 } ,
436+ {
437+ id : 'sr_query' ,
438+ title : 'Query' ,
439+ type : 'long-input' ,
440+ placeholder : 'Search phrase' ,
441+ condition : {
442+ field : 'operation' ,
443+ value : SOCIAL ,
444+ and : { field : 'sr_mode' , value : [ 'search' , 'find' ] } ,
445+ } ,
446+ required : { field : 'operation' , value : SOCIAL , and : { field : 'sr_mode' , value : 'search' } } ,
447+ } ,
448+ {
449+ id : 'sr_url' ,
450+ title : 'URL' ,
451+ type : 'short-input' ,
452+ placeholder : 'Post URL, or a LinkedIn profile or company page URL' ,
453+ condition : {
454+ field : 'operation' ,
455+ value : SOCIAL ,
456+ and : { field : 'sr_mode' , value : 'search' , not : true } ,
457+ } ,
458+ required : { field : 'operation' , value : SOCIAL , and : { field : 'sr_mode' , value : 'post' } } ,
459+ } ,
439460 {
440461 id : 'handle' ,
441462 title : 'Handle' ,
@@ -448,7 +469,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
448469 } ,
449470 } ,
450471
451- // --- Market Data ---
452472 {
453473 id : 'md_action' ,
454474 title : 'Market Report' ,
@@ -551,7 +571,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
551571 } ,
552572 } ,
553573
554- // --- Shared ---
555574 {
556575 id : 'country' ,
557576 title : 'Country' ,
@@ -630,7 +649,6 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
630649 task_id : { type : 'string' , description : 'Task the runs are filed under' } ,
631650 limit : { type : 'number' , description : 'Rows to return' } ,
632651 country : { type : 'string' , description : 'Country as ISO code or name' } ,
633- // Find Prospects
634652 ps_action : { type : 'string' , description : 'search, enrich or find_email' } ,
635653 job_titles : { type : 'string' , description : 'Job titles, comma-separated' } ,
636654 seniorities : { type : 'json' , description : 'Seniority levels' } ,
@@ -640,23 +658,20 @@ export const GlasserBlock: BlockConfig<GlasserResponse> = {
640658 full_name : { type : 'string' , description : "Person's full name" } ,
641659 email : { type : 'string' , description : 'Email address' } ,
642660 linkedin_url : { type : 'string' , description : 'LinkedIn profile URL' } ,
643- // Company Intelligence
644661 ci_action : { type : 'string' , description : 'Company report to fetch' } ,
645662 domain : { type : 'string' , description : 'Website domain' } ,
646663 ci_query : { type : 'string' , description : 'Company name for news search' } ,
647- // Keywords and SEO
648664 seo_action : { type : 'string' , description : 'SEO report to fetch' } ,
649665 seo_keywords : { type : 'string' , description : 'Keywords, comma-separated' } ,
650- // Web Research
651666 wr_action : { type : 'string' , description : 'Web research action' } ,
652667 query : { type : 'string' , description : 'Search phrase or question' } ,
653- url : { type : 'string' , description : 'Page or post URL' } ,
668+ url : { type : 'string' , description : 'Page URL' } ,
654669 language : { type : 'string' , description : 'Two-letter language code' } ,
655- // Social Media Search
656670 sr_platform : { type : 'string' , description : 'Social platform' } ,
657671 sr_mode : { type : 'string' , description : 'What to read on the platform' } ,
672+ sr_query : { type : 'string' , description : 'Search phrase (social)' } ,
673+ sr_url : { type : 'string' , description : 'Post, profile or company page URL (social)' } ,
658674 handle : { type : 'string' , description : 'Username or subreddit' } ,
659- // Market Data
660675 md_action : { type : 'string' , description : 'Market report to fetch' } ,
661676 address : { type : 'string' , description : 'US street address' } ,
662677 city : { type : 'string' , description : 'US city' } ,
0 commit comments