MCPcopy
hub / github.com/simstudioai/sim / clearCredentialRefs

Function clearCredentialRefs

apps/sim/lib/credentials/deletion.ts:81–94  ·  view source on GitHub ↗
(
  credentialId: string,
  workspaceId: string
)

Source from the content-addressed store, hash-verified

79 * fail fast at the affected block instead of with "credential not found".
80 */
81export async function clearCredentialRefs(
82 credentialId: string,
83 workspaceId: string
84): Promise<void> {
85 const needle = `%${credentialId}%`
86
87 await Promise.all([
88 clearInWorkflowBlocks(credentialId, workspaceId, needle),
89 clearInDeploymentVersions(credentialId, workspaceId, needle),
90 clearInPausedExecutions(credentialId, workspaceId, needle),
91 clearInWorkflowCheckpoints(credentialId, workspaceId, needle),
92 clearInKnowledgeConnectors(credentialId),
93 ])
94}
95
96async function clearInWorkflowBlocks(
97 credentialId: string,

Callers 1

deleteCredentialFunction · 0.85

Calls 5

clearInWorkflowBlocksFunction · 0.85
clearInPausedExecutionsFunction · 0.85

Tested by

no test coverage detected