diff --git a/package.json b/package.json index a3be4a1a82..791a56392b 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "type": "commonjs", "name": "ping-javascript-sdk", "version": "0.0.0", "private": true, @@ -22,9 +23,9 @@ "circular-dep-check": "madge --circular .", "clean": "shx rm -rf ./{coverage,dist,docs,node_modules,tmp}/ ./{packages,e2e}/*/{dist,node_modules}/ ./e2e/node_modules/ && git clean -fX -e \"!.env*,nx-cloud.env\"", "commit": "git cz", + "commitlint": "commitlint --edit", "copyright:check": "node tools/copyright/sync-header-years.mjs --check", "copyright:sync": "node tools/copyright/sync-header-years.mjs --fix", - "commitlint": "commitlint --edit", "create-package": "nx g @nx/js:library", "format": "pnpm nx format:write", "generate-docs": "typedoc", @@ -37,8 +38,8 @@ "nx": "nx", "prepare": "lefthook install", "serve": "nx serve", - "syncpack:lint": "syncpack lint --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", "syncpack:fix": "syncpack fix --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", + "syncpack:lint": "syncpack lint --source 'package.json' --source 'packages/*/package.json' --source 'packages/sdk-effects/*/package.json' --source 'packages/utils/*/package.json' --source 'e2e/*/package.json' --source 'tools/*/package.json' --source 'scratchpad/package.json'", "test": "CI=true nx affected:test", "test:e2e": "CI=true nx affected:e2e", "verdaccio": "nx local-registry", diff --git a/packages/davinci-client/api-report/davinci-client.fido.api.md b/packages/davinci-client/api-report/davinci-client.fido.api.md new file mode 100644 index 0000000000..ed3b8b1b5f --- /dev/null +++ b/packages/davinci-client/api-report/davinci-client.fido.api.md @@ -0,0 +1,94 @@ +## API Report File for "@forgerock/davinci-client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { GenericError } from '@forgerock/sdk-types'; + +// @public (undocumented) +export interface AssertionValue extends Omit { + // (undocumented) + rawId: string; + // (undocumented) + response: { + clientDataJSON: string; + authenticatorData: string; + signature: string; + userHandle: string | null; + }; +} + +// @public (undocumented) +export interface AttestationValue extends Omit { + // (undocumented) + rawId: string; + // (undocumented) + response: { + clientDataJSON: string; + attestationObject: string; + }; +} + +// @public +export function fido(): FidoClient; + +// @public (undocumented) +export interface FidoAuthenticationInputValue { + // (undocumented) + assertionValue?: AssertionValue; +} + +// @public (undocumented) +export interface FidoAuthenticationOptions extends Omit { + // (undocumented) + allowCredentials?: { + id: number[]; + transports?: AuthenticatorTransport[]; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + challenge: number[]; +} + +// @public (undocumented) +export interface FidoClient { + authenticate: (options: FidoAuthenticationOptions) => Promise; + register: (options: FidoRegistrationOptions) => Promise; +} + +// @public +export type FidoErrorCode = 'NotAllowedError' | 'AbortError' | 'InvalidStateError' | 'NotSupportedError' | 'SecurityError' | 'TimeoutError' | 'UnknownError'; + +// @public (undocumented) +export interface FidoRegistrationInputValue { + // (undocumented) + attestationValue?: AttestationValue; +} + +// @public (undocumented) +export interface FidoRegistrationOptions extends Omit { + // (undocumented) + challenge: number[]; + // (undocumented) + excludeCredentials?: { + id: number[]; + transports?: AuthenticatorTransport[]; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + pubKeyCredParams: { + alg: string | number; + type: PublicKeyCredentialType; + }[]; + // (undocumented) + user: { + id: number[]; + name: string; + displayName: string; + }; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/davinci-client/package.json b/packages/davinci-client/package.json index 77af118fcb..6e5c49b38c 100644 --- a/packages/davinci-client/package.json +++ b/packages/davinci-client/package.json @@ -13,6 +13,7 @@ "type": "module", "exports": { ".": "./dist/src/index.js", + "./fido": "./dist/src/lib/fido/index.js", "./types": "./dist/src/types.d.ts" }, "main": "./dist/src/index.js", diff --git a/packages/davinci-client/src/index.ts b/packages/davinci-client/src/index.ts index 9fee20f383..256aca5299 100644 --- a/packages/davinci-client/src/index.ts +++ b/packages/davinci-client/src/index.ts @@ -1,11 +1,11 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 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 { fido } from './lib/fido/fido.js'; -// davinci is re-exported via types.ts -export { fido }; +export { davinci } from './lib/client.store.js'; +export { fido } from './lib/fido/fido.js'; + export * from './types.js'; diff --git a/packages/davinci-client/src/lib/fido/fido.types.ts b/packages/davinci-client/src/lib/fido/fido.types.ts index df882f0a94..931386779a 100644 --- a/packages/davinci-client/src/lib/fido/fido.types.ts +++ b/packages/davinci-client/src/lib/fido/fido.types.ts @@ -46,3 +46,8 @@ export type FidoErrorCode = | 'SecurityError' | 'TimeoutError' | 'UnknownError'; + +// Re-export necessary FIDO types for package.json `./fido` entry point +export type { FidoRegistrationInputValue, FidoAuthenticationInputValue }; +export type { FidoRegistrationOptions, FidoAuthenticationOptions }; +export type { AttestationValue, AssertionValue } from '../collector.types.js'; diff --git a/packages/davinci-client/src/lib/fido/index.ts b/packages/davinci-client/src/lib/fido/index.ts new file mode 100644 index 0000000000..8046627cb8 --- /dev/null +++ b/packages/davinci-client/src/lib/fido/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2026 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. + */ + +// Re-export FIDO module and types for package.json `./fido` entry point +export { fido } from './fido.js'; +export * from './fido.types.js'; diff --git a/packages/device-client/src/index.ts b/packages/device-client/src/index.ts index e2a7dc3567..32438eaa5f 100644 --- a/packages/device-client/src/index.ts +++ b/packages/device-client/src/index.ts @@ -1,8 +1,8 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 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. */ -// deviceClient is re-exported via types.js +export { deviceClient } from './lib/device.store.js'; export * from './types.js'; diff --git a/packages/oidc-client/src/index.ts b/packages/oidc-client/src/index.ts index 97b1544914..a7694f3c85 100644 --- a/packages/oidc-client/src/index.ts +++ b/packages/oidc-client/src/index.ts @@ -1,8 +1,8 @@ /* - * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. + * Copyright (c) 2025 - 2026 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. */ -// oidc and createClientStore are re-exported via types.js +export { oidc } from './lib/client.store.js'; export * from './types.js';