@bluecopa/core 0.1.16 → 0.1.18
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.
- package/dist/api/audit/createAuditLog.d.ts +27 -0
- package/dist/api/audit/getAuditLogs.d.ts +32 -0
- package/dist/api/audit/index.d.ts +2 -0
- package/dist/api/file/fileDownload.d.ts +11 -0
- package/dist/api/file/fileUpload.d.ts +22 -0
- package/dist/api/file/index.d.ts +2 -0
- package/dist/api/form/createOrUpdateForm.d.ts +15 -0
- package/dist/api/form/getFormById.d.ts +14 -0
- package/dist/api/form/getFormData.d.ts +11 -0
- package/dist/api/form/getFormSchema.d.ts +13 -0
- package/dist/api/form/index.d.ts +4 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/process/index.d.ts +2 -0
- package/dist/api/process/markTaskDone.d.ts +22 -0
- package/dist/api/process/reassignTask.d.ts +19 -0
- package/dist/api/recon/getAllReconWorkflows.d.ts +9 -0
- package/dist/api/recon/index.d.ts +2 -0
- package/dist/api/recon/runRecon.d.ts +20 -0
- package/dist/api/task/getTaskDetails.d.ts +12 -0
- package/dist/api/task/index.d.ts +1 -0
- package/dist/api/templatedPipeline/getAllTemplatedPipelines.d.ts +12 -0
- package/dist/api/templatedPipeline/index.d.ts +1 -0
- package/dist/api/workbook/getWorkbookDetails.d.ts +12 -0
- package/dist/api/workbook/index.d.ts +3 -0
- package/dist/api/workbook/publishWorkbook.d.ts +12 -0
- package/dist/api/workbook/saveWorkbook.d.ts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.es.js +440 -26
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AuditRecord {
|
|
2
|
+
source: "UI" | "BACKEND";
|
|
3
|
+
userId: string;
|
|
4
|
+
entityId: string;
|
|
5
|
+
entityType: string;
|
|
6
|
+
entitySubType?: string;
|
|
7
|
+
action: "CREATE" | "UPDATE" | "DELETE";
|
|
8
|
+
oldValue?: string;
|
|
9
|
+
newValue?: string;
|
|
10
|
+
additionalDetails?: any;
|
|
11
|
+
eventType: "WORKFLOW" | "API" | "PROCESS" | "DELEGATED_TASK";
|
|
12
|
+
eventId: string;
|
|
13
|
+
eventTimestamp: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateAuditLogRequest {
|
|
16
|
+
auditRecords: AuditRecord[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates audit log records
|
|
20
|
+
* @param params - The create audit log request parameters
|
|
21
|
+
* @param params.auditRecords - Required: Array of audit records to create
|
|
22
|
+
* @returns Promise<void> Success response
|
|
23
|
+
* @throws Error if the request fails
|
|
24
|
+
*/
|
|
25
|
+
export declare function createAuditLog(params: CreateAuditLogRequest): Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface GetAuditLogsRequest {
|
|
2
|
+
entityType?: string;
|
|
3
|
+
entitySubType?: string;
|
|
4
|
+
entityId?: string;
|
|
5
|
+
source?: 'UI' | 'BACKEND';
|
|
6
|
+
userId?: string;
|
|
7
|
+
limit: number;
|
|
8
|
+
startDate?: string;
|
|
9
|
+
endDate?: string;
|
|
10
|
+
pageToken?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AuditLogResponse {
|
|
13
|
+
logs: any[];
|
|
14
|
+
count: number;
|
|
15
|
+
nextPageToken?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Gets audit logs based on filter criteria
|
|
19
|
+
* @param params - The audit logs request parameters
|
|
20
|
+
* @param params.entityType - Optional: Entity type to filter by
|
|
21
|
+
* @param params.entitySubType - Optional: Entity sub type to filter by
|
|
22
|
+
* @param params.entityId - Optional: Entity ID to filter by
|
|
23
|
+
* @param params.source - Optional: Source filter (UI or BACKEND)
|
|
24
|
+
* @param params.userId - Optional: User ID to filter by
|
|
25
|
+
* @param params.limit - Required: Maximum number of logs to return
|
|
26
|
+
* @param params.startDate - Optional: Start date filter (YYYY-MM-DD)
|
|
27
|
+
* @param params.endDate - Optional: End date filter (YYYY-MM-DD)
|
|
28
|
+
* @param params.pageToken - Optional: Token for pagination
|
|
29
|
+
* @returns Promise<AuditLogResponse> The audit logs response
|
|
30
|
+
* @throws Error if the request fails
|
|
31
|
+
*/
|
|
32
|
+
export declare function getAuditLogs(params: GetAuditLogsRequest): Promise<AuditLogResponse>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface FileDownloadRequest {
|
|
2
|
+
fileId: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Downloads a file from S3 using presigned URL
|
|
6
|
+
* @param params - The file download parameters
|
|
7
|
+
* @param params.fileId - Required: The S3 path/key of the file to download
|
|
8
|
+
* @returns Promise<any> The file data
|
|
9
|
+
* @throws Error if the request fails
|
|
10
|
+
*/
|
|
11
|
+
export declare function fileDownload({ fileId, }: FileDownloadRequest): Promise<any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface FileUploadRequest {
|
|
2
|
+
path?: string;
|
|
3
|
+
contentType?: string;
|
|
4
|
+
method?: string;
|
|
5
|
+
data: any;
|
|
6
|
+
uploadType?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FileUploadResponse {
|
|
9
|
+
fileId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Uploads a file to S3 using presigned URL
|
|
13
|
+
* @param params - The file upload parameters
|
|
14
|
+
* @param params.path - Optional: The S3 path/key (defaults to auto-generated)
|
|
15
|
+
* @param params.contentType - Optional: Content type (defaults to 'application/json')
|
|
16
|
+
* @param params.method - Optional: HTTP method (defaults to 'PUT')
|
|
17
|
+
* @param params.data - Required: The data to upload
|
|
18
|
+
* @param params.uploadType - Optional: Upload type for path generation (defaults to 'DEFINITION')
|
|
19
|
+
* @returns Promise<FileUploadResponse> The file ID/path
|
|
20
|
+
* @throws Error if the request fails
|
|
21
|
+
*/
|
|
22
|
+
export declare function fileUpload({ path, contentType, method, data, uploadType, }: FileUploadRequest): Promise<FileUploadResponse>;
|
package/dist/api/file/index.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Form } from './getFormById';
|
|
2
|
+
export interface CreateOrUpdateFormRequest {
|
|
3
|
+
data: Form;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateOrUpdateFormResponse {
|
|
6
|
+
data: Form;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates or updates a form
|
|
10
|
+
* @param params - The form creation/update parameters
|
|
11
|
+
* @param params.data - Required: The form data
|
|
12
|
+
* @returns Promise<Form> The created or updated form
|
|
13
|
+
* @throws Error if the request fails
|
|
14
|
+
*/
|
|
15
|
+
export declare function createOrUpdateForm({ data, }: CreateOrUpdateFormRequest): Promise<Form>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface GetFormByIdRequest {
|
|
2
|
+
formId: string;
|
|
3
|
+
}
|
|
4
|
+
export interface Form {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Gets form by ID
|
|
9
|
+
* @param params - The form request parameters
|
|
10
|
+
* @param params.formId - Required: The ID of the form
|
|
11
|
+
* @returns Promise<Form> The form data
|
|
12
|
+
* @throws Error if the request fails
|
|
13
|
+
*/
|
|
14
|
+
export declare function getFormById({ formId, }: GetFormByIdRequest): Promise<Form>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface GetFormDataRequest {
|
|
2
|
+
formId: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Gets form data by form ID
|
|
6
|
+
* @param params - The form data request parameters
|
|
7
|
+
* @param params.formId - Required: The ID of the form
|
|
8
|
+
* @returns Promise<any> The form data
|
|
9
|
+
* @throws Error if the request fails
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFormData({ formId, }: GetFormDataRequest): Promise<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface GetFormSchemaRequest {
|
|
2
|
+
formInstanceId: string;
|
|
3
|
+
formRevision: string | number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Gets form schema by form instance ID and revision
|
|
7
|
+
* @param params - The form schema request parameters
|
|
8
|
+
* @param params.formInstanceId - Required: The ID of the form instance
|
|
9
|
+
* @param params.formRevision - Required: The revision of the form
|
|
10
|
+
* @returns Promise<any> The form schema
|
|
11
|
+
* @throws Error if the request fails
|
|
12
|
+
*/
|
|
13
|
+
export declare function getFormSchema({ formInstanceId, formRevision, }: GetFormSchemaRequest): Promise<any>;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -10,3 +10,9 @@ export * as inputTable from './inputTable';
|
|
|
10
10
|
export * as workbook from './workbook';
|
|
11
11
|
export * as worksheet from './worksheet';
|
|
12
12
|
export * as statement from './statement';
|
|
13
|
+
export * as task from './task';
|
|
14
|
+
export * as recon from './recon';
|
|
15
|
+
export * as form from './form';
|
|
16
|
+
export * as audit from './audit';
|
|
17
|
+
export * as templatedPipeline from './templatedPipeline';
|
|
18
|
+
export * as process from './process';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CompleteTaskRequest {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface ProcessTask {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface MarkTaskDoneRequest {
|
|
8
|
+
taskId: string;
|
|
9
|
+
data: CompleteTaskRequest;
|
|
10
|
+
}
|
|
11
|
+
export interface MarkTaskDoneResponse {
|
|
12
|
+
data: ProcessTask;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Marks a task as done
|
|
16
|
+
* @param params - The task completion parameters
|
|
17
|
+
* @param params.taskId - Required: The ID of the task
|
|
18
|
+
* @param params.data - Required: The task completion data
|
|
19
|
+
* @returns Promise<ProcessTask> The updated task
|
|
20
|
+
* @throws Error if the request fails
|
|
21
|
+
*/
|
|
22
|
+
export declare function markTaskDone({ taskId, data, }: MarkTaskDoneRequest): Promise<ProcessTask>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ProcessTask } from './markTaskDone';
|
|
2
|
+
export interface ReassignTaskRequest {
|
|
3
|
+
taskId: string;
|
|
4
|
+
newAssignee: string;
|
|
5
|
+
assigneeType: "USER" | "TEAM";
|
|
6
|
+
}
|
|
7
|
+
export interface ReassignTaskResponse {
|
|
8
|
+
data: ProcessTask;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Reassigns a task to a new assignee
|
|
12
|
+
* @param params - The task reassignment parameters
|
|
13
|
+
* @param params.taskId - Required: The ID of the task
|
|
14
|
+
* @param params.newAssignee - Required: The new assignee ID
|
|
15
|
+
* @param params.assigneeType - Required: The type of assignee (USER or TEAM)
|
|
16
|
+
* @returns Promise<ProcessTask> The updated task
|
|
17
|
+
* @throws Error if the request fails
|
|
18
|
+
*/
|
|
19
|
+
export declare function reassignTask({ taskId, newAssignee, assigneeType, }: ReassignTaskRequest): Promise<ProcessTask>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ReconWorkflow {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Gets all recon workflows
|
|
6
|
+
* @returns Promise<ReconWorkflow[]> The list of recon workflows
|
|
7
|
+
* @throws Error if the request fails
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllReconWorkflows(): Promise<ReconWorkflow[]>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface RunReconRequest {
|
|
2
|
+
workflowId: string;
|
|
3
|
+
runId?: string;
|
|
4
|
+
fullRefresh?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface RunReconResponse {
|
|
7
|
+
success: boolean;
|
|
8
|
+
data?: any;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Runs a reconciliation workflow
|
|
13
|
+
* @param params - The recon run parameters
|
|
14
|
+
* @param params.workflowId - Required: The ID of the reconciliation workflow
|
|
15
|
+
* @param params.runId - Optional: Custom run ID
|
|
16
|
+
* @param params.fullRefresh - Optional: Whether to do a full refresh
|
|
17
|
+
* @returns Promise<RunReconResponse> The run response
|
|
18
|
+
* @throws Error if the request fails
|
|
19
|
+
*/
|
|
20
|
+
export declare function runRecon({ workflowId, runId, fullRefresh, }: RunReconRequest): Promise<RunReconResponse>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProcessTask } from '../../../../models/src/lib/gen/Api';
|
|
2
|
+
export interface GetTaskDetailsRequest {
|
|
3
|
+
taskId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Gets task details by task ID
|
|
7
|
+
* @param params - The task request parameters
|
|
8
|
+
* @param params.taskId - Required: The ID of the task
|
|
9
|
+
* @returns Promise<ProcessTask> The task details
|
|
10
|
+
* @throws Error if the request fails
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTaskDetails({ taskId, }: GetTaskDetailsRequest): Promise<ProcessTask>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getTaskDetails';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TemplatedPipelineWorkflow {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface GetAllTemplatedPipelinesResponse {
|
|
5
|
+
data: TemplatedPipelineWorkflow[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Gets all templated pipeline workflows
|
|
9
|
+
* @returns Promise<GetAllTemplatedPipelinesResponse> The list of templated pipeline workflows
|
|
10
|
+
* @throws Error if the request fails
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAllTemplatedPipelines(): Promise<TemplatedPipelineWorkflow[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getAllTemplatedPipelines';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Workbook } from '../../../../models/src/lib/gen/Api';
|
|
2
|
+
export interface GetWorkbookDetailsRequest {
|
|
3
|
+
workbookId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Gets workbook details by workbook ID
|
|
7
|
+
* @param params - The workbook request parameters
|
|
8
|
+
* @param params.workbookId - Required: The ID of the workbook
|
|
9
|
+
* @returns Promise<Workbook> The workbook details
|
|
10
|
+
* @throws Error if the request fails
|
|
11
|
+
*/
|
|
12
|
+
export declare function getWorkbookDetails({ workbookId, }: GetWorkbookDetailsRequest): Promise<Workbook>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Workbook } from '../../../../models/src/lib/gen/Api';
|
|
2
|
+
export interface PublishWorkbookRequest {
|
|
3
|
+
workbookId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Publishes a workbook
|
|
7
|
+
* @param params - The workbook publish parameters
|
|
8
|
+
* @param params.workbookId - Required: The ID of the workbook to publish
|
|
9
|
+
* @returns Promise<Workbook> The published workbook
|
|
10
|
+
* @throws Error if the request fails
|
|
11
|
+
*/
|
|
12
|
+
export declare function publishWorkbook({ workbookId, }: PublishWorkbookRequest): Promise<Workbook>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Workbook, WorksheetInputs } from '../../../../models/src/lib/gen/Api';
|
|
2
|
+
export interface SaveWorkbookRequest {
|
|
3
|
+
workbook: Workbook;
|
|
4
|
+
sheetInputs?: WorksheetInputs[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Saves or updates a workbook
|
|
8
|
+
* @param params - The workbook save parameters
|
|
9
|
+
* @param params.workbook - Required: The workbook object to save
|
|
10
|
+
* @param params.sheetInputs - Optional: Array of worksheet inputs
|
|
11
|
+
* @returns Promise<Workbook> The saved workbook
|
|
12
|
+
* @throws Error if the request fails
|
|
13
|
+
*/
|
|
14
|
+
export declare function saveWorkbook({ workbook, sheetInputs, }: SaveWorkbookRequest): Promise<Workbook>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,17 @@ export { setConfig as copaSetConfig, getConfig as copaGetConfig } from './config
|
|
|
2
2
|
export * as copaApi from './api';
|
|
3
3
|
export * as copaUtils from './utils';
|
|
4
4
|
export { default as copaTailwindConfig } from './tailwind/bluecopa.config';
|
|
5
|
+
export type { GetAuditLogsRequest, AuditLogResponse } from './api/audit/getAuditLogs';
|
|
6
|
+
export type { AuditRecord, CreateAuditLogRequest } from './api/audit/createAuditLog';
|
|
7
|
+
export type { TemplatedPipelineWorkflow, GetAllTemplatedPipelinesResponse } from './api/templatedPipeline/getAllTemplatedPipelines';
|
|
8
|
+
export type { ReconWorkflow } from './api/recon/getAllReconWorkflows';
|
|
9
|
+
export type { RunReconRequest, RunReconResponse } from './api/recon/runRecon';
|
|
10
|
+
export type { GetFormByIdRequest, Form } from './api/form/getFormById';
|
|
11
|
+
export type { CreateOrUpdateFormRequest, CreateOrUpdateFormResponse } from './api/form/createOrUpdateForm';
|
|
12
|
+
export type { GetFormSchemaRequest } from './api/form/getFormSchema';
|
|
13
|
+
export type { GetFormDataRequest } from './api/form/getFormData';
|
|
14
|
+
export type { MarkTaskDoneRequest, MarkTaskDoneResponse, ProcessTask, CompleteTaskRequest } from './api/process/markTaskDone';
|
|
15
|
+
export type { ReassignTaskRequest, ReassignTaskResponse } from './api/process/reassignTask';
|
|
16
|
+
export type { FileUploadRequest, FileUploadResponse } from './api/file/fileUpload';
|
|
17
|
+
export type { FileDownloadRequest } from './api/file/fileDownload';
|
|
18
|
+
export type { GetFileUrlRequest, GetFileUrlResponse } from './api/file/getFileUrlByFileId';
|