Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
abb64b8
feat(oracle-fusion): add shared integration foundation
BillLeoutsakosvl346 Sep 3, 2026
a7ae174
fix(oracle-fusion): harden numeric and origin parsing
BillLeoutsakosvl346 Sep 3, 2026
7b669e7
fix(oracle-fusion): handle large integral exponents
BillLeoutsakosvl346 Sep 3, 2026
b0d41e7
fix(oracle-fusion): classify rejected redirects
BillLeoutsakosvl346 Sep 3, 2026
623fc6e
fix(credentials): enforce service-account provider and kind centrally
Sep 4, 2026
a63a436
refactor(oracle-fusion): stabilize addressing and protocol primitives
Sep 4, 2026
c8c83c8
feat(oracle-fusion): add bounded JSON mutations
Sep 4, 2026
584f770
fix(credentials): reuse trusted tool policy during resolution
Sep 4, 2026
4600846
fix(oracle-fusion): close validation edge cases
Sep 4, 2026
0431a39
fix(oracle-fusion): preserve validated protocol values
Sep 4, 2026
fc2d2ea
fix(oracle-fusion): harden response invariants
Sep 4, 2026
4d644af
fix(oracle-fusion): validate continuing page totals
Sep 4, 2026
a9659a7
fix(oracle-fusion): preserve self-link key whitespace
Sep 4, 2026
5027685
revert(credentials): defer platform-wide provider enforcement
Sep 4, 2026
23032c2
refactor(oracle-fusion): narrow shared infrastructure footprint
Sep 4, 2026
631cbab
fix(oracle-fusion): support framework-v9 self links
Sep 5, 2026
29d3eee
feat(oracle-fusion): serialize exact integer request values
Sep 5, 2026
15294a2
fix(oracle-fusion): treat collection totals as estimates
Sep 5, 2026
35e9b5d
feat: add Oracle Fusion Project Management integration
Sep 5, 2026
83b3f4b
fix: tighten Oracle Project Management contracts and editor behavior
Sep 5, 2026
368f1b2
fix: correct Oracle editor guidance and focused test fixtures
Sep 5, 2026
6aad3a2
chore: apply GitHub formatting diagnostics for Oracle integration
Sep 5, 2026
fa2c473
test: assert Oracle block serialization without cloning
Sep 5, 2026
0030a36
Merge staging into Oracle Fusion foundation
Oct 3, 2026
6bc1422
fix(oracle-fusion): use shared record utility in request serializer
Oct 3, 2026
041d99a
Merge feat/oracle-fusion-foundation and resolve PR #7518 conflicts
Oct 3, 2026
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
1 change: 1 addition & 0 deletions apps/docs/components/ui/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
onedrive: MicrosoftOneDriveIcon,
onepassword: OnePasswordIcon,
openai: OpenAIIcon,
oracle_fusion_project_management: NetSuiteIcon,
otter: OtterIcon,
outlook: OutlookIcon,
pagerduty: PagerDutyIcon,
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 @@ -188,6 +188,7 @@
"okta",
"onedrive",
"onepassword",
"oracle_fusion_project_management",
"otter",
"outlook",
"pagerduty",
Expand Down
1,291 changes: 1,291 additions & 0 deletions apps/docs/content/docs/integrations/oracle_fusion_project_management.mdx

Large diffs are not rendered by default.

247 changes: 247 additions & 0 deletions apps/sim/blocks/blocks/oracle_fusion_project_management.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
/** @vitest-environment node */
import { describe, expect, it } from 'vitest'
import { NetSuiteIcon } from '@/components/icons'
import { selectorManifest } from '@/lib/selectors/manifest'
import {
OracleFusionProjectManagementBlock as block,
OracleFusionProjectManagementBlockMeta as meta,
} from '@/blocks/blocks/oracle_fusion_project_management'

