npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/secret-rotation-types

v0.1.0

Published

Type definitions and abstract interfaces for Secret Rotation Kit

Readme

@reaatech/secret-rotation-types

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Type definitions, abstract interfaces, and error classes for Secret Rotation Kit. This package is the single source of truth for all shared types used throughout the @reaatech/secret-rotation-* ecosystem.

Installation

npm install @reaatech/secret-rotation-types
# or
pnpm add @reaatech/secret-rotation-types

Feature Overview

  • Core typesSecretKey, KeyStatus, RotationState, RotationEvent, and all event payloads
  • Verification typesConsumer, VerificationResult, RetryPolicy, VerificationOptions
  • Config typesRotationConfig, SchedulingConfig, VerificationConfig, KeyWindowConfig
  • Provider typesProviderConfig, AWSProviderConfig, GCPProviderConfig, VaultProviderConfig
  • Abstract interfacesSecretProvider, KeyStore, KeyGenerator, Logger, EventEmitter, PropagationVerifier, ConsumerRegistry
  • Error hierarchyRotationError, ProviderError, PropagationError, VerificationError, TimeoutError, ConfigurationError
  • Provider registryregisterProvider, createProvider, getRegisteredTypes for dynamic provider selection
  • Zero runtime dependencies — pure type definitions, lightweight and tree-shakeable

Quick Start

import type {
  SecretKey,
  KeyStatus,
  SecretProvider,
  RotationConfig,
} from '@reaatech/secret-rotation-types';

Exports

Core Types

| Export | Description | |--------|-------------| | KeyStatus | String union: "pending", "active", "expired", "revoked", "failed" | | KeyFormat | Encoding format: "base64", "hex", "pem", "raw" | | RotationStage | Workflow stage: "generation", "propagation", "verification", "activation", "revocation" | | SecretKey | Full key object: keyId, secretName, encryptedMaterial, format, validFrom, validUntil, status, timestamps, metadata | | ProviderState | Provider-specific version identifier states | | RotationState | Complete rotation snapshot per secret: active/pending/expired/revoked/failed keys | | RotationSession | In-progress provider rotation session |

Events

| Export | Description | |--------|-------------| | RotationEvent | Discriminated union of all event types | | KeyGeneratedEvent | Emitted when new key material is created | | KeyPropagatedEvent | Emitted when key is stored in the provider | | KeyVerifiedEvent | Emitted when propagation is confirmed | | KeyActivatedEvent | Emitted when new key becomes active | | KeyRevokedEvent | Emitted when old key is revoked | | RotationFailedEvent | Emitted on rotation failure with retry info |

Verification Types

| Export | Description | |--------|-------------| | Consumer | Registered consumer with endpoint, capabilities, and auth config | | ConsumerCapabilities | supportsVersionCheck, supportsHealthCheck, supportsCallback | | ConsumerAuthConfig | Auth type: "bearer", "mtls", "api-key" | | VerificationResult | Aggregated verification result with coverage ratio | | ConsumerVerificationResult | Per-consumer result with version and error info | | VerificationOptions | Timeout, coverage threshold, retry policy | | VerificationStatus | In-flight verification progress | | RetryPolicy | maxRetries, backoffMultiplier, initialDelayMs, maxDelayMs |

Config Types

| Export | Description | |--------|-------------| | RotationConfig | Top-level configuration assembling all sub-configs | | KeyGenerationConfig | Algorithm, key length, format | | SchedulingConfig | Interval or cron-based rotation scheduling | | VerificationConfig | Strategy ("active", "passive", "hybrid"), timeout, coverage | | KeyWindowConfig | Overlap period, grace period, max valid keys | | ObservabilityConfig | Logging, metrics, and tracing settings | | SidecarConfig | HTTP server port and gRPC toggle |

Error Classes

All errors extend RotationError which carries the rotation stage and retry hint:

| Class | Base | Description | |-------|------|-------------| | RotationError | Error | Base class: stage?: string, canRetry: boolean | | ProviderError | RotationError | Provider-level failure with provider name | | PropagationError | RotationError | Secret not reaching consumers (retryable) | | VerificationError | RotationError | Consumers not using new key (retryable) | | TimeoutError | RotationError | Operation exceeded deadline (retryable) | | ConfigurationError | Error | Invalid configuration — not retryable |

Interfaces

| Export | Description | |--------|-------------| | SecretProvider | Provider adapter contract: CRUD, versions, rotation sessions, health | | KeyStore | Key storage contract: save, get, update, delete, list | | KeyGenerator | Key generation contract: generate, validate, encrypt, decrypt | | PropagationVerifier | Verification contract: verify, getStatus, cancel | | EventEmitter | Event bus contract: emit, on, off, replay | | Logger | Structured logging interface: debug, info, warn, error | | ConsumerRegistry | Consumer tracking contract: register, deregister, query |

Related Packages

License

MIT