Skip to content

Commit 4d0a523

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(netsuite): align auth and paging contracts
1 parent 2550690 commit 4d0a523

34 files changed

Lines changed: 227 additions & 89 deletions

apps/docs/content/docs/en/integrations/netsuite.mdx

Lines changed: 33 additions & 33 deletions
Large diffs are not rendered by default.

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ describe('Oracle NetSuite block', () => {
7474
for (const field of ['accountId', 'clientId', 'certificateId', 'privateKey']) {
7575
expect(getSubBlock(field).required, field).toBe(true)
7676
}
77-
expect(getSubBlock('privateKey')).toMatchObject({ type: 'long-input', password: true })
77+
expect(getSubBlock('privateKey')).toMatchObject({
78+
title: 'RSA or EC Private Key',
79+
type: 'long-input',
80+
password: true,
81+
})
7882
expect(NetSuiteBlock.inputs).toMatchObject({
7983
accountId: { type: 'string' },
8084
clientId: { type: 'string' },

apps/sim/blocks/blocks/netsuite.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export const NetSuiteBlock: BlockConfig<NetSuiteResponse> = {
367367
},
368368
{
369369
id: 'privateKey',
370-
title: 'RSA Private Key (3072/4096-bit)',
370+
title: 'RSA or EC Private Key',
371371
type: 'long-input',
372372
placeholder: '-----BEGIN PRIVATE KEY-----',
373373
password: true,
@@ -657,7 +657,7 @@ Return ONLY the SuiteQL query - no explanations, no markdown, no extra text.`,
657657
id: 'offset',
658658
title: 'Offset',
659659
type: 'short-input',
660-
placeholder: '0 (must be divisible by limit)',
660+
placeholder: '0 (multiple of limit; first 1000 pages)',
661661
condition: { field: 'operation', value: PAGING_OPERATIONS },
662662
mode: 'advanced',
663663
},
@@ -797,7 +797,7 @@ Return ONLY the comma-separated sublist IDs - no explanations, no extra text.`,
797797
certificateId: { type: 'string', description: 'OAuth 2.0 client certificate ID' },
798798
privateKey: {
799799
type: 'string',
800-
description: '3072- or 4096-bit RSA PEM private key for the certificate',
800+
description: 'Oracle-supported RSA or EC PEM private key for the certificate',
801801
},
802802
recordType: { type: 'string', description: 'REST record type script ID' },
803803
recordId: { type: 'string', description: 'Internal or external record ID' },
@@ -820,7 +820,10 @@ Return ONLY the comma-separated sublist IDs - no explanations, no extra text.`,
820820
view: { type: 'string', description: 'Task-list or task-status view' },
821821
taskId: { type: 'string', description: 'Asynchronous task ID' },
822822
limit: { type: 'number', description: 'Page size (1-1000)' },
823-
offset: { type: 'number', description: 'Page offset divisible by limit' },
823+
offset: {
824+
type: 'number',
825+
description: 'Page offset divisible by limit and within the first 1000 pages',
826+
},
824827
expand: { type: 'string', description: 'Resources to expand' },
825828
expandSubResources: { type: 'boolean', description: 'Expand sublists and subrecords' },
826829
replace: { type: 'string', description: 'Sublists replaced during update or upsert' },
@@ -864,7 +867,7 @@ export const NetSuiteBlockMeta = {
864867
icon: NetSuiteIcon,
865868
title: 'Process NetSuite sales orders',
866869
prompt:
867-
'Create a workflow that looks up an approved NetSuite sales order, validates its lines, transforms it into an item fulfillment, and reports the resulting record location.',
870+
'Create a workflow that looks up an approved NetSuite sales order, validates its lines, transforms it into an item fulfillment, and reports the completed transformation status.',
868871
modules: ['workflows'],
869872
category: 'operations',
870873
tags: ['automation', 'order-management'],
@@ -927,7 +930,7 @@ export const NetSuiteBlockMeta = {
927930
description:
928931
'Use account metadata to prepare safe create, update, upsert, and transform bodies.',
929932
content:
930-
'# Change NetSuite Records with Metadata\n\n## Steps\n\n1. Get Record Metadata for the target record type, using JSON Schema when field structure is needed.\n2. Construct only the documented fields required for the requested change.\n3. Prefer Upsert Record with a stable external ID for synchronization.\n4. Use Update Record for known internal IDs and include Replace Sublists only when replacement is intentional.\n\n## Output\n\nReport the HTTP status and Location returned by NetSuite.',
933+
'# Change NetSuite Records with Metadata\n\n## Steps\n\n1. Get Record Metadata for the target record type, using JSON Schema when field structure is needed.\n2. Construct only the documented fields required for the requested change.\n3. Prefer Upsert Record with a stable external ID for synchronization.\n4. Use Update Record for known internal IDs and include Replace Sublists only when replacement is intentional.\n\n## Output\n\nReport the HTTP status. Include Location for create and update when returned; retain the external ID for upserts and the source and target record context for transforms.',
931934
},
932935
{
933936
name: 'query-netsuite-financial-data',
@@ -937,9 +940,9 @@ export const NetSuiteBlockMeta = {
937940
},
938941
{
939942
name: 'synchronize-netsuite-records-in-batches',
940-
description: 'Submit simple, retry-safe asynchronous record batches.',
943+
description: 'Submit independent asynchronous record batches with idempotency keys.',
941944
content:
942-
'# Synchronize NetSuite Records in Batches\n\n## Steps\n\n1. Group records by one NetSuite record type and operation.\n2. Validate each record against NetSuite metadata and split input into batches of at most 100.\n3. Use an idempotency key unique to each batch.\n4. Submit the matching Batch Create, Update, Upsert, Get, or Delete operation.\n\n## Output\n\nPreserve the returned Location and job ID for monitoring.',
945+
'# Synchronize NetSuite Records in Batches\n\n## Steps\n\n1. Group only independent records by one NetSuite record type and operation.\n2. Validate each record against NetSuite metadata and split input into batches of at most 100.\n3. Use an idempotency key unique to each batch.\n4. Submit the matching Batch Create, Update, Upsert, Get, or Delete operation.\n\n## Output\n\nPreserve the returned Location and job ID, inspect every task result, and report failures separately; do not treat submission as all-or-none success.',
943946
},
944947
{
945948
name: 'monitor-netsuite-async-jobs',

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/netsuite/attach_record.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const netsuiteAttachRecordTool: ToolConfig<NetSuiteAttachParams, NetSuite
3636
required: true,
3737
visibility: 'user-only',
3838
description:
39-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
39+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
4040
},
4141
recordType: {
4242
type: 'string',

apps/sim/tools/netsuite/batch_create_records.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const netsuiteBatchCreateRecordsTool: ToolConfig<
3434
required: true,
3535
visibility: 'user-only',
3636
description:
37-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
37+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
3838
},
3939
recordType: {
4040
type: 'string',

apps/sim/tools/netsuite/batch_delete_records.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const netsuiteBatchDeleteRecordsTool: ToolConfig<
3434
required: true,
3535
visibility: 'user-only',
3636
description:
37-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
37+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
3838
},
3939
recordType: {
4040
type: 'string',

apps/sim/tools/netsuite/batch_get_records.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const netsuiteBatchGetRecordsTool: ToolConfig<NetSuiteBatchGetParams, Net
3636
required: true,
3737
visibility: 'user-only',
3838
description:
39-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
39+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
4040
},
4141
recordType: {
4242
type: 'string',

apps/sim/tools/netsuite/batch_update_records.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const netsuiteBatchUpdateRecordsTool: ToolConfig<
3434
required: true,
3535
visibility: 'user-only',
3636
description:
37-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
37+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
3838
},
3939
recordType: {
4040
type: 'string',

apps/sim/tools/netsuite/batch_upsert_records.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const netsuiteBatchUpsertRecordsTool: ToolConfig<
3535
required: true,
3636
visibility: 'user-only',
3737
description:
38-
'3072- or 4096-bit RSA PEM private key matching the certificate uploaded to NetSuite',
38+
'Oracle-supported RSA (3072/4096-bit) or EC (P-256/P-384/P-521) PEM private key matching the certificate uploaded to NetSuite',
3939
},
4040
recordType: {
4141
type: 'string',

0 commit comments

Comments
 (0)