Skip to content

Commit a75858c

Browse files
committed
docs: add JSDoc to all public API exports across client packages
Adds JSDoc comments to all undocumented public exports in davinci-client, device-client, journey-client, and oidc-client. This eliminates (undocumented) markers from API Extractor reports, improving the API surface readability and enabling richer typedoc/IntelliSense output.
1 parent 6aac711 commit a75858c

50 files changed

Lines changed: 1601 additions & 1150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/davinci-client/api-report/davinci-client.api.md

Lines changed: 114 additions & 370 deletions
Large diffs are not rendered by default.

packages/davinci-client/api-report/davinci-client.types.api.md

Lines changed: 114 additions & 370 deletions
Large diffs are not rendered by default.

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ import type {
1313
} from './collector.types.js';
1414
import type { ErrorNode, FailureNode, ContinueNode, StartNode, SuccessNode } from './node.types.js';
1515

16+
/** Union of all possible DaVinci flow node states. */
1617
export type FlowNode = ContinueNode | ErrorNode | StartNode | SuccessNode | FailureNode;
1718

19+
/** An error response generated internally by the SDK (not from the DaVinci API). */
1820
export interface InternalErrorResponse {
21+
/** The error details including a human-readable message. */
1922
error: Omit<GenericError, 'error'> & { message: string };
23+
/** The response type discriminant. */
2024
type: 'internal_error';
2125
}
2226

27+
/** Function that initializes and starts a DaVinci flow, returning the first node or an error. */
2328
export type InitFlow = () => Promise<FlowNode | InternalErrorResponse>;
2429

2530
/**
@@ -80,14 +85,20 @@ export type Updater<T = unknown> = (
8085
value: CollectorValueType<T>,
8186
index?: number,
8287
) => InternalErrorResponse | null;
88+
/** Function that validates a collector value and returns validation errors or error details. */
8389
export type Validator = (value: string) =>
8490
| string[]
8591
| {
92+
/** The validation error details. */
8693
error: {
94+
/** The validation error message. */
8795
message: string;
96+
/** The validation error type. */
8897
type: string;
8998
};
99+
/** The validation result type. */
90100
type: string;
91101
};
92102

103+
/** Union of all possible node states in a DaVinci flow lifecycle. */
93104
export type NodeStates = StartNode | ContinueNode | ErrorNode | SuccessNode | FailureNode;

0 commit comments

Comments
 (0)