MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveEffectiveRetentionHours

Function resolveEffectiveRetentionHours

apps/sim/lib/billing/retention.ts:112–123  ·  view source on GitHub ↗
(params: {
  orgSettings: DataRetentionSettings | null | undefined
  workspaceId: string
  key: RetentionHoursKey
})

Source from the content-addressed store, hash-verified

110 * nothing is configured (the dispatcher treats `null` as "skip").
111 */
112export function resolveEffectiveRetentionHours(params: {
113 orgSettings: DataRetentionSettings | null | undefined
114 workspaceId: string
115 key: RetentionHoursKey
116}): number | null {
117 const override = params.orgSettings?.retentionOverrides?.find(
118 (o) => o?.workspaceId === params.workspaceId
119 )
120 const overrideValue = override?.[params.key]
121 if (overrideValue !== undefined) return overrideValue
122 return params.orgSettings?.[params.key] ?? null
123}

Callers 2

retention.test.tsFile · 0.90
forEachCleanupChunkFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected