A TypeScript type definitions package for the ForgeRock/Ping Identity JavaScript SDK ecosystem.
This package contains shared TypeScript interfaces, types, and other type definitions that are used across the ForgeRock/Ping Identity JavaScript SDK packages. It provides a centralized repository for type definitions to ensure consistency across the SDK ecosystem.
This package is intended to be used as a dependency within the ForgeRock/Ping Identity JavaScript SDK ecosystem and is not typically installed directly by end users.
If needed, you can install it via:
npm install @forgerock/sdk-types
# or
pnpm add @forgerock/sdk-types
# or
yarn add @forgerock/sdk-types
The package includes the following type categories:
Definitions for AM/Ping authentication tree callback schema:
export interface Callback {
_id?: number;
input?: NameValue[];
output: NameValue[];
type: CallbackType;
}
Provides type definitions for various callback types, including:
Types for configuring the SDK:
export interface ServerConfig {
baseUrl: string;
paths?: CustomPathConfig;
timeout?: number;
}
Includes interfaces for:
Definitions for OAuth2/OIDC tokens:
export interface Tokens {
accessToken: string;
idToken?: string;
refreshToken?: string;
tokenExpiry?: number;
}
Types for request middleware implementations.
Import types directly from the package:
import { ServerConfig, Tokens, Callback } from '@forgerock/sdk-types';
const config: ServerConfig = {
baseUrl: 'https://example.forgerock.com/am',
timeout: 30000,
};
const processTokens = (tokens: Tokens) => {
// Use token information
};
const handleCallback = (callback: Callback) => {
// Process callback
};
This package follows the development practices of the overall ForgeRock/Ping Identity JavaScript SDK monorepo.
pnpm test
pnpm build
This project is licensed under the terms of the MIT license. See the LICENSE file for details.