const prefix = 'oracle_fusion_project_management_'
const OPERATIONS = [
'list_projects',
'get_project',
'create_project',
'update_project',
'list_project_statuses',
'list_project_status_history',
'list_project_plans',
'get_project_plan',
'list_tasks',
'get_task',
'create_task',
'update_task',
'delete_task',
'list_milestones',
'create_milestone',
'list_task_status_history',
'list_deliverables',
'get_deliverable',
'create_deliverable',
'update_deliverable',
'delete_deliverable',
'list_deliverable_task_associations',
'get_deliverable_task_association',
'create_deliverable_task_association',
'update_deliverable_task_association',
'delete_deliverable_task_association',
'list_project_team_members',
'get_project_team_member',
'create_project_team_member',
'update_project_team_member',
'delete_project_team_member',
'list_task_labor_resource_assignments',
'get_task_labor_resource_assignment',
'create_task_labor_resource_assignment',
'update_task_labor_resource_assignment',
'delete_task_labor_resource_assignment',
'list_project_enterprise_resources',
'list_project_costs',
'get_project_cost',
'update_project_cost',
'adjust_project_cost',
'list_project_budgets',
'get_project_budget',
'create_project_budget',
'update_project_budget',
'delete_project_budget',
'adjust_project_budget',
'refresh_project_budget_rates',
'list_project_contract_invoices',
'get_project_contract_invoice',
'update_project_contract_invoice',
'delete_draft_project_contract_invoice',
'transition_project_contract_invoice',
] as const

function map(operation: string, params: Record<string, unknown> = {}) {
return block.tools.config!.params!({
operation: prefix + operation,
oauthCredential: 'credential-1',
...params,
})
}

