Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions apps/docs/openapi-v2-knowledge.json
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,6 @@
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"$ref": "#/components/responses/Conflict"
},
"413": {
"description": "The uploaded file exceeds the 100 MB limit, or the workspace storage limit has been reached.",
"content": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ describe('Knowledge Connector By ID API Route', () => {
success: true,
userId: 'user-1',
})
mockCheckWriteAccess.mockResolvedValue({ hasAccess: true })
mockCheckWriteAccess.mockResolvedValue({
hasAccess: true,
knowledgeBase: { workspaceId: 'ws-1', name: 'Test KB' },
})
dbChainMockFns.limit.mockResolvedValueOnce([])

const req = createMockRequest('PATCH', { sourceConfig: { project: 'NEW' } })
Expand All @@ -174,7 +177,8 @@ describe('Knowledge Connector By ID API Route', () => {
mockHasWorkspaceLiveSyncAccess.mockResolvedValue(true)

const updatedConnector = { id: 'conn-456', status: 'paused', syncIntervalMinutes: 5 }
dbChainMockFns.limit.mockResolvedValueOnce([updatedConnector])
dbChainMockFns.limit.mockResolvedValueOnce([{ id: 'conn-456', connectorType: 'jira' }])
dbChainMockFns.returning.mockResolvedValueOnce([updatedConnector])

const req = createMockRequest('PATCH', { status: 'paused', syncIntervalMinutes: 5 })
const response = await PATCH(req, { params: mockParams })
Expand All @@ -196,6 +200,7 @@ describe('Knowledge Connector By ID API Route', () => {
knowledgeBase: { workspaceId: 'ws-free', name: 'Free KB' },
})
mockHasWorkspaceLiveSyncAccess.mockResolvedValue(false)
dbChainMockFns.limit.mockResolvedValueOnce([{ id: 'conn-456', connectorType: 'jira' }])

const req = createMockRequest('PATCH', { syncIntervalMinutes: 5 })
const response = await PATCH(req, { params: mockParams })
Expand Down
Loading
Loading