@bluecopa/core 0.1.93 → 0.1.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ export * as worksheet from './worksheet';
12
12
  export * as statement from './statement';
13
13
  export * as task from './task';
14
14
  export * as recon from './recon';
15
+ export * as reconV2 from './reconV2';
15
16
  export * as form from './form';
16
17
  export * as audit from './audit';
17
18
  export * as templatedPipeline from './templatedPipeline';
@@ -0,0 +1,35 @@
1
+ export interface StartReconV2CleanRequest {
2
+ workflowId: string;
3
+ /** Dataset side to clean, defaults to left */
4
+ side?: "left" | "right";
5
+ /** Optional custom transforms — auto-discovered when omitted */
6
+ transforms?: any[];
7
+ }
8
+ export interface GetReconV2CleanResultRequest {
9
+ workflowId: string;
10
+ side?: "left" | "right";
11
+ }
12
+ export interface ReconV2CleanResult {
13
+ [key: string]: any;
14
+ }
15
+ /**
16
+ * Starts dataset cleaning for one side of a recon v2 workflow
17
+ * @param params - The clean parameters
18
+ * @param params.workflowId - Required: The workflow ID
19
+ * @param params.side - Optional: 'left' (default) or 'right'
20
+ * @param params.transforms - Optional: Custom transforms to apply
21
+ * @returns Promise<ReconV2CleanResult> The start response
22
+ * @throws Error if the request fails
23
+ */
24
+ export declare function startReconV2Clean({ workflowId, side, transforms, }: StartReconV2CleanRequest): Promise<ReconV2CleanResult>;
25
+ /**
26
+ * Fetches the clean result for one side of a recon v2 workflow.
27
+ * Returns a "not found" message payload (HTTP 200) while the clean is still
28
+ * running — poll until the result is present.
29
+ * @param params - The request parameters
30
+ * @param params.workflowId - Required: The workflow ID
31
+ * @param params.side - Optional: 'left' (default) or 'right'
32
+ * @returns Promise<ReconV2CleanResult> The clean result
33
+ * @throws Error if the request fails
34
+ */
35
+ export declare function getReconV2CleanResult({ workflowId, side, }: GetReconV2CleanResultRequest): Promise<ReconV2CleanResult>;
@@ -0,0 +1,22 @@
1
+ export interface ReconV2Workflow {
2
+ [key: string]: any;
3
+ }
4
+ export interface CreateReconV2Request {
5
+ /** Workflow name — non-alphanumeric characters are replaced with underscores */
6
+ name: string;
7
+ /** Recon type, defaults to SMART_RECONCILIATION */
8
+ type?: string;
9
+ /** Optional initial workflow config (leftDef, rightDef, matchGroups, sources, ...) */
10
+ config?: Partial<ReconV2Workflow>;
11
+ }
12
+ /**
13
+ * Creates a recon v2 (SMART_RECONCILIATION) workflow along with its backing
14
+ * RECON workbook
15
+ * @param params - The create parameters
16
+ * @param params.name - Required: Name for the new reconciliation
17
+ * @param params.type - Optional: Recon type (defaults to SMART_RECONCILIATION)
18
+ * @param params.config - Optional: Initial workflow config to merge in
19
+ * @returns Promise<ReconV2Workflow> The created workflow
20
+ * @throws Error if the request fails
21
+ */
22
+ export declare function createReconV2({ name, type, config, }: CreateReconV2Request): Promise<ReconV2Workflow>;
@@ -0,0 +1,14 @@
1
+ export interface DeleteReconV2Request {
2
+ workflowId: string;
3
+ }
4
+ export interface DeleteReconV2Response {
5
+ success: boolean;
6
+ }
7
+ /**
8
+ * Deletes a recon v2 workflow
9
+ * @param params - The delete parameters
10
+ * @param params.workflowId - Required: The ID of the workflow to delete
11
+ * @returns Promise<DeleteReconV2Response> The delete response
12
+ * @throws Error if the request fails
13
+ */
14
+ export declare function deleteReconV2({ workflowId, }: DeleteReconV2Request): Promise<DeleteReconV2Response>;
@@ -0,0 +1,7 @@
1
+ import { ReconV2Workflow } from './createReconV2';
2
+ /**
3
+ * Gets all recon v2 (SMART_RECONCILIATION) workflows
4
+ * @returns Promise<ReconV2Workflow[]> The list of recon v2 workflows
5
+ * @throws Error if the request fails
6
+ */
7
+ export declare function getAllReconV2Workflows(): Promise<ReconV2Workflow[]>;
@@ -0,0 +1,18 @@
1
+ export interface GetReconV2DiffRequest {
2
+ runId: string;
3
+ workflowId: string;
4
+ prevRunId: string;
5
+ }
6
+ export interface ReconV2Diff {
7
+ [key: string]: any;
8
+ }
9
+ /**
10
+ * Gets the diff between a recon v2 run and a previous run
11
+ * @param params - The diff parameters
12
+ * @param params.runId - Required: The current run ID
13
+ * @param params.workflowId - Required: The workflow ID
14
+ * @param params.prevRunId - Required: The previous run ID to compare against
15
+ * @returns Promise<ReconV2Diff> The run diff
16
+ * @throws Error if the request fails
17
+ */
18
+ export declare function getReconV2Diff({ runId, workflowId, prevRunId, }: GetReconV2DiffRequest): Promise<ReconV2Diff>;
@@ -0,0 +1,17 @@
1
+ export interface GetReconV2ExplanationRequest {
2
+ runId: string;
3
+ workflowId: string;
4
+ }
5
+ export interface ReconV2Explanation {
6
+ [key: string]: any;
7
+ }
8
+ /**
9
+ * Gets the oracle explanation/analysis for a recon v2 run.
10
+ * Returns a message payload (HTTP 200) when no analysis is available yet.
11
+ * @param params - The request parameters
12
+ * @param params.runId - Required: The run ID
13
+ * @param params.workflowId - Required: The workflow ID
14
+ * @returns Promise<ReconV2Explanation> The oracle analysis
15
+ * @throws Error if the request fails
16
+ */
17
+ export declare function getReconV2Explanation({ runId, workflowId, }: GetReconV2ExplanationRequest): Promise<ReconV2Explanation>;
@@ -0,0 +1,15 @@
1
+ export interface GetReconV2RunResultRequest {
2
+ runId: string;
3
+ }
4
+ export interface ReconV2RunResult {
5
+ [key: string]: any;
6
+ }
7
+ /**
8
+ * Gets the metadata/status of a recon v2 run (pollable until the run reaches
9
+ * a terminal status)
10
+ * @param params - The request parameters
11
+ * @param params.runId - Required: The run ID returned by runReconV2
12
+ * @returns Promise<ReconV2RunResult> The run metadata/status
13
+ * @throws Error if the request fails
14
+ */
15
+ export declare function getReconV2RunResult({ runId, }: GetReconV2RunResultRequest): Promise<ReconV2RunResult>;
@@ -0,0 +1,24 @@
1
+ export interface GetReconV2SmartResultRequest {
2
+ runId: string;
3
+ workflowId: string;
4
+ /** Exception type filter, defaults to ALL */
5
+ exceptionType?: string;
6
+ ruleFilter?: string;
7
+ orderBy?: string;
8
+ }
9
+ export interface ReconV2SmartResult {
10
+ [key: string]: any;
11
+ }
12
+ /**
13
+ * Gets the detailed smart result data for a recon v2 run
14
+ * (matched/unmatched/exception records)
15
+ * @param params - The request parameters
16
+ * @param params.runId - Required: The run ID
17
+ * @param params.workflowId - Required: The workflow ID
18
+ * @param params.exceptionType - Optional: Exception type filter (default ALL)
19
+ * @param params.ruleFilter - Optional: Rule filter
20
+ * @param params.orderBy - Optional: Ordering expression
21
+ * @returns Promise<ReconV2SmartResult> The detailed result data
22
+ * @throws Error if the request fails
23
+ */
24
+ export declare function getReconV2SmartResult({ runId, workflowId, exceptionType, ruleFilter, orderBy, }: GetReconV2SmartResultRequest): Promise<ReconV2SmartResult>;
@@ -0,0 +1,11 @@
1
+ export * from './createReconV2';
2
+ export * from './updateReconV2';
3
+ export * from './deleteReconV2';
4
+ export * from './runReconV2';
5
+ export * from './getAllReconV2Workflows';
6
+ export * from './getReconV2RunResult';
7
+ export * from './getReconV2SmartResult';
8
+ export * from './profileReconV2';
9
+ export * from './cleanReconV2';
10
+ export * from './getReconV2Diff';
11
+ export * from './getReconV2Explanation';
@@ -0,0 +1,29 @@
1
+ export interface ReconV2ProfileRequest {
2
+ workflowId: string;
3
+ /** Dataset side to profile, defaults to left */
4
+ side?: "left" | "right";
5
+ }
6
+ export interface ReconV2ProfileResult {
7
+ [key: string]: any;
8
+ }
9
+ /**
10
+ * Starts data profiling for one side of a recon v2 workflow.
11
+ * Uses the shared /recon/profile endpoint (smart profile).
12
+ * @param params - The profile parameters
13
+ * @param params.workflowId - Required: The workflow ID
14
+ * @param params.side - Optional: 'left' (default) or 'right'
15
+ * @returns Promise<ReconV2ProfileResult> The start response
16
+ * @throws Error if the request fails
17
+ */
18
+ export declare function startReconV2Profile({ workflowId, side, }: ReconV2ProfileRequest): Promise<ReconV2ProfileResult>;
19
+ /**
20
+ * Fetches the data profile result for one side of a recon v2 workflow.
21
+ * Returns a "not found" message payload (HTTP 200) while the profile is
22
+ * still being computed — poll until columns are present.
23
+ * @param params - The profile parameters
24
+ * @param params.workflowId - Required: The workflow ID
25
+ * @param params.side - Optional: 'left' (default) or 'right'
26
+ * @returns Promise<ReconV2ProfileResult> The profile result
27
+ * @throws Error if the request fails
28
+ */
29
+ export declare function getReconV2ProfileResult({ workflowId, side, }: ReconV2ProfileRequest): Promise<ReconV2ProfileResult>;
@@ -0,0 +1,34 @@
1
+ export interface ReconV2MatchConfig {
2
+ match?: any[];
3
+ unmatch?: any[];
4
+ archive?: any[];
5
+ unarchive?: any[];
6
+ }
7
+ export interface RunReconV2Request {
8
+ workflowId: string;
9
+ /** Optional custom run ID — generated server-side when omitted */
10
+ runId?: string;
11
+ fullRefresh?: boolean;
12
+ /** RUN (default) or TEST */
13
+ mode?: "RUN" | "TEST";
14
+ /** Optional manual match config (match/unmatch/archive actions) */
15
+ matchConfig?: ReconV2MatchConfig;
16
+ }
17
+ export interface RunReconV2Response {
18
+ /** The run ID — use it to poll results or subscribe to run status */
19
+ runId: string;
20
+ [key: string]: any;
21
+ }
22
+ /**
23
+ * Runs a recon v2 workflow (RUN or TEST mode, optionally with a manual
24
+ * match config)
25
+ * @param params - The run parameters
26
+ * @param params.workflowId - Required: The ID of the workflow to run
27
+ * @param params.runId - Optional: Custom run ID
28
+ * @param params.fullRefresh - Optional: Whether to do a full refresh
29
+ * @param params.mode - Optional: 'RUN' (default) or 'TEST'
30
+ * @param params.matchConfig - Optional: Manual match/unmatch/archive actions
31
+ * @returns Promise<RunReconV2Response> The run response including the runId
32
+ * @throws Error if the request fails
33
+ */
34
+ export declare function runReconV2({ workflowId, runId, fullRefresh, mode, matchConfig, }: RunReconV2Request): Promise<RunReconV2Response>;
@@ -0,0 +1,15 @@
1
+ import { ReconV2Workflow } from './createReconV2';
2
+ export interface UpdateReconV2Request {
3
+ /** Full workflow object including its id */
4
+ reconWorkflow: ReconV2Workflow;
5
+ }
6
+ /**
7
+ * Updates (saves) a recon v2 workflow config.
8
+ * Note: V2 settings stored on the workbook (customFields.reconV2 — currency,
9
+ * exceptionGroups, policies, prompts) are updated via workbook.saveWorkbook.
10
+ * @param params - The update parameters
11
+ * @param params.reconWorkflow - Required: The workflow object with id
12
+ * @returns Promise<ReconV2Workflow> The updated workflow
13
+ * @throws Error if the request fails
14
+ */
15
+ export declare function updateReconV2({ reconWorkflow, }: UpdateReconV2Request): Promise<ReconV2Workflow>;
package/dist/index.d.ts CHANGED
@@ -10,6 +10,16 @@ export type { AuditRecord, CreateAuditLogRequest, } from './api/audit/createAudi
10
10
  export type { TemplatedPipelineWorkflow, GetAllTemplatedPipelinesResponse, } from './api/templatedPipeline/getAllTemplatedPipelines';
