Skip to content

Commit 6a3b51d

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(netsuite): separate async task block inputs
1 parent 993cfed commit 6a3b51d

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

apps/sim/blocks/blocks/netsuite.test.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,13 @@ describe('Oracle NetSuite block', () => {
128128
})
129129
}
130130
expect(getSubBlock('statusTaskId')).toMatchObject({
131-
canonicalParamId: 'taskId',
132131
required: {
133132
field: 'operation',
134133
value: 'netsuite_get_async_status',
135134
and: { field: 'view', value: 'task' },
136135
},
137136
})
138137
expect(getSubBlock('resultTaskId')).toMatchObject({
139-
canonicalParamId: 'taskId',
140138
required: {
141139
field: 'operation',
142140
value: 'netsuite_get_async_result',
@@ -214,6 +212,9 @@ describe('Oracle NetSuite block', () => {
214212
expect(
215213
mapParams({ operation: 'netsuite_get_async_status', statusTaskId: 'task-7' })
216214
).toMatchObject({ taskId: 'task-7' })
215+
expect(
216+
mapParams({ operation: 'netsuite_get_async_result', resultTaskId: 'task-8' })
217+
).toMatchObject({ taskId: 'task-8' })
217218
expect(
218219
mapParams({
219220
operation: 'netsuite_attach_record',
@@ -253,7 +254,8 @@ describe('Oracle NetSuite block', () => {
253254
'datasetId',
254255
'jobId',
255256
'view',
256-
'taskId',
257+
'statusTaskId',
258+
'resultTaskId',
257259
'limit',
258260
'offset',
259261
'expand',
@@ -287,14 +289,10 @@ describe('Oracle NetSuite block', () => {
287289
],
288290
})
289291
for (const input of expectedInputs) {
290-
if (input !== 'operation' && input !== 'taskId')
291-
expect(getSubBlock(input), input).toBeDefined()
292+
if (input !== 'operation') expect(getSubBlock(input), input).toBeDefined()
292293
}
293-
expect(
294-
NetSuiteBlock.subBlocks
295-
.filter((subBlock) => subBlock.canonicalParamId === 'taskId')
296-
.map((subBlock) => subBlock.id)
297-
).toEqual(['statusTaskId', 'resultTaskId'])
294+
expect(getSubBlock('statusTaskId')).not.toHaveProperty('canonicalParamId')
295+
expect(getSubBlock('resultTaskId')).not.toHaveProperty('canonicalParamId')
298296
expect(getSubBlock('view')).toMatchObject({
299297
type: 'dropdown',
300298
condition: { field: 'operation', value: 'netsuite_get_async_status' },

apps/sim/blocks/blocks/netsuite.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,6 @@ Return ONLY the SuiteQL query - no explanations, no markdown, no extra text.`,
621621
},
622622
{
623623
id: 'statusTaskId',
624-
canonicalParamId: 'taskId',
625624
title: 'Async Task ID',
626625
type: 'short-input',
627626
placeholder: 'Task ID returned by List Tasks',
@@ -638,7 +637,6 @@ Return ONLY the SuiteQL query - no explanations, no markdown, no extra text.`,
638637
},
639638
{
640639
id: 'resultTaskId',
641-
canonicalParamId: 'taskId',
642640
title: 'Async Task ID',
643641
type: 'short-input',
644642
placeholder: 'Completed task ID',
@@ -818,7 +816,8 @@ Return ONLY the comma-separated sublist IDs - no explanations, no extra text.`,
818816
datasetId: { type: 'string', description: 'SuiteAnalytics dataset script ID' },
819817
jobId: { type: 'string', description: 'Asynchronous job ID' },
820818
view: { type: 'string', description: 'Task-list or task-status view' },
821-
taskId: { type: 'string', description: 'Asynchronous task ID' },
819+
statusTaskId: { type: 'string', description: 'Task ID for async status lookup' },
820+
resultTaskId: { type: 'string', description: 'Task ID for async result retrieval' },
822821
limit: { type: 'number', description: 'Page size (1-1000)' },
823822
offset: {
824823
type: 'number',

0 commit comments

Comments
 (0)