Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/docs/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10081,6 +10081,17 @@ export function OtterIcon(props: SVGProps<SVGSVGElement>) {
)
}

export function PlaneIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 85 52' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M44.322 2.926C44.322 0.755 46.608 -0.658 48.551 0.313L80.455 16.265C82.929 17.502 84.492 20.032 84.492 22.799V48.249C84.492 50.42 82.207 51.833 80.265 50.862L62.328 41.893V22.797C62.328 20.031 60.765 17.502 58.291 16.264L44.322 9.28V2.926ZM0 2.925C0 0.754 2.286 -0.659 4.229 0.312L22.158 9.277V28.377C22.158 31.143 23.721 33.672 26.195 34.909L40.17 41.895V48.249C40.17 50.42 37.885 51.832 35.942 50.861L4.037 34.909C1.563 33.672 0 31.143 0 28.377V2.925ZM22.158 2.925C22.158 0.754 24.444 -0.659 26.387 0.312L44.322 9.28V28.378C44.322 31.144 45.886 33.673 48.36 34.91L62.328 41.893V48.249C62.328 50.42 60.043 51.832 58.101 50.861L40.17 41.895V22.797C40.17 20.031 38.607 17.502 36.133 16.264L22.158 9.277V2.925Z'
fill='currentColor'
/>
</svg>
)
}

export function PlanetScaleIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 454 454' fill='none' xmlns='http://www.w3.org/2000/svg'>
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/components/ui/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ import {
PineconeIcon,
PipedriveIcon,
PitchBookIcon,
PlaneIcon,
PlanetScaleIcon,
PolymarketIcon,
PostgresIcon,
Expand Down Expand Up @@ -558,6 +559,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
pinecone: PineconeIcon,
pipedrive: PipedriveIcon,
pitchbook: PitchBookIcon,
plane: PlaneIcon,
planetscale: PlanetScaleIcon,
polymarket: PolymarketIcon,
postgresql: PostgresIcon,
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/integrations/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
"pipedrive",
"pipedrive-service-account",
"pitchbook",
"plane",
"planetscale",
"polymarket",
"postgresql",
Expand Down
781 changes: 781 additions & 0 deletions apps/docs/content/docs/integrations/plane.mdx

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions apps/sim/blocks/blocks/plane.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* @vitest-environment node
*/
import { describe, expect, it } from 'vitest'
import { PlaneBlock } from '@/blocks/blocks/plane'

const params = (input: Record<string, unknown>) => PlaneBlock.tools.config.params?.(input) ?? {}

describe('PlaneBlock params', () => {
it('passes fields named after tool params through unchanged, from the canvas or an agent', () => {
expect(
params({ operation: 'plane_get_work_item_by_identifier', identifier: 'ENG-42' })
).toMatchObject({ identifier: 'ENG-42' })
expect(params({ operation: 'plane_create_project', identifier: 'ENG' })).toMatchObject({
identifier: 'ENG',
})
expect(
params({ operation: 'plane_create_project', projectIdentifier: 'OPS', identifier: 'ENG' })
).toMatchObject({ identifier: 'OPS' })
expect(
params({ operation: 'plane_create_project', projectIdentifier: '', identifier: 'ENG' })
).toMatchObject({ identifier: 'ENG' })
expect(
params({
operation: 'plane_get_work_item_by_identifier',
identifier: 'ENG-1',
projectIdentifier: 'OPS',
})
).toMatchObject({ identifier: 'ENG-1' })
expect(
params({ operation: 'plane_create_link', url: 'https://x.dev', title: 'X' })
).toMatchObject({ url: 'https://x.dev', title: 'X' })
expect(params({ operation: 'plane_create_label', parentId: 'label-1' })).toMatchObject({
parentId: 'label-1',
})
})

it('turns comma-separated and array ID lists into arrays and numbers into numbers', () => {
expect(
params({
operation: 'plane_update_work_item',
assigneeIds: 'user-1, user-2',
labelIds: ['label-1'],
perPage: '25',
})
).toMatchObject({ assigneeIds: ['user-1', 'user-2'], labelIds: ['label-1'], perPage: 25 })
expect(
params({ operation: 'plane_add_work_items_to_cycle', workItemIds: '["a","b"]' })
).toMatchObject({ workItemIds: ['a', 'b'] })
})

it('requires a file for uploads', () => {
expect(() => params({ operation: 'plane_upload_attachment' })).toThrow(
'A file is required to upload an attachment.'
)
})
})
Loading
Loading