Skip to content

Commit c395390

Browse files
committed
moved types to types file
1 parent c5d8d5a commit c395390

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+375
-468
lines changed

apps/sim/blocks/blocks/agent.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { beforeEach, describe, expect, it, vi } from 'vitest'
2-
import { AgentBlock } from './agent'
2+
import { AgentBlock } from '@/blocks/blocks/agent'
33

44
vi.mock('@/blocks', () => ({
55
getAllBlocks: vi.fn(() => [

apps/sim/blocks/blocks/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { AgentIcon } from '@/components/icons'
22
import { isHosted } from '@/lib/environment'
33
import { createLogger } from '@/lib/logs/console-logger'
4+
import type { BlockConfig } from '@/blocks/types'
45
import {
56
getAllModelProviders,
67
getBaseModelProviders,
@@ -13,7 +14,6 @@ import {
1314
} from '@/providers/utils'
1415
import { useOllamaStore } from '@/stores/ollama/store'
1516
import type { ToolResponse } from '@/tools/types'
16-
import type { BlockConfig } from '../types'
1717

1818
const logger = createLogger('AgentBlock')
1919

apps/sim/blocks/blocks/airtable.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
import { AirtableIcon } from '@/components/icons'
2-
import type {
3-
AirtableCreateResponse,
4-
AirtableGetResponse,
5-
AirtableListResponse,
6-
AirtableUpdateMultipleResponse,
7-
AirtableUpdateResponse,
8-
} from '@/tools/airtable/types'
9-
import type { BlockConfig } from '../types'
10-
11-
type AirtableResponse =
12-
| AirtableListResponse
13-
| AirtableGetResponse
14-
| AirtableCreateResponse
15-
| AirtableUpdateResponse
16-
| AirtableUpdateMultipleResponse
2+
import type { BlockConfig } from '@/blocks/types'
3+
import type { AirtableResponse } from '@/tools/airtable/types'
174

185
export const AirtableBlock: BlockConfig<AirtableResponse> = {
196
type: 'airtable',

apps/sim/blocks/blocks/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ApiIcon } from '@/components/icons'
2+
import type { BlockConfig } from '@/blocks/types'
23
import type { RequestResponse } from '@/tools/http/types'
3-
import type { BlockConfig } from '../types'
44

55
export const ApiBlock: BlockConfig<RequestResponse> = {
66
type: 'api',

apps/sim/blocks/blocks/browser_use.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import { BrowserUseIcon } from '@/components/icons'
2-
import type { ToolResponse } from '@/tools/types'
3-
import type { BlockConfig } from '../types'
4-
5-
interface BrowserUseResponse extends ToolResponse {
6-
output: {
7-
id: string
8-
success: boolean
9-
output: any
10-
steps: any[]
11-
}
12-
}
2+
import type { BlockConfig } from '@/blocks/types'
3+
import type { BrowserUseResponse } from '@/tools/browser_use/types'
134

145
export const BrowserUseBlock: BlockConfig<BrowserUseResponse> = {
156
type: 'browser_use',

apps/sim/blocks/blocks/clay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ClayIcon } from '@/components/icons'
2+
import type { BlockConfig } from '@/blocks/types'
23
import type { ClayPopulateResponse } from '@/tools/clay/types'
3-
import type { BlockConfig } from '../types'
44

55
export const ClayBlock: BlockConfig<ClayPopulateResponse> = {
66
type: 'clay',

apps/sim/blocks/blocks/condition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ConditionalIcon } from '@/components/icons'
2-
import type { BlockConfig } from '../types'
2+
import type { BlockConfig } from '@/blocks/types'
33

44
interface ConditionBlockOutput {
55
success: boolean

apps/sim/blocks/blocks/confluence.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { ConfluenceIcon } from '@/components/icons'
2-
import type { ConfluenceRetrieveResponse, ConfluenceUpdateResponse } from '@/tools/confluence/types'
3-
import type { BlockConfig } from '../types'
4-
5-
type ConfluenceResponse = ConfluenceRetrieveResponse | ConfluenceUpdateResponse
2+
import type { BlockConfig } from '@/blocks/types'
3+
import type { ConfluenceResponse } from '@/tools/confluence/types'
64

75
export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
86
type: 'confluence',

apps/sim/blocks/blocks/discord.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DiscordIcon } from '@/components/icons'
2+
import type { BlockConfig } from '@/blocks/types'
23
import type { DiscordResponse } from '@/tools/discord/types'
3-
import type { BlockConfig } from '../types'
44

55
export const DiscordBlock: BlockConfig<DiscordResponse> = {
66
type: 'discord',

apps/sim/blocks/blocks/elevenlabs.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import { ElevenLabsIcon } from '@/components/icons'
2-
import type { ToolResponse } from '@/tools/types'
3-
import type { BlockConfig } from '../types'
4-
5-
interface ElevenLabsBlockResponse extends ToolResponse {
6-
output: {
7-
audioUrl: string
8-
}
9-
}
2+
import type { BlockConfig } from '@/blocks/types'
3+
import type { ElevenLabsBlockResponse } from '@/tools/elevenlabs/types'
104

115
export const ElevenLabsBlock: BlockConfig<ElevenLabsBlockResponse> = {
126
type: 'elevenlabs',

0 commit comments

Comments
 (0)