Skip to content

Commit 20a21ba

Browse files
committed
chore(tools): drop the orphaned wire-payload type and delegation-mint test vestiges
1 parent 1d40891 commit 20a21ba

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎apps/sim/tools/index.test.ts‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const {
5757
mockRunWorkflowTool,
5858
mockReadAvailableCustomToolByIdOrTitleAsCopilot,
5959
mockReadAvailableCustomToolByIdOrTitleAsExecutor,
60-
mockGenerateInternalDelegationToken,
6160
mockGenerateInternalToken,
6261
mockResolveWorkspaceFileReference,
6362
mockAssertPermissionsAllowed,
@@ -78,7 +77,6 @@ const {
7877
mockRunWorkflowTool: vi.fn(),
7978
mockReadAvailableCustomToolByIdOrTitleAsCopilot: vi.fn(),
8079
mockReadAvailableCustomToolByIdOrTitleAsExecutor: vi.fn(),
81-
mockGenerateInternalDelegationToken: vi.fn(),
8280
mockGenerateInternalToken: vi.fn(),
8381
mockResolveWorkspaceFileReference: vi.fn(),
8482
mockAssertPermissionsAllowed: vi.fn(),
@@ -98,8 +96,6 @@ vi.mock('@/lib/api-key/byok', () => ({
9896
}))
9997

10098
vi.mock('@/lib/auth/internal', () => ({
101-
generateInternalDelegationToken: (...args: unknown[]) =>
102-
mockGenerateInternalDelegationToken(...args),
10399
generateInternalToken: (...args: unknown[]) => mockGenerateInternalToken(...args),
104100
}))
105101

@@ -474,7 +470,6 @@ vi.spyOn(getQueryClientModule, 'getQueryClient').mockImplementation(createMockQu
474470
beforeEach(() => {
475471
vi.spyOn(getQueryClientModule, 'getQueryClient').mockImplementation(createMockQueryClient)
476472
mockAssertPermissionsAllowed.mockResolvedValue(undefined)
477-
mockGenerateInternalDelegationToken.mockResolvedValue('executor-token')
478473
mockRunWorkflowTool.mockResolvedValue({ success: true, output: {} })
479474
mockGetInternalToolOperationHandler.mockResolvedValue(mockExecuteInternalToolOperation)
480475
mockExecuteInternalToolOperation.mockImplementation(async (request: InternalToolOperationCall) =>
@@ -4478,7 +4473,6 @@ describe('Managed OAuth Credential Delegation', () => {
44784473
})
44794474

44804475
it('fails before transport when managed credential delegation lacks current workflow authority', async () => {
4481-
mockGenerateInternalDelegationToken.mockClear()
44824476
mockResolveExecutorCredentialToken.mockRejectedValueOnce(
44834477
new Error('Managed credential delegation is missing current workflow authority')
44844478
)
@@ -4516,7 +4510,6 @@ describe('Managed OAuth Credential Delegation', () => {
45164510
success: false,
45174511
error: 'Managed credential delegation is missing current workflow authority',
45184512
})
4519-
expect(mockGenerateInternalDelegationToken).not.toHaveBeenCalled()
45204513
expect(fetchMock).not.toHaveBeenCalled()
45214514
})
45224515
})

‎apps/sim/tools/types.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,6 @@ export interface TableRow {
299299
}
300300
}
301301

302-
export interface OAuthTokenPayload {
303-
credentialId?: string
304-
credentialAccountUserId?: string
305-
providerId?: string
306-
toolId?: string
307-
workflowId?: string
308-
impersonateEmail?: string
309-
scopes?: string[]
310-
}
311-
312302
/**
313303
* File data that tools can return for file-typed outputs
314304
*/

0 commit comments

Comments
 (0)