@@ -95,46 +95,6 @@ export type DecisionDto = {
9595 trigger_object_type : string ;
9696 scheduled_execution_id ?: string ;
9797} ;
98- export type CreateDecisionBody = {
99- scenario_id : string ;
100- trigger_object : object ;
101- object_type : string ;
102- } ;
103- export type ConstantDto = ( ( string | null ) | ( number | null ) | ( boolean | null ) | ( ConstantDto [ ] | null ) | ( {
104- [ key : string ] : ConstantDto ;
105- } | null ) ) | null ;
106- export type EvaluationErrorCodeDto = "UNEXPECTED_ERROR" | "UNDEFINED_FUNCTION" | "WRONG_NUMBER_OF_ARGUMENTS" | "MISSING_NAMED_ARGUMENT" | "ARGUMENTS_MUST_BE_INT_OR_FLOAT" | "ARGUMENTS_MUST_BE_INT_FLOAT_OR_TIME" | "ARGUMENT_MUST_BE_INTEGER" | "ARGUMENT_MUST_BE_STRING" | "ARGUMENT_MUST_BE_BOOLEAN" | "ARGUMENT_MUST_BE_LIST" | "ARGUMENT_MUST_BE_CONVERTIBLE_TO_DURATION" | "ARGUMENT_MUST_BE_TIME" | "ARGUMENT_REQUIRED" | "ARGUMENT_INVALID_TYPE" | "LIST_NOT_FOUND" | "DATABASE_ACCESS_NOT_FOUND" | "PAYLOAD_FIELD_NOT_FOUND" | "NULL_FIELD_READ" | "NO_ROWS_READ" | "DIVISION_BY_ZERO" | "PAYLOAD_FIELD_NOT_FOUND" | "RUNTIME_EXPRESSION_ERROR" ;
107- export type EvaluationErrorDto = {
108- error : EvaluationErrorCodeDto ;
109- message : string ;
110- argument_index ?: number ;
111- argument_name ?: string ;
112- } ;
113- export type NodeEvaluationDto = {
114- return_value : {
115- value ?: ConstantDto ;
116- is_omitted : boolean ;
117- } ;
118- errors : EvaluationErrorDto [ ] | null ;
119- children ?: NodeEvaluationDto [ ] ;
120- named_children ?: {
121- [ key : string ] : NodeEvaluationDto ;
122- } ;
123- skipped ?: boolean ;
124- } ;
125- export type RuleExecutionDto = {
126- error ?: Error ;
127- description : string ;
128- name : string ;
129- outcome : "hit" | "no_hit" | "snoozed" | "error" ;
130- result : boolean ;
131- rule_id : string ;
132- score_modifier : number ;
133- rule_evaluation ?: NodeEvaluationDto ;
134- } ;
135- export type DecisionDetailDto = DecisionDto & {
136- rules : RuleExecutionDto [ ] ;
137- } ;
13898export type ComponentsSchemasTagEntityAnnotationDtoAllOf0 = {
13999 id : string ;
140100 case_id : string ;
@@ -508,6 +468,41 @@ export type ScheduledExecutionDto = {
508468 started_at : string ;
509469 status : "pending" | "processing" | "success" | "failure" | "partial_failure" ;
510470} ;
471+ export type ConstantDto = ( ( string | null ) | ( number | null ) | ( boolean | null ) | ( ConstantDto [ ] | null ) | ( {
472+ [ key : string ] : ConstantDto ;
473+ } | null ) ) | null ;
474+ export type EvaluationErrorCodeDto = "UNEXPECTED_ERROR" | "UNDEFINED_FUNCTION" | "WRONG_NUMBER_OF_ARGUMENTS" | "MISSING_NAMED_ARGUMENT" | "ARGUMENTS_MUST_BE_INT_OR_FLOAT" | "ARGUMENTS_MUST_BE_INT_FLOAT_OR_TIME" | "ARGUMENT_MUST_BE_INTEGER" | "ARGUMENT_MUST_BE_STRING" | "ARGUMENT_MUST_BE_BOOLEAN" | "ARGUMENT_MUST_BE_LIST" | "ARGUMENT_MUST_BE_CONVERTIBLE_TO_DURATION" | "ARGUMENT_MUST_BE_TIME" | "ARGUMENT_REQUIRED" | "ARGUMENT_INVALID_TYPE" | "LIST_NOT_FOUND" | "DATABASE_ACCESS_NOT_FOUND" | "PAYLOAD_FIELD_NOT_FOUND" | "NULL_FIELD_READ" | "NO_ROWS_READ" | "DIVISION_BY_ZERO" | "PAYLOAD_FIELD_NOT_FOUND" | "RUNTIME_EXPRESSION_ERROR" ;
475+ export type EvaluationErrorDto = {
476+ error : EvaluationErrorCodeDto ;
477+ message : string ;
478+ argument_index ?: number ;
479+ argument_name ?: string ;
480+ } ;
481+ export type NodeEvaluationDto = {
482+ return_value : {
483+ value ?: ConstantDto ;
484+ is_omitted : boolean ;
485+ } ;
486+ errors : EvaluationErrorDto [ ] | null ;
487+ children ?: NodeEvaluationDto [ ] ;
488+ named_children ?: {
489+ [ key : string ] : NodeEvaluationDto ;
490+ } ;
491+ skipped ?: boolean ;
492+ } ;
493+ export type RuleExecutionDto = {
494+ error ?: Error ;
495+ description : string ;
496+ name : string ;
497+ outcome : "hit" | "no_hit" | "snoozed" | "error" ;
498+ result : boolean ;
499+ rule_id : string ;
500+ score_modifier : number ;
501+ rule_evaluation ?: NodeEvaluationDto ;
502+ } ;
503+ export type DecisionDetailDto = DecisionDto & {
504+ rules : RuleExecutionDto [ ] ;
505+ } ;
511506export type RuleSnoozeDto = {
512507 id : string ;
513508 pivot_value : string ;
@@ -1419,7 +1414,7 @@ export function listDecisions({ caseId, endDate, hasCase, outcome, pivotValue, s
14191414 } | {
14201415 status : 403 ;
14211416 data : string ;
1422- } > ( `/decisions/with-ranks ${ QS . query ( QS . explode ( {
1417+ } > ( `/decisions${ QS . query ( QS . explode ( {
14231418 "case_id[]" : caseId ,
14241419 end_date : endDate ,
14251420 has_case : hasCase ,
@@ -1439,25 +1434,6 @@ export function listDecisions({ caseId, endDate, hasCase, outcome, pivotValue, s
14391434 ...opts
14401435 } ) ) ;
14411436}
1442- /**
1443- * Create a decision
1444- */
1445- export function createDecision ( createDecisionBody : CreateDecisionBody , opts ?: Oazapfts . RequestOpts ) {
1446- return oazapfts . ok ( oazapfts . fetchJson < {
1447- status : 200 ;
1448- data : DecisionDetailDto ;
1449- } | {
1450- status : 401 ;
1451- data : string ;
1452- } | {
1453- status : 403 ;
1454- data : string ;
1455- } > ( "/decisions/with-ranks" , oazapfts . json ( {
1456- ...opts ,
1457- method : "POST" ,
1458- body : createDecisionBody
1459- } ) ) ) ;
1460- }
14611437/**
14621438 * Get an annotation by ID
14631439 */
0 commit comments