retab 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/lib/retab/classifications/category.rb +1 -1
- data/lib/retab/classifications/classification_request.rb +2 -2
- data/lib/retab/client.rb +16 -16
- data/lib/retab/{workflow_artifacts → edits}/edit_config.rb +1 -1
- data/lib/retab/edits/edit_request.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_by_document_metrics_response.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_metrics_missing_error.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +2 -2
- data/lib/retab/experiment_run_metrics/experiment_votes_metrics_response.rb +2 -2
- data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +2 -2
- data/lib/retab/experiment_run_results/experiment_result.rb +2 -5
- data/lib/retab/experiment_runs/experiment_run.rb +6 -3
- data/lib/retab/experiment_runs.rb +0 -10
- data/lib/retab/extractions/extraction_request.rb +3 -3
- data/lib/retab/extractions/sources_response.rb +1 -1
- data/lib/retab/extractions.rb +1 -1
- data/lib/retab/files/create_upload_response.rb +1 -1
- data/lib/retab/files/file.rb +1 -1
- data/lib/retab/files.rb +65 -65
- data/lib/retab/jobs/job.rb +3 -3
- data/lib/retab/parses/parse_request.rb +3 -3
- data/lib/retab/partitions/partition.rb +1 -1
- data/lib/retab/partitions/partition_request.rb +3 -3
- data/lib/retab/schemas/generate_schema_request.rb +2 -5
- data/lib/retab/schemas/partial_schema.rb +2 -2
- data/lib/retab/schemas.rb +0 -3
- data/lib/retab/splits/split_request.rb +2 -2
- data/lib/retab/splits/subdocument.rb +2 -2
- data/lib/retab/types/trigger_info_type.rb +18 -0
- data/lib/retab/types/{workflow_export_payload_request_trigger_types.rb → workflow_export_payload_request_trigger_type.rb} +1 -1
- data/lib/retab/types/workflow_runs_trigger_type.rb +1 -1
- data/lib/retab/workflow_artifacts/api_call_invocation.rb +4 -4
- data/lib/retab/workflow_artifacts/classification_workflow_artifact.rb +1 -1
- data/lib/retab/workflow_artifacts/condition_evaluation_details.rb +6 -6
- data/lib/retab/workflow_artifacts/condition_evaluation_per_item.rb +1 -1
- data/lib/retab/workflow_artifacts/condition_evaluation_result.rb +7 -7
- data/lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb +6 -6
- data/lib/retab/workflow_artifacts/conditional_evaluation.rb +4 -4
- data/lib/retab/workflow_artifacts/edit_workflow_artifact.rb +1 -1
- data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +1 -1
- data/lib/retab/workflow_artifacts/function_invocation.rb +4 -4
- data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +1 -1
- data/lib/retab/workflow_artifacts/partition_workflow_artifact.rb +2 -2
- data/lib/retab/workflow_artifacts/review_evaluation.rb +6 -6
- data/lib/retab/workflow_artifacts/split_workflow_artifact.rb +1 -1
- data/lib/retab/workflow_artifacts/while_loop_termination.rb +4 -4
- data/lib/retab/workflow_artifacts.rb +22 -22
- data/lib/retab/workflow_block_executions/completed_block_execution_lifecycle.rb +1 -1
- data/lib/retab/workflow_block_executions/create_block_execution_request.rb +1 -1
- data/lib/retab/workflow_block_executions/error_block_execution_lifecycle.rb +1 -1
- data/lib/retab/workflow_block_executions/skipped_block_execution_lifecycle.rb +1 -1
- data/lib/retab/workflow_block_executions/stored_block_execution.rb +3 -3
- data/lib/retab/workflow_block_executions.rb +1 -1
- data/lib/retab/workflow_blocks/workflow_block.rb +1 -1
- data/lib/retab/workflow_blocks/workflow_block_create_request.rb +1 -1
- data/lib/retab/workflow_blocks.rb +7 -7
- data/lib/retab/workflow_edges.rb +3 -3
- data/lib/retab/workflow_experiments/experiment_document_capture_request.rb +3 -3
- data/lib/retab/workflow_experiments/experiment_document_provenance.rb +3 -3
- data/lib/retab/{workflow_test_run_results → workflow_experiments}/file_handle_input.rb +1 -1
- data/lib/retab/{workflow_test_run_results → workflow_experiments}/json_handle_input.rb +1 -1
- data/lib/retab/workflow_experiments/workflow_experiment.rb +3 -3
- data/lib/retab/workflow_reviews/review.rb +3 -3
- data/lib/retab/workflow_reviews/review_all_of.rb +1 -1
- data/lib/retab/workflow_reviews/review_always.rb +1 -1
- data/lib/retab/workflow_reviews/review_any_of.rb +1 -1
- data/lib/retab/workflow_reviews/review_any_required_field_null.rb +1 -1
- data/lib/retab/workflow_reviews/review_any_split_pages_lt.rb +1 -1
- data/lib/retab/workflow_reviews/review_boundary_confidence_lt.rb +1 -1
- data/lib/retab/workflow_reviews/review_branch_in.rb +1 -1
- data/lib/retab/workflow_reviews/review_category_in.rb +1 -1
- data/lib/retab/workflow_reviews/review_confidence_lt.rb +1 -1
- data/lib/retab/workflow_reviews/review_decision.rb +3 -3
- data/lib/retab/workflow_reviews/review_field_confidence_lt.rb +1 -1
- data/lib/retab/workflow_reviews/review_json_condition.rb +1 -1
- data/lib/retab/workflow_reviews/review_split_count_neq.rb +1 -1
- data/lib/retab/workflow_reviews/review_top_margin_lt.rb +1 -1
- data/lib/retab/workflow_reviews/review_validation_failed.rb +1 -1
- data/lib/retab/workflow_reviews/submit_decision_response.rb +2 -2
- data/lib/retab/workflow_runs/awaiting_review_run.rb +1 -1
- data/lib/retab/workflow_runs/cancel_workflow_response.rb +2 -2
- data/lib/retab/workflow_runs/cancelled_terminal.rb +1 -1
- data/lib/retab/workflow_runs/create_workflow_run_request.rb +1 -1
- data/lib/retab/workflow_runs/error_terminal.rb +1 -1
- data/lib/retab/workflow_runs/pending_run.rb +1 -1
- data/lib/retab/workflow_runs/run_timing.rb +2 -11
- data/lib/retab/workflow_runs/running_run.rb +1 -1
- data/lib/retab/workflow_runs/{manual_trigger.rb → trigger_info.rb} +3 -8
- data/lib/retab/workflow_runs/workflow_export_payload_request.rb +7 -7
- data/lib/retab/workflow_runs/workflow_run.rb +7 -21
- data/lib/retab/workflow_runs.rb +6 -16
- data/lib/retab/workflow_spec/declarative_apply_response.rb +2 -2
- data/lib/retab/workflow_spec/declarative_plan_field_change.rb +2 -2
- data/lib/retab/workflow_spec/declarative_plan_response.rb +2 -2
- data/lib/retab/workflow_spec/declarative_plan_summary.rb +1 -1
- data/lib/retab/workflow_spec.rb +10 -10
- data/lib/retab/workflow_steps/awaiting_review_step_lifecycle.rb +1 -1
- data/lib/retab/workflow_steps/cancelled_step_lifecycle.rb +1 -1
- data/lib/retab/workflow_steps/container_context_data.rb +1 -1
- data/lib/retab/workflow_steps/error_step_lifecycle.rb +1 -1
- data/lib/retab/workflow_steps/queued_step_lifecycle.rb +1 -1
- data/lib/retab/workflow_steps.rb +5 -10
- data/lib/retab/workflow_test_run_results/verdict_summary.rb +3 -3
- data/lib/retab/workflow_test_run_results/workflow_test_result.rb +4 -4
- data/lib/retab/workflow_test_run_results/workflow_test_run_timing.rb +7 -0
- data/lib/retab/workflow_test_runs/workflow_test_run.rb +7 -21
- data/lib/retab/workflow_test_runs.rb +1 -11
- data/lib/retab/workflow_tests/all_items_match_condition.rb +1 -1
- data/lib/retab/workflow_tests/any_item_matches_condition.rb +1 -1
- data/lib/retab/workflow_tests/array_contains_condition.rb +1 -1
- data/lib/retab/workflow_tests/assertion_schema_dep.rb +1 -1
- data/lib/retab/workflow_tests/between_condition.rb +2 -2
- data/lib/retab/workflow_tests/contain_condition.rb +1 -1
- data/lib/retab/workflow_tests/ends_with_condition.rb +1 -1
- data/lib/retab/workflow_tests/equal_condition.rb +1 -1
- data/lib/retab/workflow_tests/exist_condition.rb +1 -1
- data/lib/retab/workflow_tests/json_schema_valid_condition.rb +1 -1
- data/lib/retab/workflow_tests/length_compare_condition.rb +1 -1
- data/lib/retab/workflow_tests/llm_judged_as_condition.rb +1 -1
- data/lib/retab/workflow_tests/llm_not_judged_as_condition.rb +1 -1
- data/lib/retab/{workflow_test_run_results → workflow_tests}/manual_workflow_test_source.rb +1 -1
- data/lib/retab/workflow_tests/matche_regex_condition.rb +1 -1
- data/lib/retab/workflow_tests/not_contains_condition.rb +1 -1
- data/lib/retab/workflow_tests/not_equals_condition.rb +1 -1
- data/lib/retab/workflow_tests/not_exists_condition.rb +1 -1
- data/lib/retab/workflow_tests/number_compare_condition.rb +1 -1
- data/lib/retab/workflow_tests/object_contains_condition.rb +1 -1
- data/lib/retab/{workflow_test_run_results → workflow_tests}/run_step_workflow_test_source.rb +1 -1
- data/lib/retab/workflow_tests/similarity_gte_condition.rb +2 -2
- data/lib/retab/workflow_tests/split_iou_condition.rb +1 -1
- data/lib/retab/workflow_tests/start_with_condition.rb +1 -1
- data/lib/retab/workflow_tests/workflow_test.rb +2 -2
- data/lib/retab/{workflow_test_runs → workflow_tests}/workflow_test_block_target.rb +1 -1
- data/lib/retab/workflows/create_workflow_request.rb +2 -2
- data/lib/retab/workflows/publish_workflow_request.rb +1 -1
- data/lib/retab/workflows/workflow.rb +2 -2
- data/lib/retab/workflows/workflow_published.rb +1 -1
- data/lib/retab/workflows.rb +23 -0
- data/rbi/retab/api_call_invocation.rbi +4 -4
- data/rbi/retab/client.rbi +13 -13
- data/rbi/retab/condition_evaluation_details.rbi +2 -2
- data/rbi/retab/condition_evaluation_result.rbi +2 -2
- data/rbi/retab/condition_evaluation_sub_condition.rbi +2 -2
- data/rbi/retab/conditional_evaluation.rbi +4 -4
- data/rbi/retab/edit_workflow_artifact.rbi +2 -2
- data/rbi/retab/experiment_document_capture_request.rbi +2 -2
- data/rbi/retab/experiment_document_provenance.rbi +2 -2
- data/rbi/retab/experiment_result.rbi +0 -6
- data/rbi/retab/experiment_run.rbi +10 -4
- data/rbi/retab/experiment_runs.rbi +1 -3
- data/rbi/retab/extraction_workflow_artifact.rbi +2 -2
- data/rbi/retab/files.rbi +17 -17
- data/rbi/retab/function_invocation.rbi +4 -4
- data/rbi/retab/generate_schema_request.rbi +0 -6
- data/rbi/retab/job.rbi +2 -2
- data/rbi/retab/partition_workflow_artifact.rbi +2 -2
- data/rbi/retab/review.rbi +2 -2
- data/rbi/retab/review_decision.rbi +4 -4
- data/rbi/retab/review_evaluation.rbi +2 -2
- data/rbi/retab/run_timing.rbi +0 -18
- data/rbi/retab/schemas.rbi +1 -2
- data/rbi/retab/stored_block_execution.rbi +2 -2
- data/rbi/retab/{schedule_trigger.rbi → trigger_info.rbi} +3 -9
- data/rbi/retab/verdict_summary.rbi +2 -2
- data/rbi/retab/while_loop_termination.rbi +2 -2
- data/rbi/retab/workflow_artifacts.rbi +8 -8
- data/rbi/retab/workflow_export_payload_request.rbi +4 -4
- data/rbi/retab/workflow_run.rbi +12 -6
- data/rbi/retab/workflow_runs.rbi +3 -5
- data/rbi/retab/workflow_spec.rbi +4 -4
- data/rbi/retab/workflow_steps.rbi +1 -2
- data/rbi/retab/workflow_test_result.rbi +2 -2
- data/rbi/retab/workflow_test_run.rbi +12 -6
- data/rbi/retab/workflow_test_run_timing.rbi +2 -2
- data/rbi/retab/workflow_test_runs.rbi +1 -3
- data/rbi/retab/workflows.rbi +8 -0
- metadata +26 -38
- data/lib/retab/types/generate_schema_request_reasoning_effort.rb +0 -17
- data/lib/retab/workflow_runs/api_trigger.rb +0 -25
- data/lib/retab/workflow_runs/email_trigger.rb +0 -28
- data/lib/retab/workflow_runs/restart_trigger.rb +0 -25
- data/lib/retab/workflow_runs/schedule_trigger.rb +0 -25
- data/lib/retab/workflow_runs/webhook_trigger.rb +0 -25
- data/lib/retab/workflow_runs/workflow_snapshot_ref.rb +0 -25
- data/lib/retab/workflow_test_runs/workflow_test_run_timing.rb +0 -31
- data/rbi/retab/api_trigger.rbi +0 -30
- data/rbi/retab/email_trigger.rbi +0 -36
- data/rbi/retab/manual_trigger.rbi +0 -30
- data/rbi/retab/restart_trigger.rbi +0 -30
- data/rbi/retab/webhook_trigger.rbi +0 -30
- data/rbi/retab/workflow_snapshot_ref.rbi +0 -30
- /data/lib/retab/{extractions → classifications}/file_ref.rb +0 -0
- /data/lib/retab/{extractions → classifications}/retab_usage.rb +0 -0
- /data/lib/retab/{workflow_artifacts → edits}/b_box.rb +0 -0
- /data/lib/retab/{workflow_artifacts → edits}/edit_result.rb +0 -0
- /data/lib/retab/{workflow_artifacts → edits}/form_field.rb +0 -0
- /data/lib/retab/{workflow_runs → workflow_artifacts}/error_details.rb +0 -0
- /data/lib/retab/{workflow_steps → workflow_block_executions}/step_artifact_ref.rb +0 -0
- /data/lib/retab/{workflow_test_run_results → workflow_experiments}/materialized_document.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/cancelled_workflow_test_run.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/completed_workflow_test_run.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/error_workflow_test_run.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/pending_workflow_test_run.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/queued_workflow_test_run.rb +0 -0
- /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/running_workflow_test_run.rb +0 -0
data/lib/retab/workflow_spec.rb
CHANGED
|
@@ -10,11 +10,11 @@ module Retab
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# Apply Workflow Spec
|
|
14
14
|
# @param yaml_definition [String] Workflow YAML definition
|
|
15
15
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
16
|
-
# @return [Retab::
|
|
17
|
-
def
|
|
16
|
+
# @return [Retab::DeclarativeApplyResponse]
|
|
17
|
+
def apply(
|
|
18
18
|
yaml_definition:,
|
|
19
19
|
request_options: {}
|
|
20
20
|
)
|
|
@@ -23,12 +23,12 @@ module Retab
|
|
|
23
23
|
}
|
|
24
24
|
response = @client.request(
|
|
25
25
|
method: :post,
|
|
26
|
-
path: "/v1/workflows/spec/
|
|
26
|
+
path: "/v1/workflows/spec/apply",
|
|
27
27
|
auth: true,
|
|
28
28
|
body: body,
|
|
29
29
|
request_options: request_options
|
|
30
30
|
)
|
|
31
|
-
result = Retab::
|
|
31
|
+
result = Retab::DeclarativeApplyResponse.new(response.body)
|
|
32
32
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
33
33
|
http_status: response.code.to_i,
|
|
34
34
|
http_headers: response.each_header.to_h,
|
|
@@ -64,11 +64,11 @@ module Retab
|
|
|
64
64
|
result
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
#
|
|
67
|
+
# Validate Workflow Spec
|
|
68
68
|
# @param yaml_definition [String] Workflow YAML definition
|
|
69
69
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
70
|
-
# @return [Retab::
|
|
71
|
-
def
|
|
70
|
+
# @return [Retab::DeclarativeValidationResponse]
|
|
71
|
+
def validate(
|
|
72
72
|
yaml_definition:,
|
|
73
73
|
request_options: {}
|
|
74
74
|
)
|
|
@@ -77,12 +77,12 @@ module Retab
|
|
|
77
77
|
}
|
|
78
78
|
response = @client.request(
|
|
79
79
|
method: :post,
|
|
80
|
-
path: "/v1/workflows/spec/
|
|
80
|
+
path: "/v1/workflows/spec/validate",
|
|
81
81
|
auth: true,
|
|
82
82
|
body: body,
|
|
83
83
|
request_options: request_options
|
|
84
84
|
)
|
|
85
|
-
result = Retab::
|
|
85
|
+
result = Retab::DeclarativeValidationResponse.new(response.body)
|
|
86
86
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
87
87
|
http_status: response.code.to_i,
|
|
88
88
|
http_headers: response.each_header.to_h,
|
|
@@ -24,7 +24,7 @@ module Retab
|
|
|
24
24
|
hash = self.class.normalize(json)
|
|
25
25
|
@container_id = hash[:container_id]
|
|
26
26
|
@iteration = hash[:iteration]
|
|
27
|
-
@is_parallel = hash[:is_parallel]
|
|
27
|
+
@is_parallel = hash[:is_parallel].nil? ? false : hash[:is_parallel]
|
|
28
28
|
@parallel_item_index = hash[:parallel_item_index]
|
|
29
29
|
end
|
|
30
30
|
end
|
data/lib/retab/workflow_steps.rb
CHANGED
|
@@ -12,32 +12,29 @@ module Retab
|
|
|
12
12
|
|
|
13
13
|
# List Workflow Run Steps
|
|
14
14
|
# @param run_id [String, nil] Optional workflow run ID filter.
|
|
15
|
-
# @param block_id [String, nil] Optional logical block ID filter
|
|
16
|
-
# @param block_ids [Array<String>, nil] Optional logical block ID filter — multi-value. Repeat the query parameter (``?block_ids=a&block_ids=b``) to match any of several blocks. An empty list is treated as no filter. Preferred over the singular ``block_id``.
|
|
15
|
+
# @param block_id [String, nil] Optional logical block ID filter.
|
|
17
16
|
# @param step_id [String, nil] Optional step ID filter.
|
|
18
17
|
# @param block_type [Array<String>, nil] Optional block type filter. Repeat the query parameter for multiple values.
|
|
19
18
|
# @param status [Array<String>, nil] Optional step lifecycle status filter. Repeat the query parameter for multiple values.
|
|
20
|
-
# @param before [String, nil] Step id cursor: return the page before this id (mutually exclusive with
|
|
21
|
-
# @param after [String, nil] Step id cursor: return the page after this id (mutually exclusive with
|
|
22
|
-
# @param limit [Integer, nil] Maximum number of steps to return per page (1-1000). Defaults to
|
|
19
|
+
# @param before [String, nil] Step id cursor: return the page before this id (mutually exclusive with `after`).
|
|
20
|
+
# @param after [String, nil] Step id cursor: return the page after this id (mutually exclusive with `before`).
|
|
21
|
+
# @param limit [Integer, nil] Maximum number of steps to return per page (1-1000). Defaults to 5 because each step hydrates its handle payloads from the artifact store; raise it deliberately when you need a larger page, and use cursor pagination for the rest.
|
|
23
22
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
24
23
|
# @return [Retab::PaginatedList<Retab::WorkflowRunStep>]
|
|
25
24
|
def list(
|
|
26
25
|
run_id: nil,
|
|
27
26
|
block_id: nil,
|
|
28
|
-
block_ids: nil,
|
|
29
27
|
step_id: nil,
|
|
30
28
|
block_type: nil,
|
|
31
29
|
status: nil,
|
|
32
30
|
before: nil,
|
|
33
31
|
after: nil,
|
|
34
|
-
limit:
|
|
32
|
+
limit: 5,
|
|
35
33
|
request_options: {}
|
|
36
34
|
)
|
|
37
35
|
params = {
|
|
38
36
|
"run_id" => run_id,
|
|
39
37
|
"block_id" => block_id,
|
|
40
|
-
"block_ids" => block_ids,
|
|
41
38
|
"step_id" => step_id,
|
|
42
39
|
"block_type" => block_type,
|
|
43
40
|
"status" => status,
|
|
@@ -56,7 +53,6 @@ module Retab
|
|
|
56
53
|
list(
|
|
57
54
|
run_id: run_id,
|
|
58
55
|
block_id: block_id,
|
|
59
|
-
block_ids: block_ids,
|
|
60
56
|
step_id: step_id,
|
|
61
57
|
block_type: block_type,
|
|
62
58
|
status: status,
|
|
@@ -72,7 +68,6 @@ module Retab
|
|
|
72
68
|
filters: {
|
|
73
69
|
run_id: run_id,
|
|
74
70
|
block_id: block_id,
|
|
75
|
-
block_ids: block_ids,
|
|
76
71
|
step_id: step_id,
|
|
77
72
|
block_type: block_type,
|
|
78
73
|
status: status,
|
|
@@ -6,7 +6,7 @@ module Retab
|
|
|
6
6
|
class VerdictSummary < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
|
-
|
|
9
|
+
passed: :passed,
|
|
10
10
|
assertions_passed: :assertions_passed,
|
|
11
11
|
assertions_failed: :assertions_failed,
|
|
12
12
|
blocked_assertions: :blocked_assertions,
|
|
@@ -14,7 +14,7 @@ module Retab
|
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor(
|
|
17
|
-
:
|
|
17
|
+
:passed,
|
|
18
18
|
:assertions_passed,
|
|
19
19
|
:assertions_failed,
|
|
20
20
|
:blocked_assertions,
|
|
@@ -24,7 +24,7 @@ module Retab
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
super()
|
|
26
26
|
hash = self.class.normalize(json)
|
|
27
|
-
@
|
|
27
|
+
@passed = hash[:passed]
|
|
28
28
|
@assertions_passed = hash[:assertions_passed]
|
|
29
29
|
@assertions_failed = hash[:assertions_failed]
|
|
30
30
|
@blocked_assertions = hash[:blocked_assertions]
|
|
@@ -20,7 +20,7 @@ module Retab
|
|
|
20
20
|
block_config_fingerprint: :block_config_fingerprint,
|
|
21
21
|
source: :source,
|
|
22
22
|
outputs: :outputs,
|
|
23
|
-
|
|
23
|
+
routing_decisions: :routing_decisions,
|
|
24
24
|
warnings: :warnings,
|
|
25
25
|
error: :error,
|
|
26
26
|
skipped: :skipped,
|
|
@@ -43,7 +43,7 @@ module Retab
|
|
|
43
43
|
:block_config_fingerprint,
|
|
44
44
|
:source,
|
|
45
45
|
:outputs,
|
|
46
|
-
:
|
|
46
|
+
:routing_decisions,
|
|
47
47
|
:warnings,
|
|
48
48
|
:error,
|
|
49
49
|
:skipped,
|
|
@@ -94,10 +94,10 @@ module Retab
|
|
|
94
94
|
end
|
|
95
95
|
) : nil
|
|
96
96
|
@outputs = hash[:outputs] || {}
|
|
97
|
-
@
|
|
97
|
+
@routing_decisions = (hash[:routing_decisions] || [])
|
|
98
98
|
@warnings = (hash[:warnings] || [])
|
|
99
99
|
@error = hash[:error] ? Retab::ErrorDetails.new(hash[:error]) : nil
|
|
100
|
-
@skipped = hash[:skipped]
|
|
100
|
+
@skipped = hash[:skipped].nil? ? false : hash[:skipped]
|
|
101
101
|
@assertion_result = hash[:assertion_result] ? Retab::AssertionResult.new(hash[:assertion_result]) : nil
|
|
102
102
|
@verdict_summary = hash[:verdict_summary] ? Retab::VerdictSummary.new(hash[:verdict_summary]) : nil
|
|
103
103
|
end
|
|
@@ -7,7 +7,8 @@ module Retab
|
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
10
|
-
|
|
10
|
+
workflow_id: :workflow_id,
|
|
11
|
+
workflow_version_id: :workflow_version_id,
|
|
11
12
|
trigger: :trigger,
|
|
12
13
|
lifecycle: :lifecycle,
|
|
13
14
|
timing: :timing,
|
|
@@ -19,7 +20,8 @@ module Retab
|
|
|
19
20
|
|
|
20
21
|
attr_accessor(
|
|
21
22
|
:id,
|
|
22
|
-
:
|
|
23
|
+
:workflow_id,
|
|
24
|
+
:workflow_version_id,
|
|
23
25
|
:trigger,
|
|
24
26
|
:lifecycle,
|
|
25
27
|
:timing,
|
|
@@ -33,25 +35,9 @@ module Retab
|
|
|
33
35
|
super()
|
|
34
36
|
hash = self.class.normalize(json)
|
|
35
37
|
@id = hash[:id]
|
|
36
|
-
@
|
|
37
|
-
@
|
|
38
|
-
|
|
39
|
-
when "api"
|
|
40
|
-
Retab::ApiTrigger.new(hash[:trigger])
|
|
41
|
-
when "email"
|
|
42
|
-
Retab::EmailTrigger.new(hash[:trigger])
|
|
43
|
-
when "manual"
|
|
44
|
-
Retab::ManualTrigger.new(hash[:trigger])
|
|
45
|
-
when "restart"
|
|
46
|
-
Retab::RestartTrigger.new(hash[:trigger])
|
|
47
|
-
when "schedule"
|
|
48
|
-
Retab::ScheduleTrigger.new(hash[:trigger])
|
|
49
|
-
when "webhook"
|
|
50
|
-
Retab::WebhookTrigger.new(hash[:trigger])
|
|
51
|
-
else
|
|
52
|
-
hash[:trigger]
|
|
53
|
-
end
|
|
54
|
-
) : nil
|
|
38
|
+
@workflow_id = hash[:workflow_id]
|
|
39
|
+
@workflow_version_id = hash[:workflow_version_id]
|
|
40
|
+
@trigger = hash[:trigger] ? Retab::TriggerInfo.new(hash[:trigger]) : nil
|
|
55
41
|
@lifecycle = hash[:lifecycle] ? (
|
|
56
42
|
case hash[:lifecycle][:status]
|
|
57
43
|
when "cancelled"
|
|
@@ -15,10 +15,8 @@ module Retab
|
|
|
15
15
|
# @param test_id [String, nil]
|
|
16
16
|
# @param target_block_id [String, nil]
|
|
17
17
|
# @param status [String, nil]
|
|
18
|
-
# @param statuses [Array<String>, nil]
|
|
19
18
|
# @param exclude_status [String, nil]
|
|
20
19
|
# @param trigger_type [String, nil]
|
|
21
|
-
# @param trigger_types [Array<String>, nil]
|
|
22
20
|
# @param from_date [String, nil]
|
|
23
21
|
# @param to_date [String, nil]
|
|
24
22
|
# @param sort_by [String, nil]
|
|
@@ -33,10 +31,8 @@ module Retab
|
|
|
33
31
|
test_id: nil,
|
|
34
32
|
target_block_id: nil,
|
|
35
33
|
status: nil,
|
|
36
|
-
statuses: nil,
|
|
37
34
|
exclude_status: nil,
|
|
38
35
|
trigger_type: nil,
|
|
39
|
-
trigger_types: nil,
|
|
40
36
|
from_date: nil,
|
|
41
37
|
to_date: nil,
|
|
42
38
|
sort_by: "created_at",
|
|
@@ -51,10 +47,8 @@ module Retab
|
|
|
51
47
|
"test_id" => test_id,
|
|
52
48
|
"target_block_id" => target_block_id,
|
|
53
49
|
"status" => status,
|
|
54
|
-
"statuses" => statuses,
|
|
55
50
|
"exclude_status" => exclude_status,
|
|
56
51
|
"trigger_type" => trigger_type,
|
|
57
|
-
"trigger_types" => trigger_types,
|
|
58
52
|
"from_date" => from_date,
|
|
59
53
|
"to_date" => to_date,
|
|
60
54
|
"sort_by" => sort_by,
|
|
@@ -76,10 +70,8 @@ module Retab
|
|
|
76
70
|
test_id: test_id,
|
|
77
71
|
target_block_id: target_block_id,
|
|
78
72
|
status: status,
|
|
79
|
-
statuses: statuses,
|
|
80
73
|
exclude_status: exclude_status,
|
|
81
74
|
trigger_type: trigger_type,
|
|
82
|
-
trigger_types: trigger_types,
|
|
83
75
|
from_date: from_date,
|
|
84
76
|
to_date: to_date,
|
|
85
77
|
sort_by: sort_by,
|
|
@@ -98,10 +90,8 @@ module Retab
|
|
|
98
90
|
test_id: test_id,
|
|
99
91
|
target_block_id: target_block_id,
|
|
100
92
|
status: status,
|
|
101
|
-
statuses: statuses,
|
|
102
93
|
exclude_status: exclude_status,
|
|
103
94
|
trigger_type: trigger_type,
|
|
104
|
-
trigger_types: trigger_types,
|
|
105
95
|
from_date: from_date,
|
|
106
96
|
to_date: to_date,
|
|
107
97
|
sort_by: sort_by,
|
|
@@ -115,7 +105,7 @@ module Retab
|
|
|
115
105
|
|
|
116
106
|
# Create Test Run
|
|
117
107
|
# @param workflow_id [String]
|
|
118
|
-
# @param scope [Retab::WorkflowTestRunSingleScope, Retab::WorkflowTestRunWorkflowScope, Retab::WorkflowTestRunBlockScope, nil] Optional execution scope. Omit to run every saved test in the workflow.
|
|
108
|
+
# @param scope [Retab::WorkflowTestRunSingleScope, Retab::WorkflowTestRunWorkflowScope, Retab::WorkflowTestRunBlockScope, nil] Optional execution scope. Omit (or pass null) to run every saved test in the workflow.
|
|
119
109
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
120
110
|
# @return [Retab::WorkflowTestRun]
|
|
121
111
|
def create(
|
|
@@ -18,7 +18,7 @@ module Retab
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
|
-
@kind = hash[:kind]
|
|
21
|
+
@kind = hash[:kind].nil? ? "all_items_match" : hash[:kind]
|
|
22
22
|
@condition = hash[:condition] ? (
|
|
23
23
|
case hash[:condition][:kind]
|
|
24
24
|
when "all_items_match"
|
|
@@ -18,7 +18,7 @@ module Retab
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
|
-
@kind = hash[:kind]
|
|
21
|
+
@kind = hash[:kind].nil? ? "any_item_matches" : hash[:kind]
|
|
22
22
|
@condition = hash[:condition] ? (
|
|
23
23
|
case hash[:condition][:kind]
|
|
24
24
|
when "all_items_match"
|
|
@@ -25,7 +25,7 @@ module Retab
|
|
|
25
25
|
@output_handle_id = hash[:output_handle_id]
|
|
26
26
|
@schema_path = hash[:schema_path]
|
|
27
27
|
@subtree_hash = hash[:subtree_hash]
|
|
28
|
-
@depends_on_root = hash[:depends_on_root]
|
|
28
|
+
@depends_on_root = hash[:depends_on_root].nil? ? false : hash[:depends_on_root]
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -22,10 +22,10 @@ module Retab
|
|
|
22
22
|
def initialize(json)
|
|
23
23
|
super()
|
|
24
24
|
hash = self.class.normalize(json)
|
|
25
|
-
@kind = hash[:kind]
|
|
25
|
+
@kind = hash[:kind].nil? ? "between" : hash[:kind]
|
|
26
26
|
@lower = hash[:lower]
|
|
27
27
|
@upper = hash[:upper]
|
|
28
|
-
@inclusive = hash[:inclusive]
|
|
28
|
+
@inclusive = hash[:inclusive].nil? ? true : hash[:inclusive]
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -22,10 +22,10 @@ module Retab
|
|
|
22
22
|
def initialize(json)
|
|
23
23
|
super()
|
|
24
24
|
hash = self.class.normalize(json)
|
|
25
|
-
@kind = hash[:kind]
|
|
25
|
+
@kind = hash[:kind].nil? ? "similarity_gte" : hash[:kind]
|
|
26
26
|
@reference = hash[:reference]
|
|
27
27
|
@threshold = hash[:threshold]
|
|
28
|
-
@method = hash[:method]
|
|
28
|
+
@method = hash[:method].nil? ? "levenshtein" : hash[:method]
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -65,9 +65,9 @@ module Retab
|
|
|
65
65
|
@assertion = hash[:assertion] ? Retab::AssertionSpec.new(hash[:assertion]) : nil
|
|
66
66
|
@assertion_schema_dep = hash[:assertion_schema_dep] ? Retab::AssertionSchemaDep.new(hash[:assertion_schema_dep]) : nil
|
|
67
67
|
@assertion_drift_status = hash[:assertion_drift_status]
|
|
68
|
-
@schema_drift = hash[:schema_drift]
|
|
68
|
+
@schema_drift = hash[:schema_drift].nil? ? "unknown" : hash[:schema_drift]
|
|
69
69
|
@schema_drift_detail = hash[:schema_drift_detail]
|
|
70
|
-
@validation_status = hash[:validation_status]
|
|
70
|
+
@validation_status = hash[:validation_status].nil? ? "valid" : hash[:validation_status]
|
|
71
71
|
@validation_issues = (hash[:validation_issues] || [])
|
|
72
72
|
@latest_run_summary = hash[:latest_run_summary] ? Retab::LatestBlockTestRunSummary.new(hash[:latest_run_summary]) : nil
|
|
73
73
|
@latest_passing_run_summary = hash[:latest_passing_run_summary] ? Retab::LatestBlockTestRunSummary.new(
|
|
@@ -18,8 +18,8 @@ module Retab
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
|
-
@name = hash[:name]
|
|
22
|
-
@description = hash[:description]
|
|
21
|
+
@name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
|
|
22
|
+
@description = hash[:description].nil? ? "" : hash[:description]
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -27,8 +27,8 @@ module Retab
|
|
|
27
27
|
super()
|
|
28
28
|
hash = self.class.normalize(json)
|
|
29
29
|
@id = hash[:id]
|
|
30
|
-
@name = hash[:name]
|
|
31
|
-
@description = hash[:description]
|
|
30
|
+
@name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
|
|
31
|
+
@description = hash[:description].nil? ? "" : hash[:description]
|
|
32
32
|
@published = hash[:published] ? Retab::WorkflowPublished.new(hash[:published]) : nil
|
|
33
33
|
@created_at = hash[:created_at]
|
|
34
34
|
@updated_at = hash[:updated_at]
|