11
11
  export type { ReconWorkflow } from './api/recon/getAllReconWorkflows';
12
12
  export type { RunReconRequest, RunReconResponse } from './api/recon/runRecon';
13
+ export type { ReconV2Workflow, CreateReconV2Request, } from './api/reconV2/createReconV2';
14
+ export type { UpdateReconV2Request } from './api/reconV2/updateReconV2';
15
+ export type { DeleteReconV2Request, DeleteReconV2Response, } from './api/reconV2/deleteReconV2';
16
+ export type { ReconV2MatchConfig, RunReconV2Request, RunReconV2Response, } from './api/reconV2/runReconV2';
17
+ export type { GetReconV2RunResultRequest, ReconV2RunResult, } from './api/reconV2/getReconV2RunResult';
18
+ export type { GetReconV2SmartResultRequest, ReconV2SmartResult, } from './api/reconV2/getReconV2SmartResult';
19
+ export type { ReconV2ProfileRequest, ReconV2ProfileResult, } from './api/reconV2/profileReconV2';
20
+ export type { StartReconV2CleanRequest, GetReconV2CleanResultRequest, ReconV2CleanResult, } from './api/reconV2/cleanReconV2';
21
+ export type { GetReconV2DiffRequest, ReconV2Diff, } from './api/reconV2/getReconV2Diff';
22
+ export type { GetReconV2ExplanationRequest, ReconV2Explanation, } from './api/reconV2/getReconV2Explanation';
13
23
  export type { GetFormByIdRequest, Form } from './api/form/getFormById';
14
24
  export type { CreateOrUpdateFormRequest } from './api/form/createOrUpdateForm';
15
25
  export type { GetFormSchemaRequest } from './api/form/getFormSchema';