@kadoa/node-sdk 0.13.0 → 0.15.0
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/browser/index.global.js +13 -13
- package/dist/browser/index.global.js.map +1 -1
- package/dist/index.d.mts +1014 -856
- package/dist/index.d.ts +1014 -856
- package/dist/index.js +1296 -1536
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1280 -1535
- package/dist/index.mjs.map +1 -1
- package/package.json +68 -65
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
|
|
@@ -671,7 +670,7 @@ interface CreateSchemaBody {
|
|
|
671
670
|
/**
|
|
672
671
|
* Entity type for the schema
|
|
673
672
|
*/
|
|
674
|
-
'entity'
|
|
673
|
+
'entity'?: string;
|
|
675
674
|
/**
|
|
676
675
|
* Array of field definitions
|
|
677
676
|
*/
|
|
@@ -799,7 +798,7 @@ interface MonitoringConfig {
|
|
|
799
798
|
/**
|
|
800
799
|
* Fields to monitor
|
|
801
800
|
*/
|
|
802
|
-
'fields'
|
|
801
|
+
'fields'?: Array<MonitoredField>;
|
|
803
802
|
/**
|
|
804
803
|
* Notification channels
|
|
805
804
|
*/
|
|
@@ -997,7 +996,7 @@ interface CreateWorkflowWithCustomSchemaBody {
|
|
|
997
996
|
/**
|
|
998
997
|
* Entity name for extraction
|
|
999
998
|
*/
|
|
1000
|
-
'entity'
|
|
999
|
+
'entity'?: string;
|
|
1001
1000
|
/**
|
|
1002
1001
|
* Schema fields for extraction
|
|
1003
1002
|
*/
|
|
@@ -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
|
*/
|
|
@@ -2292,6 +2292,76 @@ declare const V4WorkflowsWorkflowIdGet200ResponseSchemaInnerDataTypeEnum: {
|
|
|
2292
2292
|
};
|
|
2293
2293
|
type V4WorkflowsWorkflowIdGet200ResponseSchemaInnerDataTypeEnum = typeof V4WorkflowsWorkflowIdGet200ResponseSchemaInnerDataTypeEnum[keyof typeof V4WorkflowsWorkflowIdGet200ResponseSchemaInnerDataTypeEnum];
|
|
2294
2294
|
|
|
2295
|
+
/**
|
|
2296
|
+
* Kadoa API
|
|
2297
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2298
|
+
*
|
|
2299
|
+
* The version of the OpenAPI document: 3.0.0
|
|
2300
|
+
* Contact: support@kadoa.com
|
|
2301
|
+
*
|
|
2302
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2303
|
+
* https://openapi-generator.tech
|
|
2304
|
+
* Do not edit the class manually.
|
|
2305
|
+
*/
|
|
2306
|
+
/**
|
|
2307
|
+
* Additional context about the error
|
|
2308
|
+
*/
|
|
2309
|
+
interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerErrorsInnerContext {
|
|
2310
|
+
[key: string]: any;
|
|
2311
|
+
/**
|
|
2312
|
+
* The URL where the error occurred
|
|
2313
|
+
*/
|
|
2314
|
+
'url'?: string;
|
|
2315
|
+
/**
|
|
2316
|
+
* HTTP status code if applicable
|
|
2317
|
+
*/
|
|
2318
|
+
'httpStatus'?: number;
|
|
2319
|
+
/**
|
|
2320
|
+
* Number of retry attempts made
|
|
2321
|
+
*/
|
|
2322
|
+
'retryCount'?: number;
|
|
2323
|
+
/**
|
|
2324
|
+
* Additional error-specific details
|
|
2325
|
+
*/
|
|
2326
|
+
'details'?: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* When the error context was captured
|
|
2329
|
+
*/
|
|
2330
|
+
'timestamp'?: string;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* Kadoa API
|
|
2335
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2336
|
+
*
|
|
2337
|
+
* The version of the OpenAPI document: 3.0.0
|
|
2338
|
+
* Contact: support@kadoa.com
|
|
2339
|
+
*
|
|
2340
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2341
|
+
* https://openapi-generator.tech
|
|
2342
|
+
* Do not edit the class manually.
|
|
2343
|
+
*/
|
|
2344
|
+
|
|
2345
|
+
interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerErrorsInner {
|
|
2346
|
+
/**
|
|
2347
|
+
* Error code identifying the type of error
|
|
2348
|
+
*/
|
|
2349
|
+
'errorCode'?: string;
|
|
2350
|
+
/**
|
|
2351
|
+
* Human-readable error message
|
|
2352
|
+
*/
|
|
2353
|
+
'message'?: string;
|
|
2354
|
+
/**
|
|
2355
|
+
* When the error occurred
|
|
2356
|
+
*/
|
|
2357
|
+
'timestamp'?: string;
|
|
2358
|
+
/**
|
|
2359
|
+
* Optional screenshot URL
|
|
2360
|
+
*/
|
|
2361
|
+
'screenshot'?: string;
|
|
2362
|
+
'context'?: V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerErrorsInnerContext;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2295
2365
|
/**
|
|
2296
2366
|
* Kadoa API
|
|
2297
2367
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -2349,10 +2419,6 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
|
|
|
2349
2419
|
* When the last job started
|
|
2350
2420
|
*/
|
|
2351
2421
|
'startedAt'?: string;
|
|
2352
|
-
/**
|
|
2353
|
-
* Protocol information from last job
|
|
2354
|
-
*/
|
|
2355
|
-
'protocol'?: string;
|
|
2356
2422
|
/**
|
|
2357
2423
|
* ID of the last job
|
|
2358
2424
|
*/
|
|
@@ -2406,6 +2472,10 @@ interface V4WorkflowsGet200ResponseWorkflowsInner {
|
|
|
2406
2472
|
* Whether the schema can be edited
|
|
2407
2473
|
*/
|
|
2408
2474
|
'isSchemaEditable'?: boolean;
|
|
2475
|
+
/**
|
|
2476
|
+
* Errors from the last job run
|
|
2477
|
+
*/
|
|
2478
|
+
'errors'?: Array<V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerErrorsInner>;
|
|
2409
2479
|
'dataValidation'?: V4WorkflowsGet200ResponseWorkflowsInnerDataValidation;
|
|
2410
2480
|
'validationStatistics'?: V4WorkflowsGet200ResponseWorkflowsInnerValidationStatistics;
|
|
2411
2481
|
/**
|
|
@@ -2438,6 +2508,7 @@ declare const V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum: {
|
|
|
2438
2508
|
readonly Queued: "QUEUED";
|
|
2439
2509
|
readonly Setup: "SETUP";
|
|
2440
2510
|
readonly Running: "RUNNING";
|
|
2511
|
+
readonly Failed: "FAILED";
|
|
2441
2512
|
};
|
|
2442
2513
|
type V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum = typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum[keyof typeof V4WorkflowsGet200ResponseWorkflowsInnerDisplayStateEnum];
|
|
2443
2514
|
declare const V4WorkflowsGet200ResponseWorkflowsInnerSchemaTypeEnum: {
|
|
@@ -2745,6 +2816,40 @@ interface V4WorkflowsWorkflowIdGet200ResponseDataValidation {
|
|
|
2745
2816
|
'ruleCounts'?: V4WorkflowsWorkflowIdGet200ResponseDataValidationRuleCounts;
|
|
2746
2817
|
}
|
|
2747
2818
|
|
|
2819
|
+
/**
|
|
2820
|
+
* Kadoa API
|
|
2821
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2822
|
+
*
|
|
2823
|
+
* The version of the OpenAPI document: 3.0.0
|
|
2824
|
+
* Contact: support@kadoa.com
|
|
2825
|
+
*
|
|
2826
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2827
|
+
* https://openapi-generator.tech
|
|
2828
|
+
* Do not edit the class manually.
|
|
2829
|
+
*/
|
|
2830
|
+
interface V4WorkflowsWorkflowIdGet200ResponseErrorsInner {
|
|
2831
|
+
/**
|
|
2832
|
+
* Error code identifying the type of error
|
|
2833
|
+
*/
|
|
2834
|
+
'errorCode'?: string;
|
|
2835
|
+
/**
|
|
2836
|
+
* Human-readable error message
|
|
2837
|
+
*/
|
|
2838
|
+
'message'?: string;
|
|
2839
|
+
/**
|
|
2840
|
+
* When the error occurred
|
|
2841
|
+
*/
|
|
2842
|
+
'timestamp'?: string;
|
|
2843
|
+
/**
|
|
2844
|
+
* Optional screenshot URL
|
|
2845
|
+
*/
|
|
2846
|
+
'screenshot'?: string;
|
|
2847
|
+
/**
|
|
2848
|
+
* Additional context about the error
|
|
2849
|
+
*/
|
|
2850
|
+
'context'?: object;
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2748
2853
|
/**
|
|
2749
2854
|
* Kadoa API
|
|
2750
2855
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -2852,14 +2957,14 @@ interface V4WorkflowsWorkflowIdGet200Response {
|
|
|
2852
2957
|
* When the last job started
|
|
2853
2958
|
*/
|
|
2854
2959
|
'startedAt'?: string;
|
|
2855
|
-
/**
|
|
2856
|
-
* Protocol information from last job
|
|
2857
|
-
*/
|
|
2858
|
-
'protocol'?: string;
|
|
2859
2960
|
/**
|
|
2860
2961
|
* Database key for the workflow data
|
|
2861
2962
|
*/
|
|
2862
2963
|
'dataKey'?: string;
|
|
2964
|
+
/**
|
|
2965
|
+
* Errors from the last job run
|
|
2966
|
+
*/
|
|
2967
|
+
'errors'?: Array<V4WorkflowsWorkflowIdGet200ResponseErrorsInner>;
|
|
2863
2968
|
/**
|
|
2864
2969
|
* Cost of the last job run in credits
|
|
2865
2970
|
*/
|
|
@@ -2949,28 +3054,6 @@ declare const V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum: {
|
|
|
2949
3054
|
};
|
|
2950
3055
|
type V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum = typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum[keyof typeof V4WorkflowsWorkflowIdGet200ResponseSchemaTypeEnum];
|
|
2951
3056
|
|
|
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
3057
|
/**
|
|
2975
3058
|
* Kadoa API
|
|
2976
3059
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -3008,7 +3091,10 @@ interface V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInner {
|
|
|
3008
3091
|
* Number of records processed in the workflow run
|
|
3009
3092
|
*/
|
|
3010
3093
|
'records'?: number;
|
|
3011
|
-
|
|
3094
|
+
/**
|
|
3095
|
+
* Errors that occurred during the workflow run
|
|
3096
|
+
*/
|
|
3097
|
+
'errors'?: Array<V4WorkflowsWorkflowIdHistoryGet200ResponseWorkflowRunsInnerErrorsInner>;
|
|
3012
3098
|
/**
|
|
3013
3099
|
* Number of credits used for this workflow run
|
|
3014
3100
|
*/
|
|
@@ -4458,51 +4544,6 @@ interface ValidationListResponse {
|
|
|
4458
4544
|
'pagination': PaginationMeta;
|
|
4459
4545
|
}
|
|
4460
4546
|
|
|
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
4547
|
/**
|
|
4507
4548
|
* Request parameters for v4DataValidationRulesGet operation in DataValidationApi.
|
|
4508
4549
|
*/
|
|
@@ -4514,35 +4555,6 @@ interface DataValidationApiV4DataValidationRulesGetRequest {
|
|
|
4514
4555
|
readonly pageSize?: number;
|
|
4515
4556
|
readonly includeDeleted?: V4DataValidationRulesGetIncludeDeletedParameter;
|
|
4516
4557
|
}
|
|
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
4558
|
/**
|
|
4547
4559
|
* Request parameters for v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet operation in DataValidationApi.
|
|
4548
4560
|
*/
|
|
@@ -5078,7 +5090,7 @@ interface WorkflowsApiV4ChangesGetRequest {
|
|
|
5078
5090
|
*/
|
|
5079
5091
|
interface WorkflowsApiV4WorkflowsGetRequest {
|
|
5080
5092
|
/**
|
|
5081
|
-
* Search term to filter workflows by name or
|
|
5093
|
+
* Search term to filter workflows by name, URL, or workflow ID
|
|
5082
5094
|
*/
|
|
5083
5095
|
readonly search?: string;
|
|
5084
5096
|
/**
|
|
@@ -5484,108 +5496,195 @@ declare const V4WorkflowsWorkflowIdDataGetOrderEnum: {
|
|
|
5484
5496
|
};
|
|
5485
5497
|
type V4WorkflowsWorkflowIdDataGetOrderEnum = typeof V4WorkflowsWorkflowIdDataGetOrderEnum[keyof typeof V4WorkflowsWorkflowIdDataGetOrderEnum];
|
|
5486
5498
|
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
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
|
-
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Workflows domain ACL.
|
|
5501
|
+
* Wraps generated WorkflowsApi requests/responses and normalizes types.
|
|
5502
|
+
* Downstream code must import from this module instead of `generated/**`.
|
|
5503
|
+
*/
|
|
5534
5504
|
|
|
5535
5505
|
/**
|
|
5536
|
-
*
|
|
5537
|
-
* Maps directly to the most common API pagination format
|
|
5506
|
+
* Workflow state filter for list queries.
|
|
5538
5507
|
*/
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
/** Number of items per page */
|
|
5547
|
-
limit?: number;
|
|
5548
|
-
}
|
|
5508
|
+
declare const WorkflowState: {
|
|
5509
|
+
readonly Active: "ACTIVE";
|
|
5510
|
+
readonly Error: "ERROR";
|
|
5511
|
+
readonly Paused: "PAUSED";
|
|
5512
|
+
readonly NotSupported: "NOT_SUPPORTED";
|
|
5513
|
+
};
|
|
5514
|
+
type WorkflowState = (typeof WorkflowState)[keyof typeof WorkflowState];
|
|
5549
5515
|
/**
|
|
5550
|
-
*
|
|
5551
|
-
* @template T The type of items in the data array
|
|
5516
|
+
* Monitoring status filter.
|
|
5552
5517
|
*/
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
/** Pagination metadata */
|
|
5557
|
-
pagination: PageInfo;
|
|
5558
|
-
}
|
|
5559
|
-
|
|
5560
|
-
interface FetchDataResult extends PagedResponse<object> {
|
|
5561
|
-
workflowId: string;
|
|
5562
|
-
runId?: string | null;
|
|
5563
|
-
executedAt?: string | null;
|
|
5564
|
-
}
|
|
5565
|
-
type FetchDataOptions = Partial<Pick<WorkflowsApiV4WorkflowsWorkflowIdDataGetRequest, "runId" | "sortBy" | "order" | "filters" | "page" | "limit" | "includeAnomalies">> & {
|
|
5566
|
-
workflowId: string;
|
|
5518
|
+
declare const MonitoringStatus: {
|
|
5519
|
+
readonly Enabled: "true";
|
|
5520
|
+
readonly Disabled: "false";
|
|
5567
5521
|
};
|
|
5522
|
+
type MonitoringStatus = (typeof MonitoringStatus)[keyof typeof MonitoringStatus];
|
|
5568
5523
|
/**
|
|
5569
|
-
*
|
|
5524
|
+
* Update interval filter.
|
|
5570
5525
|
*/
|
|
5571
|
-
declare
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5526
|
+
declare const UpdateInterval: {
|
|
5527
|
+
readonly Hourly: "HOURLY";
|
|
5528
|
+
readonly Daily: "DAILY";
|
|
5529
|
+
readonly Weekly: "WEEKLY";
|
|
5530
|
+
readonly Monthly: "MONTHLY";
|
|
5531
|
+
};
|
|
5532
|
+
type UpdateInterval = (typeof UpdateInterval)[keyof typeof UpdateInterval];
|
|
5533
|
+
/**
|
|
5534
|
+
* Include deleted workflows filter.
|
|
5535
|
+
*/
|
|
5536
|
+
declare const IncludeDeleted: {
|
|
5537
|
+
readonly True: "true";
|
|
5538
|
+
readonly False: "false";
|
|
5539
|
+
};
|
|
5540
|
+
type IncludeDeleted = (typeof IncludeDeleted)[keyof typeof IncludeDeleted];
|
|
5541
|
+
/**
|
|
5542
|
+
* Response format for workflow list.
|
|
5543
|
+
*/
|
|
5544
|
+
declare const ResponseFormat: {
|
|
5545
|
+
readonly Json: "json";
|
|
5546
|
+
readonly Csv: "csv";
|
|
5547
|
+
};
|
|
5548
|
+
type ResponseFormat = (typeof ResponseFormat)[keyof typeof ResponseFormat];
|
|
5549
|
+
/**
|
|
5550
|
+
* Workflow state enum.
|
|
5551
|
+
*/
|
|
5552
|
+
declare const WorkflowStateEnum: {
|
|
5553
|
+
readonly Active: "ACTIVE";
|
|
5554
|
+
readonly Error: "ERROR";
|
|
5555
|
+
readonly Paused: "PAUSED";
|
|
5556
|
+
readonly NotSupported: "NOT_SUPPORTED";
|
|
5557
|
+
readonly Preview: "PREVIEW";
|
|
5558
|
+
readonly ComplianceReview: "COMPLIANCE_REVIEW";
|
|
5559
|
+
readonly ComplianceRejected: "COMPLIANCE_REJECTED";
|
|
5560
|
+
readonly Queued: "QUEUED";
|
|
5561
|
+
readonly Setup: "SETUP";
|
|
5562
|
+
readonly Deleted: "DELETED";
|
|
5563
|
+
};
|
|
5564
|
+
type WorkflowStateEnum = (typeof WorkflowStateEnum)[keyof typeof WorkflowStateEnum];
|
|
5565
|
+
/**
|
|
5566
|
+
* Workflow display state enum.
|
|
5567
|
+
*/
|
|
5568
|
+
declare const WorkflowDisplayStateEnum: {
|
|
5569
|
+
readonly Active: "ACTIVE";
|
|
5570
|
+
readonly Error: "ERROR";
|
|
5571
|
+
readonly Paused: "PAUSED";
|
|
5572
|
+
readonly NotSupported: "NOT_SUPPORTED";
|
|
5573
|
+
readonly Preview: "PREVIEW";
|
|
5574
|
+
readonly ComplianceReview: "COMPLIANCE_REVIEW";
|
|
5575
|
+
readonly ComplianceRejected: "COMPLIANCE_REJECTED";
|
|
5576
|
+
readonly Queued: "QUEUED";
|
|
5577
|
+
readonly Setup: "SETUP";
|
|
5578
|
+
readonly Running: "RUNNING";
|
|
5579
|
+
readonly Failed: "FAILED";
|
|
5580
|
+
};
|
|
5581
|
+
type WorkflowDisplayStateEnum = (typeof WorkflowDisplayStateEnum)[keyof typeof WorkflowDisplayStateEnum];
|
|
5582
|
+
/**
|
|
5583
|
+
* Job state enum.
|
|
5584
|
+
*/
|
|
5585
|
+
declare const JobStateEnum: {
|
|
5586
|
+
readonly InProgress: "IN_PROGRESS";
|
|
5587
|
+
readonly Finished: "FINISHED";
|
|
5588
|
+
readonly Failed: "FAILED";
|
|
5589
|
+
readonly NotSupported: "NOT_SUPPORTED";
|
|
5590
|
+
readonly FailedInsufficientFunds: "FAILED_INSUFFICIENT_FUNDS";
|
|
5591
|
+
};
|
|
5592
|
+
type JobStateEnum = (typeof JobStateEnum)[keyof typeof JobStateEnum];
|
|
5593
|
+
declare class ListWorkflowsRequest implements WorkflowsApiV4WorkflowsGetRequest {
|
|
5594
|
+
search?: string;
|
|
5595
|
+
skip?: number;
|
|
5596
|
+
limit?: number;
|
|
5597
|
+
state?: WorkflowState;
|
|
5598
|
+
tags?: Array<string>;
|
|
5599
|
+
monitoring?: MonitoringStatus;
|
|
5600
|
+
updateInterval?: UpdateInterval;
|
|
5601
|
+
templateId?: string;
|
|
5602
|
+
includeDeleted?: IncludeDeleted;
|
|
5603
|
+
format?: ResponseFormat;
|
|
5587
5604
|
}
|
|
5605
|
+
type CreateWorkflowRequest = CreateWorkflowWithSchemaBody;
|
|
5606
|
+
type CreateWorkflowWithCustomSchemaRequest = CreateWorkflowWithCustomSchemaBody;
|
|
5607
|
+
/**
|
|
5608
|
+
* Workflow response with SDK-curated enum types.
|
|
5609
|
+
* Remaps generated enum fields to prevent type leakage.
|
|
5610
|
+
*/
|
|
5611
|
+
interface WorkflowResponse extends Omit<V4WorkflowsGet200ResponseWorkflowsInner, "state" | "displayState"> {
|
|
5612
|
+
state?: WorkflowStateEnum;
|
|
5613
|
+
displayState?: WorkflowDisplayStateEnum;
|
|
5614
|
+
}
|
|
5615
|
+
/**
|
|
5616
|
+
* Get workflow details response with SDK-curated enum types.
|
|
5617
|
+
*/
|
|
5618
|
+
interface GetWorkflowResponse extends Omit<V4WorkflowsWorkflowIdGet200Response, "state" | "displayState"> {
|
|
5619
|
+
state?: WorkflowStateEnum;
|
|
5620
|
+
displayState?: WorkflowDisplayStateEnum;
|
|
5621
|
+
}
|
|
5622
|
+
|
|
5623
|
+
/**
|
|
5624
|
+
* Get job response with SDK-curated enum types.
|
|
5625
|
+
*/
|
|
5626
|
+
interface GetJobResponse extends Omit<V4WorkflowsWorkflowIdJobsJobIdGet200Response, "state"> {
|
|
5627
|
+
state?: JobStateEnum;
|
|
5628
|
+
}
|
|
5629
|
+
type RunWorkflowRequest = V4WorkflowsWorkflowIdRunPutRequest;
|
|
5630
|
+
type RunWorkflowResponse = V4WorkflowsWorkflowIdRunPut200Response;
|
|
5631
|
+
|
|
5632
|
+
/**
|
|
5633
|
+
* Extraction domain ACL.
|
|
5634
|
+
* Wraps generated WorkflowsApi requests/responses for data fetching operations.
|
|
5635
|
+
* Wraps generated schema field types for entity resolution.
|
|
5636
|
+
* Downstream code must import from this module instead of `generated/**`.
|
|
5637
|
+
*/
|
|
5588
5638
|
|
|
5639
|
+
/**
|
|
5640
|
+
* Data pagination metadata.
|
|
5641
|
+
*/
|
|
5642
|
+
type DataPagination = V4WorkflowsWorkflowIdDataGet200ResponsePagination;
|
|
5643
|
+
/**
|
|
5644
|
+
* Workflow data response.
|
|
5645
|
+
* Note: This type doesn't contain enum fields that need remapping.
|
|
5646
|
+
*/
|
|
5647
|
+
type WorkflowDataResponse = V4WorkflowsWorkflowIdDataGet200Response;
|
|
5648
|
+
/**
|
|
5649
|
+
* Data sort order enum.
|
|
5650
|
+
*/
|
|
5651
|
+
declare const DataSortOrder: {
|
|
5652
|
+
readonly Asc: "asc";
|
|
5653
|
+
readonly Desc: "desc";
|
|
5654
|
+
};
|
|
5655
|
+
type DataSortOrder = (typeof DataSortOrder)[keyof typeof DataSortOrder];
|
|
5656
|
+
/**
|
|
5657
|
+
* Options for fetching workflow data.
|
|
5658
|
+
*/
|
|
5659
|
+
declare class FetchDataOptions {
|
|
5660
|
+
workflowId: string;
|
|
5661
|
+
runId?: string;
|
|
5662
|
+
sortBy?: string;
|
|
5663
|
+
order?: DataSortOrder;
|
|
5664
|
+
filters?: string;
|
|
5665
|
+
page?: number;
|
|
5666
|
+
limit?: number;
|
|
5667
|
+
includeAnomalies?: boolean;
|
|
5668
|
+
}
|
|
5669
|
+
/**
|
|
5670
|
+
* Schema field data type enum.
|
|
5671
|
+
*/
|
|
5672
|
+
declare const SchemaFieldDataType: {
|
|
5673
|
+
readonly Text: "TEXT";
|
|
5674
|
+
readonly Number: "NUMBER";
|
|
5675
|
+
readonly Date: "DATE";
|
|
5676
|
+
readonly Url: "URL";
|
|
5677
|
+
readonly Email: "EMAIL";
|
|
5678
|
+
readonly Image: "IMAGE";
|
|
5679
|
+
readonly Video: "VIDEO";
|
|
5680
|
+
readonly Phone: "PHONE";
|
|
5681
|
+
readonly Boolean: "BOOLEAN";
|
|
5682
|
+
readonly Location: "LOCATION";
|
|
5683
|
+
readonly Array: "ARRAY";
|
|
5684
|
+
readonly Object: "OBJECT";
|
|
5685
|
+
};
|
|
5686
|
+
type SchemaFieldDataType = (typeof SchemaFieldDataType)[keyof typeof SchemaFieldDataType];
|
|
5687
|
+
type SchemaField$1 = ExtractionSchemaField | ExtractionClassificationField | ExtractionMetadataField;
|
|
5589
5688
|
type NavigationMode = (typeof CreateWorkflowWithSchemaBodyNavigationModeEnum)[keyof typeof CreateWorkflowWithSchemaBodyNavigationModeEnum];
|
|
5590
5689
|
type DataTypeInternal = (typeof ExtractionSchemaFieldDataTypeEnum)[keyof typeof ExtractionSchemaFieldDataTypeEnum];
|
|
5591
5690
|
type DataType = Exclude<DataTypeInternal, "CURRENCY" | "JOB_DESCRIPTION" | "CATEGORY_JOB_TYPES" | "CLASSIFICATION" | "CATEGORIZE" | "STATIC_SCRAPER_DATA" | "UNIQUE_ID" | "JOBBIRD_CUSTOM" | "PASS" | "ADDITIONAL_DATA">;
|
|
@@ -5595,68 +5694,282 @@ type MonitoringOperator = (typeof V4WorkflowsWorkflowIdMetadataPutRequestMonitor
|
|
|
5595
5694
|
type MonitoringField = V4WorkflowsWorkflowIdMetadataPutRequestMonitoringFieldsInner & {
|
|
5596
5695
|
isKeyField?: boolean;
|
|
5597
5696
|
};
|
|
5598
|
-
type LocationConfig
|
|
5697
|
+
type LocationConfig = Location;
|
|
5599
5698
|
type RawFormat = (typeof ExtractionMetadataFieldMetadataKeyEnum)[keyof typeof ExtractionMetadataFieldMetadataKeyEnum];
|
|
5600
5699
|
type FieldType = ExtractionMetadataFieldFieldTypeEnum | ExtractionClassificationFieldFieldTypeEnum | ExtractionSchemaFieldFieldTypeEnum;
|
|
5700
|
+
type WorkflowMonitoringConfig = MonitoringConfig;
|
|
5701
|
+
/**
|
|
5702
|
+
* Workflow details response.
|
|
5703
|
+
* Re-exported from workflows.acl.ts to get SDK-curated enum types.
|
|
5704
|
+
*/
|
|
5705
|
+
type WorkflowDetailsResponse = GetWorkflowResponse;
|
|
5601
5706
|
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5707
|
+
/**
|
|
5708
|
+
* Simple page-based pagination info
|
|
5709
|
+
* Maps directly to the most common API pagination format
|
|
5710
|
+
*/
|
|
5711
|
+
interface PageInfo {
|
|
5712
|
+
/** Total number of items */
|
|
5713
|
+
totalCount?: number;
|
|
5714
|
+
/** Current page number */
|
|
5715
|
+
page?: number;
|
|
5716
|
+
/** Total number of pages */
|
|
5717
|
+
totalPages?: number;
|
|
5718
|
+
/** Number of items per page */
|
|
5719
|
+
limit?: number;
|
|
5608
5720
|
}
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5721
|
+
/**
|
|
5722
|
+
* Paginated response with data and pagination info
|
|
5723
|
+
* @template T The type of items in the data array
|
|
5724
|
+
*/
|
|
5725
|
+
interface PagedResponse<T> {
|
|
5726
|
+
/** Array of items for the current page */
|
|
5727
|
+
data: T[];
|
|
5728
|
+
/** Pagination metadata */
|
|
5729
|
+
pagination: PageInfo;
|
|
5613
5730
|
}
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5731
|
+
|
|
5732
|
+
interface FetchDataResult extends PagedResponse<object> {
|
|
5733
|
+
workflowId: string;
|
|
5734
|
+
runId?: string | null;
|
|
5735
|
+
executedAt?: string | null;
|
|
5617
5736
|
}
|
|
5618
|
-
type EntityConfig = "ai-detection" | {
|
|
5619
|
-
schemaId: string;
|
|
5620
|
-
} | {
|
|
5621
|
-
name: string;
|
|
5622
|
-
fields: SchemaField[];
|
|
5623
|
-
};
|
|
5624
5737
|
/**
|
|
5625
|
-
* Service for
|
|
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.
|
|
5738
|
+
* Service for fetching workflow data with pagination support
|
|
5630
5739
|
*/
|
|
5631
|
-
declare class
|
|
5740
|
+
declare class DataFetcherService {
|
|
5741
|
+
private readonly workflowsApi;
|
|
5742
|
+
private readonly defaultLimit;
|
|
5743
|
+
constructor(workflowsApi: WorkflowsApiInterface);
|
|
5744
|
+
/**
|
|
5745
|
+
* Fetch a page of workflow data
|
|
5746
|
+
*/
|
|
5747
|
+
fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
|
|
5748
|
+
/**
|
|
5749
|
+
* Fetch all pages of workflow data
|
|
5750
|
+
*/
|
|
5751
|
+
fetchAllData(options: FetchDataOptions): Promise<object[]>;
|
|
5752
|
+
/**
|
|
5753
|
+
* Create an async iterator for paginated data fetching
|
|
5754
|
+
*/
|
|
5755
|
+
fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
|
|
5756
|
+
}
|
|
5757
|
+
|
|
5758
|
+
interface KadoaUser {
|
|
5759
|
+
userId: string;
|
|
5760
|
+
email: string;
|
|
5761
|
+
featureFlags: string[];
|
|
5762
|
+
}
|
|
5763
|
+
declare class UserService {
|
|
5632
5764
|
private readonly client;
|
|
5633
|
-
private readonly schemasService;
|
|
5634
5765
|
constructor(client: KadoaClient);
|
|
5635
5766
|
/**
|
|
5636
|
-
*
|
|
5637
|
-
*
|
|
5638
|
-
* @param entityConfig The entity configuration to resolve
|
|
5639
|
-
* @param options Additional options for AI detection
|
|
5640
|
-
* @returns Resolved entity with fields
|
|
5767
|
+
* Get current user details
|
|
5768
|
+
* @returns User details
|
|
5641
5769
|
*/
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5770
|
+
getCurrentUser(): Promise<KadoaUser>;
|
|
5771
|
+
}
|
|
5772
|
+
|
|
5773
|
+
/**
|
|
5774
|
+
* Notifications domain ACL.
|
|
5775
|
+
* Wraps generated NotificationsApi requests/responses and normalizes types.
|
|
5776
|
+
* Downstream code must import from this module instead of `generated/**`.
|
|
5777
|
+
*/
|
|
5778
|
+
|
|
5779
|
+
/**
|
|
5780
|
+
* Notification channel type enum.
|
|
5781
|
+
* Re-exported from generated V5NotificationsChannelsPostRequestChannelTypeEnum.
|
|
5782
|
+
*/
|
|
5783
|
+
declare const NotificationChannelType: {
|
|
5784
|
+
EMAIL: "EMAIL";
|
|
5785
|
+
SLACK: "SLACK";
|
|
5786
|
+
WEBHOOK: "WEBHOOK";
|
|
5787
|
+
WEBSOCKET: "WEBSOCKET";
|
|
5788
|
+
};
|
|
5789
|
+
type NotificationChannelType = (typeof NotificationChannelType)[keyof typeof NotificationChannelType];
|
|
5790
|
+
|
|
5791
|
+
/**
|
|
5792
|
+
* Webhook HTTP method enum.
|
|
5793
|
+
* Re-exported from generated WebhookChannelConfigHttpMethodEnum.
|
|
5794
|
+
*/
|
|
5795
|
+
type WebhookHttpMethod = WebhookChannelConfigHttpMethodEnum;
|
|
5796
|
+
/**
|
|
5797
|
+
* Request parameters for listing notification channels.
|
|
5798
|
+
*/
|
|
5799
|
+
declare class ListChannelsRequest implements NotificationsApiV5NotificationsChannelsGetRequest {
|
|
5800
|
+
workflowId?: string;
|
|
5801
|
+
}
|
|
5802
|
+
/**
|
|
5803
|
+
* Request to create a notification channel with SDK-curated enum types.
|
|
5804
|
+
*/
|
|
5805
|
+
interface CreateChannelRequest extends Omit<V5NotificationsChannelsPostRequest, "channelType"> {
|
|
5806
|
+
channelType: NotificationChannelType;
|
|
5807
|
+
}
|
|
5808
|
+
/**
|
|
5809
|
+
* Notification channel response.
|
|
5810
|
+
* Note: Response types are simple DTOs without enum fields that need remapping.
|
|
5811
|
+
*/
|
|
5812
|
+
type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
|
|
5813
|
+
/**
|
|
5814
|
+
* Notification channel configuration (union type for all channel configs).
|
|
5815
|
+
*/
|
|
5816
|
+
type NotificationChannelConfig = V5NotificationsChannelsGet200ResponseDataChannelsInnerConfig;
|
|
5817
|
+
|
|
5818
|
+
/**
|
|
5819
|
+
* WebSocket channel configuration (empty object).
|
|
5820
|
+
*/
|
|
5821
|
+
type WebsocketChannelConfig = Record<string, never>;
|
|
5822
|
+
/**
|
|
5823
|
+
* Union of all channel configuration types.
|
|
5824
|
+
*/
|
|
5825
|
+
type ChannelConfig = EmailChannelConfig | SlackChannelConfig | WebhookChannelConfig | WebsocketChannelConfig;
|
|
5826
|
+
/**
|
|
5827
|
+
* Request parameters for listing notification settings.
|
|
5828
|
+
*/
|
|
5829
|
+
declare class ListSettingsRequest implements NotificationsApiV5NotificationsSettingsGetRequest {
|
|
5830
|
+
workflowId?: string;
|
|
5831
|
+
eventType?: NotificationSettingsEventType;
|
|
5832
|
+
}
|
|
5833
|
+
/**
|
|
5834
|
+
* Request to create notification settings with SDK-curated enum types.
|
|
5835
|
+
*/
|
|
5836
|
+
interface CreateSettingsRequest extends Omit<V5NotificationsSettingsPostRequest, "eventType"> {
|
|
5837
|
+
eventType: NotificationSettingsEventType;
|
|
5838
|
+
}
|
|
5839
|
+
/**
|
|
5840
|
+
* Notification settings response.
|
|
5841
|
+
*/
|
|
5842
|
+
type NotificationSettings = V5NotificationsSettingsGet200ResponseDataSettingsInner;
|
|
5843
|
+
/**
|
|
5844
|
+
* Notification event type enum.
|
|
5845
|
+
* Re-exported from generated V5NotificationsSettingsGetEventTypeEnum.
|
|
5846
|
+
*/
|
|
5847
|
+
type NotificationSettingsEventType = V5NotificationsSettingsGetEventTypeEnum;
|
|
5848
|
+
|
|
5849
|
+
declare class NotificationChannelsService {
|
|
5647
5850
|
/**
|
|
5648
|
-
*
|
|
5649
|
-
* This is a workaround implementation using native fetch since the endpoint
|
|
5650
|
-
* is not yet included in the OpenAPI specification.
|
|
5851
|
+
* Default channel name
|
|
5651
5852
|
*
|
|
5652
|
-
* @param options Request options including the link to analyze
|
|
5653
|
-
* @returns EntityPrediction containing the detected entity type and fields
|
|
5654
5853
|
*/
|
|
5655
|
-
|
|
5854
|
+
static readonly DEFAULT_CHANNEL_NAME = "default";
|
|
5855
|
+
private readonly api;
|
|
5856
|
+
private readonly userService;
|
|
5857
|
+
constructor(notificationsApi: NotificationsApiInterface, userService: UserService);
|
|
5858
|
+
listChannels(filters: ListChannelsRequest): Promise<NotificationChannel[]>;
|
|
5656
5859
|
/**
|
|
5657
|
-
*
|
|
5860
|
+
* List all channels (both workflow-specific and workspace-level)
|
|
5861
|
+
* This is useful for finding workspace-level channels like WebSocket channels
|
|
5862
|
+
* that might not be associated with a specific workflow
|
|
5658
5863
|
*/
|
|
5659
|
-
|
|
5864
|
+
listAllChannels(workflowId?: string): Promise<NotificationChannel[]>;
|
|
5865
|
+
deleteChannel(channelId: string): Promise<void>;
|
|
5866
|
+
createChannel(type: NotificationChannelType, config?: Pick<CreateChannelRequest, "name" | "config">): Promise<NotificationChannel>;
|
|
5867
|
+
private buildPayload;
|
|
5868
|
+
private buildEmailChannelConfig;
|
|
5869
|
+
private buildSlackChannelConfig;
|
|
5870
|
+
private buildWebhookChannelConfig;
|
|
5871
|
+
private buildWebsocketChannelConfig;
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5874
|
+
declare class NotificationSettingsService {
|
|
5875
|
+
private readonly api;
|
|
5876
|
+
constructor(notificationsApi: NotificationsApiInterface);
|
|
5877
|
+
createSettings(requestData: CreateSettingsRequest): Promise<NotificationSettings>;
|
|
5878
|
+
listSettings(filters: ListSettingsRequest): Promise<NotificationSettings[]>;
|
|
5879
|
+
listAllEvents(): Promise<NotificationSettingsEventType[]>;
|
|
5880
|
+
deleteSettings(settingsId: string): Promise<void>;
|
|
5881
|
+
}
|
|
5882
|
+
|
|
5883
|
+
type ChannelSetupRequestConfig = ChannelConfig & {
|
|
5884
|
+
/**
|
|
5885
|
+
* The name of the email channel. "default" if not provided
|
|
5886
|
+
*/
|
|
5887
|
+
name: string;
|
|
5888
|
+
};
|
|
5889
|
+
type NotificationSetupRequestChannels = {
|
|
5890
|
+
/**
|
|
5891
|
+
* - true: create a new email channel using user's default email
|
|
5892
|
+
* - { channelId: string }: use existing email channel
|
|
5893
|
+
* - EmailChannelConfig: create a new email channel using the provided configuration
|
|
5894
|
+
*/
|
|
5895
|
+
EMAIL?: true | {
|
|
5896
|
+
channelId: string;
|
|
5897
|
+
} | (ChannelSetupRequestConfig & {
|
|
5898
|
+
/**
|
|
5899
|
+
* The name of the email channel. "default" if not provided
|
|
5900
|
+
*/
|
|
5901
|
+
name: string;
|
|
5902
|
+
});
|
|
5903
|
+
/**
|
|
5904
|
+
* - true: create a new websocket channel using user's default websocket
|
|
5905
|
+
* - { channelId: string }: use existing websocket channel
|
|
5906
|
+
*/
|
|
5907
|
+
WEBSOCKET?: true | {
|
|
5908
|
+
channelId: string;
|
|
5909
|
+
};
|
|
5910
|
+
/**
|
|
5911
|
+
* - { channelId: string }: use existing slack channel
|
|
5912
|
+
* - SlackChannelConfig: create a new slack channel using the provided configuration
|
|
5913
|
+
*/
|
|
5914
|
+
SLACK?: {
|
|
5915
|
+
channelId: string;
|
|
5916
|
+
} | (SlackChannelConfig & {
|
|
5917
|
+
/**
|
|
5918
|
+
* The name of the slack channel. "default" if not provided
|
|
5919
|
+
*/
|
|
5920
|
+
name: string;
|
|
5921
|
+
});
|
|
5922
|
+
/**
|
|
5923
|
+
* - { channelId: string }: use existing webhook channel
|
|
5924
|
+
* - WebhookChannelConfig: create a new webhook channel using the provided configuration
|
|
5925
|
+
*/
|
|
5926
|
+
WEBHOOK?: {
|
|
5927
|
+
channelId: string;
|
|
5928
|
+
} | (WebhookChannelConfig & {
|
|
5929
|
+
/**
|
|
5930
|
+
* The name of the webhook channel
|
|
5931
|
+
*/
|
|
5932
|
+
name: string;
|
|
5933
|
+
});
|
|
5934
|
+
};
|
|
5935
|
+
interface NotificationOptions {
|
|
5936
|
+
workflowId?: string;
|
|
5937
|
+
events?: NotificationSettingsEventType[] | "all";
|
|
5938
|
+
channels?: NotificationSetupRequestChannels;
|
|
5939
|
+
}
|
|
5940
|
+
interface SetupWorkspaceNotificationSettingsRequest {
|
|
5941
|
+
events: NotificationSettingsEventType[] | "all";
|
|
5942
|
+
channels: NotificationSetupRequestChannels;
|
|
5943
|
+
}
|
|
5944
|
+
interface SetupWorkflowNotificationSettingsRequest extends SetupWorkspaceNotificationSettingsRequest {
|
|
5945
|
+
workflowId: string;
|
|
5946
|
+
}
|
|
5947
|
+
declare class NotificationSetupService {
|
|
5948
|
+
private readonly channelsService;
|
|
5949
|
+
private readonly settingsService;
|
|
5950
|
+
constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService);
|
|
5951
|
+
/**
|
|
5952
|
+
* Setup notification settings for a specific workflow ensuring no duplicates exist.
|
|
5953
|
+
*/
|
|
5954
|
+
setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<NotificationSettings[]>;
|
|
5955
|
+
/**
|
|
5956
|
+
* Setup notification settings at the workspace level ensuring no duplicates exist.
|
|
5957
|
+
*/
|
|
5958
|
+
setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<NotificationSettings[]>;
|
|
5959
|
+
/**
|
|
5960
|
+
* Complete workflow notification setup including channels and settings
|
|
5961
|
+
*
|
|
5962
|
+
* @param requestData Workflow notification setup configuration
|
|
5963
|
+
* @returns Array of created notification settings
|
|
5964
|
+
*/
|
|
5965
|
+
setup(requestData: NotificationOptions): Promise<NotificationSettings[]>;
|
|
5966
|
+
setupChannels(requestData: {
|
|
5967
|
+
workflowId?: string;
|
|
5968
|
+
channels: NotificationSetupRequestChannels;
|
|
5969
|
+
}): Promise<NotificationChannel[]>;
|
|
5970
|
+
private handleChannelsById;
|
|
5971
|
+
private handleDefaultChannels;
|
|
5972
|
+
private handleChannelsByConfig;
|
|
5660
5973
|
}
|
|
5661
5974
|
|
|
5662
5975
|
/**
|
|
@@ -5714,12 +6027,13 @@ interface PollingResult<T> {
|
|
|
5714
6027
|
*/
|
|
5715
6028
|
declare function pollUntil<T>(pollFn: () => Promise<T>, isComplete: (result: T) => boolean, options?: PollingOptions): Promise<PollingResult<T>>;
|
|
5716
6029
|
|
|
5717
|
-
type LocationConfig = Location;
|
|
5718
6030
|
type WorkflowId = string;
|
|
5719
|
-
type
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
6031
|
+
type JobId = string;
|
|
6032
|
+
interface WaitOptions extends PollingOptions {
|
|
6033
|
+
targetState?: WorkflowStateEnum;
|
|
6034
|
+
}
|
|
6035
|
+
interface JobWaitOptions extends PollingOptions {
|
|
6036
|
+
targetStatus?: JobStateEnum;
|
|
5723
6037
|
}
|
|
5724
6038
|
interface CreateWorkflowInput {
|
|
5725
6039
|
urls: string[];
|
|
@@ -5727,8 +6041,8 @@ interface CreateWorkflowInput {
|
|
|
5727
6041
|
name: string;
|
|
5728
6042
|
description?: string;
|
|
5729
6043
|
schemaId?: string;
|
|
5730
|
-
entity
|
|
5731
|
-
fields: Array<SchemaField>;
|
|
6044
|
+
entity?: string;
|
|
6045
|
+
fields: Array<SchemaField$1>;
|
|
5732
6046
|
tags?: string[];
|
|
5733
6047
|
interval?: WorkflowInterval;
|
|
5734
6048
|
monitoring?: MonitoringConfig;
|
|
@@ -5737,174 +6051,33 @@ interface CreateWorkflowInput {
|
|
|
5737
6051
|
autoStart?: boolean;
|
|
5738
6052
|
schedules?: string[];
|
|
5739
6053
|
}
|
|
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;
|
|
5755
|
-
}
|
|
5756
|
-
|
|
5757
|
-
type ListWorkflowsOptions = WorkflowsApiV4WorkflowsGetRequest;
|
|
5758
6054
|
declare class WorkflowsCoreService {
|
|
5759
6055
|
private readonly workflowsApi;
|
|
5760
6056
|
constructor(workflowsApi: WorkflowsApiInterface);
|
|
5761
6057
|
create(input: CreateWorkflowInput): Promise<{
|
|
5762
6058
|
id: WorkflowId;
|
|
5763
6059
|
}>;
|
|
5764
|
-
get(id: WorkflowId): Promise<
|
|
5765
|
-
list(filters?:
|
|
5766
|
-
getByName(name: string): Promise<
|
|
6060
|
+
get(id: WorkflowId): Promise<GetWorkflowResponse>;
|
|
6061
|
+
list(filters?: ListWorkflowsRequest): Promise<WorkflowResponse[]>;
|
|
6062
|
+
getByName(name: string): Promise<WorkflowResponse | undefined>;
|
|
5767
6063
|
cancel(id: WorkflowId): Promise<void>;
|
|
5768
6064
|
resume(id: WorkflowId): Promise<void>;
|
|
5769
6065
|
/**
|
|
5770
6066
|
* Wait for a workflow to reach the target state or a terminal state if no target state is provided
|
|
5771
6067
|
*/
|
|
5772
|
-
wait(id: WorkflowId, options?: WaitOptions
|
|
6068
|
+
wait(id: WorkflowId, options?: WaitOptions): Promise<GetWorkflowResponse>;
|
|
5773
6069
|
/**
|
|
5774
6070
|
* Run a workflow with variables and optional limit
|
|
5775
6071
|
*/
|
|
5776
|
-
runWorkflow(workflowId: WorkflowId, input:
|
|
5777
|
-
/**
|
|
5778
|
-
* Get job status directly without polling workflow details
|
|
5779
|
-
*/
|
|
5780
|
-
getJobStatus(workflowId: WorkflowId, jobId: JobId): Promise<FinishedJob>;
|
|
5781
|
-
/**
|
|
5782
|
-
* Wait for a job to reach the target state or a terminal state
|
|
5783
|
-
*/
|
|
5784
|
-
waitForJobCompletion(workflowId: WorkflowId, jobId: JobId, options?: JobWaitOptions): Promise<FinishedJob>;
|
|
5785
|
-
}
|
|
5786
|
-
|
|
5787
|
-
type NotificationChannel = V5NotificationsChannelsGet200ResponseDataChannelsInner;
|
|
5788
|
-
declare const NotificationChannelType: {
|
|
5789
|
-
readonly EMAIL: "EMAIL";
|
|
5790
|
-
readonly SLACK: "SLACK";
|
|
5791
|
-
readonly WEBHOOK: "WEBHOOK";
|
|
5792
|
-
readonly WEBSOCKET: "WEBSOCKET";
|
|
5793
|
-
};
|
|
5794
|
-
type NotificationChannelType = (typeof NotificationChannelType)[keyof typeof NotificationChannelType];
|
|
5795
|
-
type WebsocketChannelConfig = Record<string, never>;
|
|
5796
|
-
type ChannelConfig = EmailChannelConfig | SlackChannelConfig | WebhookChannelConfig | WebsocketChannelConfig;
|
|
5797
|
-
declare class NotificationChannelsService {
|
|
5798
|
-
/**
|
|
5799
|
-
* Default channel name
|
|
5800
|
-
*
|
|
5801
|
-
*/
|
|
5802
|
-
static readonly DEFAULT_CHANNEL_NAME = "default";
|
|
5803
|
-
private readonly api;
|
|
5804
|
-
private readonly userService;
|
|
5805
|
-
constructor(notificationsApi: NotificationsApiInterface, userService: UserService);
|
|
5806
|
-
listChannels(filters: NotificationsApiV5NotificationsChannelsGetRequest): Promise<NotificationChannel[]>;
|
|
5807
|
-
/**
|
|
5808
|
-
* List all channels (both workflow-specific and workspace-level)
|
|
5809
|
-
* This is useful for finding workspace-level channels like WebSocket channels
|
|
5810
|
-
* that might not be associated with a specific workflow
|
|
5811
|
-
*/
|
|
5812
|
-
listAllChannels(workflowId?: string): Promise<NotificationChannel[]>;
|
|
5813
|
-
deleteChannel(channelId: string): Promise<void>;
|
|
5814
|
-
createChannel(type: NotificationChannelType, config?: Pick<V5NotificationsChannelsPostRequest, "name" | "config">): Promise<NotificationChannel>;
|
|
5815
|
-
private buildPayload;
|
|
5816
|
-
private buildEmailChannelConfig;
|
|
5817
|
-
private buildSlackChannelConfig;
|
|
5818
|
-
private buildWebhookChannelConfig;
|
|
5819
|
-
private buildWebsocketChannelConfig;
|
|
5820
|
-
}
|
|
5821
|
-
|
|
5822
|
-
type NotificationSettings = V5NotificationsSettingsGet200ResponseDataSettingsInner;
|
|
5823
|
-
type NotificationSettingsEventType = V5NotificationsSettingsGetEventTypeEnum;
|
|
5824
|
-
declare class NotificationSettingsService {
|
|
5825
|
-
private readonly api;
|
|
5826
|
-
constructor(notificationsApi: NotificationsApiInterface);
|
|
5827
|
-
createSettings(requestData: V5NotificationsSettingsPostRequest): Promise<NotificationSettings>;
|
|
5828
|
-
listSettings(filters: NotificationsApiV5NotificationsSettingsGetRequest): Promise<NotificationSettings[]>;
|
|
5829
|
-
listAllEvents(): Promise<NotificationSettingsEventType[]>;
|
|
5830
|
-
deleteSettings(settingsId: string): Promise<void>;
|
|
5831
|
-
}
|
|
5832
|
-
|
|
5833
|
-
type ChannelSetupRequestConfig = ChannelConfig & {
|
|
5834
|
-
/**
|
|
5835
|
-
* The name of the email channel. "default" if not provided
|
|
5836
|
-
*/
|
|
5837
|
-
name: string;
|
|
5838
|
-
};
|
|
5839
|
-
type NotificationSetupRequestChannels = {
|
|
5840
|
-
/**
|
|
5841
|
-
* - true: create a new email channel using user's default email
|
|
5842
|
-
* - { channelId: string }: use existing email channel
|
|
5843
|
-
* - EmailChannelConfig: create a new email channel using the provided configuration
|
|
5844
|
-
*/
|
|
5845
|
-
EMAIL?: true | {
|
|
5846
|
-
channelId: string;
|
|
5847
|
-
} | (ChannelSetupRequestConfig & {
|
|
5848
|
-
/**
|
|
5849
|
-
* The name of the email channel. "default" if not provided
|
|
5850
|
-
*/
|
|
5851
|
-
name: string;
|
|
5852
|
-
});
|
|
5853
|
-
/**
|
|
5854
|
-
* - true: create a new websocket channel using user's default websocket
|
|
5855
|
-
* - { channelId: string }: use existing websocket channel
|
|
5856
|
-
*/
|
|
5857
|
-
WEBSOCKET?: true | {
|
|
5858
|
-
channelId: string;
|
|
5859
|
-
};
|
|
5860
|
-
/**
|
|
5861
|
-
* - { channelId: string }: use existing slack channel
|
|
5862
|
-
* - SlackChannelConfig: create a new slack channel using the provided configuration
|
|
5863
|
-
*/
|
|
5864
|
-
SLACK?: {
|
|
5865
|
-
channelId: string;
|
|
5866
|
-
} | (SlackChannelConfig & {
|
|
5867
|
-
/**
|
|
5868
|
-
* The name of the slack channel. "default" if not provided
|
|
5869
|
-
*/
|
|
5870
|
-
name: string;
|
|
5871
|
-
});
|
|
5872
|
-
/**
|
|
5873
|
-
* - { channelId: string }: use existing webhook channel
|
|
5874
|
-
* - WebhookChannelConfig: create a new webhook channel using the provided configuration
|
|
6072
|
+
runWorkflow(workflowId: WorkflowId, input: RunWorkflowRequest): Promise<RunWorkflowResponse>;
|
|
6073
|
+
/**
|
|
6074
|
+
* Get job status directly without polling workflow details
|
|
5875
6075
|
*/
|
|
5876
|
-
|
|
5877
|
-
channelId: string;
|
|
5878
|
-
} | (WebhookChannelConfig & {
|
|
5879
|
-
/**
|
|
5880
|
-
* The name of the webhook channel
|
|
5881
|
-
*/
|
|
5882
|
-
name: string;
|
|
5883
|
-
});
|
|
5884
|
-
};
|
|
5885
|
-
interface NotificationOptions {
|
|
5886
|
-
workflowId?: string;
|
|
5887
|
-
events?: NotificationSettingsEventType[] | "all";
|
|
5888
|
-
channels?: NotificationSetupRequestChannels;
|
|
5889
|
-
}
|
|
5890
|
-
declare class NotificationSetupService {
|
|
5891
|
-
private readonly channelsService;
|
|
5892
|
-
private readonly settingsService;
|
|
5893
|
-
constructor(channelsService: NotificationChannelsService, settingsService: NotificationSettingsService);
|
|
6076
|
+
getJobStatus(workflowId: WorkflowId, jobId: JobId): Promise<GetJobResponse>;
|
|
5894
6077
|
/**
|
|
5895
|
-
*
|
|
5896
|
-
*
|
|
5897
|
-
* @param requestData Workflow notification setup configuration
|
|
5898
|
-
* @returns Array of created notification settings
|
|
6078
|
+
* Wait for a job to reach the target state or a terminal state
|
|
5899
6079
|
*/
|
|
5900
|
-
|
|
5901
|
-
setupChannels(requestData: {
|
|
5902
|
-
workflowId?: string;
|
|
5903
|
-
channels: NotificationSetupRequestChannels;
|
|
5904
|
-
}): Promise<NotificationChannel[]>;
|
|
5905
|
-
private handleChannelsById;
|
|
5906
|
-
private handleDefaultChannels;
|
|
5907
|
-
private handleChannelsByConfig;
|
|
6080
|
+
waitForJobCompletion(workflowId: WorkflowId, jobId: JobId, options?: JobWaitOptions): Promise<GetJobResponse>;
|
|
5908
6081
|
}
|
|
5909
6082
|
|
|
5910
6083
|
interface ExtractionOptionsInternal {
|
|
@@ -5914,13 +6087,13 @@ interface ExtractionOptionsInternal {
|
|
|
5914
6087
|
navigationMode: NavigationMode;
|
|
5915
6088
|
name: string;
|
|
5916
6089
|
description?: string;
|
|
5917
|
-
location: LocationConfig
|
|
6090
|
+
location: LocationConfig;
|
|
5918
6091
|
bypassPreview?: boolean;
|
|
5919
6092
|
pollingInterval: number;
|
|
5920
6093
|
maxWaitTime: number;
|
|
5921
6094
|
entity: EntityConfig;
|
|
5922
6095
|
interval?: WorkflowInterval;
|
|
5923
|
-
monitoring?:
|
|
6096
|
+
monitoring?: WorkflowMonitoringConfig;
|
|
5924
6097
|
tags?: string[];
|
|
5925
6098
|
notifications?: NotificationOptions;
|
|
5926
6099
|
autoStart?: boolean;
|
|
@@ -5930,7 +6103,7 @@ type ExtractionOptions = {
|
|
|
5930
6103
|
} & Partial<Omit<ExtractionOptionsInternal, "urls">>;
|
|
5931
6104
|
interface ExtractionResult {
|
|
5932
6105
|
workflowId: string;
|
|
5933
|
-
workflow?:
|
|
6106
|
+
workflow?: WorkflowDetailsResponse;
|
|
5934
6107
|
data?: Array<object>;
|
|
5935
6108
|
pagination?: PageInfo;
|
|
5936
6109
|
}
|
|
@@ -5946,11 +6119,49 @@ declare class ExtractionService {
|
|
|
5946
6119
|
private readonly dataFetcherService;
|
|
5947
6120
|
private readonly entityResolverService;
|
|
5948
6121
|
private readonly notificationSetupService;
|
|
5949
|
-
|
|
6122
|
+
private readonly notificationChannelsService;
|
|
6123
|
+
private readonly notificationSettingsService;
|
|
6124
|
+
constructor(workflowsCoreService: WorkflowsCoreService, dataFetcherService: DataFetcherService, entityResolverService: EntityResolverService, notificationSetupService: NotificationSetupService, notificationChannelsService: NotificationChannelsService, notificationSettingsService: NotificationSettingsService);
|
|
6125
|
+
/**
|
|
6126
|
+
* Run an extraction workflow and wait for completion.
|
|
6127
|
+
*/
|
|
6128
|
+
run(options: ExtractionOptions): Promise<ExtractionResult>;
|
|
6129
|
+
/**
|
|
6130
|
+
* Submit an extraction workflow for asynchronous processing.
|
|
6131
|
+
*/
|
|
6132
|
+
submit(options: ExtractionOptions): Promise<SubmitExtractionResult>;
|
|
6133
|
+
/**
|
|
6134
|
+
* Trigger a workflow run without waiting for completion.
|
|
6135
|
+
*/
|
|
6136
|
+
runJob(workflowId: string, input: RunWorkflowRequest): Promise<RunWorkflowResponse>;
|
|
6137
|
+
/**
|
|
6138
|
+
* Trigger a workflow run and wait for the job to complete.
|
|
6139
|
+
*/
|
|
6140
|
+
runJobAndWait(workflowId: string, input: RunWorkflowRequest): Promise<GetJobResponse>;
|
|
6141
|
+
/**
|
|
6142
|
+
* Fetch a single page of extraction data.
|
|
6143
|
+
*/
|
|
6144
|
+
fetchData(options: FetchDataOptions): Promise<FetchDataResult>;
|
|
6145
|
+
/**
|
|
6146
|
+
* Fetch all extraction data across all pages.
|
|
6147
|
+
*/
|
|
6148
|
+
fetchAllData(options: FetchDataOptions): Promise<object[]>;
|
|
6149
|
+
/**
|
|
6150
|
+
* Iterate through extraction data pages.
|
|
6151
|
+
*/
|
|
6152
|
+
fetchDataPages(options: FetchDataOptions): AsyncGenerator<FetchDataResult, void, unknown>;
|
|
6153
|
+
/**
|
|
6154
|
+
* List notification channels for a workflow.
|
|
6155
|
+
*/
|
|
6156
|
+
getNotificationChannels(workflowId: string): Promise<NotificationChannel[]>;
|
|
6157
|
+
/**
|
|
6158
|
+
* List notification settings for a workflow.
|
|
6159
|
+
*/
|
|
6160
|
+
getNotificationSettings(workflowId: string): Promise<NotificationSettings[]>;
|
|
5950
6161
|
/**
|
|
5951
6162
|
* execute extraction workflow
|
|
5952
6163
|
*/
|
|
5953
|
-
executeExtraction
|
|
6164
|
+
private executeExtraction;
|
|
5954
6165
|
/**
|
|
5955
6166
|
* Validates extraction options
|
|
5956
6167
|
*/
|
|
@@ -5965,174 +6176,228 @@ declare class ExtractionService {
|
|
|
5965
6176
|
private isExtractionSuccessful;
|
|
5966
6177
|
}
|
|
5967
6178
|
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
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>;
|
|
6179
|
+
/**
|
|
6180
|
+
* Schemas domain ACL.
|
|
6181
|
+
* Wraps generated SchemasApi requests/responses and normalizes types.
|
|
6182
|
+
* Downstream code must import from this module instead of `generated/**`.
|
|
6183
|
+
*
|
|
6184
|
+
* NOTE: This ACL uses type aliases instead of explicit classes/interfaces because:
|
|
6185
|
+
* - The generated types (CreateSchemaBody, UpdateSchemaBody, SchemaResponse) are flat interfaces
|
|
6186
|
+
* - They contain only primitive fields and simple nested types (SchemaResponseSchemaInner)
|
|
6187
|
+
* - No enums or complex nested structures that could leak implementation details
|
|
6188
|
+
* - The types are stable and unlikely to change in structure
|
|
6189
|
+
*/
|
|
6190
|
+
|
|
6191
|
+
/**
|
|
6192
|
+
* Request to create a new schema.
|
|
6193
|
+
* Re-exported from generated CreateSchemaBody model with JSDoc preserved.
|
|
6194
|
+
*/
|
|
6195
|
+
type CreateSchemaRequest = CreateSchemaBody;
|
|
6196
|
+
/**
|
|
6197
|
+
* Request to update an existing schema.
|
|
6198
|
+
* Re-exported from generated UpdateSchemaBody model with JSDoc preserved.
|
|
6199
|
+
*/
|
|
6200
|
+
type UpdateSchemaRequest = UpdateSchemaBody;
|
|
6201
|
+
/**
|
|
6202
|
+
* Schema response data.
|
|
6203
|
+
* Re-exported from generated SchemaResponse model with JSDoc preserved.
|
|
6204
|
+
*/
|
|
6205
|
+
type SchemaResponse = SchemaResponse$1;
|
|
6206
|
+
/**
|
|
6207
|
+
* Schema field definition.
|
|
6208
|
+
* Re-exported from generated SchemaResponseSchemaInner model.
|
|
6209
|
+
*/
|
|
6210
|
+
type SchemaField = SchemaResponseSchemaInner;
|
|
6211
|
+
/**
|
|
6212
|
+
* Example value for a field.
|
|
6213
|
+
* Re-exported from generated ExtractionSchemaFieldExample model.
|
|
6214
|
+
*/
|
|
6215
|
+
type FieldExample = ExtractionSchemaFieldExample;
|
|
6216
|
+
/**
|
|
6217
|
+
* Category definition for classification fields.
|
|
6218
|
+
* Re-exported from generated ExtractionClassificationFieldCategoriesInner model.
|
|
6219
|
+
*/
|
|
6220
|
+
type Category = ExtractionClassificationFieldCategoriesInner;
|
|
6221
|
+
|
|
6222
|
+
/**
|
|
6223
|
+
* Optional configuration for schema fields
|
|
6224
|
+
*/
|
|
6225
|
+
interface FieldOptions {
|
|
6038
6226
|
/**
|
|
6039
|
-
*
|
|
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
|
-
* ```
|
|
6227
|
+
* Example value for the field (required for STRING, IMAGE, LINK, OBJECT, ARRAY)
|
|
6228
|
+
* Can be a string or an array of strings
|
|
6058
6229
|
*/
|
|
6059
|
-
|
|
6230
|
+
example?: FieldExample;
|
|
6060
6231
|
/**
|
|
6061
|
-
*
|
|
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
|
-
* ```
|
|
6232
|
+
* Whether this field is a primary key
|
|
6072
6233
|
*/
|
|
6073
|
-
|
|
6234
|
+
isKey?: boolean;
|
|
6235
|
+
}
|
|
6236
|
+
/**
|
|
6237
|
+
* Builder for defining custom schemas with fields
|
|
6238
|
+
*/
|
|
6239
|
+
declare class SchemaBuilder {
|
|
6240
|
+
private static readonly FIELD_NAME_PATTERN;
|
|
6241
|
+
private static readonly TYPES_REQUIRING_EXAMPLE;
|
|
6242
|
+
readonly fields: SchemaField[];
|
|
6243
|
+
entityName?: string;
|
|
6244
|
+
private hasSchemaFields;
|
|
6245
|
+
entity(entityName: string): this;
|
|
6074
6246
|
/**
|
|
6075
|
-
*
|
|
6076
|
-
*
|
|
6077
|
-
* @param
|
|
6078
|
-
* @
|
|
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
|
-
* ```
|
|
6247
|
+
* Add a structured field to the schema
|
|
6248
|
+
* @param name - Field name (alphanumeric only)
|
|
6249
|
+
* @param description - Field description
|
|
6250
|
+
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
6251
|
+
* @param options - Optional field configuration
|
|
6086
6252
|
*/
|
|
6087
|
-
|
|
6253
|
+
field(name: string, description: string, dataType: DataType, options?: FieldOptions): this;
|
|
6088
6254
|
/**
|
|
6089
|
-
*
|
|
6090
|
-
*
|
|
6091
|
-
* @param
|
|
6092
|
-
* @
|
|
6093
|
-
*
|
|
6094
|
-
* @example
|
|
6095
|
-
* ```typescript
|
|
6096
|
-
* const channels = await client.extraction.getNotificationChannels('workflow-id');
|
|
6097
|
-
* ```
|
|
6255
|
+
* Add a classification field to categorize content
|
|
6256
|
+
* @param name - Field name (alphanumeric only)
|
|
6257
|
+
* @param description - Field description
|
|
6258
|
+
* @param categories - Array of category definitions
|
|
6098
6259
|
*/
|
|
6099
|
-
|
|
6260
|
+
classify(name: string, description: string, categories: Category[]): this;
|
|
6100
6261
|
/**
|
|
6101
|
-
*
|
|
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
|
-
* ```
|
|
6262
|
+
* Add raw page content to extract
|
|
6263
|
+
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
6110
6264
|
*/
|
|
6111
|
-
|
|
6265
|
+
raw(name: RawFormat | RawFormat[]): this;
|
|
6266
|
+
build(): {
|
|
6267
|
+
entityName?: string;
|
|
6268
|
+
fields: SchemaField[];
|
|
6269
|
+
};
|
|
6270
|
+
private validateFieldName;
|
|
6112
6271
|
}
|
|
6113
6272
|
|
|
6114
|
-
interface
|
|
6115
|
-
|
|
6116
|
-
|
|
6273
|
+
interface ExtractOptionsInternal {
|
|
6274
|
+
urls: string[];
|
|
6275
|
+
name: string;
|
|
6276
|
+
description?: string;
|
|
6277
|
+
navigationMode: NavigationMode;
|
|
6278
|
+
entity: EntityConfig;
|
|
6279
|
+
bypassPreview?: boolean;
|
|
6280
|
+
interval?: WorkflowInterval;
|
|
6281
|
+
schedules?: string[];
|
|
6282
|
+
location?: LocationConfig;
|
|
6117
6283
|
}
|
|
6118
|
-
interface
|
|
6284
|
+
interface ExtractOptions extends Omit<ExtractOptionsInternal, "navigationMode" | "entity"> {
|
|
6285
|
+
navigationMode?: NavigationMode;
|
|
6286
|
+
extraction?: (builder: SchemaBuilder) => SchemaBuilder | {
|
|
6287
|
+
schemaId: string;
|
|
6288
|
+
};
|
|
6289
|
+
}
|
|
6290
|
+
interface PreparedExtraction {
|
|
6291
|
+
options: ExtractOptionsInternal;
|
|
6292
|
+
withNotifications: (options: NotificationOptions) => PreparedExtraction;
|
|
6293
|
+
withMonitoring: (options: WorkflowMonitoringConfig) => PreparedExtraction;
|
|
6294
|
+
setInterval: (options: {
|
|
6295
|
+
interval: WorkflowInterval;
|
|
6296
|
+
} | {
|
|
6297
|
+
schedules: string[];
|
|
6298
|
+
}) => PreparedExtraction;
|
|
6299
|
+
bypassPreview: () => PreparedExtraction;
|
|
6300
|
+
setLocation: (options: LocationConfig) => PreparedExtraction;
|
|
6301
|
+
create: () => Promise<CreatedExtraction>;
|
|
6302
|
+
}
|
|
6303
|
+
interface RunWorkflowOptions {
|
|
6304
|
+
variables: Record<string, unknown>;
|
|
6305
|
+
limit: number;
|
|
6306
|
+
}
|
|
6307
|
+
interface CreatedExtraction {
|
|
6308
|
+
options: ExtractOptionsInternal;
|
|
6119
6309
|
workflowId: string;
|
|
6310
|
+
run: (options?: RunWorkflowOptions) => Promise<FinishedExtraction>;
|
|
6311
|
+
submit: (options?: RunWorkflowOptions) => Promise<SubmittedExtraction>;
|
|
6120
6312
|
}
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6313
|
+
interface SubmittedExtraction {
|
|
6314
|
+
workflowId: string;
|
|
6315
|
+
jobId: string;
|
|
6316
|
+
}
|
|
6317
|
+
interface FinishedExtraction {
|
|
6318
|
+
jobId: string;
|
|
6319
|
+
fetchData: (options: Omit<FetchDataOptions, "workflowId" | "runId">) => Promise<FetchDataResult>;
|
|
6320
|
+
fetchAllData: (options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">) => Promise<object[]>;
|
|
6321
|
+
}
|
|
6322
|
+
declare class ExtractionBuilderService {
|
|
6323
|
+
private readonly workflowsCoreService;
|
|
6324
|
+
private readonly entityResolverService;
|
|
6325
|
+
private readonly dataFetcherService;
|
|
6326
|
+
private readonly notificationSetupService;
|
|
6327
|
+
private _options;
|
|
6328
|
+
private _workflowId;
|
|
6329
|
+
private _jobId;
|
|
6330
|
+
private _notificationOptions;
|
|
6331
|
+
private _monitoringOptions;
|
|
6332
|
+
get options(): ExtractOptionsInternal;
|
|
6333
|
+
get notificationOptions(): NotificationOptions | undefined;
|
|
6334
|
+
get monitoringOptions(): WorkflowMonitoringConfig | undefined;
|
|
6335
|
+
get workflowId(): string;
|
|
6336
|
+
get jobId(): string;
|
|
6337
|
+
constructor(workflowsCoreService: WorkflowsCoreService, entityResolverService: EntityResolverService, dataFetcherService: DataFetcherService, notificationSetupService: NotificationSetupService);
|
|
6338
|
+
extract({ urls, name, description, navigationMode, extraction, }: ExtractOptions): PreparedExtraction;
|
|
6339
|
+
withNotifications(options: Omit<NotificationOptions, "workflowId">): PreparedExtraction;
|
|
6340
|
+
withMonitoring(options: WorkflowMonitoringConfig): PreparedExtraction;
|
|
6341
|
+
bypassPreview(): PreparedExtraction;
|
|
6342
|
+
setInterval(options: {
|
|
6343
|
+
interval: WorkflowInterval;
|
|
6344
|
+
} | {
|
|
6345
|
+
schedules: string[];
|
|
6346
|
+
}): PreparedExtraction;
|
|
6347
|
+
setLocation(options: LocationConfig): PreparedExtraction;
|
|
6348
|
+
create(): Promise<CreatedExtraction>;
|
|
6349
|
+
run(options?: RunWorkflowOptions): Promise<FinishedExtraction>;
|
|
6350
|
+
submit(options?: RunWorkflowOptions): Promise<SubmittedExtraction>;
|
|
6351
|
+
fetchData(options: Omit<FetchDataOptions, "workflowId" | "runId">): Promise<FetchDataResult>;
|
|
6352
|
+
fetchAllData(options: Omit<FetchDataOptions, "workflowId" | "runId" | "page" | "limit">): Promise<object[]>;
|
|
6353
|
+
}
|
|
6354
|
+
|
|
6355
|
+
interface RealtimeConfig {
|
|
6356
|
+
teamApiKey: string;
|
|
6357
|
+
heartbeatInterval?: number;
|
|
6358
|
+
reconnectDelay?: number;
|
|
6359
|
+
missedHeartbeatsLimit?: number;
|
|
6360
|
+
}
|
|
6361
|
+
declare class Realtime {
|
|
6362
|
+
private socket?;
|
|
6363
|
+
private heartbeatInterval;
|
|
6364
|
+
private reconnectDelay;
|
|
6365
|
+
private lastHeartbeat;
|
|
6366
|
+
private isConnecting;
|
|
6367
|
+
private missedHeartbeatsLimit;
|
|
6368
|
+
private missedHeartbeatCheckTimer?;
|
|
6369
|
+
private teamApiKey?;
|
|
6370
|
+
private eventListeners;
|
|
6371
|
+
private connectionListeners;
|
|
6372
|
+
private errorListeners;
|
|
6373
|
+
constructor(config: RealtimeConfig);
|
|
6374
|
+
connect(): Promise<void>;
|
|
6375
|
+
private handleHeartbeat;
|
|
6376
|
+
private notifyEventListeners;
|
|
6377
|
+
private notifyConnectionListeners;
|
|
6378
|
+
private notifyErrorListeners;
|
|
6379
|
+
private startHeartbeatCheck;
|
|
6380
|
+
private stopHeartbeatCheck;
|
|
6381
|
+
/**
|
|
6382
|
+
* Subscribe to realtime events
|
|
6383
|
+
* @param listener Function to handle incoming events
|
|
6384
|
+
* @returns Function to unsubscribe
|
|
6385
|
+
*/
|
|
6386
|
+
onEvent(listener: (event: unknown) => void): () => void;
|
|
6128
6387
|
/**
|
|
6129
|
-
*
|
|
6388
|
+
* Subscribe to connection state changes
|
|
6389
|
+
* @param listener Function to handle connection state changes
|
|
6390
|
+
* @returns Function to unsubscribe
|
|
6130
6391
|
*/
|
|
6131
|
-
|
|
6392
|
+
onConnection(listener: (connected: boolean, reason?: string) => void): () => void;
|
|
6132
6393
|
/**
|
|
6133
|
-
*
|
|
6394
|
+
* Subscribe to errors
|
|
6395
|
+
* @param listener Function to handle errors
|
|
6396
|
+
* @returns Function to unsubscribe
|
|
6134
6397
|
*/
|
|
6135
|
-
|
|
6398
|
+
onError(listener: (error: unknown) => void): () => void;
|
|
6399
|
+
close(): void;
|
|
6400
|
+
isConnected(): boolean;
|
|
6136
6401
|
}
|
|
6137
6402
|
|
|
6138
6403
|
/**
|
|
@@ -6141,6 +6406,12 @@ declare class NotificationsModule {
|
|
|
6141
6406
|
declare class SchemasService {
|
|
6142
6407
|
private readonly schemasApi;
|
|
6143
6408
|
constructor(client: KadoaClient);
|
|
6409
|
+
/**
|
|
6410
|
+
* Create a schema builder with fluent API and inline create support.
|
|
6411
|
+
*/
|
|
6412
|
+
builder(entityName?: string): SchemaBuilder & {
|
|
6413
|
+
create(name?: string): Promise<SchemaResponse>;
|
|
6414
|
+
};
|
|
6144
6415
|
/**
|
|
6145
6416
|
* Get a schema by ID
|
|
6146
6417
|
*/
|
|
@@ -6152,11 +6423,11 @@ declare class SchemasService {
|
|
|
6152
6423
|
/**
|
|
6153
6424
|
* Create a new schema
|
|
6154
6425
|
*/
|
|
6155
|
-
createSchema(body:
|
|
6426
|
+
createSchema(body: CreateSchemaRequest): Promise<SchemaResponse>;
|
|
6156
6427
|
/**
|
|
6157
6428
|
* Update an existing schema
|
|
6158
6429
|
*/
|
|
6159
|
-
updateSchema(schemaId: string, body:
|
|
6430
|
+
updateSchema(schemaId: string, body: UpdateSchemaRequest): Promise<SchemaResponse>;
|
|
6160
6431
|
/**
|
|
6161
6432
|
* Delete a schema
|
|
6162
6433
|
*/
|
|
@@ -6164,314 +6435,148 @@ declare class SchemasService {
|
|
|
6164
6435
|
}
|
|
6165
6436
|
|
|
6166
6437
|
/**
|
|
6167
|
-
*
|
|
6438
|
+
* Validation domain ACL.
|
|
6439
|
+
* Wraps generated DataValidationApi requests/responses and normalizes enums.
|
|
6440
|
+
* Downstream code must import from this module instead of `generated/**`.
|
|
6168
6441
|
*/
|
|
6169
|
-
|
|
6442
|
+
|
|
6170
6443
|
/**
|
|
6171
|
-
*
|
|
6444
|
+
* Rule status enum.
|
|
6172
6445
|
*/
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
/**
|
|
6180
|
-
* Whether this field is a primary key
|
|
6181
|
-
*/
|
|
6182
|
-
isKey?: boolean;
|
|
6183
|
-
}
|
|
6446
|
+
declare const RuleStatus: {
|
|
6447
|
+
readonly Preview: "preview";
|
|
6448
|
+
readonly Enabled: "enabled";
|
|
6449
|
+
readonly Disabled: "disabled";
|
|
6450
|
+
};
|
|
6451
|
+
type RuleStatus = (typeof RuleStatus)[keyof typeof RuleStatus];
|
|
6184
6452
|
/**
|
|
6185
|
-
*
|
|
6453
|
+
* Rule type enum.
|
|
6186
6454
|
*/
|
|
6187
|
-
|
|
6455
|
+
declare const RuleType: {
|
|
6456
|
+
readonly CustomSql: "custom_sql";
|
|
6457
|
+
};
|
|
6458
|
+
type RuleType = (typeof RuleType)[keyof typeof RuleType];
|
|
6188
6459
|
/**
|
|
6189
|
-
*
|
|
6460
|
+
* Validation strategy enum.
|
|
6190
6461
|
*/
|
|
6191
|
-
declare
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
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
|
-
|
|
6462
|
+
declare const ValidationStrategy: {
|
|
6463
|
+
readonly Isolated: "ISOLATED";
|
|
6464
|
+
readonly LinkingColumns: "LINKING_COLUMNS";
|
|
6465
|
+
};
|
|
6466
|
+
type ValidationStrategy = (typeof ValidationStrategy)[keyof typeof ValidationStrategy];
|
|
6224
6467
|
/**
|
|
6225
|
-
*
|
|
6226
|
-
* Extends SchemaBuilder to add direct schema creation
|
|
6468
|
+
* Include deleted rules parameter.
|
|
6227
6469
|
*/
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
create(name?: string): Promise<SchemaResponse>;
|
|
6470
|
+
type IncludeDeletedRules = V4DataValidationRulesGetIncludeDeletedParameter;
|
|
6471
|
+
declare class ListRulesRequest implements DataValidationApiV4DataValidationRulesGetRequest {
|
|
6472
|
+
groupId?: string;
|
|
6473
|
+
workflowId?: string;
|
|
6474
|
+
status?: RuleStatus;
|
|
6475
|
+
page?: number;
|
|
6476
|
+
pageSize?: number;
|
|
6477
|
+
includeDeleted?: IncludeDeletedRules;
|
|
6237
6478
|
}
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
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>;
|
|
6479
|
+
type CreateRuleRequest = CreateRule;
|
|
6480
|
+
type GenerateRuleRequest = GenerateRule;
|
|
6481
|
+
type GenerateRulesRequest = GenerateRules;
|
|
6482
|
+
type UpdateRuleRequest = UpdateRule;
|
|
6483
|
+
interface DisableRuleRequest {
|
|
6484
|
+
ruleId: string;
|
|
6485
|
+
disableRule?: DisableRule;
|
|
6287
6486
|
}
|
|
6288
|
-
|
|
6487
|
+
type BulkApproveRulesRequest = BulkApproveRules;
|
|
6488
|
+
type BulkDeleteRulesRequest = BulkDeleteRules;
|
|
6489
|
+
type DeleteAllRulesRequest = DeleteRuleWithReason;
|
|
6289
6490
|
/**
|
|
6290
|
-
*
|
|
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
|
-
* ```
|
|
6491
|
+
* Rule with SDK-curated enum types.
|
|
6492
|
+
* Remaps generated enum fields to prevent type leakage.
|
|
6303
6493
|
*/
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
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>;
|
|
6494
|
+
interface Rule extends Omit<Rule$1, "status" | "ruleType"> {
|
|
6495
|
+
status: RuleStatus;
|
|
6496
|
+
ruleType?: RuleType;
|
|
6317
6497
|
}
|
|
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"];
|
|
6498
|
+
type ListRulesResponse = RulesListResponse;
|
|
6328
6499
|
type BulkApproveRulesResponseData = BulkApproveRulesResponse["data"];
|
|
6329
6500
|
type BulkDeleteRulesResponseData = BulkDeleteRulesResponse["data"];
|
|
6330
6501
|
type DeleteAllRulesResponseData = DeleteAllRulesResponse["data"];
|
|
6331
|
-
|
|
6502
|
+
declare class ListWorkflowValidationsRequest implements DataValidationApiV4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGetRequest {
|
|
6503
|
+
workflowId: string;
|
|
6504
|
+
jobId: string;
|
|
6505
|
+
page?: number;
|
|
6506
|
+
pageSize?: number;
|
|
6507
|
+
includeDryRun?: boolean | null;
|
|
6508
|
+
}
|
|
6509
|
+
type ListValidationsResponse = ValidationListResponse;
|
|
6332
6510
|
/**
|
|
6333
|
-
*
|
|
6511
|
+
* Validation report with SDK-curated enum types.
|
|
6334
6512
|
*/
|
|
6335
|
-
|
|
6336
|
-
|
|
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>;
|
|
6513
|
+
interface GetValidationResponse extends Omit<DataValidationReport, "strategy"> {
|
|
6514
|
+
strategy?: ValidationStrategy;
|
|
6349
6515
|
}
|
|
6516
|
+
type ToggleValidationResponse = V4DataValidationWorkflowsWorkflowIdValidationTogglePut200Response;
|
|
6350
6517
|
|
|
6351
|
-
type
|
|
6352
|
-
type
|
|
6353
|
-
type WaitUntilCompletedOptions = PollingOptions;
|
|
6518
|
+
type GetAnomaliesByRuleResponse = AnomaliesByRuleResponse;
|
|
6519
|
+
type GetAnomalyRulePageResponse = AnomalyRulePageResponse;
|
|
6354
6520
|
|
|
6355
6521
|
declare class ValidationCoreService {
|
|
6356
6522
|
private readonly validationApi;
|
|
6357
6523
|
constructor(client: KadoaClient);
|
|
6358
|
-
listWorkflowValidations(filters:
|
|
6359
|
-
getValidationDetails(validationId: string): Promise<
|
|
6524
|
+
listWorkflowValidations(filters: ListWorkflowValidationsRequest): Promise<ListValidationsResponse>;
|
|
6525
|
+
getValidationDetails(validationId: string): Promise<GetValidationResponse>;
|
|
6360
6526
|
scheduleValidation(workflowId: string, jobId: string): Promise<ScheduleValidationResponse>;
|
|
6361
|
-
toggleValidationEnabled(workflowId: string): Promise<
|
|
6362
|
-
getLatestValidation(workflowId: string, jobId?: string): Promise<
|
|
6363
|
-
getValidationAnomalies(validationId: string): Promise<
|
|
6364
|
-
getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<
|
|
6365
|
-
waitUntilCompleted(validationId: string, options?:
|
|
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>;
|
|
6381
|
-
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>;
|
|
6527
|
+
toggleValidationEnabled(workflowId: string): Promise<ToggleValidationResponse>;
|
|
6528
|
+
getLatestValidation(workflowId: string, jobId?: string): Promise<GetValidationResponse>;
|
|
6529
|
+
getValidationAnomalies(validationId: string): Promise<GetAnomaliesByRuleResponse>;
|
|
6530
|
+
getValidationAnomaliesByRule(validationId: string, ruleName: string): Promise<GetAnomalyRulePageResponse>;
|
|
6531
|
+
waitUntilCompleted(validationId: string, options?: PollingOptions): Promise<GetValidationResponse>;
|
|
6388
6532
|
}
|
|
6389
6533
|
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
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>;
|
|
6534
|
+
/**
|
|
6535
|
+
* Service for managing data validation rules
|
|
6536
|
+
*/
|
|
6537
|
+
declare class ValidationRulesService {
|
|
6538
|
+
private readonly validationApi;
|
|
6539
|
+
constructor(client: KadoaClient);
|
|
6540
|
+
listRules(options?: ListRulesRequest): Promise<ListRulesResponse>;
|
|
6541
|
+
getRuleById(ruleId: string): Promise<Rule | undefined>;
|
|
6542
|
+
getRuleByName(name: string): Promise<Rule | undefined>;
|
|
6543
|
+
createRule(data: CreateRuleRequest): Promise<Rule>;
|
|
6544
|
+
updateRule(ruleId: string, updateData: UpdateRuleRequest): Promise<Rule>;
|
|
6545
|
+
disableRule(data: DisableRuleRequest): Promise<Rule>;
|
|
6546
|
+
generateRule(data: GenerateRuleRequest): Promise<Rule>;
|
|
6547
|
+
generateRules(data: GenerateRulesRequest): Promise<Rule[]>;
|
|
6548
|
+
bulkApproveRules(data: BulkApproveRulesRequest): Promise<BulkApproveRulesResponseData>;
|
|
6549
|
+
bulkDeleteRules(data: BulkDeleteRulesRequest): Promise<BulkDeleteRulesResponseData>;
|
|
6550
|
+
deleteAllRules(data: DeleteAllRulesRequest): Promise<DeleteAllRulesResponseData>;
|
|
6415
6551
|
}
|
|
6416
6552
|
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
interval?: WorkflowInterval;
|
|
6425
|
-
schedules?: string[];
|
|
6426
|
-
location?: LocationConfig$1;
|
|
6427
|
-
}
|
|
6428
|
-
interface ExtractOptions extends Omit<ExtractOptionsInternal, "navigationMode" | "entity"> {
|
|
6429
|
-
navigationMode?: NavigationMode;
|
|
6553
|
+
/**
|
|
6554
|
+
* Facade exposing validation operations directly on the client validation domain,
|
|
6555
|
+
* while preserving access to the underlying `rules` services.
|
|
6556
|
+
*/
|
|
6557
|
+
interface ValidationDomain {
|
|
6558
|
+
/** Rule management utilities. */
|
|
6559
|
+
rules: ValidationRulesService;
|
|
6430
6560
|
/**
|
|
6431
|
-
*
|
|
6432
|
-
*
|
|
6433
|
-
*
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
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[]>;
|
|
6561
|
+
* Schedule a validation run for a workflow/job.
|
|
6562
|
+
*
|
|
6563
|
+
* Example: `await client.validation.schedule(workflowId, jobId)`
|
|
6564
|
+
*/
|
|
6565
|
+
schedule: (...args: Parameters<ValidationCoreService["scheduleValidation"]>) => ReturnType<ValidationCoreService["scheduleValidation"]>;
|
|
6566
|
+
/** List validations for a workflow/job. */
|
|
6567
|
+
listWorkflowValidations: (...args: Parameters<ValidationCoreService["listWorkflowValidations"]>) => ReturnType<ValidationCoreService["listWorkflowValidations"]>;
|
|
6568
|
+
/** Get details for a specific validation. */
|
|
6569
|
+
getValidationDetails: (...args: Parameters<ValidationCoreService["getValidationDetails"]>) => ReturnType<ValidationCoreService["getValidationDetails"]>;
|
|
6570
|
+
/** Enable/disable validation for a workflow. */
|
|
6571
|
+
toggleEnabled: (...args: Parameters<ValidationCoreService["toggleValidationEnabled"]>) => ReturnType<ValidationCoreService["toggleValidationEnabled"]>;
|
|
6572
|
+
/** Get the latest validation for a workflow (optionally filtered by job). */
|
|
6573
|
+
getLatest: (...args: Parameters<ValidationCoreService["getLatestValidation"]>) => ReturnType<ValidationCoreService["getLatestValidation"]>;
|
|
6574
|
+
/** Get aggregated anomalies for a validation. */
|
|
6575
|
+
getAnomalies: (...args: Parameters<ValidationCoreService["getValidationAnomalies"]>) => ReturnType<ValidationCoreService["getValidationAnomalies"]>;
|
|
6576
|
+
/** Get anomalies for a specific rule. */
|
|
6577
|
+
getAnomaliesByRule: (...args: Parameters<ValidationCoreService["getValidationAnomaliesByRule"]>) => ReturnType<ValidationCoreService["getValidationAnomaliesByRule"]>;
|
|
6578
|
+
/** Wait until a validation completes; throws if validation fails. */
|
|
6579
|
+
waitUntilCompleted: (...args: Parameters<ValidationCoreService["waitUntilCompleted"]>) => ReturnType<ValidationCoreService["waitUntilCompleted"]>;
|
|
6475
6580
|
}
|
|
6476
6581
|
|
|
6477
6582
|
interface KadoaClientStatus {
|
|
@@ -6498,6 +6603,15 @@ interface KadoaClientConfig {
|
|
|
6498
6603
|
heartbeatInterval?: number;
|
|
6499
6604
|
};
|
|
6500
6605
|
}
|
|
6606
|
+
interface NotificationDomain {
|
|
6607
|
+
channels: NotificationChannelsService;
|
|
6608
|
+
settings: NotificationSettingsService;
|
|
6609
|
+
setup: NotificationSetupService;
|
|
6610
|
+
configure(options: NotificationOptions): Promise<NotificationSettings[]>;
|
|
6611
|
+
setupForWorkflow(requestData: SetupWorkflowNotificationSettingsRequest): Promise<NotificationSettings[]>;
|
|
6612
|
+
setupForWorkspace(requestData: SetupWorkspaceNotificationSettingsRequest): Promise<NotificationSettings[]>;
|
|
6613
|
+
}
|
|
6614
|
+
|
|
6501
6615
|
/**
|
|
6502
6616
|
* KadoaClient provides an object-oriented interface to the Kadoa SDK
|
|
6503
6617
|
*
|
|
@@ -6523,12 +6637,12 @@ declare class KadoaClient {
|
|
|
6523
6637
|
private readonly _apiKey;
|
|
6524
6638
|
private _realtime?;
|
|
6525
6639
|
private _extractionBuilderService;
|
|
6526
|
-
readonly extraction:
|
|
6527
|
-
readonly workflow:
|
|
6528
|
-
readonly notification:
|
|
6529
|
-
readonly schema:
|
|
6530
|
-
readonly user:
|
|
6531
|
-
readonly validation:
|
|
6640
|
+
readonly extraction: ExtractionService;
|
|
6641
|
+
readonly workflow: WorkflowsCoreService;
|
|
6642
|
+
readonly notification: NotificationDomain;
|
|
6643
|
+
readonly schema: SchemasService;
|
|
6644
|
+
readonly user: UserService;
|
|
6645
|
+
readonly validation: ValidationDomain;
|
|
6532
6646
|
constructor(config: KadoaClientConfig);
|
|
6533
6647
|
/**
|
|
6534
6648
|
* Get the underlying configuration
|
|
@@ -6629,19 +6743,63 @@ declare class KadoaClient {
|
|
|
6629
6743
|
dispose(): void;
|
|
6630
6744
|
}
|
|
6631
6745
|
|
|
6632
|
-
interface
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6746
|
+
interface EntityPrediction {
|
|
6747
|
+
entity: string;
|
|
6748
|
+
fields: SchemaField$1[];
|
|
6749
|
+
primaryKeyField?: string;
|
|
6750
|
+
expectedResults?: string;
|
|
6636
6751
|
}
|
|
6637
|
-
|
|
6752
|
+
interface EntityRequestOptions {
|
|
6753
|
+
link: string;
|
|
6754
|
+
location?: LocationConfig;
|
|
6755
|
+
navigationMode?: string;
|
|
6756
|
+
}
|
|
6757
|
+
interface ResolvedEntity {
|
|
6758
|
+
entity?: string;
|
|
6759
|
+
fields: SchemaField$1[];
|
|
6760
|
+
}
|
|
6761
|
+
type EntityConfig = "ai-detection" | {
|
|
6762
|
+
schemaId: string;
|
|
6763
|
+
} | {
|
|
6764
|
+
name?: string;
|
|
6765
|
+
fields: SchemaField$1[];
|
|
6766
|
+
};
|
|
6767
|
+
/**
|
|
6768
|
+
* Service for resolving entities and their fields from various sources
|
|
6769
|
+
*
|
|
6770
|
+
* NOTE: This is a workaround for the /v4/entity endpoint which is not yet exposed in the OpenAPI spec.
|
|
6771
|
+
* Once the endpoint is added to the OpenAPI specification, this manual implementation should be
|
|
6772
|
+
* replaced with the generated client code.
|
|
6773
|
+
*/
|
|
6774
|
+
declare class EntityResolverService {
|
|
6638
6775
|
private readonly client;
|
|
6776
|
+
private readonly schemasService;
|
|
6639
6777
|
constructor(client: KadoaClient);
|
|
6640
6778
|
/**
|
|
6641
|
-
*
|
|
6642
|
-
*
|
|
6779
|
+
* Resolves entity and fields from the provided entity configuration
|
|
6780
|
+
*
|
|
6781
|
+
* @param entityConfig The entity configuration to resolve
|
|
6782
|
+
* @param options Additional options for AI detection
|
|
6783
|
+
* @returns Resolved entity with fields
|
|
6643
6784
|
*/
|
|
6644
|
-
|
|
6785
|
+
resolveEntity(entityConfig: EntityConfig, options?: {
|
|
6786
|
+
link?: string;
|
|
6787
|
+
location?: LocationConfig;
|
|
6788
|
+
navigationMode?: string;
|
|
6789
|
+
}): Promise<ResolvedEntity>;
|
|
6790
|
+
/**
|
|
6791
|
+
* Fetches entity fields dynamically from the /v4/entity endpoint.
|
|
6792
|
+
* This is a workaround implementation using native fetch since the endpoint
|
|
6793
|
+
* is not yet included in the OpenAPI specification.
|
|
6794
|
+
*
|
|
6795
|
+
* @param options Request options including the link to analyze
|
|
6796
|
+
* @returns EntityPrediction containing the detected entity type and fields
|
|
6797
|
+
*/
|
|
6798
|
+
fetchEntityFields(options: EntityRequestOptions): Promise<EntityPrediction>;
|
|
6799
|
+
/**
|
|
6800
|
+
* Validates entity request options
|
|
6801
|
+
*/
|
|
6802
|
+
private validateEntityOptions;
|
|
6645
6803
|
}
|
|
6646
6804
|
|
|
6647
6805
|
declare const KadoaErrorCode: {
|
|
@@ -6770,4 +6928,4 @@ declare class KadoaHttpException extends KadoaSdkException {
|
|
|
6770
6928
|
static mapStatusToCode(errorOrStatus: AxiosError | number): KadoaErrorCode;
|
|
6771
6929
|
}
|
|
6772
6930
|
|
|
6773
|
-
export { type Category, type
|
|
6931
|
+
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 };
|