Skip to content

Commit bca228e

Browse files
committed
feat: expose client return types
1 parent 4933f55 commit bca228e

5 files changed

Lines changed: 23 additions & 0 deletions

File tree

.changeset/lovely-cloths-sin.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@forgerock/journey-client': minor
3+
'@forgerock/device-client': minor
4+
'@forgerock/oidc-client': minor
5+
---
6+
7+
Expose return types for clients

packages/device-client/src/lib/types/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* This software may be modified and distributed under the terms
55
* of the MIT license. See the LICENSE file for details.
66
*/
7+
import { deviceClient } from '../device.store.js';
8+
9+
export type DeviceClient = ReturnType<typeof deviceClient>;
710

811
// Re-export types from external dependencies that consumers need
912
export type { ConfigOptions } from '@forgerock/javascript-sdk';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
3+
*
4+
* This software may be modified and distributed under the terms
5+
* of the MIT license. See the LICENSE file for details.
6+
*/
7+
import { journey } from './client.store.js';
8+
9+
export type JourneyClient = Awaited<ReturnType<typeof journey>>;

packages/journey-client/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type {
1919
} from '@forgerock/sdk-types';
2020

2121
// Re-export local types
22+
export * from './lib/client.types.js';
2223
export * from './lib/config.types.js';
2324
export * from './lib/interfaces.js';
2425
export * from './lib/step.types.js';

packages/oidc-client/src/lib/client.types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import type { GenericError, GetAuthorizationUrlOptions } from '@forgerock/sdk-types';
88
import type { StorageConfig } from '@forgerock/storage';
99
import { createClientStore } from './client.store.utils.js';
10+
import { oidc } from './client.store.js';
11+
12+
export type OidcClient = Awaited<ReturnType<typeof oidc>>;
1013

1114
export type ClientStore = ReturnType<typeof createClientStore>;
1215

0 commit comments

Comments
 (0)