From bca228e7a9beb1991159c42a03e537c29687b6e6 Mon Sep 17 00:00:00 2001 From: AJ Ancheta <7781450+ancheetah@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:49:37 -0500 Subject: [PATCH] feat: expose client return types --- .changeset/lovely-cloths-sin.md | 7 +++++++ packages/device-client/src/lib/types/index.ts | 3 +++ packages/journey-client/src/lib/client.types.ts | 9 +++++++++ packages/journey-client/src/types.ts | 1 + packages/oidc-client/src/lib/client.types.ts | 3 +++ 5 files changed, 23 insertions(+) create mode 100644 .changeset/lovely-cloths-sin.md create mode 100644 packages/journey-client/src/lib/client.types.ts diff --git a/.changeset/lovely-cloths-sin.md b/.changeset/lovely-cloths-sin.md new file mode 100644 index 0000000000..fc7d9fae80 --- /dev/null +++ b/.changeset/lovely-cloths-sin.md @@ -0,0 +1,7 @@ +--- +'@forgerock/journey-client': minor +'@forgerock/device-client': minor +'@forgerock/oidc-client': minor +--- + +Expose return types for clients diff --git a/packages/device-client/src/lib/types/index.ts b/packages/device-client/src/lib/types/index.ts index 2571e8cc4e..884c2a1d05 100644 --- a/packages/device-client/src/lib/types/index.ts +++ b/packages/device-client/src/lib/types/index.ts @@ -4,6 +4,9 @@ * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ +import { deviceClient } from '../device.store.js'; + +export type DeviceClient = ReturnType; // Re-export types from external dependencies that consumers need export type { ConfigOptions } from '@forgerock/javascript-sdk'; diff --git a/packages/journey-client/src/lib/client.types.ts b/packages/journey-client/src/lib/client.types.ts new file mode 100644 index 0000000000..a6337c5150 --- /dev/null +++ b/packages/journey-client/src/lib/client.types.ts @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ +import { journey } from './client.store.js'; + +export type JourneyClient = Awaited>; diff --git a/packages/journey-client/src/types.ts b/packages/journey-client/src/types.ts index 5ec9b606c9..edf39abb6f 100644 --- a/packages/journey-client/src/types.ts +++ b/packages/journey-client/src/types.ts @@ -19,6 +19,7 @@ export type { } from '@forgerock/sdk-types'; // Re-export local types +export * from './lib/client.types.js'; export * from './lib/config.types.js'; export * from './lib/interfaces.js'; export * from './lib/step.types.js'; diff --git a/packages/oidc-client/src/lib/client.types.ts b/packages/oidc-client/src/lib/client.types.ts index ed2ea08274..6a04c919b3 100644 --- a/packages/oidc-client/src/lib/client.types.ts +++ b/packages/oidc-client/src/lib/client.types.ts @@ -7,6 +7,9 @@ import type { GenericError, GetAuthorizationUrlOptions } from '@forgerock/sdk-types'; import type { StorageConfig } from '@forgerock/storage'; import { createClientStore } from './client.store.utils.js'; +import { oidc } from './client.store.js'; + +export type OidcClient = Awaited>; export type ClientStore = ReturnType;