@kadoa/node-sdk 0.13.0 → 0.14.1

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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { RawAxiosRequestConfig, AxiosPromise, AxiosInstance, AxiosError } from 'axios';
2
- import * as src_generated from 'src/generated';
3
2
 
4
3
  /**
5
4
  * Kadoa API
@@ -799,7 +798,7 @@ interface MonitoringConfig {
799
798
  /**
800
799
  * Fields to monitor
801
800
  */
802
- 'fields': Array<MonitoredField>;
801
+ 'fields'?: Array<MonitoredField>;
803
802
  /**
804
803
  * Notification channels
805
804
  */
@@ -1425,6 +1424,7 @@ type DataValidationReportStrategyEnum = typeof DataValidationReportStrategyEnum[
1425
1424
  interface DeleteAllRulesResponseData$1 {
1426
1425
  'deletedCount': number;
1427
1426
  'workflowId'?: string;
1427
+ 'deletedRuleIds': Array<string>;
1428
1428
  }
1429
1429
 
1430
1430
  /**
@@ -1561,7 +1561,7 @@ interface RuleParameters {
1561
1561
  /**
1562
1562
  * Complete validation rule with metadata and lifecycle information
1563
1563
  */
1564
- interface Rule {
1564
+ interface Rule$1 {
1565
1565
  /**
1566
1566
  * Unique identifier
1567
1567
  */
@@ -1647,7 +1647,7 @@ interface GenerateRules {
1647
1647
  */
1648
1648
  interface RulesListResponse {
1649
1649
  'error': boolean;
1650
- 'data': Array<Rule>;
1650
+ 'data': Array<Rule$1>;
1651
1651
  'pagination': PaginationMeta;
1652
1652
  }
1653
1653
 
@@ -1717,7 +1717,7 @@ interface SchemaResponseDescription {
1717
1717
  /**
1718
1718
  * Schema object response
1719
1719
  */
1720
- interface SchemaResponse {
1720
+ interface SchemaResponse$1 {
1721
1721
  /**
1722
1722
  * Unique identifier for the schema
1723
1723
  */
@@ -2183,6 +2183,59 @@ interface V4WorkflowsWorkflowIdGet200ResponseBrowserActionsInner {
2183
2183
  'url'?: string;
2184
2184
  }
2185
2185
 
2186
+ /**
2187
+ * Kadoa API
2188
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2189
+ *
2190
+ * The version of the OpenAPI document: 3.0.0
2191
+ * Contact: support@kadoa.com
2192
+ *
2193
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2194
+ * https://openapi-generator.tech
2195
+ * Do not edit the class manually.
2196
+ */
2197
+ interface V4WorkflowsWorkflowIdGet200ResponseLastJobErrorsInner {
2198
+ /**
2199
+ * Error code identifying the type of error
2200
+ */
2201
+ 'errorCode'?: string;
2202
+ /**
2203
+ * Human-readable error message
2204
+ */
2205
+ 'message'?: string;
2206
+ /**
2207
+ * When the error occurred
2208
+ */
2209
+ 'timestamp'?: string;
2210
+ /**
2211
+ * Optional screenshot URL
2212
+ */
2213
+ 'screenshot'?: string;
2214
+ /**
2215
+ * Additional context about the error
2216
+ */
2217
+ 'context'?: object;
2218
+ }
2219
+
2220
+ /**
2221
+ * Kadoa API
2222
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2223
+ *
2224
+ * The version of the OpenAPI document: 3.0.0
2225
+ * Contact: support@kadoa.com
2226
+ *
2227
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2228
+ * https://openapi-generator.tech
2229
+ * Do not edit the class manually.
2230
+ */
2231
+
2232
+ interface V4WorkflowsWorkflowIdGet200ResponseLastJob {
2233
+ /**
2234
+ * Errors from the last job run
2235
+ */
2236
+ 'errors'?: Array<V4WorkflowsWorkflowIdGet200ResponseLastJobErrorsInner>;
2237
+ }
2238
+
2186
2239
  /**
2187
2240
  * Kadoa API
2188
2241
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -2349,10 +2402,6 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
2349
2402
  * When the last job started
2350
2403
  */
2351
2404
  'startedAt'?: string;
2352
- /**
2353
- * Protocol information from last job
2354
- */
2355
- 'protocol'?: string;
2356
2405
  /**
2357
2406
  * ID of the last job
2358
2407
  */
@@ -2406,6 +2455,7 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
2406
2455
  * Whether the schema can be edited
2407
2456
  */
2408
2457
  'isSchemaEditable'?: boolean;
2458
+ 'lastJob'?: V4WorkflowsWorkflowIdGet200ResponseLastJob;
2409
2459
  'dataValidation'?: V4WorkflowsGet200ResponseWorkflowsInnerDataValidation;
2410
2460
  'validationStatistics'?: V4WorkflowsGet200ResponseWorkflowsInnerValidationStatistics;
2411
2461
  /**
@@ -2438,6 +2488,7 @@ declare const V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum: {
2438
2488
  readonly Queued: "QUEUED";
2439
2489
  readonly Setup: "SETUP";
2440
2490
  readonly Running: "RUNNING";
2491
+ readonly Failed: "FAILED";
2441
2492
  };
2442
2493
  type V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum = typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum[keyof typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum];
2443
2494
  declare const V4WorkflowsGet200ResponseWorkflowsInnerSchemaTypeEnum: {
@@ -2852,14 +2903,11 @@ interface V4WorkflowsWorkflowIdGet200Response {
2852
2903
  * When the last job started
2853
2904
  */
2854
2905
  'startedAt'?: string;
2855
- /**
2856
- * Protocol information from last job
2857
- */
2858
- 'protocol'?: string;
2859
2906
  /**
2860
2907
  * Database key for the workflow data
2861
2908
  */
2862
2909
  'dataKey'?: string;
2910
+ 'lastJob'?: V4WorkflowsWorkflowIdGet200ResponseLastJob;
2863
2911
  /**
2864
2912
  * Cost of the last job run in credits
2865
2913
  */
@@ -2949,28 +2997,6 @@ declare const V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum: {
2949
2997
  };
2950
2998
  type V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum = typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum[keyof typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum];
2951
2999
 
2952
- /**
2953
- * Kadoa API
2954
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2955
- *
2956
- * The version of the OpenAPI document: 3.0.0
2957
- * Contact: support@kadoa.com
2958
- *
2959
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2960
- * https://openapi-generator.tech
2961
- * Do not edit the class manually.
2962
- */
2963
- interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerProtocol {
2964
- /**
2965
- * state of the run if it FAILED
2966
- */
2967
- 'decision'?: string;
2968
- /**
2969
- * description why the run failed
2970
- */
2971
- 'reasoning'?: string;
2972
- }
2973
-
2974
3000
  /**
2975
3001
  * Kadoa API
2976
3002
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -3008,7 +3034,10 @@ interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInner {
3008
3034
  * Number of records processed in the workflow run
3009
3035
  */
3010
3036
  'records'?: number;
3011
- 'protocol'?: V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerProtocol;
3037
+ /**
3038
+ * Errors that occurred during the workflow run
3039
+ */
3040
+ 'errors'?: Array<V4WorkflowsWorkflowIdGet200ResponseLastJobErrorsInner>;
3012
3041
  /**
3013
3042
  * Number of credits used for this workflow run
3014
3043
  */
@@ -4458,51 +4487,6 @@ interface ValidationListResponse {
4458
4487
  'pagination': PaginationMeta;
4459
4488
  }
4460
4489
 
4461
- /**
4462
- * Request parameters for v4DataValidationRulesActionsBulkApprovePost operation in DataValidationApi.
4463
- */
4464
- interface DataValidationApiV4DataValidationRulesActionsBulkApprovePostRequest {
4465
- /**
4466
- * Body
4467
- */
4468
- readonly bulkApproveRules?: BulkApproveRules;
4469
- }
4470
- /**
4471
- * Request parameters for v4DataValidationRulesActionsBulkDeletePost operation in DataValidationApi.
4472
- */
4473
- interface DataValidationApiV4DataValidationRulesActionsBulkDeletePostRequest {
4474
- /**
4475
- * Body
4476
- */
4477
- readonly bulkDeleteRules?: BulkDeleteRules;
4478
- }
4479
- /**
4480
- * Request parameters for v4DataValidationRulesActionsDeleteAllDelete operation in DataValidationApi.
4481
- */
4482
- interface DataValidationApiV4DataValidationRulesActionsDeleteAllDeleteRequest {
4483
- /**
4484
- * Body
4485
- */
4486
- readonly deleteRuleWithReason?: DeleteRuleWithReason;
4487
- }
4488
- /**
4489
- * Request parameters for v4DataValidationRulesActionsGeneratePost operation in DataValidationApi.
4490
- */
4491
- interface DataValidationApiV4DataValidationRulesActionsGeneratePostRequest {
4492
- /**
4493
- * Body
4494
- */
4495
- readonly generateRule?: GenerateRule;
4496
- }
4497
- /**
4498
- * Request parameters for v4DataValidationRulesActionsGenerateRulesPost operation in DataValidationApi.
4499
- */
4500
- interface DataValidationApiV4DataValidationRulesActionsGenerateRulesPostRequest {
4501
- /**
4502
- * Body
4503
- */
4504
- readonly generateRules?: GenerateRules;
4505
- }
4506
4490
  /**
4507
4491
  * Request parameters for v4DataValidationRulesGet operation in DataValidationApi.
4508
4492
  */
@@ -4514,35 +4498,6 @@ interface DataValidationApiV4DataValidationRulesGetRequest {
4514
4498
  readonly pageSize?: number;
4515
4499
  readonly includeDeleted?: V4DataValidationRulesGetIncludeDeletedParameter;
4516
4500
  }
4517
- /**
4518
- * Request parameters for v4DataValidationRulesPost operation in DataValidationApi.
4519
- */
4520
- interface DataValidationApiV4DataValidationRulesPostRequest {
4521
- /**
4522
- * Body
4523
- */
4524
- readonly createRule?: CreateRule;
4525
- }
4526
- /**
4527
- * Request parameters for v4DataValidationRulesRuleIdDisablePost operation in DataValidationApi.
4528
- */
4529
- interface DataValidationApiV4DataValidationRulesRuleIdDisablePostRequest {
4530
- readonly ruleId: string;
4531
- /**
4532
- * Body
4533
- */
4534
- readonly disableRule?: DisableRule;
4535
- }
4536
- /**
4537
- * Request parameters for v4DataValidationRulesRuleIdPut operation in DataValidationApi.
4538
- */
4539
- interface DataValidationApiV4DataValidationRulesRuleIdPutRequest {
4540
- readonly ruleId: string;
4541
- /**
4542
- * Body
4543
- */
4544
- readonly updateRule?: UpdateRule;
4545
- }
4546
4501
  /**
4547
4502
  * Request parameters for v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet operation in DataValidationApi.
4548
4503
  */
@@ -5078,7 +5033,7 @@ interface WorkflowsApiV4ChangesGetRequest {
5078
5033
  */
5079
5034
  interface WorkflowsApiV4WorkflowsGetRequest {
5080
5035
  /**
5081
- * Search term to filter workflows by name or URL
5036
+ * Search term to filter workflows by name, URL, or workflow ID
5082
5037
  */
5083
5038
  readonly search?: string;
5084
5039
  /**
@@ -5484,108 +5439,195 @@ declare const V4WorkflowsWorkflowIdDataGetOrderEnum: {
5484
5439
  };
5485
5440
  type V4WorkflowsWorkflowIdDataGetOrderEnum = typeof V4WorkflowsWorkflowIdDataGetOrderEnum[keyof typeof V4WorkflowsWorkflowIdDataGetOrderEnum];
5486
5441
 
5487
- interface RealtimeConfig {
5488
- teamApiKey: string;
5489
- heartbeatInterval?: number;
5490
- reconnectDelay?: number;
5491
- missedHeartbeatsLimit?: number;
5492
- }
5493
- declare class Realtime {
5494
- private socket?;
5495
- private heartbeatInterval;
5496
- private reconnectDelay;
5497
- private lastHeartbeat;
5498
- private isConnecting;
5499
- private missedHeartbeatsLimit;
5500
- private missedHeartbeatCheckTimer?;
5501
- private teamApiKey?;
5502
- private eventListeners;
5503
- private connectionListeners;
5504
- private errorListeners;
5505
- constructor(config: RealtimeConfig);
5506
- connect(): Promise<void>;
5507
- private handleHeartbeat;
5508
- private notifyEventListeners;
5509
- private notifyConnectionListeners;
5510
- private notifyErrorListeners;
5511
- private startHeartbeatCheck;
5512
- private stopHeartbeatCheck;
5513
- /**
5514
- * Subscribe to realtime events
5515
- * @param listener Function to handle incoming events
5516
- * @returns Function to unsubscribe
5517
- */
5518
- onEvent(listener: (event: unknown) => void): () => void;
5519
- /**
5520
- * Subscribe to connection state changes
5521
- * @param listener Function to handle connection state changes
5522
- * @returns Function to unsubscribe
5523
- */
5524
- onConnection(listener: (connected: boolean, reason?: string) => void): () => void;
5525
- /**
5526
- * Subscribe to errors
5527
- * @param listener Function to handle errors
5528
- * @returns Function to unsubscribe
5529
- */
5530
- onError(listener: (error: unknown) => void): () => void;
5531
- close(): void;
5532
- isConnected(): boolean;
5533
- }
5442
+ /**
5443
+ * Workflows domain ACL.
5444
+ * Wraps generated WorkflowsApi requests/responses and normalizes types.
5445
+ * Downstream code must import from this module instead of `generated/**`.
5446
+ */
5534
5447
 
5535
5448
  /**
5536
- * Simple page-based pagination info
5537
- * Maps directly to the most common API pagination format
5449
+ * Workflow state filter for list queries.
5538
5450
  */
5539
- interface PageInfo {
5540
- /** Total number of items */
5541
- totalCount?: number;
5542
- /** Current page number */
5543
- page?: number;
5544
- /** Total number of pages */
5545
- totalPages?: number;
5546
- /** Number of items per page */
5451
+ declare const WorkflowState: {
5452
+ readonly Active: "ACTIVE";
5453
+ readonly Error: "ERROR";
5454
+ readonly Paused: "PAUSED";
5455
+ readonly NotSupported: "NOT_SUPPORTED";
5456
+ };
5457
+ type WorkflowState = (typeof WorkflowState)[keyof typeof WorkflowState];
5458
+ /**
5459
+ * Monitoring status filter.
5460
+ */
5461
+ declare const MonitoringStatus: {
5462
+ readonly Enabled: "true";
5463
+ readonly Disabled: "false";
5464
+ };
5465
+ type MonitoringStatus = (typeof MonitoringStatus)[keyof typeof MonitoringStatus];
5466
+ /**
5467
+ * Update interval filter.
5468
+ */
5469
+ declare const UpdateInterval: {
5470
+ readonly Hourly: "HOURLY";
5471
+ readonly Daily: "DAILY";
5472
+ readonly Weekly: "WEEKLY";
5473
+ readonly Monthly: "MONTHLY";
5474
+ };
5475
+ type UpdateInterval = (typeof UpdateInterval)[keyof typeof UpdateInterval];
5476
+ /**
5477
+ * Include deleted workflows filter.
5478
+ */
5479
+ declare const IncludeDeleted: {
5480
+ readonly True: "true";
5481
+ readonly False: "false";
5482
+ };
5483
+ type IncludeDeleted = (typeof IncludeDeleted)[keyof typeof IncludeDeleted];
5484
+ /**
5485
+ * Response format for workflow list.
5486
+ */
5487
+ declare const ResponseFormat: {
5488
+ readonly Json: "json";
5489
+ readonly Csv: "csv";
5490
+ };
5491
+ type ResponseFormat = (typeof ResponseFormat)[keyof typeof ResponseFormat];
5492
+ /**
5493
+ * Workflow state enum.
5494
+ */
5495
+ declare const WorkflowStateEnum: {
5496
+ readonly Active: "ACTIVE";
5497
+ readonly Error: "ERROR";
5498
+ readonly Paused: "PAUSED";
5499
+ readonly NotSupported: "NOT_SUPPORTED";
5500
+ readonly Preview: "PREVIEW";
5501
+ readonly ComplianceReview: "COMPLIANCE_REVIEW";
5502
+ readonly ComplianceRejected: "COMPLIANCE_REJECTED";
5503
+ readonly Queued: "QUEUED";
5504
+ readonly Setup: "SETUP";
5505
+ readonly Deleted: "DELETED";
5506
+ };
5507
+ type WorkflowStateEnum = (typeof WorkflowStateEnum)[keyof typeof WorkflowStateEnum];
5508
+ /**
5509
+ * Workflow display state enum.
5510
+ */
5511
+ declare const WorkflowDisplayStateEnum: {
5512
+ readonly Active: "ACTIVE";
5513
+ readonly Error: "ERROR";
5514
+ readonly Paused: "PAUSED";
5515
+ readonly NotSupported: "NOT_SUPPORTED";
5516
+ readonly Preview: "PREVIEW";
5517
+ readonly ComplianceReview: "COMPLIANCE_REVIEW";
5518
+ readonly ComplianceRejected: "COMPLIANCE_REJECTED";
5519
+ readonly Queued: "QUEUED";
5520
+ readonly Setup: "SETUP";
5521
+ readonly Running: "RUNNING";
5522
+ readonly Failed: "FAILED";
5523
+ };
5524
+ type WorkflowDisplayStateEnum = (typeof WorkflowDisplayStateEnum)[keyof typeof WorkflowDisplayStateEnum];
5525
+ /**
5526
+ * Job state enum.
5527
+ */
5528
+ declare const JobStateEnum: {
5529
+ readonly InProgress: "IN_PROGRESS";
5530
+ readonly Finished: "FINISHED";
5531
+ readonly Failed: "FAILED";
5532
+ readonly NotSupported: "NOT_SUPPORTED";
5533
+ readonly FailedInsufficientFunds: "FAILED_INSUFFICIENT_FUNDS";
5534
+ };
5535
+ type JobStateEnum = (typeof JobStateEnum)[keyof typeof JobStateEnum];
5536
+ declare class ListWorkflowsRequest implements WorkflowsApiV4WorkflowsGetRequest {
5537
+ search?: string;
5538
+ skip?: number;
5547
5539
  limit?: number;
5540
+ state?: WorkflowState;
5541
+ tags?: Array<string>;
5542
+ monitoring?: MonitoringStatus;
5543
+ updateInterval?: UpdateInterval;
5544
+ templateId?: string;
5545
+ includeDeleted?: IncludeDeleted;
5546
+ format?: ResponseFormat;
5548
5547
  }
5548
+ type CreateWorkflowRequest = CreateWorkflowWithSchemaBody;
5549
+ type CreateWorkflowWithCustomSchemaRequest = CreateWorkflowWithCustomSchemaBody;
5549
5550
  /**
5550
- * Paginated response with data and pagination info
5551
- * @template T The type of items in the data array
5551
+ * Workflow response with SDK-curated enum types.
5552
+ * Remaps generated enum fields to prevent type leakage.
5552
5553
  */
5553
- interface PagedResponse<T> {
5554
- /** Array of items for the current page */
5555
- data: T[];
5556
- /** Pagination metadata */
5557
- pagination: PageInfo;
5554
+ interface WorkflowResponse extends Omit<V4WorkflowsGet200ResponseWorkflowsInner, "state" | "displayState"> {
5555
+ state?: WorkflowStateEnum;
5556
+ displayState?: WorkflowDisplayStateEnum;
5557
+ }
5558
+ /**
5559
+ * Get workflow details response with SDK-curated enum types.
5560
+ */
5561
+ interface GetWorkflowResponse extends Omit<V4WorkflowsWorkflowIdGet200Response, "state" | "displayState"> {
5562
+ state?: WorkflowStateEnum;
5563
+ displayState?: WorkflowDisplayStateEnum;
5558
5564
  }
5559
5565
 
5560
- interface FetchDataResult extends PagedResponse<object> {
5561
- workflowId: string;
5562
- runId?: string | null;
5563
- executedAt?: string | null;
5566
+ /**
5567
+ * Get job response with SDK-curated enum types.
5568
+ */
5569
+ interface GetJobResponse extends Omit<V4WorkflowsWorkflowIdJobsJobIdGet200Response, "state"> {
5570
+ state?: JobStateEnum;
5564
5571
  }
5565
- type FetchDataOptions = Partial<Pick<WorkflowsApiV4WorkflowsWorkflowIdDataGetRequest, "runId" | "sortBy" | "order" | "filters" | "page" | "limit" | "includeAnomalies">> & {
5566
- workflowId: string;
5567
- };
5572
+ type RunWorkflowRequest = V4WorkflowsWorkflowIdRunPutRequest;
5573
+ type RunWorkflowResponse = V4WorkflowsWorkflowIdRunPut200Response;
5574
+
5568
5575
  /**
5569
- * Service for fetching workflow data with pagination support
5576
+ * Extraction domain ACL.
5577
+ * Wraps generated WorkflowsApi requests/responses for data fetching operations.
5578
+ * Wraps generated schema field types for entity resolution.
5579
+ * Downstream code must import from this module instead of `generated/**`.
5570
5580
  */
5571
- declare class DataFetcherService {
5572
- private readonly workflowsApi;
5573
- private readonly defaultLimit;
5574
- constructor(workflowsApi: WorkflowsApiInterface);
5575
- /**
5576
- * Fetch a page of workflow data
5577
- */
5578
- fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
5579
- /**
5580
- * Fetch all pages of workflow data
5581
- */
5582
- fetchAllData(options: FetchDataOptions): Promise<object[]>;
5583
- /**
5584
- * Create an async iterator for paginated data fetching
5585
- */
5586
- fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
5587
- }
5588
5581
 
5582
+ /**
5583
+ * Data pagination metadata.
5584
+ */
5585
+ type DataPagination = V4WorkflowsWorkflowIdDataGet200ResponsePagination;
5586
+ /**
5587
+ * Workflow data response.
5588
+ * Note: This type doesn't contain enum fields that need remapping.
5589
+ */
5590
+ type WorkflowDataResponse = V4WorkflowsWorkflowIdDataGet200Response;
5591
+ /**
5592
+ * Data sort order enum.
5593
+ */
5594
+ declare const DataSortOrder: {
5595
+ readonly Asc: "asc";
5596
+ readonly Desc: "desc";
5597
+ };
5598
+ type DataSortOrder = (typeof DataSortOrder)[keyof typeof DataSortOrder];
5599
+ /**
5600
+ * Options for fetching workflow data.
5601
+ */
5602
+ declare class FetchDataOptions {
5603
+ workflowId: string;
5604
+ runId?: string;
5605
+ sortBy?: string;
5606
+ order?: DataSortOrder;
5607
+ filters?: string;
5608
+ page?: number;
5609
+ limit?: number;
5610
+ includeAnomalies?: boolean;
5611
+ }
5612
+ /**
5613
+ * Schema field data type enum.
5614
+ */
5615
+ declare const SchemaFieldDataType: {
5616
+ readonly Text: "TEXT";
5617
+ readonly Number: "NUMBER";
5618
+ readonly Date: "DATE";
5619
+ readonly Url: "URL";
5620
+ readonly Email: "EMAIL";
5621
+ readonly Image: "IMAGE";
5622
+ readonly Video: "VIDEO";
5623
+ readonly Phone: "PHONE";
5624
+ readonly Boolean: "BOOLEAN";
5625
+ readonly Location: "LOCATION";
5626
+ readonly Array: "ARRAY";
5627
+ readonly Object: "OBJECT";
5628
+ };
5629
+ type SchemaFieldDataType = (typeof SchemaFieldDataType)[keyof typeof SchemaFieldDataType];
5630
+ type SchemaField$1 = ExtractionSchemaField | ExtractionClassificationField | ExtractionMetadataField;
5589
5631
  type NavigationMode = (typeof CreateWorkflowWithSchemaBodyNavigationModeEnum)[keyof typeof CreateWorkflowWithSchemaBodyNavigationModeEnum];
5590
5632
  type DataTypeInternal = (typeof ExtractionSchemaFieldDataTypeEnum)[keyof typeof ExtractionSchemaFieldDataTypeEnum];
5591
5633
  type DataType = Exclude<DataTypeInternal, "CURRENCY" | "JOB_DESCRIPTION" | "CATEGORY_JOB_TYPES" | "CLASSIFICATION" | "CATEGORIZE" | "STATIC_SCRAPER_DATA" | "UNIQUE_ID" | "JOBBIRD_CUSTOM" | "PASS" | "ADDITIONAL_DATA">;
@@ -5595,205 +5637,158 @@ type MonitoringOperator = (typeof V4WorkflowsWorkflowIdMetadataPutRequestMonitor
5595
5637
  type MonitoringField = V4WorkflowsWorkflowIdMetadataPutRequestMonitoringFieldsInner & {
5596
5638
  isKeyField?: boolean;
5597
5639
  };
5598
- type LocationConfig$1 = Location;
5640
+ type LocationConfig = Location;
5599
5641
  type RawFormat = (typeof ExtractionMetadataFieldMetadataKeyEnum)[keyof typeof ExtractionMetadataFieldMetadataKeyEnum];
5600
5642
  type FieldType = ExtractionMetadataFieldFieldTypeEnum | ExtractionClassificationFieldFieldTypeEnum | ExtractionSchemaFieldFieldTypeEnum;
5601
-
5602
- type SchemaField = ExtractionSchemaField | ExtractionClassificationField | ExtractionMetadataField;
5603
- interface EntityPrediction {
5604
- entity: string;
5605
- fields: SchemaField[];
5606
- primaryKeyField?: string;
5607
- expectedResults?: string;
5608
- }
5609
- interface EntityRequestOptions {
5610
- link: string;
5611
- location?: LocationConfig$1;
5612
- navigationMode?: string;
5613
- }
5614
- interface ResolvedEntity {
5615
- entity: string;
5616
- fields: SchemaField[];
5617
- }
5618
- type EntityConfig = "ai-detection" | {
5619
- schemaId: string;
5620
- } | {
5621
- name: string;
5622
- fields: SchemaField[];
5623
- };
5643
+ type WorkflowMonitoringConfig = MonitoringConfig;
5624
5644
  /**
5625
- * Service for resolving entities and their fields from various sources
5626
- *
5627
- * NOTE: This is a workaround for the /v4/entity endpoint which is not yet exposed in the OpenAPI spec.
5628
- * Once the endpoint is added to the OpenAPI specification, this manual implementation should be
5629
- * replaced with the generated client code.
5645
+ * Workflow details response.
5646
+ * Re-exported from workflows.acl.ts to get SDK-curated enum types.
5630
5647
  */
5631
- declare class EntityResolverService {
5632
- private readonly client;
5633
- private readonly schemasService;
5634
- constructor(client: KadoaClient);
5635
- /**
5636
- * Resolves entity and fields from the provided entity configuration
5637
- *
5638
- * @param entityConfig The entity configuration to resolve
5639
- * @param options Additional options for AI detection
5640
- * @returns Resolved entity with fields
5641
- */
5642
- resolveEntity(entityConfig: EntityConfig, options?: {
5643
- link?: string;
5644
- location?: LocationConfig$1;
5645
- navigationMode?: string;
5646
- }): Promise<ResolvedEntity>;
5647
- /**
5648
- * Fetches entity fields dynamically from the /v4/entity endpoint.
5649
- * This is a workaround implementation using native fetch since the endpoint
5650
- * is not yet included in the OpenAPI specification.
5651
- *
5652
- * @param options Request options including the link to analyze
5653
- * @returns EntityPrediction containing the detected entity type and fields
5654
- */
5655
- fetchEntityFields(options: EntityRequestOptions): Promise<EntityPrediction>;
5656
- /**
5657
- * Validates entity request options
5658
- */
5659
- private validateEntityOptions;
5660
- }
5648
+ type WorkflowDetailsResponse = GetWorkflowResponse;
5661
5649
 
5662
5650
  /**
5663
- * Options for polling operations
5651
+ * Simple page-based pagination info
5652
+ * Maps directly to the most common API pagination format
5664
5653
  */
5665
- interface PollingOptions {
5666
- /**
5667
- * Polling interval in milliseconds (minimum 250ms)
5668
- * @default 1000
5669
- */
5670
- pollIntervalMs?: number;
5671
- /**
5672
- * Timeout in milliseconds
5673
- * @default 300000 (5 minutes)
5674
- */
5675
- timeoutMs?: number;
5676
- /**
5677
- * AbortSignal to cancel the polling operation
5678
- */
5679
- abortSignal?: AbortSignal;
5654
+ interface PageInfo {
5655
+ /** Total number of items */
5656
+ totalCount?: number;
5657
+ /** Current page number */
5658
+ page?: number;
5659
+ /** Total number of pages */
5660
+ totalPages?: number;
5661
+ /** Number of items per page */
5662
+ limit?: number;
5680
5663
  }
5681
5664
  /**
5682
- * Result of a polling operation
5665
+ * Paginated response with data and pagination info
5666
+ * @template T The type of items in the data array
5683
5667
  */
5684
- interface PollingResult<T> {
5685
- /**
5686
- * The final result when polling completes successfully
5687
- */
5688
- result: T;
5689
- /**
5690
- * The number of polling attempts made
5691
- */
5692
- attempts: number;
5693
- /**
5694
- * The total time spent polling in milliseconds
5695
- */
5696
- duration: number;
5668
+ interface PagedResponse<T> {
5669
+ /** Array of items for the current page */
5670
+ data: T[];
5671
+ /** Pagination metadata */
5672
+ pagination: PageInfo;
5697
5673
  }
5698
- /**
5699
- * Generic polling utility that polls a function until a condition is met
5700
- *
5701
- * @param pollFn Function to call on each poll attempt
5702
- * @param isComplete Function to check if polling should complete
5703
- * @param options Polling configuration options
5704
- * @returns Promise that resolves with the polling result
5705
- *
5706
- * @example
5707
- * ```typescript
5708
- * const result = await pollUntil(
5709
- * () => api.getStatus(id),
5710
- * (status) => status.completedAt !== null,
5711
- * { pollIntervalMs: 2000, timeoutMs: 60000 }
5712
- * );
5713
- * ```
5714
- */
5715
- declare function pollUntil<T>(pollFn: () => Promise<T>, isComplete: (result: T) => boolean, options?: PollingOptions): Promise<PollingResult<T>>;
5716
5674
 
5717
- type LocationConfig = Location;
5718
- type WorkflowId = string;
5719
- type WorkflowStateEnum = V4WorkflowsGet200ResponseWorkflowsInnerStateEnum;
5720
- type WorkflowState = WorkflowStateEnum[keyof WorkflowStateEnum];
5721
- interface WaitOptions$1 extends PollingOptions {
5722
- targetState?: WorkflowState;
5723
- }
5724
- interface CreateWorkflowInput {
5725
- urls: string[];
5726
- navigationMode: NavigationMode;
5727
- name: string;
5728
- description?: string;
5729
- schemaId?: string;
5730
- entity: string;
5731
- fields: Array<SchemaField>;
5732
- tags?: string[];
5733
- interval?: WorkflowInterval;
5734
- monitoring?: MonitoringConfig;
5735
- location?: LocationConfig;
5736
- bypassPreview?: boolean;
5737
- autoStart?: boolean;
5738
- schedules?: string[];
5739
- }
5740
- type JobId = string;
5741
- type JobStatus = (typeof V4WorkflowsWorkflowIdJobsJobIdGet200ResponseStateEnum)[keyof typeof V4WorkflowsWorkflowIdJobsJobIdGet200ResponseStateEnum];
5742
- interface RunWorkflowInput {
5743
- variables?: Record<string, unknown>;
5744
- limit?: number;
5745
- }
5746
- interface StartedJob {
5747
- jobId: JobId;
5748
- message?: string;
5749
- status?: string;
5750
- }
5751
- interface FinishedJob extends V4WorkflowsWorkflowIdJobsJobIdGet200Response {
5752
- }
5753
- interface JobWaitOptions extends PollingOptions {
5754
- targetStatus?: JobStatus;
5675
+ interface FetchDataResult extends PagedResponse<object> {
5676
+ workflowId: string;
5677
+ runId?: string | null;
5678
+ executedAt?: string | null;
5755
5679
  }
5756
-
5757
- type ListWorkflowsOptions = WorkflowsApiV4WorkflowsGetRequest;
5758
- declare class WorkflowsCoreService {
5680
+ /**
5681
+ * Service for fetching workflow data with pagination support
5682
+ */
5683
+ declare class DataFetcherService {
5759
5684
  private readonly workflowsApi;
5685
+ private readonly defaultLimit;
5760
5686
  constructor(workflowsApi: WorkflowsApiInterface);
5761
- create(input: CreateWorkflowInput): Promise<{
5762
- id: WorkflowId;
5763
- }>;
5764
- get(id: WorkflowId): Promise<V4WorkflowsWorkflowIdGet200Response>;
5765
- list(filters?: ListWorkflowsOptions): Promise<V4WorkflowsGet200ResponseWorkflowsInner[]>;
5766
- getByName(name: string): Promise<V4WorkflowsGet200ResponseWorkflowsInner | undefined>;
5767
- cancel(id: WorkflowId): Promise<void>;
5768
- resume(id: WorkflowId): Promise<void>;
5769
5687
  /**
5770
- * Wait for a workflow to reach the target state or a terminal state if no target state is provided
5688
+ * Fetch a page of workflow data
5771
5689
  */
5772
- wait(id: WorkflowId, options?: WaitOptions$1): Promise<V4WorkflowsWorkflowIdGet200Response>;
5690
+ fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
5773
5691
  /**
5774
- * Run a workflow with variables and optional limit
5692
+ * Fetch all pages of workflow data
5775
5693
  */
5776
- runWorkflow(workflowId: WorkflowId, input: RunWorkflowInput): Promise<StartedJob>;
5694
+ fetchAllData(options: FetchDataOptions): Promise<object[]>;
5777
5695
  /**
5778
- * Get job status directly without polling workflow details
5696
+ * Create an async iterator for paginated data fetching
5779
5697
  */
5780
- getJobStatus(workflowId: WorkflowId, jobId: JobId): Promise<FinishedJob>;
5698
+ fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
5699
+ }
5700
+
5701
+ interface KadoaUser {
5702
+ userId: string;
5703
+ email: string;
5704
+ featureFlags: string[];
5705
+ }
5706
+ declare class UserService {
5707
+ private readonly client;
5708
+ constructor(client: KadoaClient);
5781
5709
  /**
5782
- * Wait for a job to reach the target state or a terminal state
5710
+ * Get current user details
5711
+ * @returns User details
5783
5712
  */
5784
- waitForJobCompletion(workflowId: WorkflowId, jobId: JobId, options?: JobWaitOptions): Promise<FinishedJob>;
5713
+ getCurrentUser(): Promise<KadoaUser>;
5785
5714
  }
5786
5715
 
5787
- type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
5716
+ /**
5717
+ * Notifications domain ACL.
5718
+ * Wraps generated NotificationsApi requests/responses and normalizes types.
5719
+ * Downstream code must import from this module instead of `generated/**`.
5720
+ */
5721
+
5722
+ /**
5723
+ * Notification channel type enum.
5724
+ * Re-exported from generated V5NotificationsChannelsPostRequestChannelTypeEnum.
5725
+ */
5788
5726
  declare const NotificationChannelType: {
5789
- readonly EMAIL: "EMAIL";
5790
- readonly SLACK: "SLACK";
5791
- readonly WEBHOOK: "WEBHOOK";
5792
- readonly WEBSOCKET: "WEBSOCKET";
5727
+ EMAIL: "EMAIL";
5728
+ SLACK: "SLACK";
5729
+ WEBHOOK: "WEBHOOK";
5730
+ WEBSOCKET: "WEBSOCKET";
5793
5731
  };
5794
5732
  type NotificationChannelType = (typeof NotificationChannelType)[keyof typeof NotificationChannelType];
5733
+
5734
+ /**
5735
+ * Webhook HTTP method enum.
5736
+ * Re-exported from generated WebhookChannelConfigHttpMethodEnum.
5737
+ */
5738
+ type WebhookHttpMethod = WebhookChannelConfigHttpMethodEnum;
5739
+ /**
5740
+ * Request parameters for listing notification channels.
5741
+ */
5742
+ declare class ListChannelsRequest implements NotificationsApiV5NotificationsChannelsGetRequest {
5743
+ workflowId?: string;
5744
+ }
5745
+ /**
5746
+ * Request to create a notification channel with SDK-curated enum types.
5747
+ */
5748
+ interface CreateChannelRequest extends Omit<V5NotificationsChannelsPostRequest, "channelType"> {
5749
+ channelType: NotificationChannelType;
5750
+ }
5751
+ /**
5752
+ * Notification channel response.
5753
+ * Note: Response types are simple DTOs without enum fields that need remapping.
5754
+ */
5755
+ type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
5756
+ /**
5757
+ * Notification channel configuration (union type for all channel configs).
5758
+ */
5759
+ type NotificationChannelConfig = V5NotificationsChannelsGet200ResponseDataChannelsInnerConfig;
5760
+
5761
+ /**
5762
+ * WebSocket channel configuration (empty object).
5763
+ */
5795
5764
  type WebsocketChannelConfig = Record<string, never>;
5765
+ /**
5766
+ * Union of all channel configuration types.
5767
+ */
5796
5768
  type ChannelConfig = EmailChannelConfig | SlackChannelConfig | WebhookChannelConfig | WebsocketChannelConfig;
5769
+ /**
5770
+ * Request parameters for listing notification settings.
5771
+ */
5772
+ declare class ListSettingsRequest implements NotificationsApiV5NotificationsSettingsGetRequest {
5773
+ workflowId?: string;
5774
+ eventType?: NotificationSettingsEventType;
5775
+ }
5776
+ /**
5777
+ * Request to create notification settings with SDK-curated enum types.
5778
+ */
5779
+ interface CreateSettingsRequest extends Omit<V5NotificationsSettingsPostRequest, "eventType"> {
5780
+ eventType: NotificationSettingsEventType;
5781
+ }
5782
+ /**
5783
+ * Notification settings response.
5784
+ */
5785
+ type NotificationSettings = V5NotificationsSettingsGet200ResponseDataSettingsInner;
5786
+ /**
5787
+ * Notification event type enum.
5788
+ * Re-exported from generated V5NotificationsSettingsGetEventTypeEnum.
5789
+ */
5790
+ type NotificationSettingsEventType = V5NotificationsSettingsGetEventTypeEnum;
5791
+
5797
5792
  declare class NotificationChannelsService {
5798
5793
  /**
5799
5794
  * Default channel name
@@ -5803,7 +5798,7 @@ declare class NotificationChannelsService {
5803
5798
  private readonly api;
5804
5799
  private readonly userService;
5805
5800
  constructor(notificationsApi: NotificationsApiInterface, userService: UserService);
5806
- listChannels(filters: NotificationsApiV5NotificationsChannelsGetRequest): Promise<NotificationChannel[]>;
5801
+ listChannels(filters: ListChannelsRequest): Promise<NotificationChannel[]>;
5807
5802
  /**
5808
5803
  * List all channels (both workflow-specific and workspace-level)
5809
5804
  * This is useful for finding workspace-level channels like WebSocket channels
@@ -5811,7 +5806,7 @@ declare class NotificationChannelsService {
5811
5806
  */
5812
5807
  listAllChannels(workflowId?: string): Promise<NotificationChannel[]>;
5813
5808
  deleteChannel(channelId: string): Promise<void>;
5814
- createChannel(type: NotificationChannelType, config?: Pick<V5NotificationsChannelsPostRequest, "name" | "config">): Promise<NotificationChannel>;
5809
+ createChannel(type: NotificationChannelType, config?: Pick<CreateChannelRequest, "name" | "config">): Promise<NotificationChannel>;
5815
5810
  private buildPayload;
5816
5811
  private buildEmailChannelConfig;
5817
5812
  private buildSlackChannelConfig;
@@ -5819,13 +5814,11 @@ declare class NotificationChannelsService {
5819
5814
  private buildWebsocketChannelConfig;
5820
5815
  }
5821
5816
 
5822
- type NotificationSettings = V5NotificationsSettingsGet200ResponseDataSettingsInner;
5823
- type NotificationSettingsEventType = V5NotificationsSettingsGetEventTypeEnum;
5824
5817
  declare class NotificationSettingsService {
5825
5818
  private readonly api;
5826
5819
  constructor(notificationsApi: NotificationsApiInterface);
5827
- createSettings(requestData: V5NotificationsSettingsPostRequest): Promise<NotificationSettings>;
5828
- listSettings(filters: NotificationsApiV5NotificationsSettingsGetRequest): Promise<NotificationSettings[]>;
5820
+ createSettings(requestData: CreateSettingsRequest): Promise<NotificationSettings>;
5821
+ listSettings(filters: ListSettingsRequest): Promise<NotificationSettings[]>;
5829
5822
  listAllEvents(): Promise<NotificationSettingsEventType[]>;
5830
5823
  deleteSettings(settingsId: string): Promise<void>;
5831
5824
  }
@@ -5887,24 +5880,147 @@ interface NotificationOptions {
5887
5880
  events?: NotificationSettingsEventType[] | "all";
5888
5881
  channels?: NotificationSetupRequestChannels;
5889
5882
  }
5883
+ interface SetupWorkspaceNotificationSettingsRequest {
5884
+ events: NotificationSettingsEventType[] | "all";
5885
+ channels: NotificationSetupRequestChannels;
5886
+ }
5887
+ interface SetupWorkflowNotificationSettingsRequest extends SetupWorkspaceNotificationSettingsRequest {
5888
+ workflowId: string;
5889
+ }
5890
5890
  declare class NotificationSetupService {
5891
5891
  private readonly channelsService;
5892
5892
  private readonly settingsService;
5893
5893
  constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService);
5894
5894
  /**
5895
- * Complete workflow notification setup including channels and settings
5896
- *
5897
- * @param requestData Workflow notification setup configuration
5898
- * @returns Array of created notification settings
5895
+ * Setup notification settings for a specific workflow ensuring no duplicates exist.
5896
+ */
5897
+ setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<NotificationSettings[]>;
5898
+ /**
5899
+ * Setup notification settings at the workspace level ensuring no duplicates exist.
5900
+ */
5901
+ setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<NotificationSettings[]>;
5902
+ /**
5903
+ * Complete workflow notification setup including channels and settings
5904
+ *
5905
+ * @param requestData Workflow notification setup configuration
5906
+ * @returns Array of created notification settings
5907
+ */
5908
+ setup(requestData: NotificationOptions): Promise<NotificationSettings[]>;
5909
+ setupChannels(requestData: {
5910
+ workflowId?: string;
5911
+ channels: NotificationSetupRequestChannels;
5912
+ }): Promise<NotificationChannel[]>;
5913
+ private handleChannelsById;
5914
+ private handleDefaultChannels;
5915
+ private handleChannelsByConfig;
5916
+ }
5917
+
5918
+ /**
5919
+ * Options for polling operations
5920
+ */
5921
+ interface PollingOptions {
5922
+ /**
5923
+ * Polling interval in milliseconds (minimum 250ms)
5924
+ * @default 1000
5925
+ */
5926
+ pollIntervalMs?: number;
5927
+ /**
5928
+ * Timeout in milliseconds
5929
+ * @default 300000 (5 minutes)
5930
+ */
5931
+ timeoutMs?: number;
5932
+ /**
5933
+ * AbortSignal to cancel the polling operation
5934
+ */
5935
+ abortSignal?: AbortSignal;
5936
+ }
5937
+ /**
5938
+ * Result of a polling operation
5939
+ */
5940
+ interface PollingResult<T> {
5941
+ /**
5942
+ * The final result when polling completes successfully
5943
+ */
5944
+ result: T;
5945
+ /**
5946
+ * The number of polling attempts made
5947
+ */
5948
+ attempts: number;
5949
+ /**
5950
+ * The total time spent polling in milliseconds
5951
+ */
5952
+ duration: number;
5953
+ }
5954
+ /**
5955
+ * Generic polling utility that polls a function until a condition is met
5956
+ *
5957
+ * @param pollFn Function to call on each poll attempt
5958
+ * @param isComplete Function to check if polling should complete
5959
+ * @param options Polling configuration options
5960
+ * @returns Promise that resolves with the polling result
5961
+ *
5962
+ * @example
5963
+ * ```typescript
5964
+ * const result = await pollUntil(
5965
+ * () => api.getStatus(id),
5966
+ * (status) => status.completedAt !== null,
5967
+ * { pollIntervalMs: 2000, timeoutMs: 60000 }
5968
+ * );
5969
+ * ```
5970
+ */
5971
+ declare function pollUntil<T>(pollFn: () => Promise<T>, isComplete: (result: T) => boolean, options?: PollingOptions): Promise<PollingResult<T>>;
5972
+
5973
+ type WorkflowId = string;
5974
+ type JobId = string;
5975
+ interface WaitOptions extends PollingOptions {
5976
+ targetState?: WorkflowStateEnum;
5977
+ }
5978
+ interface JobWaitOptions extends PollingOptions {
5979
+ targetStatus?: JobStateEnum;
5980
+ }
5981
+ interface CreateWorkflowInput {
5982
+ urls: string[];
5983
+ navigationMode: NavigationMode;
5984
+ name: string;
5985
+ description?: string;
5986
+ schemaId?: string;
5987
+ entity: string;
5988
+ fields: Array<SchemaField$1>;
5989
+ tags?: string[];
5990
+ interval?: WorkflowInterval;
5991
+ monitoring?: MonitoringConfig;
5992
+ location?: LocationConfig;
5993
+ bypassPreview?: boolean;
5994
+ autoStart?: boolean;
5995
+ schedules?: string[];
5996
+ }
5997
+ declare class WorkflowsCoreService {
5998
+ private readonly workflowsApi;
5999
+ constructor(workflowsApi: WorkflowsApiInterface);
6000
+ create(input: CreateWorkflowInput): Promise<{
6001
+ id: WorkflowId;
6002
+ }>;
6003
+ get(id: WorkflowId): Promise<GetWorkflowResponse>;
6004
+ list(filters?: ListWorkflowsRequest): Promise<WorkflowResponse[]>;
6005
+ getByName(name: string): Promise<WorkflowResponse | undefined>;
6006
+ cancel(id: WorkflowId): Promise<void>;
6007
+ resume(id: WorkflowId): Promise<void>;
6008
+ /**
6009
+ * Wait for a workflow to reach the target state or a terminal state if no target state is provided
5899
6010
  */
5900
- setup(requestData: NotificationOptions): Promise<NotificationSettings[]>;
5901
- setupChannels(requestData: {
5902
- workflowId?: string;
5903
- channels: NotificationSetupRequestChannels;
5904
- }): Promise<NotificationChannel[]>;
5905
- private handleChannelsById;
5906
- private handleDefaultChannels;
5907
- private handleChannelsByConfig;
6011
+ wait(id: WorkflowId, options?: WaitOptions): Promise<GetWorkflowResponse>;
6012
+ /**
6013
+ * Run a workflow with variables and optional limit
6014
+ */
6015
+ runWorkflow(workflowId: WorkflowId, input: RunWorkflowRequest): Promise<RunWorkflowResponse>;
6016
+ /**
6017
+ * Get job status directly without polling workflow details
6018
+ */
6019
+ getJobStatus(workflowId: WorkflowId, jobId: JobId): Promise<GetJobResponse>;
6020
+ /**
6021
+ * Wait for a job to reach the target state or a terminal state
6022
+ */
6023
+ waitForJobCompletion(workflowId: WorkflowId, jobId: JobId, options?: JobWaitOptions): Promise<GetJobResponse>;
5908
6024
  }
5909
6025
 
5910
6026
  interface ExtractionOptionsInternal {
@@ -5914,13 +6030,13 @@ interface ExtractionOptionsInternal {
5914
6030
  navigationMode: NavigationMode;
5915
6031
  name: string;
5916
6032
  description?: string;
5917
- location: LocationConfig$1;
6033
+ location: LocationConfig;
5918
6034
  bypassPreview?: boolean;
5919
6035
  pollingInterval: number;
5920
6036
  maxWaitTime: number;
5921
6037
  entity: EntityConfig;
5922
6038
  interval?: WorkflowInterval;
5923
- monitoring?: MonitoringConfig;
6039
+ monitoring?: WorkflowMonitoringConfig;
5924
6040
  tags?: string[];
5925
6041
  notifications?: NotificationOptions;
5926
6042
  autoStart?: boolean;
@@ -5930,7 +6046,7 @@ type ExtractionOptions = {
5930
6046
  } & Partial<Omit<ExtractionOptionsInternal, "urls">>;
5931
6047
  interface ExtractionResult {
5932
6048
  workflowId: string;
5933
- workflow?: V4WorkflowsWorkflowIdGet200Response;
6049
+ workflow?: WorkflowDetailsResponse;
5934
6050
  data?: Array<object>;
5935
6051
  pagination?: PageInfo;
5936
6052
  }
@@ -5946,11 +6062,49 @@ declare class ExtractionService {
5946
6062
  private readonly dataFetcherService;
5947
6063
  private readonly entityResolverService;
5948
6064
  private readonly notificationSetupService;
5949
- constructor(workflowsCoreService: WorkflowsCoreService, dataFetcherService: DataFetcherService, entityResolverService: EntityResolverService, notificationSetupService: NotificationSetupService);
6065
+ private readonly notificationChannelsService;
6066
+ private readonly notificationSettingsService;
6067
+ constructor(workflowsCoreService: WorkflowsCoreService, dataFetcherService: DataFetcherService, entityResolverService: EntityResolverService, notificationSetupService: NotificationSetupService, notificationChannelsService: NotificationChannelsService, notificationSettingsService: NotificationSettingsService);
6068
+ /**
6069
+ * Run an extraction workflow and wait for completion.
6070
+ */
6071
+ run(options: ExtractionOptions): Promise<ExtractionResult>;
6072
+ /**
6073
+ * Submit an extraction workflow for asynchronous processing.
6074
+ */
6075
+ submit(options: ExtractionOptions): Promise<SubmitExtractionResult>;
6076
+ /**
6077
+ * Trigger a workflow run without waiting for completion.
6078
+ */
6079
+ runJob(workflowId: string, input: RunWorkflowRequest): Promise<RunWorkflowResponse>;
6080
+ /**
6081
+ * Trigger a workflow run and wait for the job to complete.
6082
+ */
6083
+ runJobAndWait(workflowId: string, input: RunWorkflowRequest): Promise<GetJobResponse>;
6084
+ /**
6085
+ * Fetch a single page of extraction data.
6086
+ */
6087
+ fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
6088
+ /**
6089
+ * Fetch all extraction data across all pages.
6090
+ */
6091
+ fetchAllData(options: FetchDataOptions): Promise<object[]>;
6092
+ /**
6093
+ * Iterate through extraction data pages.
6094
+ */
6095
+ fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
6096
+ /**
6097
+ * List notification channels for a workflow.
6098
+ */
6099
+ getNotificationChannels(workflowId: string): Promise<NotificationChannel[]>;
6100
+ /**
6101
+ * List notification settings for a workflow.
6102
+ */
6103
+ getNotificationSettings(workflowId: string): Promise<NotificationSettings[]>;
5950
6104
  /**
5951
6105
  * execute extraction workflow
5952
6106
  */
5953
- executeExtraction(options: ExtractionOptions): Promise<ExtractionResult | SubmitExtractionResult>;
6107
+ private executeExtraction;
5954
6108
  /**
5955
6109
  * Validates extraction options
5956
6110
  */
@@ -5965,174 +6119,227 @@ declare class ExtractionService {
5965
6119
  private isExtractionSuccessful;
5966
6120
  }
5967
6121
 
5968
- declare class ExtractionModule {
5969
- private readonly extractionService;
5970
- private readonly dataFetcherService;
5971
- private readonly channelsService;
5972
- private readonly settingsService;
5973
- private readonly workflowsCoreService;
5974
- constructor(extractionService: ExtractionService, dataFetcherService: DataFetcherService, channelsService: NotificationChannelsService, settingsService: NotificationSettingsService, workflowsCoreService: WorkflowsCoreService);
5975
- /**
5976
- * Run extraction workflow using dynamic entity detection
5977
- *
5978
- * @param options Extraction configuration options including optional notification settings
5979
- * @returns ExtractionResult containing workflow ID, workflow details, and first page of extracted data
5980
- *
5981
- * @example Simple extraction with AI detection
5982
- * ```typescript
5983
- * const result = await client.extraction.run({
5984
- * urls: ['https://example.com'],
5985
- * name: 'My Extraction'
5986
- * });
5987
- * ```
5988
- *
5989
- * @example With notifications
5990
- * ```typescript
5991
- * const result = await client.extraction.run({
5992
- * urls: ['https://example.com'],
5993
- * name: 'My Extraction',
5994
- * notifications: {
5995
- * events: ['workflow_completed', 'workflow_failed'],
5996
- * channels: {
5997
- * email: true,
5998
- * slack: { channelId: 'slack-channel-id' }
5999
- * }
6000
- * }
6001
- * });
6002
- * ```
6003
- *
6004
- * @see {@link KadoaClient.extract} For more flexible extraction configuration using the builder API
6005
- */
6006
- run(options: ExtractionOptions): Promise<ExtractionResult>;
6007
- /**
6008
- * Submit extraction workflow for background processing
6009
- *
6010
- * @param options Extraction configuration options including optional notification settings
6011
- * @returns SubmitExtractionResult containing workflow ID
6012
- *
6013
- * @example
6014
- * ```typescript
6015
- * const result = await client.extraction.submit({
6016
- * urls: ['https://example.com'],
6017
- * name: 'My Extraction',
6018
- * notifications: {
6019
- * events: 'all',
6020
- * channels: {
6021
- * email: true
6022
- * }
6023
- * }
6024
- * });
6025
- * ```
6026
- *
6027
- * @see {@link KadoaClient.extract} For more flexible extraction configuration using the builder API
6028
- */
6029
- submit(options: ExtractionOptions): Promise<SubmitExtractionResult>;
6030
- /**
6031
- * Run a workflow with variables and optional limit
6032
- */
6033
- runJob(workflowId: string, input: RunWorkflowInput): Promise<StartedJob>;
6034
- /**
6035
- * Run a workflow and wait for it to complete
6036
- */
6037
- runJobAndWait(workflowId: string, input: RunWorkflowInput): Promise<FinishedJob>;
6122
+ /**
6123
+ * Schemas domain ACL.
6124
+ * Wraps generated SchemasApi requests/responses and normalizes types.
6125
+ * Downstream code must import from this module instead of `generated/**`.
6126
+ *
6127
+ * NOTE: This ACL uses type aliases instead of explicit classes/interfaces because:
6128
+ * - The generated types (CreateSchemaBody, UpdateSchemaBody, SchemaResponse) are flat interfaces
6129
+ * - They contain only primitive fields and simple nested types (SchemaResponseSchemaInner)
6130
+ * - No enums or complex nested structures that could leak implementation details
6131
+ * - The types are stable and unlikely to change in structure
6132
+ */
6133
+
6134
+ /**
6135
+ * Request to create a new schema.
6136
+ * Re-exported from generated CreateSchemaBody model with JSDoc preserved.
6137
+ */
6138
+ type CreateSchemaRequest = CreateSchemaBody;
6139
+ /**
6140
+ * Request to update an existing schema.
6141
+ * Re-exported from generated UpdateSchemaBody model with JSDoc preserved.
6142
+ */
6143
+ type UpdateSchemaRequest = UpdateSchemaBody;
6144
+ /**
6145
+ * Schema response data.
6146
+ * Re-exported from generated SchemaResponse model with JSDoc preserved.
6147
+ */
6148
+ type SchemaResponse = SchemaResponse$1;
6149
+ /**
6150
+ * Schema field definition.
6151
+ * Re-exported from generated SchemaResponseSchemaInner model.
6152
+ */
6153
+ type SchemaField = SchemaResponseSchemaInner;
6154
+ /**
6155
+ * Example value for a field.
6156
+ * Re-exported from generated ExtractionSchemaFieldExample model.
6157
+ */
6158
+ type FieldExample = ExtractionSchemaFieldExample;
6159
+ /**
6160
+ * Category definition for classification fields.
6161
+ * Re-exported from generated ExtractionClassificationFieldCategoriesInner model.
6162
+ */
6163
+ type Category = ExtractionClassificationFieldCategoriesInner;
6164
+
6165
+ /**
6166
+ * Optional configuration for schema fields
6167
+ */
6168
+ interface FieldOptions {
6038
6169
  /**
6039
- * Fetch paginated data from a workflow
6040
- *
6041
- * @param options Options for fetching data including workflowId and pagination parameters
6042
- * @returns Paginated workflow data with metadata
6043
- *
6044
- * @example
6045
- * ```typescript
6046
- * // Fetch first page
6047
- * const firstPage = await client.extraction.fetchData({
6048
- * workflowId: 'workflow-id',
6049
- * page: 1,
6050
- * limit: 100
6051
- * });
6052
- *
6053
- * // Iterate through all pages
6054
- * for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
6055
- * console.log(`Processing ${page.data.length} records`);
6056
- * }
6057
- * ```
6170
+ * Example value for the field (required for STRING, IMAGE, LINK, OBJECT, ARRAY)
6171
+ * Can be a string or an array of strings
6058
6172
  */
6059
- fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
6173
+ example?: FieldExample;
6060
6174
  /**
6061
- * Fetch all data from a workflow across all pages
6062
- *
6063
- * @param options Options for fetching data
6064
- * @returns All workflow data combined from all pages
6065
- *
6066
- * @example
6067
- * ```typescript
6068
- * const allData = await client.extraction.fetchAllData({
6069
- * workflowId: 'workflow-id'
6070
- * });
6071
- * ```
6175
+ * Whether this field is a primary key
6072
6176
  */
6073
- fetchAllData(options: FetchDataOptions): Promise<Array<object>>;
6177
+ isKey?: boolean;
6178
+ }
6179
+ /**
6180
+ * Builder for defining custom schemas with fields
6181
+ */
6182
+ declare class SchemaBuilder {
6183
+ private static readonly FIELD_NAME_PATTERN;
6184
+ private static readonly TYPES_REQUIRING_EXAMPLE;
6185
+ readonly fields: SchemaField[];
6186
+ entityName?: string;
6187
+ entity(entityName: string): this;
6074
6188
  /**
6075
- * Create an async iterator for paginated data fetching
6076
- *
6077
- * @param options Options for fetching data
6078
- * @returns Async iterator that yields pages of data
6079
- *
6080
- * @example
6081
- * ```typescript
6082
- * for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
6083
- * console.log(`Page ${page.pagination.page}: ${page.data.length} records`);
6084
- * }
6085
- * ```
6189
+ * Add a structured field to the schema
6190
+ * @param name - Field name (alphanumeric only)
6191
+ * @param description - Field description
6192
+ * @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
6193
+ * @param options - Optional field configuration
6086
6194
  */
6087
- fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
6195
+ field(name: string, description: string, dataType: DataType, options?: FieldOptions): this;
6088
6196
  /**
6089
- * Get notification channels for a workflow
6090
- *
6091
- * @param workflowId The workflow ID
6092
- * @returns Array of notification channels
6093
- *
6094
- * @example
6095
- * ```typescript
6096
- * const channels = await client.extraction.getNotificationChannels('workflow-id');
6097
- * ```
6197
+ * Add a classification field to categorize content
6198
+ * @param name - Field name (alphanumeric only)
6199
+ * @param description - Field description
6200
+ * @param categories - Array of category definitions
6098
6201
  */
6099
- getNotificationChannels(workflowId: string): Promise<src_generated.V5NotificationsChannelsGet200ResponseDataChannelsInner[]>;
6202
+ classify(name: string, description: string, categories: Category[]): this;
6100
6203
  /**
6101
- * Get notification settings for a workflow
6102
- *
6103
- * @param workflowId The workflow ID
6104
- * @returns Array of notification settings
6105
- *
6106
- * @example
6107
- * ```typescript
6108
- * const settings = await client.extraction.getNotificationSettings('workflow-id');
6109
- * ```
6204
+ * Add raw page content to extract
6205
+ * @param name - Raw content format(s): "html", "markdown", or "url"
6110
6206
  */
6111
- getNotificationSettings(workflowId: string): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
6207
+ raw(name: RawFormat | RawFormat[]): this;
6208
+ build(): {
6209
+ entityName: string;
6210
+ fields: SchemaField[];
6211
+ };
6212
+ private validateFieldName;
6112
6213
  }
6113
6214
 
6114
- interface SetupWorkspaceNotificationSettingsRequest {
6115
- events: NotificationSettingsEventType[] | "all";
6116
- channels: NotificationSetupRequestChannels;
6215
+ interface ExtractOptionsInternal {
6216
+ urls: string[];
6217
+ name: string;
6218
+ description?: string;
6219
+ navigationMode: NavigationMode;
6220
+ entity: EntityConfig;
6221
+ bypassPreview?: boolean;
6222
+ interval?: WorkflowInterval;
6223
+ schedules?: string[];
6224
+ location?: LocationConfig;
6117
6225
  }
6118
- interface SetupWorkflowNotificationSettingsRequest extends SetupWorkspaceNotificationSettingsRequest {
6226
+ interface ExtractOptions extends Omit<ExtractOptionsInternal, "navigationMode" | "entity"> {
6227
+ navigationMode?: NavigationMode;
6228
+ extraction?: (builder: SchemaBuilder) => SchemaBuilder | {
6229
+ schemaId: string;
6230
+ };
6231
+ }
6232
+ interface PreparedExtraction {
6233
+ options: ExtractOptionsInternal;
6234
+ withNotifications: (options: NotificationOptions) => PreparedExtraction;
6235
+ withMonitoring: (options: WorkflowMonitoringConfig) => PreparedExtraction;
6236
+ setInterval: (options: {
6237
+ interval: WorkflowInterval;
6238
+ } | {
6239
+ schedules: string[];
6240
+ }) => PreparedExtraction;
6241
+ bypassPreview: () => PreparedExtraction;
6242
+ setLocation: (options: LocationConfig) => PreparedExtraction;
6243
+ create: () => Promise<CreatedExtraction>;
6244
+ }
6245
+ interface RunWorkflowOptions {
6246
+ variables: Record<string, unknown>;
6247
+ limit: number;
6248
+ }
6249
+ interface CreatedExtraction {
6250
+ options: ExtractOptionsInternal;
6251
+ workflowId: string;
6252
+ run: (options?: RunWorkflowOptions) => Promise<FinishedExtraction>;
6253
+ submit: (options?: RunWorkflowOptions) => Promise<SubmittedExtraction>;
6254
+ }
6255
+ interface SubmittedExtraction {
6119
6256
  workflowId: string;
6257
+ jobId: string;
6120
6258
  }
6121
- declare class NotificationsModule {
6122
- private readonly channelsService;
6123
- private readonly settingsService;
6124
- private readonly channelSetupService;
6125
- constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService, channelSetupService: NotificationSetupService);
6126
- setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
6127
- setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
6259
+ interface FinishedExtraction {
6260
+ jobId: string;
6261
+ fetchData: (options: Omit<FetchDataOptions, "workflowId" | "runId">) => Promise<FetchDataResult>;
6262
+ fetchAllData: (options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">) => Promise<object[]>;
6263
+ }
6264
+ declare class ExtractionBuilderService {
6265
+ private readonly workflowsCoreService;
6266
+ private readonly entityResolverService;
6267
+ private readonly dataFetcherService;
6268
+ private readonly notificationSetupService;
6269
+ private _options;
6270
+ private _workflowId;
6271
+ private _jobId;
6272
+ private _notificationOptions;
6273
+ private _monitoringOptions;
6274
+ get options(): ExtractOptionsInternal;
6275
+ get notificationOptions(): NotificationOptions | undefined;
6276
+ get monitoringOptions(): WorkflowMonitoringConfig | undefined;
6277
+ get workflowId(): string;
6278
+ get jobId(): string;
6279
+ constructor(workflowsCoreService: WorkflowsCoreService, entityResolverService: EntityResolverService, dataFetcherService: DataFetcherService, notificationSetupService: NotificationSetupService);
6280
+ extract({ urls, name, description, navigationMode, extraction, }: ExtractOptions): PreparedExtraction;
6281
+ withNotifications(options: Omit<NotificationOptions, "workflowId">): PreparedExtraction;
6282
+ withMonitoring(options: WorkflowMonitoringConfig): PreparedExtraction;
6283
+ bypassPreview(): PreparedExtraction;
6284
+ setInterval(options: {
6285
+ interval: WorkflowInterval;
6286
+ } | {
6287
+ schedules: string[];
6288
+ }): PreparedExtraction;
6289
+ setLocation(options: LocationConfig): PreparedExtraction;
6290
+ create(): Promise<CreatedExtraction>;
6291
+ run(options?: RunWorkflowOptions): Promise<FinishedExtraction>;
6292
+ submit(options?: RunWorkflowOptions): Promise<SubmittedExtraction>;
6293
+ fetchData(options: Omit<FetchDataOptions, "workflowId" | "runId">): Promise<FetchDataResult>;
6294
+ fetchAllData(options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">): Promise<object[]>;
6295
+ }
6296
+
6297
+ interface RealtimeConfig {
6298
+ teamApiKey: string;
6299
+ heartbeatInterval?: number;
6300
+ reconnectDelay?: number;
6301
+ missedHeartbeatsLimit?: number;
6302
+ }
6303
+ declare class Realtime {
6304
+ private socket?;
6305
+ private heartbeatInterval;
6306
+ private reconnectDelay;
6307
+ private lastHeartbeat;
6308
+ private isConnecting;
6309
+ private missedHeartbeatsLimit;
6310
+ private missedHeartbeatCheckTimer?;
6311
+ private teamApiKey?;
6312
+ private eventListeners;
6313
+ private connectionListeners;
6314
+ private errorListeners;
6315
+ constructor(config: RealtimeConfig);
6316
+ connect(): Promise<void>;
6317
+ private handleHeartbeat;
6318
+ private notifyEventListeners;
6319
+ private notifyConnectionListeners;
6320
+ private notifyErrorListeners;
6321
+ private startHeartbeatCheck;
6322
+ private stopHeartbeatCheck;
6323
+ /**
6324
+ * Subscribe to realtime events
6325
+ * @param listener Function to handle incoming events
6326
+ * @returns Function to unsubscribe
6327
+ */
6328
+ onEvent(listener: (event: unknown) => void): () => void;
6128
6329
  /**
6129
- * Get the channels service
6330
+ * Subscribe to connection state changes
6331
+ * @param listener Function to handle connection state changes
6332
+ * @returns Function to unsubscribe
6130
6333
  */
6131
- get channels(): NotificationChannelsService;
6334
+ onConnection(listener: (connected: boolean, reason?: string) => void): () => void;
6132
6335
  /**
6133
- * Get the settings service
6336
+ * Subscribe to errors
6337
+ * @param listener Function to handle errors
6338
+ * @returns Function to unsubscribe
6134
6339
  */
6135
- get settings(): NotificationSettingsService;
6340
+ onError(listener: (error: unknown) => void): () => void;
6341
+ close(): void;
6342
+ isConnected(): boolean;
6136
6343
  }
6137
6344
 
6138
6345
  /**
@@ -6141,6 +6348,12 @@ declare class NotificationsModule {
6141
6348
  declare class SchemasService {
6142
6349
  private readonly schemasApi;
6143
6350
  constructor(client: KadoaClient);
6351
+ /**
6352
+ * Create a schema builder with fluent API and inline create support.
6353
+ */
6354
+ builder(entityName: string): SchemaBuilder & {
6355
+ create(name?: string): Promise<SchemaResponse>;
6356
+ };
6144
6357
  /**
6145
6358
  * Get a schema by ID
6146
6359
  */
@@ -6152,11 +6365,11 @@ declare class SchemasService {
6152
6365
  /**
6153
6366
  * Create a new schema
6154
6367
  */
6155
- createSchema(body: CreateSchemaBody): Promise<SchemaResponse>;
6368
+ createSchema(body: CreateSchemaRequest): Promise<SchemaResponse>;
6156
6369
  /**
6157
6370
  * Update an existing schema
6158
6371
  */
6159
- updateSchema(schemaId: string, body: UpdateSchemaBody): Promise<SchemaResponse>;
6372
+ updateSchema(schemaId: string, body: UpdateSchemaRequest): Promise<SchemaResponse>;
6160
6373
  /**
6161
6374
  * Delete a schema
6162
6375
  */
@@ -6164,314 +6377,148 @@ declare class SchemasService {
6164
6377
  }
6165
6378
 
6166
6379
  /**
6167
- * Example value for a field (re-exported from generated types)
6380
+ * Validation domain ACL.
6381
+ * Wraps generated DataValidationApi requests/responses and normalizes enums.
6382
+ * Downstream code must import from this module instead of `generated/**`.
6168
6383
  */
6169
- type FieldExample = ExtractionSchemaFieldExample;
6384
+
6170
6385
  /**
6171
- * Optional configuration for schema fields
6386
+ * Rule status enum.
6172
6387
  */
6173
- interface FieldOptions {
6174
- /**
6175
- * Example value for the field (required for STRING, IMAGE, LINK, OBJECT, ARRAY)
6176
- * Can be a string or an array of strings
6177
- */
6178
- example?: FieldExample;
6179
- /**
6180
- * Whether this field is a primary key
6181
- */
6182
- isKey?: boolean;
6183
- }
6388
+ declare const RuleStatus: {
6389
+ readonly Preview: "preview";
6390
+ readonly Enabled: "enabled";
6391
+ readonly Disabled: "disabled";
6392
+ };
6393
+ type RuleStatus = (typeof RuleStatus)[keyof typeof RuleStatus];
6184
6394
  /**
6185
- * Category definition for classification fields (re-exported from generated types)
6395
+ * Rule type enum.
6186
6396
  */
6187
- type Category = ExtractionClassificationFieldCategoriesInner;
6397
+ declare const RuleType: {
6398
+ readonly CustomSql: "custom_sql";
6399
+ };
6400
+ type RuleType = (typeof RuleType)[keyof typeof RuleType];
6188
6401
  /**
6189
- * Builder for defining custom schemas with fields
6402
+ * Validation strategy enum.
6190
6403
  */
6191
- declare class SchemaBuilder {
6192
- private static readonly FIELD_NAME_PATTERN;
6193
- private static readonly TYPES_REQUIRING_EXAMPLE;
6194
- readonly fields: SchemaField[];
6195
- entityName?: string;
6196
- entity(entityName: string): this;
6197
- /**
6198
- * Add a structured field to the schema
6199
- * @param name - Field name (alphanumeric only)
6200
- * @param description - Field description
6201
- * @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
6202
- * @param options - Optional field configuration
6203
- */
6204
- field(name: string, description: string, dataType: DataType, options?: FieldOptions): this;
6205
- /**
6206
- * Add a classification field to categorize content
6207
- * @param name - Field name (alphanumeric only)
6208
- * @param description - Field description
6209
- * @param categories - Array of category definitions
6210
- */
6211
- classify(name: string, description: string, categories: Category[]): this;
6212
- /**
6213
- * Add raw page content to extract
6214
- * @param name - Raw content format(s): "html", "markdown", or "url"
6215
- */
6216
- raw(name: RawFormat | RawFormat[]): this;
6217
- build(): {
6218
- entityName: string;
6219
- fields: SchemaField[];
6220
- };
6221
- private validateFieldName;
6222
- }
6223
-
6404
+ declare const ValidationStrategy: {
6405
+ readonly Isolated: "ISOLATED";
6406
+ readonly LinkingColumns: "LINKING_COLUMNS";
6407
+ };
6408
+ type ValidationStrategy = (typeof ValidationStrategy)[keyof typeof ValidationStrategy];
6224
6409
  /**
6225
- * Schema builder with create capability
6226
- * Extends SchemaBuilder to add direct schema creation
6410
+ * Include deleted rules parameter.
6227
6411
  */
6228
- declare class SchemaBuilderWithCreate extends SchemaBuilder {
6229
- private readonly service;
6230
- constructor(entityName: string, service: SchemasService);
6231
- /**
6232
- * Create the schema directly in Kadoa
6233
- * @param name - Optional schema name (defaults to entity name)
6234
- * @returns Promise resolving to the created schema
6235
- */
6236
- create(name?: string): Promise<SchemaResponse>;
6412
+ type IncludeDeletedRules = V4DataValidationRulesGetIncludeDeletedParameter;
6413
+ declare class ListRulesRequest implements DataValidationApiV4DataValidationRulesGetRequest {
6414
+ groupId?: string;
6415
+ workflowId?: string;
6416
+ status?: RuleStatus;
6417
+ page?: number;
6418
+ pageSize?: number;
6419
+ includeDeleted?: IncludeDeletedRules;
6237
6420
  }
6238
- /**
6239
- * Schemas module for managing schemas
6240
- */
6241
- declare class SchemasModule {
6242
- private readonly service;
6243
- constructor(service: SchemasService);
6244
- /**
6245
- * Create a new schema builder for fluent schema definition
6246
- * @param entityName - The name of the entity this schema represents
6247
- * @returns A new SchemaBuilder instance with the entity name already set
6248
- * @example Build then create
6249
- * ```typescript
6250
- * const schema = kadoa.schema.builder("Product")
6251
- * .field("title", "Product name", "STRING", { example: "iPhone 15" })
6252
- * .field("price", "Product price", "NUMBER")
6253
- * .build();
6254
- *
6255
- * await kadoa.schema.create(schema);
6256
- * ```
6257
- *
6258
- * @example Fluent chain with create
6259
- * ```typescript
6260
- * const schema = await kadoa.schema.builder("Product")
6261
- * .field("title", "Product name", "STRING", { example: "iPhone 15" })
6262
- * .field("price", "Product price", "NUMBER")
6263
- * .create("Product Schema");
6264
- * ```
6265
- */
6266
- builder(entityName: string): SchemaBuilderWithCreate;
6267
- /**
6268
- * Get a schema by ID
6269
- */
6270
- get(schemaId: string): Promise<SchemaResponse>;
6271
- /**
6272
- * List all schemas
6273
- */
6274
- list(): Promise<SchemaResponse[]>;
6275
- /**
6276
- * Create a new schema from a body
6277
- */
6278
- create(body: CreateSchemaBody): Promise<SchemaResponse>;
6279
- /**
6280
- * Update an existing schema
6281
- */
6282
- update(schemaId: string, body: UpdateSchemaBody): Promise<SchemaResponse>;
6283
- /**
6284
- * Delete a schema
6285
- */
6286
- delete(schemaId: string): Promise<void>;
6421
+ type CreateRuleRequest = CreateRule;
6422
+ type GenerateRuleRequest = GenerateRule;
6423
+ type GenerateRulesRequest = GenerateRules;
6424
+ type UpdateRuleRequest = UpdateRule;
6425
+ interface DisableRuleRequest {
6426
+ ruleId: string;
6427
+ disableRule?: DisableRule;
6287
6428
  }
6288
-
6429
+ type BulkApproveRulesRequest = BulkApproveRules;
6430
+ type BulkDeleteRulesRequest = BulkDeleteRules;
6431
+ type DeleteAllRulesRequest = DeleteRuleWithReason;
6289
6432
  /**
6290
- * UserModule provides user management functionality
6291
- *
6292
- * @example
6293
- * ```typescript
6294
- * import { KadoaClient } from '@kadoa/sdk';
6295
- *
6296
- * const client = new KadoaClient({
6297
- * apiKey: 'your-api-key'
6298
- * });
6299
- *
6300
- * // Get current user details
6301
- * const currentUser = await client.user.getCurrentUser();
6302
- * ```
6433
+ * Rule with SDK-curated enum types.
6434
+ * Remaps generated enum fields to prevent type leakage.
6303
6435
  */
6304
- declare class UserModule {
6305
- private readonly userService;
6306
- constructor(userService: UserService);
6307
- /**
6308
- * Get the underlying UserService instance
6309
- * @returns UserService instance
6310
- */
6311
- get service(): UserService;
6312
- /**
6313
- * Get current user details
6314
- * @returns KadoaUser details
6315
- */
6316
- getCurrentUser(): Promise<KadoaUser>;
6436
+ interface Rule extends Omit<Rule$1, "status" | "ruleType"> {
6437
+ status: RuleStatus;
6438
+ ruleType?: RuleType;
6317
6439
  }
6318
-
6319
- type ListRulesOptions = DataValidationApiV4DataValidationRulesGetRequest;
6320
- type CreateRuleOptions = DataValidationApiV4DataValidationRulesPostRequest["createRule"];
6321
- type GenerateRuleOptions = DataValidationApiV4DataValidationRulesActionsGeneratePostRequest["generateRule"];
6322
- type GenerateRulesOptions = DataValidationApiV4DataValidationRulesActionsGenerateRulesPostRequest["generateRules"];
6323
- type UpdateRuleOptions = DataValidationApiV4DataValidationRulesRuleIdPutRequest["updateRule"];
6324
- type DisableRuleOptions = DataValidationApiV4DataValidationRulesRuleIdDisablePostRequest;
6325
- type BulkApproveRulesOptions = DataValidationApiV4DataValidationRulesActionsBulkApprovePostRequest["bulkApproveRules"];
6326
- type BulkDeleteRulesOptions = DataValidationApiV4DataValidationRulesActionsBulkDeletePostRequest["bulkDeleteRules"];
6327
- type DeleteAllRulesOptions = DataValidationApiV4DataValidationRulesActionsDeleteAllDeleteRequest["deleteRuleWithReason"];
6440
+ type ListRulesResponse = RulesListResponse;
6328
6441
  type BulkApproveRulesResponseData = BulkApproveRulesResponse["data"];
6329
6442
  type BulkDeleteRulesResponseData = BulkDeleteRulesResponse["data"];
6330
6443
  type DeleteAllRulesResponseData = DeleteAllRulesResponse["data"];
6331
-
6444
+ declare class ListWorkflowValidationsRequest implements DataValidationApiV4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGetRequest {
6445
+ workflowId: string;
6446
+ jobId: string;
6447
+ page?: number;
6448
+ pageSize?: number;
6449
+ includeDryRun?: boolean | null;
6450
+ }
6451
+ type ListValidationsResponse = ValidationListResponse;
6332
6452
  /**
6333
- * Service for managing data validation rules
6453
+ * Validation report with SDK-curated enum types.
6334
6454
  */
6335
- declare class ValidationRulesService {
6336
- private readonly validationApi;
6337
- constructor(client: KadoaClient);
6338
- listRules(options?: ListRulesOptions): Promise<RulesListResponse>;
6339
- getRuleById(ruleId: string): Promise<Rule | undefined>;
6340
- getRuleByName(name: string): Promise<Rule | undefined>;
6341
- createRule(data: CreateRuleOptions): Promise<Rule>;
6342
- updateRule(ruleId: string, updateData: UpdateRuleOptions): Promise<Rule>;
6343
- disableRule(data: DisableRuleOptions): Promise<Rule>;
6344
- generateRule(data: GenerateRuleOptions): Promise<Rule>;
6345
- generateRules(data: GenerateRulesOptions): Promise<Rule[]>;
6346
- bulkApproveRules(data: BulkApproveRulesOptions): Promise<BulkApproveRulesResponseData>;
6347
- bulkDeleteRules(data: BulkDeleteRulesOptions): Promise<BulkDeleteRulesResponseData>;
6348
- deleteAllRules(data: DeleteAllRulesOptions): Promise<DeleteAllRulesResponseData>;
6455
+ interface GetValidationResponse extends Omit<DataValidationReport, "strategy"> {
6456
+ strategy?: ValidationStrategy;
6349
6457
  }
6458
+ type ToggleValidationResponse = V4DataValidationWorkflowsWorkflowIdValidationTogglePut200Response;
6350
6459
 
6351
- type ToggleResponse = V4DataValidationWorkflowsWorkflowIdValidationTogglePut200Response;
6352
- type ListWorkflowValidationsOptions = DataValidationApiV4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGetRequest;
6353
- type WaitUntilCompletedOptions = PollingOptions;
6460
+ type GetAnomaliesByRuleResponse = AnomaliesByRuleResponse;
6461
+ type GetAnomalyRulePageResponse = AnomalyRulePageResponse;
6354
6462
 
6355
6463
  declare class ValidationCoreService {
6356
6464
  private readonly validationApi;
6357
6465
  constructor(client: KadoaClient);
6358
- listWorkflowValidations(filters: ListWorkflowValidationsOptions): Promise<ValidationListResponse>;
6359
- getValidationDetails(validationId: string): Promise<DataValidationReport>;
6360
- scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
6361
- toggleValidationEnabled(workflowId: string): Promise<ToggleResponse>;
6362
- getLatestValidation(workflowId: string, jobId?: string): Promise<DataValidationReport>;
6363
- getValidationAnomalies(validationId: string): Promise<AnomaliesByRuleResponse>;
6364
- getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<AnomalyRulePageResponse>;
6365
- waitUntilCompleted(validationId: string, options?: WaitUntilCompletedOptions): Promise<DataValidationReport>;
6366
- }
6367
-
6368
- declare class ValidationModule {
6369
- private readonly coreService;
6370
- private readonly rulesService;
6371
- constructor(coreService: ValidationCoreService, rulesService: ValidationRulesService);
6372
- listRules(options?: ListRulesOptions): Promise<RulesListResponse>;
6373
- getRuleByName(name: string): Promise<Rule | undefined>;
6374
- createRule(data: CreateRuleOptions): Promise<Rule>;
6375
- generateRule(data: GenerateRuleOptions): Promise<Rule>;
6376
- generateRules(data: GenerateRulesOptions): Promise<Rule[]>;
6377
- bulkApproveRules(data: BulkApproveRulesOptions): Promise<BulkApproveRulesResponseData>;
6378
- bulkDeleteRules(data: BulkDeleteRulesOptions): Promise<BulkDeleteRulesResponseData>;
6379
- deleteAllRules(data: DeleteAllRulesOptions): Promise<DeleteAllRulesResponseData>;
6380
- listWorkflowValidations(workflowId: string, jobId: string): Promise<ValidationListResponse>;
6466
+ listWorkflowValidations(filters: ListWorkflowValidationsRequest): Promise<ListValidationsResponse>;
6467
+ getValidationDetails(validationId: string): Promise<GetValidationResponse>;
6381
6468
  scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
6382
- waitUntilCompleted(validationId: string, options?: WaitUntilCompletedOptions): Promise<DataValidationReport>;
6383
- getValidationDetails(validationId: string): Promise<DataValidationReport>;
6384
- getLatestValidation(workflowId: string, jobId?: string): Promise<DataValidationReport>;
6385
- getValidationAnomalies(validationId: string): Promise<AnomaliesByRuleResponse>;
6386
- getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<AnomalyRulePageResponse>;
6387
- toggleValidationEnabled(workflowId: string): Promise<ToggleResponse>;
6469
+ toggleValidationEnabled(workflowId: string): Promise<ToggleValidationResponse>;
6470
+ getLatestValidation(workflowId: string, jobId?: string): Promise<GetValidationResponse>;
6471
+ getValidationAnomalies(validationId: string): Promise<GetAnomaliesByRuleResponse>;
6472
+ getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<GetAnomalyRulePageResponse>;
6473
+ waitUntilCompleted(validationId: string, options?: PollingOptions): Promise<GetValidationResponse>;
6388
6474
  }
6389
6475
 
6390
- interface WaitOptions {
6391
- pollIntervalMs?: number;
6392
- timeoutMs?: number;
6393
- }
6394
- declare class WorkflowsModule {
6395
- private readonly core;
6396
- constructor(core: WorkflowsCoreService);
6397
- get(workflowId: string): Promise<V4WorkflowsWorkflowIdGet200Response>;
6398
- list(filters?: ListWorkflowsOptions): Promise<V4WorkflowsGet200ResponseWorkflowsInner[]>;
6399
- getByName(name: string): Promise<V4WorkflowsGet200ResponseWorkflowsInner | undefined>;
6400
- create(input: CreateWorkflowInput): Promise<{
6401
- id: WorkflowId;
6402
- }>;
6403
- cancel(workflowId: string): Promise<void>;
6404
- approve(workflowId: string): Promise<void>;
6405
- resume(workflowId: string): Promise<void>;
6406
- wait(workflowId: string, options?: WaitOptions): Promise<V4WorkflowsWorkflowIdGet200Response>;
6407
- /**
6408
- * Get job status directly without polling workflow details
6409
- */
6410
- getJobStatus(workflowId: string, jobId: string): Promise<FinishedJob>;
6411
- /**
6412
- * Wait for a job to complete using the job status endpoint
6413
- */
6414
- waitForJobCompletion(workflowId: string, jobId: string, options?: JobWaitOptions): Promise<FinishedJob>;
6476
+ /**
6477
+ * Service for managing data validation rules
6478
+ */
6479
+ declare class ValidationRulesService {
6480
+ private readonly validationApi;
6481
+ constructor(client: KadoaClient);
6482
+ listRules(options?: ListRulesRequest): Promise<ListRulesResponse>;
6483
+ getRuleById(ruleId: string): Promise<Rule | undefined>;
6484
+ getRuleByName(name: string): Promise<Rule | undefined>;
6485
+ createRule(data: CreateRuleRequest): Promise<Rule>;
6486
+ updateRule(ruleId: string, updateData: UpdateRuleRequest): Promise<Rule>;
6487
+ disableRule(data: DisableRuleRequest): Promise<Rule>;
6488
+ generateRule(data: GenerateRuleRequest): Promise<Rule>;
6489
+ generateRules(data: GenerateRulesRequest): Promise<Rule[]>;
6490
+ bulkApproveRules(data: BulkApproveRulesRequest): Promise<BulkApproveRulesResponseData>;
6491
+ bulkDeleteRules(data: BulkDeleteRulesRequest): Promise<BulkDeleteRulesResponseData>;
6492
+ deleteAllRules(data: DeleteAllRulesRequest): Promise<DeleteAllRulesResponseData>;
6415
6493
  }
6416
6494
 
6417
- interface ExtractOptionsInternal {
6418
- urls: string[];
6419
- name: string;
6420
- description?: string;
6421
- navigationMode: NavigationMode;
6422
- entity: EntityConfig;
6423
- bypassPreview?: boolean;
6424
- interval?: WorkflowInterval;
6425
- schedules?: string[];
6426
- location?: LocationConfig$1;
6427
- }
6428
- interface ExtractOptions extends Omit<ExtractOptionsInternal, "navigationMode" | "entity"> {
6429
- navigationMode?: NavigationMode;
6495
+ /**
6496
+ * Facade exposing validation operations directly on the client validation domain,
6497
+ * while preserving access to the underlying `rules` services.
6498
+ */
6499
+ interface ValidationDomain {
6500
+ /** Rule management utilities. */
6501
+ rules: ValidationRulesService;
6430
6502
  /**
6431
- * Extraction configuration builder function
6432
- * @example
6433
- * ```typescript
6434
- * extraction: builder => builder
6435
- * .schema("Product")
6436
- * .field("title", "Product name", "STRING", { example: "Example Product" })
6437
- * .field("price", "Product price", "CURRENCY")
6438
- * ```
6439
- */
6440
- extraction?: (builder: SchemaBuilder) => SchemaBuilder | {
6441
- schemaId: string;
6442
- };
6443
- }
6444
- interface PreparedExtraction {
6445
- options: ExtractOptionsInternal;
6446
- withNotifications: (options: NotificationOptions) => PreparedExtraction;
6447
- withMonitoring: (options: MonitoringConfig) => PreparedExtraction;
6448
- setInterval: (options: {
6449
- interval: WorkflowInterval;
6450
- } | {
6451
- schedules: string[];
6452
- }) => PreparedExtraction;
6453
- bypassPreview: () => PreparedExtraction;
6454
- setLocation: (options: LocationConfig$1) => PreparedExtraction;
6455
- create: () => Promise<CreatedExtraction>;
6456
- }
6457
- interface RunWorkflowOptions {
6458
- variables: Record<string, unknown>;
6459
- limit: number;
6460
- }
6461
- interface CreatedExtraction {
6462
- options: ExtractOptionsInternal;
6463
- workflowId: string;
6464
- run: (options?: RunWorkflowOptions) => Promise<FinishedExtraction>;
6465
- submit: (options?: RunWorkflowOptions) => Promise<SubmittedExtraction>;
6466
- }
6467
- interface SubmittedExtraction {
6468
- workflowId: string;
6469
- jobId: string;
6470
- }
6471
- interface FinishedExtraction {
6472
- jobId: string;
6473
- fetchData: (options: Omit<FetchDataOptions, "workflowId" | "runId">) => Promise<FetchDataResult>;
6474
- fetchAllData: (options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">) => Promise<object[]>;
6503
+ * Schedule a validation run for a workflow/job.
6504
+ *
6505
+ * Example: `await client.validation.schedule(workflowId, jobId)`
6506
+ */
6507
+ schedule: (...args: Parameters<ValidationCoreService["scheduleValidation"]>) => ReturnType<ValidationCoreService["scheduleValidation"]>;
6508
+ /** List validations for a workflow/job. */
6509
+ listWorkflowValidations: (...args: Parameters<ValidationCoreService["listWorkflowValidations"]>) => ReturnType<ValidationCoreService["listWorkflowValidations"]>;
6510
+ /** Get details for a specific validation. */
6511
+ getValidationDetails: (...args: Parameters<ValidationCoreService["getValidationDetails"]>) => ReturnType<ValidationCoreService["getValidationDetails"]>;
6512
+ /** Enable/disable validation for a workflow. */
6513
+ toggleEnabled: (...args: Parameters<ValidationCoreService["toggleValidationEnabled"]>) => ReturnType<ValidationCoreService["toggleValidationEnabled"]>;
6514
+ /** Get the latest validation for a workflow (optionally filtered by job). */
6515
+ getLatest: (...args: Parameters<ValidationCoreService["getLatestValidation"]>) => ReturnType<ValidationCoreService["getLatestValidation"]>;
6516
+ /** Get aggregated anomalies for a validation. */
6517
+ getAnomalies: (...args: Parameters<ValidationCoreService["getValidationAnomalies"]>) => ReturnType<ValidationCoreService["getValidationAnomalies"]>;
6518
+ /** Get anomalies for a specific rule. */
6519
+ getAnomaliesByRule: (...args: Parameters<ValidationCoreService["getValidationAnomaliesByRule"]>) => ReturnType<ValidationCoreService["getValidationAnomaliesByRule"]>;
6520
+ /** Wait until a validation completes; throws if validation fails. */
6521
+ waitUntilCompleted: (...args: Parameters<ValidationCoreService["waitUntilCompleted"]>) => ReturnType<ValidationCoreService["waitUntilCompleted"]>;
6475
6522
  }
6476
6523
 
6477
6524
  interface KadoaClientStatus {
@@ -6498,6 +6545,15 @@ interface KadoaClientConfig {
6498
6545
  heartbeatInterval?: number;
6499
6546
  };
6500
6547
  }
6548
+ interface NotificationDomain {
6549
+ channels: NotificationChannelsService;
6550
+ settings: NotificationSettingsService;
6551
+ setup: NotificationSetupService;
6552
+ configure(options: NotificationOptions): Promise<NotificationSettings[]>;
6553
+ setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<NotificationSettings[]>;
6554
+ setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<NotificationSettings[]>;
6555
+ }
6556
+
6501
6557
  /**
6502
6558
  * KadoaClient provides an object-oriented interface to the Kadoa SDK
6503
6559
  *
@@ -6523,12 +6579,12 @@ declare class KadoaClient {
6523
6579
  private readonly _apiKey;
6524
6580
  private _realtime?;
6525
6581
  private _extractionBuilderService;
6526
- readonly extraction: ExtractionModule;
6527
- readonly workflow: WorkflowsModule;
6528
- readonly notification: NotificationsModule;
6529
- readonly schema: SchemasModule;
6530
- readonly user: UserModule;
6531
- readonly validation: ValidationModule;
6582
+ readonly extraction: ExtractionService;
6583
+ readonly workflow: WorkflowsCoreService;
6584
+ readonly notification: NotificationDomain;
6585
+ readonly schema: SchemasService;
6586
+ readonly user: UserService;
6587
+ readonly validation: ValidationDomain;
6532
6588
  constructor(config: KadoaClientConfig);
6533
6589
  /**
6534
6590
  * Get the underlying configuration
@@ -6629,19 +6685,63 @@ declare class KadoaClient {
6629
6685
  dispose(): void;
6630
6686
  }
6631
6687
 
6632
- interface KadoaUser {
6633
- userId: string;
6634
- email: string;
6635
- featureFlags: string[];
6688
+ interface EntityPrediction {
6689
+ entity: string;
6690
+ fields: SchemaField$1[];
6691
+ primaryKeyField?: string;
6692
+ expectedResults?: string;
6636
6693
  }
6637
- declare class UserService {
6694
+ interface EntityRequestOptions {
6695
+ link: string;
6696
+ location?: LocationConfig;
6697
+ navigationMode?: string;
6698
+ }
6699
+ interface ResolvedEntity {
6700
+ entity: string;
6701
+ fields: SchemaField$1[];
6702
+ }
6703
+ type EntityConfig = "ai-detection" | {
6704
+ schemaId: string;
6705
+ } | {
6706
+ name: string;
6707
+ fields: SchemaField$1[];
6708
+ };
6709
+ /**
6710
+ * Service for resolving entities and their fields from various sources
6711
+ *
6712
+ * NOTE: This is a workaround for the /v4/entity endpoint which is not yet exposed in the OpenAPI spec.
6713
+ * Once the endpoint is added to the OpenAPI specification, this manual implementation should be
6714
+ * replaced with the generated client code.
6715
+ */
6716
+ declare class EntityResolverService {
6638
6717
  private readonly client;
6718
+ private readonly schemasService;
6639
6719
  constructor(client: KadoaClient);
6640
6720
  /**
6641
- * Get current user details
6642
- * @returns User details
6721
+ * Resolves entity and fields from the provided entity configuration
6722
+ *
6723
+ * @param entityConfig The entity configuration to resolve
6724
+ * @param options Additional options for AI detection
6725
+ * @returns Resolved entity with fields
6643
6726
  */
6644
- getCurrentUser(): Promise<KadoaUser>;
6727
+ resolveEntity(entityConfig: EntityConfig, options?: {
6728
+ link?: string;
6729
+ location?: LocationConfig;
6730
+ navigationMode?: string;
6731
+ }): Promise<ResolvedEntity>;
6732
+ /**
6733
+ * Fetches entity fields dynamically from the /v4/entity endpoint.
6734
+ * This is a workaround implementation using native fetch since the endpoint
6735
+ * is not yet included in the OpenAPI specification.
6736
+ *
6737
+ * @param options Request options including the link to analyze
6738
+ * @returns EntityPrediction containing the detected entity type and fields
6739
+ */
6740
+ fetchEntityFields(options: EntityRequestOptions): Promise<EntityPrediction>;
6741
+ /**
6742
+ * Validates entity request options
6743
+ */
6744
+ private validateEntityOptions;
6645
6745
  }
6646
6746
 
6647
6747
  declare const KadoaErrorCode: {
@@ -6770,4 +6870,4 @@ declare class KadoaHttpException extends KadoaSdkException {
6770
6870
  static mapStatusToCode(errorOrStatus: AxiosError | number): KadoaErrorCode;
6771
6871
  }
6772
6872
 
6773
- export { type Category, type CreateSchemaBody, type DataType, ERROR_MESSAGES, type FieldExample, type FieldOptions, type FieldType, type FinishedJob, KadoaClient, type KadoaClientConfig, KadoaErrorCode, KadoaHttpException, KadoaSdkException, type KadoaUser, type ListRulesOptions, type LocationConfig, type MetadataKey, type MonitoringField, type MonitoringOperator, type NavigationMode, type PollingOptions, type RawFormat, type RunWorkflowInput, SchemaBuilder, type SchemaField, type SchemaResponse, SchemasModule, type StartedJob, type UpdateSchemaBody, ValidationModule, type WorkflowInterval, pollUntil };
6873
+ export { type BulkApproveRulesRequest, type BulkApproveRulesResponseData, type BulkDeleteRulesRequest, type BulkDeleteRulesResponseData, type Category, type ChannelConfig, type ChannelSetupRequestConfig, type CreateChannelRequest, type CreateRuleRequest, type CreateSchemaRequest, type CreateSettingsRequest, type CreateWorkflowInput, type CreateWorkflowRequest, type CreateWorkflowWithCustomSchemaRequest, type CreatedExtraction, DataFetcherService, type DataPagination, DataSortOrder, type DataType, type DeleteAllRulesRequest, type DeleteAllRulesResponseData, type DisableRuleRequest, ERROR_MESSAGES, type EmailChannelConfig, EntityResolverService, type ExtractOptions, ExtractionBuilderService, type ExtractionOptions, type ExtractionResult, ExtractionService, FetchDataOptions, type FetchDataResult, type FieldExample, type FieldOptions, type FieldType, type FinishedExtraction, type GenerateRuleRequest, type GenerateRulesRequest, type GetAnomaliesByRuleResponse, type GetAnomalyRulePageResponse, type GetJobResponse, type GetValidationResponse, type GetWorkflowResponse, type JobId, JobStateEnum, type JobWaitOptions, KadoaClient, type KadoaClientConfig, KadoaErrorCode, KadoaHttpException, KadoaSdkException, type KadoaUser, ListChannelsRequest, ListRulesRequest, type ListRulesResponse, ListSettingsRequest, type ListValidationsResponse, ListWorkflowValidationsRequest, ListWorkflowsRequest, type LocationConfig, type MetadataKey, type MonitoringConfig, type MonitoringField, type MonitoringOperator, MonitoringStatus, type NavigationMode, type NotificationChannel, type NotificationChannelConfig, NotificationChannelType, NotificationChannelsService, type NotificationDomain, type NotificationOptions, type NotificationSettings, type NotificationSettingsEventType, V5NotificationsSettingsGetEventTypeEnum as NotificationSettingsEventTypeEnum, NotificationSettingsService, type NotificationSetupRequestChannels, NotificationSetupService, type PollingOptions, type PreparedExtraction, type RawFormat, Realtime, ResponseFormat, type Rule, RuleStatus, RuleType, type RunWorkflowRequest, type RunWorkflowResponse, type ScheduleValidationResponse, SchemaBuilder, type SchemaField as SchemaDefinitionField, type SchemaField$1 as SchemaField, SchemaFieldDataType, type SchemaResponse, SchemasService, type SetupWorkflowNotificationSettingsRequest, type SetupWorkspaceNotificationSettingsRequest, type SlackChannelConfig, type SubmitExtractionResult, type SubmittedExtraction, type ToggleValidationResponse, UpdateInterval, type UpdateRuleRequest, type UpdateSchemaRequest, UserService, ValidationCoreService, type ValidationDomain, ValidationRulesService, ValidationStrategy, type WaitOptions, type WebhookChannelConfig, type WebhookChannelConfigAuth, type WebhookHttpMethod, type WebsocketChannelConfig, type WorkflowDataResponse, type WorkflowDetailsResponse, WorkflowDisplayStateEnum, type WorkflowId, type WorkflowInterval, type WorkflowMonitoringConfig, type WorkflowResponse, WorkflowState, WorkflowStateEnum, type WorkflowsApiInterface, WorkflowsCoreService, pollUntil };