Skip to content

Conversation

@koltsov-iv
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds authentication provider support to the task management library. The changes introduce an optional authProvider parameter throughout the API, with 'telegram' as the default provider, allowing the library to support multiple authentication mechanisms.

  • Introduces new options types (TrackOptions, ProcessMethodOptions, ClaimOptions) to pass authentication provider information
  • Updates method signatures across the codebase to accept optional options parameters
  • Implements default auth provider fallback logic in HTTP client methods

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/core/src/types/options.ts New file defining option types with authProvider field and DefaultAuthProvider constant
packages/core/src/types/plugin.ts Updated PluginProcessMethod signature and added new PluginVerifyMethod type to support options
packages/core/src/types/index.ts Added export for the new options module
packages/core/src/services/TaskProcessor.ts Updated goProcess and claimProcess methods to accept and forward options parameters
packages/core/src/services/PluginsManager.ts Changed return type of getVerifyEndpointByID to use new PluginVerifyMethod type
packages/core/src/services/HttpClient.ts Added auth provider support to getTasks, trackEvent, and claimProcess methods with default fallback
packages/core/src/index.ts Updated public API methods to accept options parameters while maintaining backward compatibility
packages/core/package.json Version bump to 0.3.4 and updated types path to reflect build output structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

export * from "./plugins/action-based";
export * from "./plugins/interfaces";
export * from "./plugins/interfaces";
export * from "./options"
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

Missing semicolon at the end of the export statement. All other export statements in this file end with semicolons, so this should be consistent.

Suggested change
export * from "./options"
export * from "./options";

Copilot uses AI. Check for mistakes.
authProvider?: string;
}

export interface ClaimOptions {
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

Inconsistent type definitions: TrackOptions and ProcessMethodOptions use type while ClaimOptions uses interface. Since all three types have the same structure (a single optional authProvider field), they should use the same declaration style for consistency. Consider using type for all three or interface for all three.

Suggested change
export interface ClaimOptions {
export type ClaimOptions = {

Copilot uses AI. Check for mistakes.
import {PluginsManager} from "./PluginsManager";
import {EventRegister} from "./EventRegister";
import {HttpClient} from "./HttpClient";
import { HttpClient} from "./HttpClient";
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

Inconsistent import formatting: there's an extra space after the opening brace. Compare with line 1 which doesn't have this spacing. The import should be import {HttpClient} from "./HttpClient"; to match the style of other imports.

Suggested change
import { HttpClient} from "./HttpClient";
import {HttpClient} from "./HttpClient";

Copilot uses AI. Check for mistakes.
import {Plugin, PluginProcessMethod, PluginVerifyMethod} from "../types";
import {HttpClient} from "./HttpClient";


Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

Extra blank line added. This introduces unnecessary whitespace that's not consistent with the rest of the file structure.

Copilot uses AI. Check for mistakes.
export * from "./types/index";
import {Config, EventPayloadMap} from "./types";
import {HttpClient, TaskFilters} from "./services/HttpClient";
import { HttpClient, TaskFilters} from "./services/HttpClient";
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

Inconsistent import formatting: there's an extra space after the opening brace. The import should be import {HttpClient, TaskFilters} from "./services/HttpClient"; to match the style of other imports in this file.

Suggested change
import { HttpClient, TaskFilters} from "./services/HttpClient";
import {HttpClient, TaskFilters} from "./services/HttpClient";

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants