@kadoa/node-sdk 0.12.1 → 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.mts 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
@@ -648,6 +647,36 @@ type ExtractionSchemaFieldDataTypeEnum = typeof ExtractionSchemaFieldDataTypeEnu
648
647
  */
649
648
  type SchemaResponseSchemaInner = ExtractionClassificationField | ExtractionMetadataField | ExtractionSchemaField;
650
649
 
650
+ /**
651
+ * Kadoa API
652
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
653
+ *
654
+ * The version of the OpenAPI document: 3.0.0
655
+ * Contact: support@kadoa.com
656
+ *
657
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
658
+ * https://openapi-generator.tech
659
+ * Do not edit the class manually.
660
+ */
661
+
662
+ /**
663
+ * Request body for creating a new schema
664
+ */
665
+ interface CreateSchemaBody {
666
+ /**
667
+ * Name of the schema
668
+ */
669
+ 'name': string;
670
+ /**
671
+ * Entity type for the schema
672
+ */
673
+ 'entity': string;
674
+ /**
675
+ * Array of field definitions
676
+ */
677
+ 'fields': Array<SchemaResponseSchemaInner>;
678
+ }
679
+
651
680
  /**
652
681
  * Kadoa API
653
682
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -769,7 +798,7 @@ interface MonitoringConfig {
769
798
  /**
770
799
  * Fields to monitor
771
800
  */
772
- 'fields': Array<MonitoredField>;
801
+ 'fields'?: Array<MonitoredField>;
773
802
  /**
774
803
  * Notification channels
775
804
  */