describe('Oracle Project Management block', () => {
it('has the complete 53-operation surface, a read-first default, and the established Oracle icon', () => {
const operation = block.subBlocks.find((field) => field.id === 'operation')!
const options =
typeof operation.options === 'function' ? operation.options() : operation.options
expect(options?.map((option) => option.id)).toEqual(OPERATIONS.map((name) => prefix + name))
expect(operation.value?.({})).toBe(`${prefix}list_projects`)
expect(block.icon).toBe(NetSuiteIcon)
expect(meta.templates).toHaveLength(7)
expect(meta.skills).toHaveLength(3)
expect(new Set(block.subBlocks.map((field) => field.id)).size).toBe(block.subBlocks.length)
})

it.each(OPERATIONS)(
'routes %s before resolving numeric or structured workflow references',
(operation) => {
const toolId = block.tools.config!.tool!({
operation: prefix + operation,
projectId: '<project.ProjectId>',
limit: '<agent.limit>',
planningResources: '<agent.lines>',
})
expect(toolId).toBe(prefix + operation)
expect(block.tools.access).toContain(toolId)
expect(block.canvasPresentation?.sentences?.byOperation?.[prefix + operation]).toBeDefined()
}
)

it('rejects unsupported operations without attempting reference coercion', () => {
expect(() =>
block.tools.config!.tool!({ operation: 'arbitrary', limit: '<agent.limit>' })
).toThrow('Unsupported')
})

it.each([
['projectId', 'projects', ['credential']],
['taskId', 'tasks', ['credential', 'projectId']],
['organizationName', 'organizations', ['credential']],
['personEmail', 'resources', ['credential']],
['projectRole', 'roles', ['credential']],
['deliverableTypeId', 'deliverableTypes', ['credential']],
['assignmentId', 'laborAssignments', ['credential', 'projectId', 'taskId']],
] as const)(
'keeps %s basic/manual inputs canonical and dependency-bound',
(field, selector, dependencies) => {
const basic = block.subBlocks.find((input) => input.id === `${field}Selector`)!
const manual = block.subBlocks.find((input) => input.id === `${field}Manual`)!
expect(basic).toMatchObject({
type: 'project-selector',
canonicalParamId: field,
mode: 'basic',
selectorKey: `oracleFusionProjectManagement.${selector}`,
dependsOn: [...dependencies],
})
expect(manual).toMatchObject({
type: 'short-input',
canonicalParamId: field,
mode: 'advanced',
})
expect(basic.required).toEqual(manual.required)
expect(basic.condition).toEqual(manual.condition)
expect(block.inputs[field]).toBeDefined()
}
)

it('requires both project and task context for the task-assignment selector', () => {
expect(selectorManifest['oracleFusionProjectManagement.laborAssignments'].context).toEqual({
allowed: ['oauthCredential', 'projectId', 'taskId'],
readiness: { all: ['oauthCredential', 'projectId', 'taskId'] },
})
})

it('maps resolved canonical values without numeric ID coercion and clears stale inputs', () => {
const result = map('update_task', {
projectId: '999999999999999999',
taskId: '9007199254740993',
physicalPercentComplete: '50',
milestoneFlag: 'false',
projectName: 'stale',
invoiceId: 'stale',
})
expect(result).toMatchObject({
oauthCredential: 'credential-1',
projectId: '999999999999999999',
taskId: '9007199254740993',
physicalPercentComplete: 50,
milestoneFlag: false,
projectName: undefined,
invoiceId: undefined,
})
expect(JSON.stringify(result)).not.toContain('"invoiceId"')
expect(
map('update_project', { projectId: '101', projectDescription: null }).projectDescription
).toBeNull()
})

it('keeps task-assignment context out of updates and parses documented budget arrays after resolution', () => {
expect(
map('update_task_labor_resource_assignment', {
projectId: '101',
taskId: '202',
assignmentId: '707',
resourceEmail: 'a@example.test',
})
).toMatchObject({ taskId: undefined, assignmentId: '707', resourceEmail: 'a@example.test' })
const resources = [
{
RbsElementId: '999999999999999999',
TaskId: '202',
PlanningAmounts: [{ Currency: 'USD', Quantity: 2 }],
},
]
expect(
map('create_project_budget', { planningResources: JSON.stringify(resources) })
.planningResources
).toEqual(resources)
})

it('retains only action-specific invoice inputs when operations or transitions change', () => {
const result = map('transition_project_contract_invoice', {
invoiceId: '110',
action: 'approve',
invoiceDate: '2026-09-04',
unreleaseComments: 'stale',
receivablesNumber: 'stale',
})
expect(result).toMatchObject({
invoiceId: '110',
action: 'approve',
invoiceDate: undefined,
unreleaseComments: undefined,
receivablesNumber: undefined,
})
expect(
map('transition_project_contract_invoice', {
invoiceId: '110',
action: 'release',
invoiceDate: '2026-09-04',
}).invoiceDate
).toBe('2026-09-04')
})

it('keeps numeric IDs and task levels distinct from date/time input formats', () => {
for (const id of ['sourceTemplateId', 'parentTaskId', 'laborResourceId', 'taskLevel']) {
const field = block.subBlocks.find((input) => input.id === id)!
expect(field.wandConfig).toBeUndefined()
expect(field.description).not.toContain('ISO int')
expect(field.placeholder).not.toContain('2026-09-04T')
}
const plannedStart = block.subBlocks.find((input) => input.id === 'plannedStartDateTime')!
expect(plannedStart.wandConfig?.enabled).toBe(true)
expect(plannedStart.placeholder).toBe('2026-09-04T09:00:00Z')
})

it.each([
['invoiceDate', 'release'],
['unreleaseComments', 'unrelease'],
])('shows %s only for its transition or the ordinary invoice update', (id, action) => {
const field = block.subBlocks.find((input) => input.id === id)!
const condition = field.condition
expect(typeof condition).toBe('function')
if (typeof condition !== 'function') throw new Error('Expected action-aware condition')
expect(condition({ operation: `${prefix}transition_project_contract_invoice` })).toEqual({
field: 'operation',
value: `${prefix}transition_project_contract_invoice`,
and: { field: 'action', value: action },
})
expect(condition({ operation: `${prefix}update_project_contract_invoice` })).toEqual({
field: 'operation',
value: `${prefix}update_project_contract_invoice`,
})
})
})
Loading