Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ Authorization: Bearer <token>
}
```

* `JobType`: see [documentation](./docs/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](./docs/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](./docs/types/jobs_jobs.types.JobResult.html) for possible result structures.
* `JobType`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/types/jobs_jobs.types.JobResult.html) for possible result structures.
Comment on lines +176 to +178
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README now hard-codes documentation links to https://shreeed-app.github.io/.... This will be incorrect for forks, non-master previews, or local documentation builds (where docs/ exists). Consider keeping relative links (e.g., ./docs/...) or providing both a relative link and a hosted GitHub Pages link so the README remains portable.

Suggested change
* `JobType`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](https://shreeed-app.github.io/multi-party-computation-controller-api/types/jobs_jobs.types.JobResult.html) for possible result structures.
* `JobType`: see [documentation](./docs/enums/jobs_jobs.types.JobType.html) for possible enum values.
* `JobStatus`: see [documentation](./docs/enums/jobs_jobs.types.JobStatus.html) for possible enum values.
* `JobResult`: see [documentation](./docs/types/jobs_jobs.types.JobResult.html) for possible result structures.

Copilot uses AI. Check for mistakes.

**Error response:** `404 Not Found` - job does not exist.

Expand Down
18 changes: 9 additions & 9 deletions src/common/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AppConfigService {
/**
* Current application environment, e.g. "development", "production".
*
* @returns The current environment string.
* @returns {string} The current environment string.
*/
public get environment(): string {
return this.getRequiredString(ConfigKeySchema.NODE_ENV);
Expand All @@ -50,7 +50,7 @@ class AppConfigService {
/**
* TCP port on which the HTTP server listens.
*
* @returns The configured port number; defaults to 3000.
* @returns {number} The configured port number; defaults to 3000.
*/
public get port(): number {
return (
Expand All @@ -62,7 +62,7 @@ class AppConfigService {
* Bearer token that client backends must present in the `Authorization`
* header.
*
* @returns The configured client bearer token.
* @returns {string} The configured client bearer token.
*/
public get clientBearerToken(): string {
return this.getRequiredString(ConfigKeySchema.CLIENT_BEARER_TOKEN);
Expand All @@ -71,7 +71,7 @@ class AppConfigService {
/**
* Hostname or IP address of the Rust controller engine gRPC server.
*
* @returns The engine host string.
* @returns {string} The engine host string.
*/
public get rustEngineHost(): string {
return this.getRequiredString(ConfigKeySchema.CRYPTOGRAPHIC_ENGINE_HOST);
Expand All @@ -80,7 +80,7 @@ class AppConfigService {
/**
* Port of the Rust controller engine gRPC server.
*
* @returns The engine port number.
* @returns {number} The engine port number.
*/
public get rustEnginePort(): number {
return this.getRequiredNumber(ConfigKeySchema.CRYPTOGRAPHIC_ENGINE_PORT);
Expand All @@ -90,7 +90,7 @@ class AppConfigService {
* Bearer token injected into gRPC metadata for every call to the Rust
* engine.
*
* @returns The engine bearer token.
* @returns {string} The engine bearer token.
*/
public get rustEngineBearerToken(): string {
return this.getRequiredString(
Expand All @@ -101,7 +101,7 @@ class AppConfigService {
/**
* Hostname or IP address of the Redis instance.
*
* @returns The Redis host string.
* @returns {string} The Redis host string.
*/
public get redisHost(): string {
return this.getRequiredString(ConfigKeySchema.REDIS_HOST);
Expand All @@ -110,7 +110,7 @@ class AppConfigService {
/**
* Port of the Redis instance.
*
* @returns The Redis port number.
* @returns {number} The Redis port number.
*/
public get redisPort(): number {
return this.getRequiredNumber(ConfigKeySchema.REDIS_PORT);
Expand All @@ -119,7 +119,7 @@ class AppConfigService {
/**
* Directory where daily log files are written.
*
* @returns The log directory path string. Defaults to "logs".
* @returns {string} The log directory path string. Defaults to "logs".
*/
public get logDirectory(): string {
return this.getRequiredString(ConfigKeySchema.LOG_DIRECTORY);
Expand Down
1 change: 0 additions & 1 deletion src/jobs/jobs.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ enum JobType {
SIGNING = "signing",
}

// #JobResult
/** Union of all possible job result payloads. */
type JobResult = KeyGenerationJobResult | SigningJobResult;

Expand Down
10 changes: 10 additions & 0 deletions src/tasks/key-generation/key-generation.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@ import { v4 } from "uuid";
*/
@ValidatorConstraint({ name: "thresholdWithinParticipants", async: false })
class ThresholdWithinParticipants implements ValidatorConstraintInterface {
/**
* @param {number} threshold - The threshold value to validate.
* @param {ValidationArguments} args - Context containing the parent DTO.
* @returns {boolean} `true` if threshold is within participants or not yet
* parseable.
*/
validate(threshold: number, { object }: ValidationArguments): boolean {
const dto: KeyGenerationRequestDto = object as KeyGenerationRequestDto;
// If `participants` hasn't been parsed yet, defer to its own validator.
return dto.participants === undefined || threshold <= dto.participants;
Comment on lines +27 to 36
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new JSDoc for validate documents a @param {ValidationArguments} args, but the signature destructures the second argument ({ object }: ValidationArguments) and there is no args parameter. This makes the generated docs misleading; either rename the parameter in the signature or update the JSDoc to match the actual parameter name/shape (and consider clarifying that the early-true case is when participants is still undefined).

Copilot uses AI. Check for mistakes.
}


/**
* @returns {string} The default validation failure message.
*/
defaultMessage({ value }: ValidationArguments): string {
return `Threshold (${value as number}) must not exceed participants.`;
}
Expand Down
17 changes: 14 additions & 3 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
"entryPoints": ["src"],
"entryPointStrategy": "expand",
"out": "docs",
"excludePrivate": true,
"excludeProtected": true,
"excludeInternal": true,
"excludePrivate": false,
"excludeProtected": false,
"excludeInternal": false,
"readme": "none",
"disableSources": false,
"navigation": {
"includeCategories": true
},
"externalSymbolLinkMappings": {
"@types/node": {
"\"crypto\".timingSafeEqual": "#"
},
"@nestjs/common": {
"UnauthorizedException": "#"
},
"@grpc/grpc-js": {
"Metadata": "#"
Comment on lines +15 to +21
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

externalSymbolLinkMappings currently maps external symbols to "#", which produces non-useful/broken links in the rendered docs (everything points to the top of the current page). If the goal is to make {@link ...} references clickable, map these symbols to the appropriate external documentation URLs (e.g., Node.js/NestJS/gRPC API docs) or omit the mapping and tolerate the unresolved-link warnings.

Suggested change
"\"crypto\".timingSafeEqual": "#"
},
"@nestjs/common": {
"UnauthorizedException": "#"
},
"@grpc/grpc-js": {
"Metadata": "#"
"\"crypto\".timingSafeEqual": "https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b"
},
"@nestjs/common": {
"UnauthorizedException": "https://www.jsdocs.io/package/@nestjs/common#UnauthorizedException"
},
"@grpc/grpc-js": {
"Metadata": "https://www.jsdocs.io/package/@grpc/grpc-js#Metadata"

Copilot uses AI. Check for mistakes.
}
}
}
Loading