@@ -1395,6 +1424,7 @@ type DataValidationReportStrategyEnum = typeof DataValidationReportStrategyEnum[
1395
1424
  interface DeleteAllRulesResponseData$1 {
1396
1425
  'deletedCount': number;
1397
1426
  'workflowId'?: string;
1427
+ 'deletedRuleIds': Array<string>;
1398
1428
  }
1399
1429
 
1400
1430
  /**
@@ -1531,7 +1561,7 @@ interface RuleParameters {
1531
1561
  /**
1532
1562
  * Complete validation rule with metadata and lifecycle information
1533
1563
  */
1534
- interface Rule {
1564
+ interface Rule$1 {
1535
1565
  /**
1536
1566
  * Unique identifier
1537
1567
  */
@@ -1617,7 +1647,7 @@ interface GenerateRules {
1617
1647
  */
1618
1648
  interface RulesListResponse {
1619
1649
  'error': boolean;
1620
- 'data': Array<Rule>;
1650
+ 'data': Array<Rule$1>;
1621
1651
  'pagination': PaginationMeta;
1622
1652
  }
1623
1653
 
@@ -1651,6 +1681,74 @@ interface ScheduleValidationResponse {
1651
1681
  'createdAt': string;
1652
1682
  }
1653
1683
 
1684
+ /**
1685
+ * Kadoa API
1686
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1687
+ *
1688
+ * The version of the OpenAPI document: 3.0.0
1689
+ * Contact: support@kadoa.com
1690
+ *
1691
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1692
+ * https://openapi-generator.tech
1693
+ * Do not edit the class manually.
1694
+ */
1695
+ /**
1696
+ * Schema description metadata
1697
+ */
1698
+ interface SchemaResponseDescription {
1699
+ /**
1700
+ * Hint text for the schema
1701
+ */
1702
+ 'hintText': string;
1703
+ }
1704
+
1705
+ /**
1706
+ * Kadoa API
1707
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1708
+ *
1709
+ * The version of the OpenAPI document: 3.0.0
1710
+ * Contact: support@kadoa.com
1711
+ *
1712
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1713
+ * https://openapi-generator.tech
1714
+ * Do not edit the class manually.
1715
+ */
1716
+
1717
+ /**
1718
+ * Schema object response
1719
+ */
1720
+ interface SchemaResponse$1 {
1721
+ /**
1722
+ * Unique identifier for the schema
1723
+ */
1724
+ 'id': string;
1725
+ /**
1726
+ * Name of the schema
1727
+ */
1728
+ 'name': string;
1729
+ /**
1730
+ * Schema type (always NEO)
1731
+ */
1732
+ 'type': SchemaResponseTypeEnum;
1733
+ /**
1734
+ * Whether the schema is public
1735
+ */
1736
+ 'isPublic': boolean;
1737
+ /**
1738
+ * Array of field definitions
1739
+ */
1740
+ 'schema': Array<SchemaResponseSchemaInner>;
1741
+ /**
1742
+ * Entity type for the schema
1743
+ */
1744
+ 'entity': string | null;
1745
+ 'description': SchemaResponseDescription;
1746
+ }
1747
+ declare const SchemaResponseTypeEnum: {
1748
+ readonly Neo: "NEO";
1749
+ };
1750
+ type SchemaResponseTypeEnum = typeof SchemaResponseTypeEnum[keyof typeof SchemaResponseTypeEnum];
1751
+
1654
1752
  /**
1655
1753
  * Kadoa API
1656
1754
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -1710,6 +1808,36 @@ declare const UpdateRuleStatusEnum: {
1710
1808
  };
1711
1809
  type UpdateRuleStatusEnum = typeof UpdateRuleStatusEnum[keyof typeof UpdateRuleStatusEnum];
1712
1810
 
1811
+ /**
1812
+ * Kadoa API
1813
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1814
+ *
1815
+ * The version of the OpenAPI document: 3.0.0
1816
+ * Contact: support@kadoa.com
1817
+ *
1818
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1819
+ * https://openapi-generator.tech
1820
+ * Do not edit the class manually.
1821
+ */
1822
+
1823
+ /**
1824
+ * Request body for updating a schema
1825
+ */
1826
+ interface UpdateSchemaBody {
1827
+ /**
1828
+ * Name of the schema
1829
+ */
1830
+ 'name'?: string;
1831
+ /**
1832
+ * Entity type for the schema
1833
+ */
1834
+ 'entity'?: string | null;
1835
+ /**
1836
+ * Array of field definitions
1837
+ */
1838
+ 'fields'?: Array<SchemaResponseSchemaInner>;
1839
+ }
1840
+
1713
1841
  /**
1714
1842
  * Kadoa API
1715
1843
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -2055,6 +2183,59 @@ interface V4WorkflowsWorkflowIdGet200ResponseBrowserActionsInner {
2055
2183
  'url'?: string;
2056
2184
  }
2057
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
+
2058
2239
  /**
2059
2240
  * Kadoa API
2060
2241
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -2221,10 +2402,6 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
2221
2402
  * When the last job started
2222
2403
  */
2223
2404
  'startedAt'?: string;
2224
- /**
2225
- * Protocol information from last job
2226
- */
2227
- 'protocol'?: string;
2228
2405
  /**
2229
2406
  * ID of the last job
2230
2407
  */
@@ -2278,6 +2455,7 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
2278
2455
  * Whether the schema can be edited
2279
2456
  */
2280
2457
  'isSchemaEditable'?: boolean;
2458
+ 'lastJob'?: V4WorkflowsWorkflowIdGet200ResponseLastJob;
2281
2459
  'dataValidation'?: V4WorkflowsGet200ResponseWorkflowsInnerDataValidation;
2282
2460
  'validationStatistics'?: V4WorkflowsGet200ResponseWorkflowsInnerValidationStatistics;
2283
2461
  /**
@@ -2310,6 +2488,7 @@ declare const V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum: {
2310
2488
  readonly Queued: "QUEUED";
2311
2489
  readonly Setup: "SETUP";
2312
2490
  readonly Running: "RUNNING";
2491
+ readonly Failed: "FAILED";
2313
2492
  };
2314
2493
  type V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum = typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum[keyof typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum];
2315
2494
  declare const V4WorkflowsGet200ResponseWorkflowsInnerSchemaTypeEnum: {
@@ -2724,14 +2903,11 @@ interface V4WorkflowsWorkflowIdGet200Response {
2724
2903
  * When the last job started
2725
2904
  */
2726
2905
  'startedAt'?: string;
2727
- /**
2728
- * Protocol information from last job
2729
- */
2730
- 'protocol'?: string;
2731
2906
  /**
2732
2907
  * Database key for the workflow data
2733
2908
  */
2734
2909
  'dataKey'?: string;
2910
+ 'lastJob'?: V4WorkflowsWorkflowIdGet200ResponseLastJob;
2735
2911
  /**
2736
2912
  * Cost of the last job run in credits
2737
2913
  */
@@ -2821,28 +2997,6 @@ declare const V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum: {
2821
2997
  };
2822
2998
  type V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum = typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum[keyof typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum];
2823
2999
 
2824
- /**
2825
- * Kadoa API
2826
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2827
- *
2828
- * The version of the OpenAPI document: 3.0.0
2829
- * Contact: support@kadoa.com
2830
- *
2831
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2832
- * https://openapi-generator.tech
2833
- * Do not edit the class manually.
2834
- */
2835
- interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerProtocol {
2836
- /**
2837
- * state of the run if it FAILED
2838
- */
2839
- 'decision'?: string;
2840
- /**
2841
- * description why the run failed
2842
- */
2843
- 'reasoning'?: string;
2844
- }
2845
-
2846
3000
  /**
2847
3001
  * Kadoa API
2848
3002
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -2880,7 +3034,10 @@ interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInner {
2880
3034
  * Number of records processed in the workflow run
2881
3035
  */
2882
3036
  'records'?: number;
2883
- 'protocol'?: V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerProtocol;
3037
+ /**
3038
+ * Errors that occurred during the workflow run
3039
+ */
3040
+ 'errors'?: Array<V4WorkflowsWorkflowIdGet200ResponseLastJobErrorsInner>;
2884
3041
  /**
2885
3042
  * Number of credits used for this workflow run
2886
3043
  */
@@ -4330,51 +4487,6 @@ interface ValidationListResponse {
4330
4487
  'pagination': PaginationMeta;
4331
4488
  }
4332
4489
 
4333
- /**
4334
- * Request parameters for v4DataValidationRulesActionsBulkApprovePost operation in DataValidationApi.
4335
- */
4336
- interface DataValidationApiV4DataValidationRulesActionsBulkApprovePostRequest {
4337
- /**
4338
- * Body
4339
- */
4340
- readonly bulkApproveRules?: BulkApproveRules;
4341
- }
4342
- /**
4343
- * Request parameters for v4DataValidationRulesActionsBulkDeletePost operation in DataValidationApi.
4344
- */
4345
- interface DataValidationApiV4DataValidationRulesActionsBulkDeletePostRequest {
4346
- /**
4347
- * Body
4348
- */
4349
- readonly bulkDeleteRules?: BulkDeleteRules;
4350
- }
4351
- /**
4352
- * Request parameters for v4DataValidationRulesActionsDeleteAllDelete operation in DataValidationApi.
4353
- */
4354
- interface DataValidationApiV4DataValidationRulesActionsDeleteAllDeleteRequest {
4355
- /**
4356
- * Body
4357
- */
4358
- readonly deleteRuleWithReason?: DeleteRuleWithReason;
4359
- }
4360
- /**
4361
- * Request parameters for v4DataValidationRulesActionsGeneratePost operation in DataValidationApi.
4362
- */
4363
- interface DataValidationApiV4DataValidationRulesActionsGeneratePostRequest {
4364
- /**
4365
- * Body
4366
- */
4367
- readonly generateRule?: GenerateRule;
4368
- }
4369
- /**
4370
- * Request parameters for v4DataValidationRulesActionsGenerateRulesPost operation in DataValidationApi.
4371
- */
4372
- interface DataValidationApiV4DataValidationRulesActionsGenerateRulesPostRequest {
4373
- /**
4374
- * Body
4375
- */
4376
- readonly generateRules?: GenerateRules;
4377
- }
4378
4490
  /**
4379
4491
  * Request parameters for v4DataValidationRulesGet operation in DataValidationApi.
4380
4492
  */
@@ -4386,35 +4498,6 @@ interface DataValidationApiV4DataValidationRulesGetRequest {
4386
4498
  readonly pageSize?: number;
4387
4499
  readonly includeDeleted?: V4DataValidationRulesGetIncludeDeletedParameter;
4388
4500
  }
4389
- /**
4390
- * Request parameters for v4DataValidationRulesPost operation in DataValidationApi.
4391
- */
4392
- interface DataValidationApiV4DataValidationRulesPostRequest {
4393
- /**
4394
- * Body
4395
- */
4396
- readonly createRule?: CreateRule;
4397
- }
4398
- /**
4399
- * Request parameters for v4DataValidationRulesRuleIdDisablePost operation in DataValidationApi.
4400
- */
4401
- interface DataValidationApiV4DataValidationRulesRuleIdDisablePostRequest {
4402
- readonly ruleId: string;
4403
- /**
4404
- * Body
4405
- */
4406
- readonly disableRule?: DisableRule;
4407
- }
4408
- /**
4409
- * Request parameters for v4DataValidationRulesRuleIdPut operation in DataValidationApi.
4410
- */
4411
- interface DataValidationApiV4DataValidationRulesRuleIdPutRequest {
4412
- readonly ruleId: string;
4413
- /**
4414
- * Body
4415
- */
4416
- readonly updateRule?: UpdateRule;
4417
- }
4418
4501
  /**
4419
4502
  * Request parameters for v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet operation in DataValidationApi.
4420
4503
  */
@@ -4950,7 +5033,7 @@ interface WorkflowsApiV4ChangesGetRequest {
4950
5033
  */
4951
5034
  interface WorkflowsApiV4WorkflowsGetRequest {
4952
5035
  /**
4953
- * Search term to filter workflows by name or URL
5036
+ * Search term to filter workflows by name, URL, or workflow ID
4954
5037
  */
4955
5038
  readonly search?: string;
4956
5039
  /**
@@ -5356,54 +5439,214 @@ declare const V4WorkflowsWorkflowIdDataGetOrderEnum: {
5356
5439
  };
5357
5440
  type V4WorkflowsWorkflowIdDataGetOrderEnum = typeof V4WorkflowsWorkflowIdDataGetOrderEnum[keyof typeof V4WorkflowsWorkflowIdDataGetOrderEnum];
5358
5441
 
5359
- interface RealtimeConfig {
5360
- teamApiKey: string;
5361
- heartbeatInterval?: number;
5362
- reconnectDelay?: number;
5363
- missedHeartbeatsLimit?: number;
5364
- }
5365
- declare class Realtime {
5366
- private socket?;
5367
- private heartbeatInterval;
5368
- private reconnectDelay;
5369
- private lastHeartbeat;
5370
- private isConnecting;
5371
- private missedHeartbeatsLimit;
5372
- private missedHeartbeatCheckTimer?;
5373
- private teamApiKey?;
5374
- private eventListeners;
5375
- private connectionListeners;
5376
- private errorListeners;
5377
- constructor(config: RealtimeConfig);
5378
- connect(): Promise<void>;
5379
- private handleHeartbeat;
5380
- private notifyEventListeners;
5381
- private notifyConnectionListeners;
5382
- private notifyErrorListeners;
5383
- private startHeartbeatCheck;
5384
- private stopHeartbeatCheck;
5385
- /**
5386
- * Subscribe to realtime events
5387
- * @param listener Function to handle incoming events
5388
- * @returns Function to unsubscribe
5389
- */
5390
- onEvent(listener: (event: unknown) => void): () => void;
5391
- /**
5392
- * Subscribe to connection state changes
5393
- * @param listener Function to handle connection state changes
5394
- * @returns Function to unsubscribe
5395
- */
5396
- onConnection(listener: (connected: boolean, reason?: string) => void): () => void;
5397
- /**
5398
- * Subscribe to errors
5399
- * @param listener Function to handle errors
5400
- * @returns Function to unsubscribe
5401
- */
5402
- onError(listener: (error: unknown) => void): () => void;
5403
- close(): void;
5404
- isConnected(): boolean;
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
+ */
5447
+
5448
+ /**
5449
+ * Workflow state filter for list queries.
5450
+ */
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;
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;
5547
+ }
5548
+ type CreateWorkflowRequest = CreateWorkflowWithSchemaBody;
5549
+ type CreateWorkflowWithCustomSchemaRequest = CreateWorkflowWithCustomSchemaBody;
5550
+ /**
5551
+ * Workflow response with SDK-curated enum types.
5552
+ * Remaps generated enum fields to prevent type leakage.
5553
+ */
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;
5405
5564
  }
5406
5565
 
5566
+ /**
5567
+ * Get job response with SDK-curated enum types.
5568
+ */
5569
+ interface GetJobResponse extends Omit<V4WorkflowsWorkflowIdJobsJobIdGet200Response, "state"> {
5570
+ state?: JobStateEnum;
5571
+ }
5572
+ type RunWorkflowRequest = V4WorkflowsWorkflowIdRunPutRequest;
5573
+ type RunWorkflowResponse = V4WorkflowsWorkflowIdRunPut200Response;
5574
+
5575
+ /**
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/**`.
5580
+ */
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;
5631
+ type NavigationMode = (typeof CreateWorkflowWithSchemaBodyNavigationModeEnum)[keyof typeof CreateWorkflowWithSchemaBodyNavigationModeEnum];
5632
+ type DataTypeInternal = (typeof ExtractionSchemaFieldDataTypeEnum)[keyof typeof ExtractionSchemaFieldDataTypeEnum];
5633
+ type DataType = Exclude<DataTypeInternal, "CURRENCY" | "JOB_DESCRIPTION" | "CATEGORY_JOB_TYPES" | "CLASSIFICATION" | "CATEGORIZE" | "STATIC_SCRAPER_DATA" | "UNIQUE_ID" | "JOBBIRD_CUSTOM" | "PASS" | "ADDITIONAL_DATA">;
5634
+ type MetadataKey = (typeof ExtractionMetadataFieldMetadataKeyEnum)[keyof typeof ExtractionMetadataFieldMetadataKeyEnum];
5635
+ type WorkflowInterval = (typeof CreateWorkflowWithSchemaBodyIntervalEnum)[keyof typeof CreateWorkflowWithSchemaBodyIntervalEnum];
5636
+ type MonitoringOperator = (typeof V4WorkflowsWorkflowIdMetadataPutRequestMonitoringFieldsInnerOperatorEnum)[keyof typeof V4WorkflowsWorkflowIdMetadataPutRequestMonitoringFieldsInnerOperatorEnum];
5637
+ type MonitoringField = V4WorkflowsWorkflowIdMetadataPutRequestMonitoringFieldsInner & {
5638
+ isKeyField?: boolean;
5639
+ };
5640
+ type LocationConfig = Location;
5641
+ type RawFormat = (typeof ExtractionMetadataFieldMetadataKeyEnum)[keyof typeof ExtractionMetadataFieldMetadataKeyEnum];
5642
+ type FieldType = ExtractionMetadataFieldFieldTypeEnum | ExtractionClassificationFieldFieldTypeEnum | ExtractionSchemaFieldFieldTypeEnum;
5643
+ type WorkflowMonitoringConfig = MonitoringConfig;
5644
+ /**
5645
+ * Workflow details response.
5646
+ * Re-exported from workflows.acl.ts to get SDK-curated enum types.
5647
+ */
5648
+ type WorkflowDetailsResponse = GetWorkflowResponse;
5649
+
5407
5650
  /**
5408
5651
  * Simple page-based pagination info
5409
5652
  * Maps directly to the most common API pagination format
@@ -5434,9 +5677,6 @@ interface FetchDataResult extends PagedResponse<object> {
5434
5677
  runId?: string | null;
5435
5678
  executedAt?: string | null;
5436
5679
  }
5437
- type FetchDataOptions = Partial<Pick<WorkflowsApiV4WorkflowsWorkflowIdDataGetRequest, "runId" | "sortBy" | "order" | "filters" | "page" | "limit" | "includeAnomalies">> & {
5438
- workflowId: string;
5439
- };
5440
5680
  /**
5441
5681
  * Service for fetching workflow data with pagination support
5442
5682
  */
@@ -5458,205 +5698,97 @@ declare class DataFetcherService {
5458
5698
  fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
5459
5699
  }
5460
5700
 
5461
- type NavigationMode = (typeof CreateWorkflowWithSchemaBodyNavigationModeEnum)[keyof typeof CreateWorkflowWithSchemaBodyNavigationModeEnum];
5462
- type WorkflowInterval = (typeof CreateWorkflowWithSchemaBodyIntervalEnum)[keyof typeof CreateWorkflowWithSchemaBodyIntervalEnum];
5463
- type LocationConfig$1 = Location;
5464
-
5465
- type SchemaField = ExtractionSchemaField | ExtractionClassificationField | ExtractionMetadataField;
5466
- interface EntityPrediction {
5467
- entity: string;
5468
- fields: SchemaField[];
5469
- primaryKeyField?: string;
5470
- expectedResults?: string;
5471
- }
5472
- interface EntityRequestOptions {
5473
- link: string;
5474
- location?: LocationConfig$1;
5475
- navigationMode?: string;
5476
- }
5477
- interface ResolvedEntity {
5478
- entity: string;
5479
- fields: SchemaField[];
5701
+ interface KadoaUser {
5702
+ userId: string;
5703
+ email: string;
5704
+ featureFlags: string[];
5480
5705
  }
5481
- type EntityConfig = "ai-detection" | {
5482
- schemId: string;
5483
- } | {
5484
- name: string;
5485
- fields: SchemaField[];
5486
- };
5487
- /**
5488
- * Service for resolving entities and their fields from various sources
5489
- *
5490
- * NOTE: This is a workaround for the /v4/entity endpoint which is not yet exposed in the OpenAPI spec.
5491
- * Once the endpoint is added to the OpenAPI specification, this manual implementation should be
5492
- * replaced with the generated client code.
5493
- */
5494
- declare class EntityResolverService {
5706
+ declare class UserService {
5495
5707
  private readonly client;
5496
- private readonly schemasService;
5497
5708
  constructor(client: KadoaClient);
5498
5709
  /**
5499
- * Resolves entity and fields from the provided entity configuration
5500
- *
5501
- * @param entityConfig The entity configuration to resolve
5502
- * @param options Additional options for AI detection
5503
- * @returns Resolved entity with fields
5504
- */
5505
- resolveEntity(entityConfig: EntityConfig, options?: {
5506
- link?: string;
5507
- location?: LocationConfig$1;
5508
- navigationMode?: string;
5509
- }): Promise<ResolvedEntity>;
5510
- /**
5511
- * Fetches entity fields dynamically from the /v4/entity endpoint.
5512
- * This is a workaround implementation using native fetch since the endpoint
5513
- * is not yet included in the OpenAPI specification.
5514
- *
5515
- * @param options Request options including the link to analyze
5516
- * @returns EntityPrediction containing the detected entity type and fields
5517
- */
5518
- fetchEntityFields(options: EntityRequestOptions): Promise<EntityPrediction>;
5519
- /**
5520
- * Validates entity request options
5710
+ * Get current user details
5711
+ * @returns User details
5521
5712
  */
5522
- private validateEntityOptions;
5713
+ getCurrentUser(): Promise<KadoaUser>;
5523
5714
  }
5524
5715
 
5525
5716
  /**
5526
- * Options for polling operations
5717
+ * Notifications domain ACL.
5718
+ * Wraps generated NotificationsApi requests/responses and normalizes types.
5719
+ * Downstream code must import from this module instead of `generated/**`.
5527
5720
  */
5528
- interface PollingOptions {
5529
- /**
5530
- * Polling interval in milliseconds (minimum 250ms)
5531
- * @default 1000
5532
- */
5533
- pollIntervalMs?: number;
5534
- /**
5535
- * Timeout in milliseconds
5536
- * @default 300000 (5 minutes)
5537
- */
5538
- timeoutMs?: number;
5539
- /**
5540
- * AbortSignal to cancel the polling operation
5541
- */
5542
- abortSignal?: AbortSignal;
5721
+
5722
+ /**
5723
+ * Notification channel type enum.
5724
+ * Re-exported from generated V5NotificationsChannelsPostRequestChannelTypeEnum.
5725
+ */
5726
+ declare const NotificationChannelType: {
5727
+ EMAIL: "EMAIL";
5728
+ SLACK: "SLACK";
5729
+ WEBHOOK: "WEBHOOK";
5730
+ WEBSOCKET: "WEBSOCKET";
5731
+ };
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;
5543
5744
  }
5544
5745
  /**
5545
- * Result of a polling operation
5746
+ * Request to create a notification channel with SDK-curated enum types.
5546
5747
  */
5547
- interface PollingResult<T> {
5548
- /**
5549
- * The final result when polling completes successfully
5550
- */
5551
- result: T;
5552
- /**
5553
- * The number of polling attempts made
5554
- */
5555
- attempts: number;
5556
- /**
5557
- * The total time spent polling in milliseconds
5558
- */
5559
- duration: number;
5748
+ interface CreateChannelRequest extends Omit<V5NotificationsChannelsPostRequest, "channelType"> {
5749
+ channelType: NotificationChannelType;
5560
5750
  }
5561
5751
  /**
5562
- * Generic polling utility that polls a function until a condition is met
5563
- *
5564
- * @param pollFn Function to call on each poll attempt
5565
- * @param isComplete Function to check if polling should complete
5566
- * @param options Polling configuration options
5567
- * @returns Promise that resolves with the polling result
5568
- *
5569
- * @example
5570
- * ```typescript
5571
- * const result = await pollUntil(
5572
- * () => api.getStatus(id),
5573
- * (status) => status.completedAt !== null,
5574
- * { pollIntervalMs: 2000, timeoutMs: 60000 }
5575
- * );
5576
- * ```
5752
+ * Notification channel response.
5753
+ * Note: Response types are simple DTOs without enum fields that need remapping.
5577
5754
  */
5578
- declare function pollUntil<T>(pollFn: () => Promise<T>, isComplete: (result: T) => boolean, options?: PollingOptions): Promise<PollingResult<T>>;
5755
+ type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
5756
+ /**
5757
+ * Notification channel configuration (union type for all channel configs).
5758
+ */
5759
+ type NotificationChannelConfig = V5NotificationsChannelsGet200ResponseDataChannelsInnerConfig;
5579
5760
 
5580
- type LocationConfig = Location;
5581
- type WorkflowId = string;
5582
- type WorkflowStateEnum = V4WorkflowsGet200ResponseWorkflowsInnerStateEnum;
5583
- type WorkflowState = WorkflowStateEnum[keyof WorkflowStateEnum];
5584
- interface WaitOptions$1 extends PollingOptions {
5585
- targetState?: WorkflowState;
5586
- }
5587
- interface CreateWorkflowInput {
5588
- urls: string[];
5589
- navigationMode: NavigationMode;
5590
- name: string;
5591
- description?: string;
5592
- schemaId?: string;
5593
- entity: string;
5594
- fields: Array<SchemaField>;
5595
- tags?: string[];
5596
- interval?: WorkflowInterval;
5597
- monitoring?: MonitoringConfig;
5598
- location?: LocationConfig;
5599
- bypassPreview?: boolean;
5600
- autoStart?: boolean;
5601
- schedules?: string[];
5602
- }
5603
- type JobId = string;
5604
- type JobStatus = (typeof V4WorkflowsWorkflowIdJobsJobIdGet200ResponseStateEnum)[keyof typeof V4WorkflowsWorkflowIdJobsJobIdGet200ResponseStateEnum];
5605
- interface RunWorkflowInput {
5606
- variables?: Record<string, unknown>;
5607
- limit?: number;
5608
- }
5609
- interface StartedJob {
5610
- jobId: JobId;
5611
- message?: string;
5612
- status?: string;
5613
- }
5614
- interface FinishedJob extends V4WorkflowsWorkflowIdJobsJobIdGet200Response {
5615
- }
5616
- interface JobWaitOptions extends PollingOptions {
5617
- targetStatus?: JobStatus;
5761
+ /**
5762
+ * WebSocket channel configuration (empty object).
5763
+ */
5764
+ type WebsocketChannelConfig = Record<string, never>;
5765
+ /**
5766
+ * Union of all channel configuration types.
5767
+ */
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;
5618
5775
  }
5619
-
5620
- type ListWorkflowsOptions = WorkflowsApiV4WorkflowsGetRequest;
5621
- declare class WorkflowsCoreService {
5622
- private readonly workflowsApi;
5623
- constructor(workflowsApi: WorkflowsApiInterface);
5624
- create(input: CreateWorkflowInput): Promise<{
5625
- id: WorkflowId;
5626
- }>;
5627
- get(id: WorkflowId): Promise<V4WorkflowsWorkflowIdGet200Response>;
5628
- list(filters?: ListWorkflowsOptions): Promise<V4WorkflowsGet200ResponseWorkflowsInner[]>;
5629
- getByName(name: string): Promise<V4WorkflowsGet200ResponseWorkflowsInner | undefined>;
5630
- cancel(id: WorkflowId): Promise<void>;
5631
- resume(id: WorkflowId): Promise<void>;
5632
- /**
5633
- * Wait for a workflow to reach the target state or a terminal state if no target state is provided
5634
- */
5635
- wait(id: WorkflowId, options?: WaitOptions$1): Promise<V4WorkflowsWorkflowIdGet200Response>;
5636
- /**
5637
- * Run a workflow with variables and optional limit
5638
- */
5639
- runWorkflow(workflowId: WorkflowId, input: RunWorkflowInput): Promise<StartedJob>;
5640
- /**
5641
- * Get job status directly without polling workflow details
5642
- */
5643
- getJobStatus(workflowId: WorkflowId, jobId: JobId): Promise<FinishedJob>;
5644
- /**
5645
- * Wait for a job to reach the target state or a terminal state
5646
- */
5647
- waitForJobCompletion(workflowId: WorkflowId, jobId: JobId, options?: JobWaitOptions): Promise<FinishedJob>;
5776
+ /**
5777
+ * Request to create notification settings with SDK-curated enum types.
5778
+ */
5779
+ interface CreateSettingsRequest extends Omit<V5NotificationsSettingsPostRequest, "eventType"> {
5780
+ eventType: NotificationSettingsEventType;
5648
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;
5649
5791
 
5650
- type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
5651
- declare const NotificationChannelType: {
5652
- readonly EMAIL: "EMAIL";
5653
- readonly SLACK: "SLACK";
5654
- readonly WEBHOOK: "WEBHOOK";
5655
- readonly WEBSOCKET: "WEBSOCKET";
5656
- };
5657
- type NotificationChannelType = (typeof NotificationChannelType)[keyof typeof NotificationChannelType];
5658
- type WebsocketChannelConfig = Record<string, never>;
5659
- type ChannelConfig = EmailChannelConfig | SlackChannelConfig | WebhookChannelConfig | WebsocketChannelConfig;
5660
5792
  declare class NotificationChannelsService {
5661
5793
  /**
5662
5794
  * Default channel name
@@ -5666,7 +5798,7 @@ declare class NotificationChannelsService {
5666
5798
  private readonly api;
5667
5799
  private readonly userService;
5668
5800
  constructor(notificationsApi: NotificationsApiInterface, userService: UserService);
5669
- listChannels(filters: NotificationsApiV5NotificationsChannelsGetRequest): Promise<NotificationChannel[]>;
5801
+ listChannels(filters: ListChannelsRequest): Promise<NotificationChannel[]>;
5670
5802
  /**
5671
5803
  * List all channels (both workflow-specific and workspace-level)
5672
5804
  * This is useful for finding workspace-level channels like WebSocket channels
@@ -5674,7 +5806,7 @@ declare class NotificationChannelsService {
5674
5806
  */
5675
5807
  listAllChannels(workflowId?: string): Promise<NotificationChannel[]>;
5676
5808
  deleteChannel(channelId: string): Promise<void>;
5677
- createChannel(type: NotificationChannelType, config?: Pick<V5NotificationsChannelsPostRequest, "name" | "config">): Promise<NotificationChannel>;
5809
+ createChannel(type: NotificationChannelType, config?: Pick<CreateChannelRequest, "name" | "config">): Promise<NotificationChannel>;
5678
5810
  private buildPayload;
5679
5811
  private buildEmailChannelConfig;
5680
5812
  private buildSlackChannelConfig;
@@ -5682,13 +5814,11 @@ declare class NotificationChannelsService {
5682
5814
  private buildWebsocketChannelConfig;
5683
5815
  }
5684
5816
 
5685
- type NotificationSettings = V5NotificationsSettingsGet200ResponseDataSettingsInner;
5686
- type NotificationSettingsEventType = V5NotificationsSettingsGetEventTypeEnum;
5687
5817
  declare class NotificationSettingsService {
5688
5818
  private readonly api;
5689
5819
  constructor(notificationsApi: NotificationsApiInterface);
5690
- createSettings(requestData: V5NotificationsSettingsPostRequest): Promise<NotificationSettings>;
5691
- listSettings(filters: NotificationsApiV5NotificationsSettingsGetRequest): Promise<NotificationSettings[]>;
5820
+ createSettings(requestData: CreateSettingsRequest): Promise<NotificationSettings>;
5821
+ listSettings(filters: ListSettingsRequest): Promise<NotificationSettings[]>;
5692
5822
  listAllEvents(): Promise<NotificationSettingsEventType[]>;
5693
5823
  deleteSettings(settingsId: string): Promise<void>;
5694
5824
  }
@@ -5750,10 +5880,25 @@ interface NotificationOptions {
5750
5880
  events?: NotificationSettingsEventType[] | "all";
5751
5881
  channels?: NotificationSetupRequestChannels;
5752
5882
  }
5883
+ interface SetupWorkspaceNotificationSettingsRequest {
5884
+ events: NotificationSettingsEventType[] | "all";
5885
+ channels: NotificationSetupRequestChannels;
5886
+ }
5887
+ interface SetupWorkflowNotificationSettingsRequest extends SetupWorkspaceNotificationSettingsRequest {
5888
+ workflowId: string;
5889
+ }
5753
5890
  declare class NotificationSetupService {
5754
5891
  private readonly channelsService;
5755
5892
  private readonly settingsService;
5756
5893
  constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService);
5894
+ /**
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[]>;
5757
5902
  /**
5758
5903
  * Complete workflow notification setup including channels and settings
5759
5904
  *
@@ -5770,6 +5915,114 @@ declare class NotificationSetupService {
5770
5915
  private handleChannelsByConfig;
5771
5916
  }
5772
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
6010
+ */
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>;
6024
+ }
6025
+
5773
6026
  interface ExtractionOptionsInternal {
5774
6027
  urls: string[];
5775
6028
  prompt?: string;
@@ -5777,13 +6030,13 @@ interface ExtractionOptionsInternal {
5777
6030
  navigationMode: NavigationMode;
5778
6031
  name: string;
5779
6032
  description?: string;
5780
- location: LocationConfig$1;
6033
+ location: LocationConfig;
5781
6034
  bypassPreview?: boolean;
5782
6035
  pollingInterval: number;
5783
6036
  maxWaitTime: number;
5784
6037
  entity: EntityConfig;
5785
6038
  interval?: WorkflowInterval;
5786
- monitoring?: MonitoringConfig;
6039
+ monitoring?: WorkflowMonitoringConfig;
5787
6040
  tags?: string[];
5788
6041
  notifications?: NotificationOptions;
5789
6042
  autoStart?: boolean;
@@ -5793,7 +6046,7 @@ type ExtractionOptions = {
5793
6046
  } & Partial<Omit<ExtractionOptionsInternal, "urls">>;
5794
6047
  interface ExtractionResult {
5795
6048
  workflowId: string;
5796
- workflow?: V4WorkflowsWorkflowIdGet200Response;
6049
+ workflow?: WorkflowDetailsResponse;
5797
6050
  data?: Array<object>;
5798
6051
  pagination?: PageInfo;
5799
6052
  }
@@ -5809,417 +6062,129 @@ declare class ExtractionService {
5809
6062
  private readonly dataFetcherService;
5810
6063
  private readonly entityResolverService;
5811
6064
  private readonly notificationSetupService;
5812
- constructor(workflowsCoreService: WorkflowsCoreService, dataFetcherService: DataFetcherService, entityResolverService: EntityResolverService, notificationSetupService: NotificationSetupService);
5813
- /**
5814
- * execute extraction workflow
5815
- */
5816
- executeExtraction(options: ExtractionOptions): Promise<ExtractionResult | SubmitExtractionResult>;
5817
- /**
5818
- * Validates extraction options
5819
- */
5820
- private validateOptions;
5821
- /**
5822
- * Resume a workflow after notification setup
5823
- */
5824
- resumeWorkflow(workflowId: string): Promise<ExtractionResult>;
5825
- /**
5826
- * Checks if extraction was successful
5827
- */
5828
- private isExtractionSuccessful;
5829
- }
5830
-
5831
- declare class ExtractionModule {
5832
- private readonly extractionService;
5833
- private readonly dataFetcherService;
5834
- private readonly channelsService;
5835
- private readonly settingsService;
5836
- private readonly workflowsCoreService;
5837
- constructor(extractionService: ExtractionService, dataFetcherService: DataFetcherService, channelsService: NotificationChannelsService, settingsService: NotificationSettingsService, workflowsCoreService: WorkflowsCoreService);
6065
+ private readonly notificationChannelsService;
6066
+ private readonly notificationSettingsService;
6067
+ constructor(workflowsCoreService: WorkflowsCoreService, dataFetcherService: DataFetcherService, entityResolverService: EntityResolverService, notificationSetupService: NotificationSetupService, notificationChannelsService: NotificationChannelsService, notificationSettingsService: NotificationSettingsService);
5838
6068
  /**
5839
- * Run extraction workflow using dynamic entity detection
5840
- *
5841
- * @param options Extraction configuration options including optional notification settings
5842
- * @returns ExtractionResult containing workflow ID, workflow details, and first page of extracted data
5843
- *
5844
- * @example Simple extraction with AI detection
5845
- * ```typescript
5846
- * const result = await client.extraction.run({
5847
- * urls: ['https://example.com'],
5848
- * name: 'My Extraction'
5849
- * });
5850
- * ```
5851
- *
5852
- * @example With notifications
5853
- * ```typescript
5854
- * const result = await client.extraction.run({
5855
- * urls: ['https://example.com'],
5856
- * name: 'My Extraction',
5857
- * notifications: {
5858
- * events: ['workflow_completed', 'workflow_failed'],
5859
- * channels: {
5860
- * email: true,
5861
- * slack: { channelId: 'slack-channel-id' }
5862
- * }
5863
- * }
5864
- * });
5865
- * ```
5866
- *
5867
- * @see {@link KadoaClient.extract} For more flexible extraction configuration using the builder API
6069
+ * Run an extraction workflow and wait for completion.
5868
6070
  */
5869
6071
  run(options: ExtractionOptions): Promise<ExtractionResult>;
5870
6072
  /**
5871
- * Submit extraction workflow for background processing
5872
- *
5873
- * @param options Extraction configuration options including optional notification settings
5874
- * @returns SubmitExtractionResult containing workflow ID
5875
- *
5876
- * @example
5877
- * ```typescript
5878
- * const result = await client.extraction.submit({
5879
- * urls: ['https://example.com'],
5880
- * name: 'My Extraction',
5881
- * notifications: {
5882
- * events: 'all',
5883
- * channels: {
5884
- * email: true
5885
- * }
5886
- * }
5887
- * });
5888
- * ```
5889
- *
5890
- * @see {@link KadoaClient.extract} For more flexible extraction configuration using the builder API
6073
+ * Submit an extraction workflow for asynchronous processing.
5891
6074
  */
5892
6075
  submit(options: ExtractionOptions): Promise<SubmitExtractionResult>;
5893
6076
  /**
5894
- * Run a workflow with variables and optional limit
6077
+ * Trigger a workflow run without waiting for completion.
5895
6078
  */
5896
- runJob(workflowId: string, input: RunWorkflowInput): Promise<StartedJob>;
6079
+ runJob(workflowId: string, input: RunWorkflowRequest): Promise<RunWorkflowResponse>;
5897
6080
  /**
5898
- * Run a workflow and wait for it to complete
6081
+ * Trigger a workflow run and wait for the job to complete.
5899
6082
  */
5900
- runJobAndWait(workflowId: string, input: RunWorkflowInput): Promise<FinishedJob>;
6083
+ runJobAndWait(workflowId: string, input: RunWorkflowRequest): Promise<GetJobResponse>;
5901
6084
  /**
5902
- * Fetch paginated data from a workflow
5903
- *
5904
- * @param options Options for fetching data including workflowId and pagination parameters
5905
- * @returns Paginated workflow data with metadata
5906
- *
5907
- * @example
5908
- * ```typescript
5909
- * // Fetch first page
5910
- * const firstPage = await client.extraction.fetchData({
5911
- * workflowId: 'workflow-id',
5912
- * page: 1,
5913
- * limit: 100
5914
- * });
5915
- *
5916
- * // Iterate through all pages
5917
- * for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
5918
- * console.log(`Processing ${page.data.length} records`);
5919
- * }
5920
- * ```
6085
+ * Fetch a single page of extraction data.
5921
6086
  */
5922
6087
  fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
5923
6088
  /**
5924
- * Fetch all data from a workflow across all pages
5925
- *
5926
- * @param options Options for fetching data
5927
- * @returns All workflow data combined from all pages
5928
- *
5929
- * @example
5930
- * ```typescript
5931
- * const allData = await client.extraction.fetchAllData({
5932
- * workflowId: 'workflow-id'
5933
- * });
5934
- * ```
5935
- */
5936
- fetchAllData(options: FetchDataOptions): Promise<Array<object>>;
5937
- /**
5938
- * Create an async iterator for paginated data fetching
5939
- *
5940
- * @param options Options for fetching data
5941
- * @returns Async iterator that yields pages of data
5942
- *
5943
- * @example
5944
- * ```typescript
5945
- * for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
5946
- * console.log(`Page ${page.pagination.page}: ${page.data.length} records`);
5947
- * }
5948
- * ```
5949
- */
5950
- fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
5951
- /**
5952
- * Get notification channels for a workflow
5953
- *
5954
- * @param workflowId The workflow ID
5955
- * @returns Array of notification channels
5956
- *
5957
- * @example
5958
- * ```typescript
5959
- * const channels = await client.extraction.getNotificationChannels('workflow-id');
5960
- * ```
5961
- */
5962
- getNotificationChannels(workflowId: string): Promise<src_generated.V5NotificationsChannelsGet200ResponseDataChannelsInner[]>;
5963
- /**
5964
- * Get notification settings for a workflow
5965
- *
5966
- * @param workflowId The workflow ID
5967
- * @returns Array of notification settings
5968
- *
5969
- * @example
5970
- * ```typescript
5971
- * const settings = await client.extraction.getNotificationSettings('workflow-id');
5972
- * ```
5973
- */
5974
- getNotificationSettings(workflowId: string): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
5975
- }
5976
-
5977
- interface SetupWorkspaceNotificationSettingsRequest {
5978
- events: NotificationSettingsEventType[] | "all";
5979
- channels: NotificationSetupRequestChannels;
5980
- }
5981
- interface SetupWorkflowNotificationSettingsRequest extends SetupWorkspaceNotificationSettingsRequest {
5982
- workflowId: string;
5983
- }
5984
- declare class NotificationsModule {
5985
- private readonly channelsService;
5986
- private readonly settingsService;
5987
- private readonly channelSetupService;
5988
- constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService, channelSetupService: NotificationSetupService);
5989
- setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
5990
- setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<src_generated.V5NotificationsSettingsGet200ResponseDataSettingsInner[]>;
5991
- /**
5992
- * Get the channels service
5993
- */
5994
- get channels(): NotificationChannelsService;
5995
- /**
5996
- * Get the settings service
5997
- */
5998
- get settings(): NotificationSettingsService;
5999
- }
6000
-
6001
- interface Schema {
6002
- entity: string;
6003
- schema: SchemaField[];
6004
- }
6005
- /**
6006
- * Service for managing schemas
6007
- */
6008
- declare class SchemasService {
6009
- private readonly schemasApi;
6010
- constructor(client: KadoaClient);
6011
- /**
6012
- * Get a schema by ID
6013
- * //todo: use proper schema type for response from generated client (when avaialble)
6014
- */
6015
- getSchema(schemaId: string): Promise<Schema>;
6016
- }
6017
-
6018
- /**
6019
- * Schemas module for managing schemas
6020
- */
6021
- declare class SchemasModule {
6022
- private readonly service;
6023
- constructor(service: SchemasService);
6024
- }
6025
-
6026
- /**
6027
- * UserModule provides user management functionality
6028
- *
6029
- * @example
6030
- * ```typescript
6031
- * import { KadoaClient } from '@kadoa/sdk';
6032
- *
6033
- * const client = new KadoaClient({
6034
- * apiKey: 'your-api-key'
6035
- * });
6036
- *
6037
- * // Get current user details
6038
- * const currentUser = await client.user.getCurrentUser();
6039
- * ```
6040
- */
6041
- declare class UserModule {
6042
- private readonly userService;
6043
- constructor(userService: UserService);
6044
- /**
6045
- * Get the underlying UserService instance
6046
- * @returns UserService instance
6047
- */
6048
- get service(): UserService;
6049
- /**
6050
- * Get current user details
6051
- * @returns KadoaUser details
6089
+ * Fetch all extraction data across all pages.
6052
6090
  */
6053
- getCurrentUser(): Promise<KadoaUser>;
6054
- }
6055
-
6056
- type ListRulesOptions = DataValidationApiV4DataValidationRulesGetRequest;
6057
- type CreateRuleOptions = DataValidationApiV4DataValidationRulesPostRequest["createRule"];
6058
- type GenerateRuleOptions = DataValidationApiV4DataValidationRulesActionsGeneratePostRequest["generateRule"];
6059
- type GenerateRulesOptions = DataValidationApiV4DataValidationRulesActionsGenerateRulesPostRequest["generateRules"];
6060
- type UpdateRuleOptions = DataValidationApiV4DataValidationRulesRuleIdPutRequest["updateRule"];
6061
- type DisableRuleOptions = DataValidationApiV4DataValidationRulesRuleIdDisablePostRequest;
6062
- type BulkApproveRulesOptions = DataValidationApiV4DataValidationRulesActionsBulkApprovePostRequest["bulkApproveRules"];
6063
- type BulkDeleteRulesOptions = DataValidationApiV4DataValidationRulesActionsBulkDeletePostRequest["bulkDeleteRules"];
6064
- type DeleteAllRulesOptions = DataValidationApiV4DataValidationRulesActionsDeleteAllDeleteRequest["deleteRuleWithReason"];
6065
- type BulkApproveRulesResponseData = BulkApproveRulesResponse["data"];
6066
- type BulkDeleteRulesResponseData = BulkDeleteRulesResponse["data"];
6067
- type DeleteAllRulesResponseData = DeleteAllRulesResponse["data"];
6068
-
6069
- /**
6070
- * Service for managing data validation rules
6071
- */
6072
- declare class ValidationRulesService {
6073
- private readonly validationApi;
6074
- constructor(client: KadoaClient);
6075
- listRules(options?: ListRulesOptions): Promise<RulesListResponse>;
6076
- getRuleById(ruleId: string): Promise<Rule | undefined>;
6077
- getRuleByName(name: string): Promise<Rule | undefined>;
6078
- createRule(data: CreateRuleOptions): Promise<Rule>;
6079
- updateRule(ruleId: string, updateData: UpdateRuleOptions): Promise<Rule>;
6080
- disableRule(data: DisableRuleOptions): Promise<Rule>;
6081
- generateRule(data: GenerateRuleOptions): Promise<Rule>;
6082
- generateRules(data: GenerateRulesOptions): Promise<Rule[]>;
6083
- bulkApproveRules(data: BulkApproveRulesOptions): Promise<BulkApproveRulesResponseData>;
6084
- bulkDeleteRules(data: BulkDeleteRulesOptions): Promise<BulkDeleteRulesResponseData>;
6085
- deleteAllRules(data: DeleteAllRulesOptions): Promise<DeleteAllRulesResponseData>;
6086
- }
6087
-
6088
- type ToggleResponse = V4DataValidationWorkflowsWorkflowIdValidationTogglePut200Response;
6089
- type ListWorkflowValidationsOptions = DataValidationApiV4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGetRequest;
6090
- type WaitUntilCompletedOptions = PollingOptions;
6091
-
6092
- declare class ValidationCoreService {
6093
- private readonly validationApi;
6094
- constructor(client: KadoaClient);
6095
- listWorkflowValidations(filters: ListWorkflowValidationsOptions): Promise<ValidationListResponse>;
6096
- getValidationDetails(validationId: string): Promise<DataValidationReport>;
6097
- scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
6098
- toggleValidationEnabled(workflowId: string): Promise<ToggleResponse>;
6099
- getLatestValidation(workflowId: string, jobId?: string): Promise<DataValidationReport>;
6100
- getValidationAnomalies(validationId: string): Promise<AnomaliesByRuleResponse>;
6101
- getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<AnomalyRulePageResponse>;
6102
- waitUntilCompleted(validationId: string, options?: WaitUntilCompletedOptions): Promise<DataValidationReport>;
6103
- }
6104
-
6105
- declare class ValidationModule {
6106
- private readonly coreService;
6107
- private readonly rulesService;
6108
- constructor(coreService: ValidationCoreService, rulesService: ValidationRulesService);
6109
- listRules(options?: ListRulesOptions): Promise<RulesListResponse>;
6110
- getRuleByName(name: string): Promise<Rule | undefined>;
6111
- createRule(data: CreateRuleOptions): Promise<Rule>;
6112
- generateRule(data: GenerateRuleOptions): Promise<Rule>;
6113
- generateRules(data: GenerateRulesOptions): Promise<Rule[]>;
6114
- bulkApproveRules(data: BulkApproveRulesOptions): Promise<BulkApproveRulesResponseData>;
6115
- bulkDeleteRules(data: BulkDeleteRulesOptions): Promise<BulkDeleteRulesResponseData>;
6116
- deleteAllRules(data: DeleteAllRulesOptions): Promise<DeleteAllRulesResponseData>;
6117
- listWorkflowValidations(workflowId: string, jobId: string): Promise<ValidationListResponse>;
6118
- scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
6119
- waitUntilCompleted(validationId: string, options?: WaitUntilCompletedOptions): Promise<DataValidationReport>;
6120
- getValidationDetails(validationId: string): Promise<DataValidationReport>;
6121
- getLatestValidation(workflowId: string, jobId?: string): Promise<DataValidationReport>;
6122
- getValidationAnomalies(validationId: string): Promise<AnomaliesByRuleResponse>;
6123
- getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<AnomalyRulePageResponse>;
6124
- toggleValidationEnabled(workflowId: string): Promise<ToggleResponse>;
6125
- }
6126
-
6127
- interface WaitOptions {
6128
- pollIntervalMs?: number;
6129
- timeoutMs?: number;
6130
- }
6131
- declare class WorkflowsModule {
6132
- private readonly core;
6133
- constructor(core: WorkflowsCoreService);
6134
- get(workflowId: string): Promise<V4WorkflowsWorkflowIdGet200Response>;
6135
- list(filters?: ListWorkflowsOptions): Promise<V4WorkflowsGet200ResponseWorkflowsInner[]>;
6136
- getByName(name: string): Promise<V4WorkflowsGet200ResponseWorkflowsInner | undefined>;
6137
- create(input: CreateWorkflowInput): Promise<{
6138
- id: WorkflowId;
6139
- }>;
6140
- cancel(workflowId: string): Promise<void>;
6141
- approve(workflowId: string): Promise<void>;
6142
- resume(workflowId: string): Promise<void>;
6143
- wait(workflowId: string, options?: WaitOptions): Promise<V4WorkflowsWorkflowIdGet200Response>;
6091
+ fetchAllData(options: FetchDataOptions): Promise<object[]>;
6144
6092
  /**
6145
- * Get job status directly without polling workflow details
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[]>;
6104
+ /**
6105
+ * execute extraction workflow
6106
+ */
6107
+ private executeExtraction;
6108
+ /**
6109
+ * Validates extraction options
6110
+ */
6111
+ private validateOptions;
6112
+ /**
6113
+ * Resume a workflow after notification setup
6146
6114
  */
6147
- getJobStatus(workflowId: string, jobId: string): Promise<FinishedJob>;
6115
+ resumeWorkflow(workflowId: string): Promise<ExtractionResult>;
6148
6116
  /**
6149
- * Wait for a job to complete using the job status endpoint
6117
+ * Checks if extraction was successful
6150
6118
  */
6151
- waitForJobCompletion(workflowId: string, jobId: string, options?: JobWaitOptions): Promise<FinishedJob>;
6119
+ private isExtractionSuccessful;
6152
6120
  }
6153
6121
 
6154
6122
  /**
6155
- * Raw content format options
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
6156
6132
  */
6157
- type RawFormat = "html" | "markdown" | "url";
6133
+
6158
6134
  /**
6159
- * Data type for schema fields
6135
+ * Request to create a new schema.
6136
+ * Re-exported from generated CreateSchemaBody model with JSDoc preserved.
6160
6137
  */
6161
- type DataType = (typeof ExtractionSchemaFieldDataTypeEnum)[keyof typeof ExtractionSchemaFieldDataTypeEnum];
6138
+ type CreateSchemaRequest = CreateSchemaBody;
6162
6139
  /**
6163
- * Optional configuration for schema fields
6140
+ * Request to update an existing schema.
6141
+ * Re-exported from generated UpdateSchemaBody model with JSDoc preserved.
6164
6142
  */
6165
- interface FieldOptions {
6166
- /**
6167
- * Example value for the field (required for STRING, IMAGE, LINK, OBJECT, ARRAY)
6168
- * Can be a string or an array of strings
6169
- */
6170
- example?: ExtractionSchemaFieldExample;
6171
- /**
6172
- * Whether this field is a primary key
6173
- */
6174
- isKey?: boolean;
6175
- }
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;
6176
6159
  /**
6177
- * Category definition for classification fields
6160
+ * Category definition for classification fields.
6161
+ * Re-exported from generated ExtractionClassificationFieldCategoriesInner model.
6178
6162
  */
6179
6163
  type Category = ExtractionClassificationFieldCategoriesInner;
6180
6164
 
6181
6165
  /**
6182
- * Base builder for extraction configuration
6166
+ * Optional configuration for schema fields
6183
6167
  */
6184
- declare class ExtractionBuilder {
6185
- protected fields: SchemaField[];
6186
- protected schemaName?: string;
6187
- protected schemaId?: string;
6188
- /**
6189
- * Start defining a custom schema with fields
6190
- * @param name - The entity name (e.g., "Product", "Article")
6191
- */
6192
- schema(name: string): SchemaBuilder;
6193
- /**
6194
- * Use an existing schema by ID
6195
- * @param schemaId - The schema ID to reference
6196
- */
6197
- useSchema(schemaId: string): this;
6198
- /**
6199
- * Extract raw page content without transformation
6200
- * @param format - Raw content format(s): "html", "markdown", or "url"
6201
- */
6202
- raw(format: RawFormat | RawFormat[]): this;
6203
- /**
6204
- * Get the fields array (internal use)
6205
- */
6206
- getFields(): SchemaField[];
6168
+ interface FieldOptions {
6207
6169
  /**
6208
- * Get the schema name (internal use)
6170
+ * Example value for the field (required for STRING, IMAGE, LINK, OBJECT, ARRAY)
6171
+ * Can be a string or an array of strings
6209
6172
  */
6210
- getSchemaName(): string | undefined;
6173
+ example?: FieldExample;
6211
6174
  /**
6212
- * Get the schema ID (internal use)
6175
+ * Whether this field is a primary key
6213
6176
  */
6214
- getSchemaId(): string | undefined;
6177
+ isKey?: boolean;
6215
6178
  }
6216
6179
  /**
6217
6180
  * Builder for defining custom schemas with fields
6218
6181
  */
6219
- declare class SchemaBuilder extends ExtractionBuilder {
6182
+ declare class SchemaBuilder {
6220
6183
  private static readonly FIELD_NAME_PATTERN;
6221
6184
  private static readonly TYPES_REQUIRING_EXAMPLE;
6222
- constructor(parentBuilder: ExtractionBuilder);
6185
+ readonly fields: SchemaField[];
6186
+ entityName?: string;
6187
+ entity(entityName: string): this;
6223
6188
  /**
6224
6189
  * Add a structured field to the schema
6225
6190
  * @param name - Field name (alphanumeric only)
@@ -6236,10 +6201,15 @@ declare class SchemaBuilder extends ExtractionBuilder {
6236
6201
  */
6237
6202
  classify(name: string, description: string, categories: Category[]): this;
6238
6203
  /**
6239
- * Add raw page content alongside structured fields
6240
- * @param format - Raw content format(s): "html", "markdown", or "url"
6204
+ * Add raw page content to extract
6205
+ * @param name - Raw content format(s): "html", "markdown", or "url"
6241
6206
  */
6242
- raw(format: RawFormat | RawFormat[]): this;
6207
+ raw(name: RawFormat | RawFormat[]): this;
6208
+ build(): {
6209
+ entityName: string;
6210
+ fields: SchemaField[];
6211
+ };
6212
+ private validateFieldName;
6243
6213
  }
6244
6214
 
6245
6215
  interface ExtractOptionsInternal {
@@ -6251,33 +6221,25 @@ interface ExtractOptionsInternal {
6251
6221
  bypassPreview?: boolean;
6252
6222
  interval?: WorkflowInterval;
6253
6223
  schedules?: string[];
6254
- location?: LocationConfig$1;
6224
+ location?: LocationConfig;
6255
6225
  }
6256
6226
  interface ExtractOptions extends Omit<ExtractOptionsInternal, "navigationMode" | "entity"> {
6257
6227
  navigationMode?: NavigationMode;
6258
- /**
6259
- * Extraction configuration builder function
6260
- * @example
6261
- * ```typescript
6262
- * extraction: builder => builder
6263
- * .schema("Product")
6264
- * .field("title", "Product name", "STRING", { example: "Example Product" })
6265
- * .field("price", "Product price", "CURRENCY")
6266
- * ```
6267
- */
6268
- extraction?: (builder: ExtractionBuilder) => ExtractionBuilder;
6228
+ extraction?: (builder: SchemaBuilder) => SchemaBuilder | {
6229
+ schemaId: string;
6230
+ };
6269
6231
  }
6270
6232
  interface PreparedExtraction {
6271
6233
  options: ExtractOptionsInternal;
6272
6234
  withNotifications: (options: NotificationOptions) => PreparedExtraction;
6273
- withMonitoring: (options: MonitoringConfig) => PreparedExtraction;
6235
+ withMonitoring: (options: WorkflowMonitoringConfig) => PreparedExtraction;
6274
6236
  setInterval: (options: {
6275
6237
  interval: WorkflowInterval;
6276
6238
  } | {
6277
6239
  schedules: string[];
6278
6240
  }) => PreparedExtraction;
6279
6241
  bypassPreview: () => PreparedExtraction;
6280
- setLocation: (options: LocationConfig$1) => PreparedExtraction;
6242
+ setLocation: (options: LocationConfig) => PreparedExtraction;
6281
6243
  create: () => Promise<CreatedExtraction>;
6282
6244
  }
6283
6245
  interface RunWorkflowOptions {
@@ -6299,6 +6261,265 @@ interface FinishedExtraction {
6299
6261
  fetchData: (options: Omit<FetchDataOptions, "workflowId" | "runId">) => Promise<FetchDataResult>;
6300
6262
  fetchAllData: (options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">) => Promise<object[]>;
6301
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;
6329
+ /**
6330
+ * Subscribe to connection state changes
6331
+ * @param listener Function to handle connection state changes
6332
+ * @returns Function to unsubscribe
6333
+ */
6334
+ onConnection(listener: (connected: boolean, reason?: string) => void): () => void;
6335
+ /**
6336
+ * Subscribe to errors
6337
+ * @param listener Function to handle errors
6338
+ * @returns Function to unsubscribe
6339
+ */
6340
+ onError(listener: (error: unknown) => void): () => void;
6341
+ close(): void;
6342
+ isConnected(): boolean;
6343
+ }
6344
+
6345
+ /**
6346
+ * Service for managing schemas
6347
+ */
6348
+ declare class SchemasService {
6349
+ private readonly schemasApi;
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
+ };
6357
+ /**
6358
+ * Get a schema by ID
6359
+ */
6360
+ getSchema(schemaId: string): Promise<SchemaResponse>;
6361
+ /**
6362
+ * List all schemas
6363
+ */
6364
+ listSchemas(): Promise<SchemaResponse[]>;
6365
+ /**
6366
+ * Create a new schema
6367
+ */
6368
+ createSchema(body: CreateSchemaRequest): Promise<SchemaResponse>;
6369
+ /**
6370
+ * Update an existing schema
6371
+ */
6372
+ updateSchema(schemaId: string, body: UpdateSchemaRequest): Promise<SchemaResponse>;
6373
+ /**
6374
+ * Delete a schema
6375
+ */
6376
+ deleteSchema(schemaId: string): Promise<void>;
6377
+ }
6378
+
6379
+ /**
6380
+ * Validation domain ACL.
6381
+ * Wraps generated DataValidationApi requests/responses and normalizes enums.
6382
+ * Downstream code must import from this module instead of `generated/**`.
6383
+ */
6384
+
6385
+ /**
6386
+ * Rule status enum.
6387
+ */
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];
6394
+ /**
6395
+ * Rule type enum.
6396
+ */
6397
+ declare const RuleType: {
6398
+ readonly CustomSql: "custom_sql";
6399
+ };
6400
+ type RuleType = (typeof RuleType)[keyof typeof RuleType];
6401
+ /**
6402
+ * Validation strategy enum.
6403
+ */
6404
+ declare const ValidationStrategy: {
6405
+ readonly Isolated: "ISOLATED";
6406
+ readonly LinkingColumns: "LINKING_COLUMNS";
6407
+ };
6408
+ type ValidationStrategy = (typeof ValidationStrategy)[keyof typeof ValidationStrategy];
6409
+ /**
6410
+ * Include deleted rules parameter.
6411
+ */
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;
6420
+ }
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;
6428
+ }
6429
+ type BulkApproveRulesRequest = BulkApproveRules;
6430
+ type BulkDeleteRulesRequest = BulkDeleteRules;
6431
+ type DeleteAllRulesRequest = DeleteRuleWithReason;
6432
+ /**
6433
+ * Rule with SDK-curated enum types.
6434
+ * Remaps generated enum fields to prevent type leakage.
6435
+ */
6436
+ interface Rule extends Omit<Rule$1, "status" | "ruleType"> {
6437
+ status: RuleStatus;
6438
+ ruleType?: RuleType;
6439
+ }
6440
+ type ListRulesResponse = RulesListResponse;
6441
+ type BulkApproveRulesResponseData = BulkApproveRulesResponse["data"];
6442
+ type BulkDeleteRulesResponseData = BulkDeleteRulesResponse["data"];
6443
+ type DeleteAllRulesResponseData = DeleteAllRulesResponse["data"];
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;
6452
+ /**
6453
+ * Validation report with SDK-curated enum types.
6454
+ */
6455
+ interface GetValidationResponse extends Omit<DataValidationReport, "strategy"> {
6456
+ strategy?: ValidationStrategy;
6457
+ }
6458
+ type ToggleValidationResponse = V4DataValidationWorkflowsWorkflowIdValidationTogglePut200Response;
6459
+
6460
+ type GetAnomaliesByRuleResponse = AnomaliesByRuleResponse;
6461
+ type GetAnomalyRulePageResponse = AnomalyRulePageResponse;
6462
+
6463
+ declare class ValidationCoreService {
6464
+ private readonly validationApi;
6465
+ constructor(client: KadoaClient);
6466
+ listWorkflowValidations(filters: ListWorkflowValidationsRequest): Promise<ListValidationsResponse>;
6467
+ getValidationDetails(validationId: string): Promise<GetValidationResponse>;
6468
+ scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
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>;
6474
+ }
6475
+
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>;
6493
+ }
6494
+
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;
6502
+ /**
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"]>;
6522
+ }
6302
6523
 
6303
6524
  interface KadoaClientStatus {
6304
6525
  baseUrl: string;
@@ -6324,6 +6545,15 @@ interface KadoaClientConfig {
6324
6545
  heartbeatInterval?: number;
6325
6546
  };
6326
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
+
6327
6557
  /**
6328
6558
  * KadoaClient provides an object-oriented interface to the Kadoa SDK
6329
6559
  *
@@ -6349,12 +6579,12 @@ declare class KadoaClient {
6349
6579
  private readonly _apiKey;
6350
6580
  private _realtime?;
6351
6581
  private _extractionBuilderService;
6352
- readonly extraction: ExtractionModule;
6353
- readonly workflow: WorkflowsModule;
6354
- readonly notification: NotificationsModule;
6355
- readonly schema: SchemasModule;
6356
- readonly user: UserModule;
6357
- 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;
6358
6588
  constructor(config: KadoaClientConfig);
6359
6589
  /**
6360
6590
  * Get the underlying configuration
@@ -6455,19 +6685,63 @@ declare class KadoaClient {
6455
6685
  dispose(): void;
6456
6686
  }
6457
6687
 
6458
- interface KadoaUser {
6459
- userId: string;
6460
- email: string;
6461
- featureFlags: string[];
6688
+ interface EntityPrediction {
6689
+ entity: string;
6690
+ fields: SchemaField$1[];
6691
+ primaryKeyField?: string;
6692
+ expectedResults?: string;
6462
6693
  }
6463
- 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 {
6464
6717
  private readonly client;
6718
+ private readonly schemasService;
6465
6719
  constructor(client: KadoaClient);
6466
6720
  /**
6467
- * Get current user details
6468
- * @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
6469
6726
  */
6470
- 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;
6471
6745
  }
6472
6746
 
6473
6747
  declare const KadoaErrorCode: {
@@ -6520,6 +6794,9 @@ declare class KadoaSdkException extends Error {
6520
6794
  readonly SCHEMA_NOT_FOUND: "Schema not found";
6521
6795
  readonly SCHEMA_FETCH_ERROR: "Failed to fetch schema";
6522
6796
  readonly SCHEMAS_FETCH_ERROR: "Failed to fetch schemas";
6797
+ readonly SCHEMA_CREATE_FAILED: "Failed to create schema";
6798
+ readonly SCHEMA_UPDATE_FAILED: "Failed to update schema";
6799
+ readonly SCHEMA_DELETE_FAILED: "Failed to delete schema";
6523
6800
  };
6524
6801
  constructor(message: string, options?: KadoaSdkExceptionOptions);
6525
6802
  static from(error: unknown, details?: Record<string, unknown>): KadoaSdkException;
@@ -6558,6 +6835,9 @@ declare const ERROR_MESSAGES: {
6558
6835
  readonly SCHEMA_NOT_FOUND: "Schema not found";
6559
6836
  readonly SCHEMA_FETCH_ERROR: "Failed to fetch schema";
6560
6837
  readonly SCHEMAS_FETCH_ERROR: "Failed to fetch schemas";
6838
+ readonly SCHEMA_CREATE_FAILED: "Failed to create schema";
6839
+ readonly SCHEMA_UPDATE_FAILED: "Failed to update schema";
6840
+ readonly SCHEMA_DELETE_FAILED: "Failed to delete schema";
6561
6841
  };
6562
6842
 
6563
6843
  type KadoaHttpExceptionOptions = {
@@ -6590,4 +6870,4 @@ declare class KadoaHttpException extends KadoaSdkException {
6590
6870
  static mapStatusToCode(errorOrStatus: AxiosError | number): KadoaErrorCode;
6591
6871
  }
6592
6872
 
6593
- export { ERROR_MESSAGES, type FinishedJob, KadoaClient, type KadoaClientConfig, KadoaErrorCode, KadoaHttpException, KadoaSdkException, type KadoaUser, type ListRulesOptions, type LocationConfig, type PollingOptions, type RunWorkflowInput, type Schema, type SchemaField, SchemasModule, type StartedJob, ValidationModule, 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 };