Skip to content

Commit cc3246d

Browse files
committed
ack pr comments
1 parent c395390 commit cc3246d

File tree

10 files changed

+26
-133
lines changed

10 files changed

+26
-133
lines changed

apps/sim/blocks/blocks/linear.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ export const LinearBlock: BlockConfig<LinearResponse> = {
107107
}
108108

109109
if (params.operation === 'write') {
110+
if (!params.title?.trim()) {
111+
throw new Error('Title is required for creating issues.')
112+
}
113+
if (!params.description?.trim()) {
114+
throw new Error('Description is required for creating issues.')
115+
}
110116
return {
111117
credential: params.credential,
112118
teamId: effectiveTeamId,

apps/sim/tools/browser_use/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ export interface BrowserUseResponse extends ToolResponse {
3333
id: string
3434
success: boolean
3535
output: any
36-
steps: any[]
36+
steps: BrowserUseTaskStep[]
3737
}
3838
}

apps/sim/tools/google/types.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,3 @@ export interface GoogleSearchResponse extends ToolResponse {
2424
}
2525
}
2626
}
27-
28-
export interface GoogleSearchResponse extends ToolResponse {
29-
output: {
30-
items: Array<{
31-
title: string
32-
link: string
33-
snippet: string
34-
displayLink?: string
35-
pagemap?: Record<string, any>
36-
}>
37-
searchInformation: {
38-
totalResults: string
39-
searchTime: number
40-
formattedSearchTime: string
41-
formattedTotalResults: string
42-
}
43-
}
44-
}

apps/sim/tools/google_calendar/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,4 @@ export type GoogleCalendarResponse =
283283
| GoogleCalendarGetResponse
284284
| GoogleCalendarQuickAddResponse
285285
| GoogleCalendarInviteResponse
286+
| GoogleCalendarUpdateResponse

apps/sim/tools/perplexity/types.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,3 @@ export interface PerplexityChatResponse extends ToolResponse {
2525
}
2626
}
2727
}
28-
29-
export interface PerplexityChatResponse extends ToolResponse {
30-
output: {
31-
content: string
32-
model: string
33-
usage: {
34-
prompt_tokens: number
35-
completion_tokens: number
36-
total_tokens: number
37-
}
38-
}
39-
}

apps/sim/tools/stagehand/types.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,3 @@ export function jsonSchemaToZod(jsonSchema: Record<string, any>): z.ZodTypeAny {
101101
return z.any()
102102
}
103103
}
104-
105-
export interface StagehandAgentResponse extends ToolResponse {
106-
output: {
107-
agentResult: {
108-
success: boolean
109-
completed: boolean
110-
message: string
111-
actions: Array<{
112-
type: string
113-
params: Record<string, any>
114-
result: Record<string, any>
115-
}>
116-
}
117-
structuredOutput?: Record<string, any>
118-
}
119-
}

apps/sim/tools/supabase/types.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,16 @@ export interface SupabaseInsertParams {
1313
data: any
1414
}
1515

16-
export interface SupabaseQueryResponse extends ToolResponse {
17-
error?: string
16+
export interface SupabaseBaseResponse extends ToolResponse {
1817
output: {
1918
message: string
2019
results: any
2120
}
22-
}
23-
24-
export interface SupabaseInsertResponse extends ToolResponse {
2521
error?: string
26-
output: {
27-
message: string
28-
results: any
29-
}
3022
}
3123

32-
export interface SupabaseResponse extends ToolResponse {
33-
output: {
34-
message: string
35-
results: any
36-
}
37-
error?: string
38-
}
24+
export interface SupabaseQueryResponse extends SupabaseBaseResponse {}
25+
26+
export interface SupabaseInsertResponse extends SupabaseBaseResponse {}
27+
28+
export interface SupabaseResponse extends SupabaseBaseResponse {}

apps/sim/tools/typeform/types.ts

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -106,72 +106,7 @@ export interface TypeformResponsesResponse extends ToolResponse {
106106

107107
export interface TypeformResponse extends ToolResponse {
108108
output:
109-
| {
110-
total_items: number
111-
page_count: number
112-
items: Array<{
113-
landing_id: string
114-
token: string
115-
landed_at: string
116-
submitted_at: string
117-
metadata: {
118-
user_agent: string
119-
platform: string
120-
referer: string
121-
network_id: string
122-
browser: string
123-
}
124-
answers: Array<{
125-
field: {
126-
id: string
127-
type: string
128-
ref: string
129-
}
130-
type: string
131-
[key: string]: any // For different answer types (text, boolean, number, etc.)
132-
}>
133-
hidden: Record<string, any>
134-
calculated: {
135-
score: number
136-
}
137-
variables: Array<{
138-
key: string
139-
type: string
140-
[key: string]: any // For different variable types
141-
}>
142-
}>
143-
}
144-
| {
145-
fileUrl: string
146-
contentType: string
147-
filename: string
148-
}
149-
| {
150-
fields: Array<{
151-
dropoffs: number
152-
id: string
153-
label: string
154-
ref: string
155-
title: string
156-
type: string
157-
views: number
158-
}>
159-
form: {
160-
platforms: Array<{
161-
average_time: number
162-
completion_rate: number
163-
platform: string
164-
responses_count: number
165-
total_visits: number
166-
unique_visits: number
167-
}>
168-
summary: {
169-
average_time: number
170-
completion_rate: number
171-
responses_count: number
172-
total_visits: number
173-
unique_visits: number
174-
}
175-
}
176-
}
109+
| TypeformResponsesResponse['output']
110+
| TypeformFilesResponse['output']
111+
| TypeformInsightsData
177112
}

apps/sim/tools/whatsapp/send_message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { createLogger } from '@/lib/logs/console-logger'
22
import type { ToolConfig } from '../types'
3-
import type { WhatsAppResponse } from './types'
3+
import type { WhatsAppResponse, WhatsAppSendMessageParams } from './types'
44

55
const logger = createLogger('WhatsAppSendMessageTool')
66

7-
export const sendMessageTool: ToolConfig<any, WhatsAppResponse> = {
7+
export const sendMessageTool: ToolConfig<WhatsAppSendMessageParams, WhatsAppResponse> = {
88
id: 'whatsapp_send_message',
99
name: 'WhatsApp',
1010
description: 'Send WhatsApp messages',

apps/sim/tools/whatsapp/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import type { ToolResponse } from '../types'
22

3+
export interface WhatsAppSendMessageParams {
4+
phoneNumber: string
5+
message: string
6+
phoneNumberId: string
7+
accessToken: string
8+
}
9+
310
export interface WhatsAppResponse extends ToolResponse {
411
output: {
512
success: boolean

0 commit comments

Comments
 (0)