Skip to content

Reporting command implementation(Audit, Action and Password).#180

Merged
ukumar-ks merged 6 commits into
feature-reporting-commandsfrom
feature-reporting-commands-int-v1
Jul 1, 2026
Merged

Reporting command implementation(Audit, Action and Password).#180
ukumar-ks merged 6 commits into
feature-reporting-commandsfrom
feature-reporting-commands-int-v1

Conversation

@ukumar-ks

Copy link
Copy Markdown
Contributor

No description provided.

@ukumar-ks ukumar-ks changed the title Reporting command implementaion(Audit, Action and Password). Reporting command implementation(Audit, Action and Password). Jun 25, 2026
Comment thread KeeperSdk/src/enterpriseReport/auditReport.ts
Comment thread KeeperSdk/src/enterpriseReport/auditReport.ts
daysSince,
applyAction,
dryRun,
force,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

force option is defined but never implemented

occurrences?: number
first_created?: number | string
last_created?: number | string
[key: string]: string | number | boolean | undefined

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index signature weakens type safety for known fields. Consider Record<string, unknown> for extras or a separate raw bag.

if (policy.digits > 0) parts.push(`digits >= ${policy.digits}`)
if (policy.special > 0) parts.push(`special >= ${policy.special}`)
return parts.join(', ')
}

@sali-ks sali-ks Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor this

export function buildPasswordPolicySummary(policy: PasswordPolicy): string {
    return POLICY_SUMMARY_LABELS.filter(({ key }) => policy[key] > 0)
        .map(({ key, label }) => `${label} >= ${policy[key]}`)
        .join(', ')
}

@sali-ks sali-ks Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

declare POLICY_SUMMARY_LABELS like

const POLICY_SUMMARY_LABELS: ReadonlyArray<{ key: keyof PasswordPolicy; label: string }> = [
    { key: 'length', label: 'length' },
    { key: 'lower', label: 'lowercase' },
    { key: 'upper', label: 'uppercase' },
    { key: 'digits', label: 'digits' },
    { key: 'special', label: 'special' },
]

Comment thread KeeperSdk/src/enterpriseReport/passwordReport.ts
@ukumar-ks ukumar-ks merged commit d96a43f into feature-reporting-commands Jul 1, 2026
3 checks passed
@ukumar-ks ukumar-ks deleted the feature-reporting-commands-int-v1 branch July 2, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants