Files
sim/apps/sim/tools/box_sign/resend_request.ts
Waleed Latif c893ec7d89 feat(box): add Box and Box Sign integrations
Add complete Box integration with file management (upload, download, get info, list folders, create/delete folders, copy, search, update metadata) and Box Sign e-signature support (create/get/list/cancel/resend sign requests). Includes OAuth provider setup, internal upload API route following the Dropbox pattern, block configurations, icon, and generated docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 22:09:39 -07:00

56 lines
1.4 KiB
TypeScript

import type { ToolConfig, ToolResponse } from '@/tools/types'
import type { BoxSignResendRequestParams } from './types'
export const boxSignResendRequestTool: ToolConfig<BoxSignResendRequestParams, ToolResponse> = {
id: 'box_sign_resend_request',
name: 'Box Sign Resend Request',
description: 'Resend a Box Sign request to signers who have not yet signed',
version: '1.0.0',
oauth: {
required: true,
provider: 'box',
},
params: {
accessToken: {
type: 'string',
required: true,
visibility: 'hidden',
description: 'OAuth access token for Box API',
},
signRequestId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The ID of the sign request to resend',
},
},
request: {
url: (params) => `https://api.box.com/2.0/sign_requests/${params.signRequestId}/resend`,
method: 'POST',
headers: (params) => ({
Authorization: `Bearer ${params.accessToken}`,
}),
},
transformResponse: async (response) => {
if (!response.ok) {
const data = await response.json()
throw new Error(data.message || `Box Sign API error: ${response.status}`)
}
return {
success: true,
output: {
message: 'Sign request resent successfully',
},
}
},
outputs: {
message: { type: 'string', description: 'Success confirmation message' },
},
}