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.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retab/classifications/category.rb +1 -1
  3. data/lib/retab/classifications/classification_request.rb +2 -2
  4. data/lib/retab/client.rb +16 -16
  5. data/lib/retab/{workflow_artifacts → edits}/edit_config.rb +1 -1
  6. data/lib/retab/edits/edit_request.rb +2 -2
  7. data/lib/retab/experiment_run_metrics/experiment_by_document_metrics_response.rb +2 -2
  8. data/lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb +2 -2
  9. data/lib/retab/experiment_run_metrics/experiment_metrics_missing_error.rb +2 -2
  10. data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +2 -2
  11. data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +2 -2
  12. data/lib/retab/experiment_run_metrics/experiment_votes_metrics_response.rb +2 -2
  13. data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +2 -2
  14. data/lib/retab/experiment_run_results/experiment_result.rb +2 -5
  15. data/lib/retab/experiment_runs/experiment_run.rb +6 -3
  16. data/lib/retab/experiment_runs.rb +0 -10
  17. data/lib/retab/extractions/extraction_request.rb +3 -3
  18. data/lib/retab/extractions/sources_response.rb +1 -1
  19. data/lib/retab/extractions.rb +1 -1
  20. data/lib/retab/files/create_upload_response.rb +1 -1
  21. data/lib/retab/files/file.rb +1 -1
  22. data/lib/retab/files.rb +65 -65
  23. data/lib/retab/jobs/job.rb +3 -3
  24. data/lib/retab/parses/parse_request.rb +3 -3
  25. data/lib/retab/partitions/partition.rb +1 -1
  26. data/lib/retab/partitions/partition_request.rb +3 -3
  27. data/lib/retab/schemas/generate_schema_request.rb +2 -5
  28. data/lib/retab/schemas/partial_schema.rb +2 -2
  29. data/lib/retab/schemas.rb +0 -3
  30. data/lib/retab/splits/split_request.rb +2 -2
  31. data/lib/retab/splits/subdocument.rb +2 -2
  32. data/lib/retab/types/trigger_info_type.rb +18 -0
  33. data/lib/retab/types/{workflow_export_payload_request_trigger_types.rb → workflow_export_payload_request_trigger_type.rb} +1 -1
  34. data/lib/retab/types/workflow_runs_trigger_type.rb +1 -1
  35. data/lib/retab/workflow_artifacts/api_call_invocation.rb +4 -4
  36. data/lib/retab/workflow_artifacts/classification_workflow_artifact.rb +1 -1
  37. data/lib/retab/workflow_artifacts/condition_evaluation_details.rb +6 -6
  38. data/lib/retab/workflow_artifacts/condition_evaluation_per_item.rb +1 -1
  39. data/lib/retab/workflow_artifacts/condition_evaluation_result.rb +7 -7
  40. data/lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb +6 -6
  41. data/lib/retab/workflow_artifacts/conditional_evaluation.rb +4 -4
  42. data/lib/retab/workflow_artifacts/edit_workflow_artifact.rb +1 -1
  43. data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +1 -1
  44. data/lib/retab/workflow_artifacts/function_invocation.rb +4 -4
  45. data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +1 -1
  46. data/lib/retab/workflow_artifacts/partition_workflow_artifact.rb +2 -2
  47. data/lib/retab/workflow_artifacts/review_evaluation.rb +6 -6
  48. data/lib/retab/workflow_artifacts/split_workflow_artifact.rb +1 -1
  49. data/lib/retab/workflow_artifacts/while_loop_termination.rb +4 -4
  50. data/lib/retab/workflow_artifacts.rb +22 -22
  51. data/lib/retab/workflow_block_executions/completed_block_execution_lifecycle.rb +1 -1
  52. data/lib/retab/workflow_block_executions/create_block_execution_request.rb +1 -1
  53. data/lib/retab/workflow_block_executions/error_block_execution_lifecycle.rb +1 -1
  54. data/lib/retab/workflow_block_executions/skipped_block_execution_lifecycle.rb +1 -1
  55. data/lib/retab/workflow_block_executions/stored_block_execution.rb +3 -3
  56. data/lib/retab/workflow_block_executions.rb +1 -1
  57. data/lib/retab/workflow_blocks/workflow_block.rb +1 -1
  58. data/lib/retab/workflow_blocks/workflow_block_create_request.rb +1 -1
  59. data/lib/retab/workflow_blocks.rb +7 -7
  60. data/lib/retab/workflow_edges.rb +3 -3
  61. data/lib/retab/workflow_experiments/experiment_document_capture_request.rb +3 -3
  62. data/lib/retab/workflow_experiments/experiment_document_provenance.rb +3 -3
  63. data/lib/retab/{workflow_test_run_results → workflow_experiments}/file_handle_input.rb +1 -1
  64. data/lib/retab/{workflow_test_run_results → workflow_experiments}/json_handle_input.rb +1 -1
  65. data/lib/retab/workflow_experiments/workflow_experiment.rb +3 -3
  66. data/lib/retab/workflow_reviews/review.rb +3 -3
  67. data/lib/retab/workflow_reviews/review_all_of.rb +1 -1
  68. data/lib/retab/workflow_reviews/review_always.rb +1 -1
  69. data/lib/retab/workflow_reviews/review_any_of.rb +1 -1
  70. data/lib/retab/workflow_reviews/review_any_required_field_null.rb +1 -1
  71. data/lib/retab/workflow_reviews/review_any_split_pages_lt.rb +1 -1
  72. data/lib/retab/workflow_reviews/review_boundary_confidence_lt.rb +1 -1
  73. data/lib/retab/workflow_reviews/review_branch_in.rb +1 -1
  74. data/lib/retab/workflow_reviews/review_category_in.rb +1 -1
  75. data/lib/retab/workflow_reviews/review_confidence_lt.rb +1 -1
  76. data/lib/retab/workflow_reviews/review_decision.rb +3 -3
  77. data/lib/retab/workflow_reviews/review_field_confidence_lt.rb +1 -1
  78. data/lib/retab/workflow_reviews/review_json_condition.rb +1 -1
  79. data/lib/retab/workflow_reviews/review_split_count_neq.rb +1 -1
  80. data/lib/retab/workflow_reviews/review_top_margin_lt.rb +1 -1
  81. data/lib/retab/workflow_reviews/review_validation_failed.rb +1 -1
  82. data/lib/retab/workflow_reviews/submit_decision_response.rb +2 -2
  83. data/lib/retab/workflow_runs/awaiting_review_run.rb +1 -1
  84. data/lib/retab/workflow_runs/cancel_workflow_response.rb +2 -2
  85. data/lib/retab/workflow_runs/cancelled_terminal.rb +1 -1
  86. data/lib/retab/workflow_runs/create_workflow_run_request.rb +1 -1
  87. data/lib/retab/workflow_runs/error_terminal.rb +1 -1
  88. data/lib/retab/workflow_runs/pending_run.rb +1 -1
  89. data/lib/retab/workflow_runs/run_timing.rb +2 -11
  90. data/lib/retab/workflow_runs/running_run.rb +1 -1
  91. data/lib/retab/workflow_runs/{manual_trigger.rb → trigger_info.rb} +3 -8
  92. data/lib/retab/workflow_runs/workflow_export_payload_request.rb +7 -7
  93. data/lib/retab/workflow_runs/workflow_run.rb +7 -21
  94. data/lib/retab/workflow_runs.rb +6 -16
  95. data/lib/retab/workflow_spec/declarative_apply_response.rb +2 -2
  96. data/lib/retab/workflow_spec/declarative_plan_field_change.rb +2 -2
  97. data/lib/retab/workflow_spec/declarative_plan_response.rb +2 -2
  98. data/lib/retab/workflow_spec/declarative_plan_summary.rb +1 -1
  99. data/lib/retab/workflow_spec.rb +10 -10
  100. data/lib/retab/workflow_steps/awaiting_review_step_lifecycle.rb +1 -1
  101. data/lib/retab/workflow_steps/cancelled_step_lifecycle.rb +1 -1
  102. data/lib/retab/workflow_steps/container_context_data.rb +1 -1
  103. data/lib/retab/workflow_steps/error_step_lifecycle.rb +1 -1
  104. data/lib/retab/workflow_steps/queued_step_lifecycle.rb +1 -1
  105. data/lib/retab/workflow_steps.rb +5 -10
  106. data/lib/retab/workflow_test_run_results/verdict_summary.rb +3 -3
  107. data/lib/retab/workflow_test_run_results/workflow_test_result.rb +4 -4
  108. data/lib/retab/workflow_test_run_results/workflow_test_run_timing.rb +7 -0
  109. data/lib/retab/workflow_test_runs/workflow_test_run.rb +7 -21
  110. data/lib/retab/workflow_test_runs.rb +1 -11
  111. data/lib/retab/workflow_tests/all_items_match_condition.rb +1 -1
  112. data/lib/retab/workflow_tests/any_item_matches_condition.rb +1 -1
  113. data/lib/retab/workflow_tests/array_contains_condition.rb +1 -1
  114. data/lib/retab/workflow_tests/assertion_schema_dep.rb +1 -1
  115. data/lib/retab/workflow_tests/between_condition.rb +2 -2
  116. data/lib/retab/workflow_tests/contain_condition.rb +1 -1
  117. data/lib/retab/workflow_tests/ends_with_condition.rb +1 -1
  118. data/lib/retab/workflow_tests/equal_condition.rb +1 -1
  119. data/lib/retab/workflow_tests/exist_condition.rb +1 -1
  120. data/lib/retab/workflow_tests/json_schema_valid_condition.rb +1 -1
  121. data/lib/retab/workflow_tests/length_compare_condition.rb +1 -1
  122. data/lib/retab/workflow_tests/llm_judged_as_condition.rb +1 -1
  123. data/lib/retab/workflow_tests/llm_not_judged_as_condition.rb +1 -1
  124. data/lib/retab/{workflow_test_run_results → workflow_tests}/manual_workflow_test_source.rb +1 -1
  125. data/lib/retab/workflow_tests/matche_regex_condition.rb +1 -1
  126. data/lib/retab/workflow_tests/not_contains_condition.rb +1 -1
  127. data/lib/retab/workflow_tests/not_equals_condition.rb +1 -1
  128. data/lib/retab/workflow_tests/not_exists_condition.rb +1 -1
  129. data/lib/retab/workflow_tests/number_compare_condition.rb +1 -1
  130. data/lib/retab/workflow_tests/object_contains_condition.rb +1 -1
  131. data/lib/retab/{workflow_test_run_results → workflow_tests}/run_step_workflow_test_source.rb +1 -1
  132. data/lib/retab/workflow_tests/similarity_gte_condition.rb +2 -2
  133. data/lib/retab/workflow_tests/split_iou_condition.rb +1 -1
  134. data/lib/retab/workflow_tests/start_with_condition.rb +1 -1
  135. data/lib/retab/workflow_tests/workflow_test.rb +2 -2
  136. data/lib/retab/{workflow_test_runs → workflow_tests}/workflow_test_block_target.rb +1 -1
  137. data/lib/retab/workflows/create_workflow_request.rb +2 -2
  138. data/lib/retab/workflows/publish_workflow_request.rb +1 -1
  139. data/lib/retab/workflows/workflow.rb +2 -2
  140. data/lib/retab/workflows/workflow_published.rb +1 -1
  141. data/lib/retab/workflows.rb +23 -0
  142. data/rbi/retab/api_call_invocation.rbi +4 -4
  143. data/rbi/retab/client.rbi +13 -13
  144. data/rbi/retab/condition_evaluation_details.rbi +2 -2
  145. data/rbi/retab/condition_evaluation_result.rbi +2 -2
  146. data/rbi/retab/condition_evaluation_sub_condition.rbi +2 -2
  147. data/rbi/retab/conditional_evaluation.rbi +4 -4
  148. data/rbi/retab/edit_workflow_artifact.rbi +2 -2
  149. data/rbi/retab/experiment_document_capture_request.rbi +2 -2
  150. data/rbi/retab/experiment_document_provenance.rbi +2 -2
  151. data/rbi/retab/experiment_result.rbi +0 -6
  152. data/rbi/retab/experiment_run.rbi +10 -4
  153. data/rbi/retab/experiment_runs.rbi +1 -3
  154. data/rbi/retab/extraction_workflow_artifact.rbi +2 -2
  155. data/rbi/retab/files.rbi +17 -17
  156. data/rbi/retab/function_invocation.rbi +4 -4
  157. data/rbi/retab/generate_schema_request.rbi +0 -6
  158. data/rbi/retab/job.rbi +2 -2
  159. data/rbi/retab/partition_workflow_artifact.rbi +2 -2
  160. data/rbi/retab/review.rbi +2 -2
  161. data/rbi/retab/review_decision.rbi +4 -4
  162. data/rbi/retab/review_evaluation.rbi +2 -2
  163. data/rbi/retab/run_timing.rbi +0 -18
  164. data/rbi/retab/schemas.rbi +1 -2
  165. data/rbi/retab/stored_block_execution.rbi +2 -2
  166. data/rbi/retab/{schedule_trigger.rbi → trigger_info.rbi} +3 -9
  167. data/rbi/retab/verdict_summary.rbi +2 -2
  168. data/rbi/retab/while_loop_termination.rbi +2 -2
  169. data/rbi/retab/workflow_artifacts.rbi +8 -8
  170. data/rbi/retab/workflow_export_payload_request.rbi +4 -4
  171. data/rbi/retab/workflow_run.rbi +12 -6
  172. data/rbi/retab/workflow_runs.rbi +3 -5
  173. data/rbi/retab/workflow_spec.rbi +4 -4
  174. data/rbi/retab/workflow_steps.rbi +1 -2
  175. data/rbi/retab/workflow_test_result.rbi +2 -2
  176. data/rbi/retab/workflow_test_run.rbi +12 -6
  177. data/rbi/retab/workflow_test_run_timing.rbi +2 -2
  178. data/rbi/retab/workflow_test_runs.rbi +1 -3
  179. data/rbi/retab/workflows.rbi +8 -0
  180. metadata +26 -38
  181. data/lib/retab/types/generate_schema_request_reasoning_effort.rb +0 -17
  182. data/lib/retab/workflow_runs/api_trigger.rb +0 -25
  183. data/lib/retab/workflow_runs/email_trigger.rb +0 -28
  184. data/lib/retab/workflow_runs/restart_trigger.rb +0 -25
  185. data/lib/retab/workflow_runs/schedule_trigger.rb +0 -25
  186. data/lib/retab/workflow_runs/webhook_trigger.rb +0 -25
  187. data/lib/retab/workflow_runs/workflow_snapshot_ref.rb +0 -25
  188. data/lib/retab/workflow_test_runs/workflow_test_run_timing.rb +0 -31
  189. data/rbi/retab/api_trigger.rbi +0 -30
  190. data/rbi/retab/email_trigger.rbi +0 -36
  191. data/rbi/retab/manual_trigger.rbi +0 -30
  192. data/rbi/retab/restart_trigger.rbi +0 -30
  193. data/rbi/retab/webhook_trigger.rbi +0 -30
  194. data/rbi/retab/workflow_snapshot_ref.rbi +0 -30
  195. /data/lib/retab/{extractions → classifications}/file_ref.rb +0 -0
  196. /data/lib/retab/{extractions → classifications}/retab_usage.rb +0 -0
  197. /data/lib/retab/{workflow_artifacts → edits}/b_box.rb +0 -0
  198. /data/lib/retab/{workflow_artifacts → edits}/edit_result.rb +0 -0
  199. /data/lib/retab/{workflow_artifacts → edits}/form_field.rb +0 -0
  200. /data/lib/retab/{workflow_runs → workflow_artifacts}/error_details.rb +0 -0
  201. /data/lib/retab/{workflow_steps → workflow_block_executions}/step_artifact_ref.rb +0 -0
  202. /data/lib/retab/{workflow_test_run_results → workflow_experiments}/materialized_document.rb +0 -0
  203. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/cancelled_workflow_test_run.rb +0 -0
  204. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/completed_workflow_test_run.rb +0 -0
  205. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/error_workflow_test_run.rb +0 -0
  206. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/pending_workflow_test_run.rb +0 -0
  207. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/queued_workflow_test_run.rb +0 -0
  208. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/running_workflow_test_run.rb +0 -0
@@ -6,19 +6,19 @@ module Retab
6
6
  class ExperimentDocumentCaptureRequest < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
- workflow_run_id: :workflow_run_id,
9
+ run_id: :run_id,
10
10
  step_id: :step_id
11
11
  }.freeze
12
12
 
13
13
  attr_accessor(
14
- :workflow_run_id,
14
+ :run_id,
15
15
  :step_id
16
16
  )
17
17
 
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @workflow_run_id = hash[:workflow_run_id]
21
+ @run_id = hash[:run_id]
22
22
  @step_id = hash[:step_id]
23
23
  end
24
24
  end
@@ -6,19 +6,19 @@ module Retab
6
6
  class ExperimentDocumentProvenance < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
- workflow_run_id: :workflow_run_id,
9
+ run_id: :run_id,
10
10
  step_id: :step_id
11
11
  }.freeze
12
12
 
13
13
  attr_accessor(
14
- :workflow_run_id,
14
+ :run_id,
15
15
  :step_id
16
16
  )
17
17
 
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @workflow_run_id = hash[:workflow_run_id]
21
+ @run_id = hash[:run_id]
22
22
  @step_id = hash[:step_id]
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @type = hash[:type]
21
+ @type = hash[:type].nil? ? "file" : hash[:type]
22
22
  @document = hash[:document] ? Retab::MaterializedDocument.new(hash[:document]) : nil
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @type = hash[:type]
21
+ @type = hash[:type].nil? ? "json" : hash[:type]
22
22
  @data = hash[:data]
23
23
  end
24
24
  end
@@ -53,11 +53,11 @@ module Retab
53
53
  @last_run_id = hash[:last_run_id]
54
54
  @created_at = hash[:created_at]
55
55
  @updated_at = hash[:updated_at]
56
- @status = hash[:status]
56
+ @status = hash[:status].nil? ? "draft" : hash[:status]
57
57
  @block_type = hash[:block_type]
58
58
  @score = hash[:score]
59
- @is_stale = hash[:is_stale]
60
- @schema_drift = hash[:schema_drift]
59
+ @is_stale = hash[:is_stale].nil? ? false : hash[:is_stale]
60
+ @schema_drift = hash[:schema_drift].nil? ? "unknown" : hash[:schema_drift]
61
61
  @schema_drift_detail = hash[:schema_drift_detail]
62
62
  end
63
63
  end
@@ -9,7 +9,7 @@ module Retab
9
9
  id: :id,
10
10
  workflow_id: :workflow_id,
11
11
  workflow_version_id: :workflow_version_id,
12
- workflow_run_id: :workflow_run_id,
12
+ run_id: :run_id,
13
13
  block_id: :block_id,
14
14
  step_id: :step_id,
15
15
  parent_step_id: :parent_step_id,
@@ -24,7 +24,7 @@ module Retab
24
24
  :id,
25
25
  :workflow_id,
26
26
  :workflow_version_id,
27
- :workflow_run_id,
27
+ :run_id,
28
28
  :block_id,
29
29
  :step_id,
30
30
  :parent_step_id,
@@ -41,7 +41,7 @@ module Retab
41
41
  @id = hash[:id]
42
42
  @workflow_id = hash[:workflow_id]
43
43
  @workflow_version_id = hash[:workflow_version_id]
44
- @workflow_run_id = hash[:workflow_run_id]
44
+ @run_id = hash[:run_id]
45
45
  @block_id = hash[:block_id]
46
46
  @step_id = hash[:step_id]
47
47
  @parent_step_id = hash[:parent_step_id]
@@ -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_of" : hash[:kind]
22
22
  @predicates = (hash[:predicates] || []).map { |item|
23
23
  item ? (
24
24
  case item[:kind]
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @kind = hash[:kind]
17
+ @kind = hash[:kind].nil? ? "always" : hash[:kind]
18
18
  end
19
19
  end
20
20
  end
@@ -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_of" : hash[:kind]
22
22
  @predicates = (hash[:predicates] || []).map { |item|
23
23
  item ? (
24
24
  case item[:kind]
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @kind = hash[:kind]
17
+ @kind = hash[:kind].nil? ? "any_required_field_null" : hash[:kind]
18
18
  end
19
19
  end
20
20
  end
@@ -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_split_pages_lt" : hash[:kind]
22
22
  @min_pages = hash[:min_pages]
23
23
  end
24
24
  end
@@ -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? ? "boundary_confidence_lt" : hash[:kind]
22
22
  @threshold = hash[:threshold]
23
23
  end
24
24
  end
@@ -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? ? "branch_in" : hash[:kind]
22
22
  @branches = (hash[:branches] || [])
23
23
  end
24
24
  end
@@ -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? ? "category_in" : hash[:kind]
22
22
  @categories = (hash[:categories] || [])
23
23
  end
24
24
  end
@@ -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? ? "confidence_lt" : hash[:kind]
22
22
  @threshold = hash[:threshold]
23
23
  end
24
24
  end
@@ -9,7 +9,7 @@ module Retab
9
9
  verdict: :verdict,
10
10
  version_id: :version_id,
11
11
  author: :author,
12
- decided_at: :decided_at,
12
+ created_at: :created_at,
13
13
  reason: :reason
14
14
  }.freeze
15
15
 
@@ -17,7 +17,7 @@ module Retab
17
17
  :verdict,
18
18
  :version_id,
19
19
  :author,
20
- :decided_at,
20
+ :created_at,
21
21
  :reason
22
22
  )
23
23
 
@@ -27,7 +27,7 @@ module Retab
27
27
  @verdict = hash[:verdict]
28
28
  @version_id = hash[:version_id]
29
29
  @author = hash[:author] ? Retab::Actor.new(hash[:author]) : nil
30
- @decided_at = hash[:decided_at]
30
+ @created_at = hash[:created_at]
31
31
  @reason = hash[:reason]
32
32
  end
33
33
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "field_confidence_lt" : hash[:kind]
24
24
  @path = hash[:path]
25
25
  @threshold = hash[:threshold]
26
26
  end
@@ -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? ? "json_condition" : hash[:kind]
22
22
  @condition = hash[:condition] || {}
23
23
  end
24
24
  end
@@ -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? ? "split_count_neq" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -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? ? "top_margin_lt" : hash[:kind]
22
22
  @margin = hash[:margin]
23
23
  end
24
24
  end
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @kind = hash[:kind]
17
+ @kind = hash[:kind].nil? ? "validation_failed" : hash[:kind]
18
18
  end
19
19
  end
20
20
  end
@@ -22,9 +22,9 @@ module Retab
22
22
  def initialize(json)
23
23
  super()
24
24
  hash = self.class.normalize(json)
25
- @submission_status = hash[:submission_status]
25
+ @submission_status = hash[:submission_status].nil? ? "accepted" : hash[:submission_status]
26
26
  @review = hash[:review] ? Retab::Review.new(hash[:review]) : nil
27
- @resume_status = hash[:resume_status]
27
+ @resume_status = hash[:resume_status].nil? ? "resumed" : hash[:resume_status]
28
28
  @resume_error = hash[:resume_error]
29
29
  end
30
30
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @status = hash[:status]
21
+ @status = hash[:status].nil? ? "awaiting_review" : hash[:status]
22
22
  @waiting_for_block_ids = (hash[:waiting_for_block_ids] || [])
23
23
  end
24
24
  end
@@ -21,8 +21,8 @@ module Retab
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
23
  @run = hash[:run] ? Retab::WorkflowRun.new(hash[:run]) : nil
24
- @redis_available = hash[:redis_available]
25
- @cancellation_status = hash[:cancellation_status]
24
+ @redis_available = hash[:redis_available].nil? ? true : hash[:redis_available]
25
+ @cancellation_status = hash[:cancellation_status].nil? ? "cancellation_requested" : hash[:cancellation_status]
26
26
  end
27
27
  end
28
28
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @status = hash[:status]
21
+ @status = hash[:status].nil? ? "cancelled" : hash[:status]
22
22
  @reason = hash[:reason]
23
23
  end
24
24
  end
@@ -25,7 +25,7 @@ module Retab
25
25
  @workflow_id = hash[:workflow_id]
26
26
  @documents = hash[:documents] || {}
27
27
  @json_inputs = hash[:json_inputs] || {}
28
- @version = hash[:version]
28
+ @version = hash[:version].nil? ? "production" : hash[:version]
29
29
  end
30
30
  end
31
31
  end
@@ -26,7 +26,7 @@ module Retab
26
26
  def initialize(json)
27
27
  super()
28
28
  hash = self.class.normalize(json)
29
- @status = hash[:status]
29
+ @status = hash[:status].nil? ? "error" : hash[:status]
30
30
  @message = hash[:message]
31
31
  @stage = hash[:stage]
32
32
  @category = hash[:category]
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @status = hash[:status]
17
+ @status = hash[:status].nil? ? "pending" : hash[:status]
18
18
  end
19
19
  end
20
20
  end
@@ -8,19 +8,13 @@ module Retab
8
8
  HASH_ATTRS = {
9
9
  created_at: :created_at,
10
10
  started_at: :started_at,
11
- completed_at: :completed_at,
12
- review_waiting_started_at: :review_waiting_started_at,
13
- accumulated_review_waiting_ms: :accumulated_review_waiting_ms,
14
- duration_ms: :duration_ms
11
+ completed_at: :completed_at
15
12
  }.freeze
16
13
 
17
14
  attr_accessor(
18
15
  :created_at,
19
16
  :started_at,
20
- :completed_at,
21
- :review_waiting_started_at,
22
- :accumulated_review_waiting_ms,
23
- :duration_ms
17
+ :completed_at
24
18
  )
25
19
 
26
20
  def initialize(json)
@@ -29,9 +23,6 @@ module Retab
29
23
  @created_at = hash[:created_at]
30
24
  @started_at = hash[:started_at]
31
25
  @completed_at = hash[:completed_at]
32
- @review_waiting_started_at = hash[:review_waiting_started_at]
33
- @accumulated_review_waiting_ms = hash[:accumulated_review_waiting_ms]
34
- @duration_ms = hash[:duration_ms]
35
26
  end
36
27
  end
37
28
  end
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @status = hash[:status]
17
+ @status = hash[:status].nil? ? "running" : hash[:status]
18
18
  end
19
19
  end
20
20
  end
@@ -3,23 +3,18 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module Retab
6
- class ManualTrigger < Retab::Types::BaseModel
6
+ class TriggerInfo < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
- type: :type,
10
- user_id: :user_id
9
+ type: :type
11
10
  }.freeze
12
11
 
13
- attr_accessor(
14
- :type,
15
- :user_id
16
- )
12
+ attr_accessor :type
17
13
 
18
14
  def initialize(json)
19
15
  super()
20
16
  hash = self.class.normalize(json)
21
17
  @type = hash[:type]
22
- @user_id = hash[:user_id]
23
18
  end
24
19
  end
25
20
  end
@@ -15,7 +15,7 @@ module Retab
15
15
  exclude_status: :exclude_status,
16
16
  from_date: :from_date,
17
17
  to_date: :to_date,
18
- trigger_types: :trigger_types,
18
+ trigger_type: :trigger_type,
19
19
  preferred_columns: :preferred_columns,
20
20
  delimiter: :delimiter,
21
21
  line_delimiter: :line_delimiter,
@@ -32,7 +32,7 @@ module Retab
32
32
  :exclude_status,
33
33
  :from_date,
34
34
  :to_date,
35
- :trigger_types,
35
+ :trigger_type,
36
36
  :preferred_columns,
37
37
  :delimiter,
38
38
  :line_delimiter,
@@ -44,18 +44,18 @@ module Retab
44
44
  hash = self.class.normalize(json)
45
45
  @workflow_id = hash[:workflow_id]
46
46
  @block_id = hash[:block_id]
47
- @export_source = hash[:export_source]
47
+ @export_source = hash[:export_source].nil? ? "outputs" : hash[:export_source]
48
48
  @selected_run_ids = (hash[:selected_run_ids] || [])
49
49
  @selected_doc_types = (hash[:selected_doc_types] || [])
50
50
  @status = hash[:status]
51
51
  @exclude_status = hash[:exclude_status]
52
52
  @from_date = hash[:from_date]
53
53
  @to_date = hash[:to_date]
54
- @trigger_types = (hash[:trigger_types] || [])
54
+ @trigger_type = hash[:trigger_type]
55
55
  @preferred_columns = (hash[:preferred_columns] || [])
56
- @delimiter = hash[:delimiter]
57
- @line_delimiter = hash[:line_delimiter]
58
- @quote = hash[:quote]
56
+ @delimiter = hash[:delimiter].nil? ? ";" : hash[:delimiter]
57
+ @line_delimiter = hash[:line_delimiter].nil? ? "\n" : hash[:line_delimiter]
58
+ @quote = hash[:quote].nil? ? "\"" : hash[:quote]
59
59
  end
60
60
  end
61
61
  end
@@ -7,7 +7,8 @@ module Retab
7
7
 
8
8
  HASH_ATTRS = {
9
9
  id: :id,
10
- workflow: :workflow,
10
+ workflow_id: :workflow_id,
11
+ workflow_version_id: :workflow_version_id,
11
12
  trigger: :trigger,
12
13
  lifecycle: :lifecycle,
13
14
  timing: :timing,
@@ -16,7 +17,8 @@ module Retab
16
17
 
17
18
  attr_accessor(
18
19
  :id,
19
- :workflow,
20
+ :workflow_id,
21
+ :workflow_version_id,
20
22
  :trigger,
21
23
  :lifecycle,
22
24
  :timing,
@@ -27,25 +29,9 @@ module Retab
27
29
  super()
28
30
  hash = self.class.normalize(json)
29
31
  @id = hash[:id]
30
- @workflow = hash[:workflow] ? Retab::WorkflowSnapshotRef.new(hash[:workflow]) : nil
31
- @trigger = hash[:trigger] ? (
32
- case hash[:trigger][:type]
33
- when "api"
34
- Retab::ApiTrigger.new(hash[:trigger])
35
- when "email"
36
- Retab::EmailTrigger.new(hash[:trigger])
37
- when "manual"
38
- Retab::ManualTrigger.new(hash[:trigger])
39
- when "restart"
40
- Retab::RestartTrigger.new(hash[:trigger])
41
- when "schedule"
42
- Retab::ScheduleTrigger.new(hash[:trigger])
43
- when "webhook"
44
- Retab::WebhookTrigger.new(hash[:trigger])
45
- else
46
- hash[:trigger]
47
- end
48
- ) : nil
32
+ @workflow_id = hash[:workflow_id]
33
+ @workflow_version_id = hash[:workflow_version_id]
34
+ @trigger = hash[:trigger] ? Retab::TriggerInfo.new(hash[:trigger]) : nil
49
35
  @lifecycle = hash[:lifecycle] ? (
50
36
  case hash[:lifecycle][:status]
51
37
  when "awaiting_review"
@@ -12,11 +12,9 @@ module Retab
12
12
 
13
13
  # List Workflow Runs
14
14
  # @param workflow_id [String, nil] Filter by workflow ID
15
- # @param status [Retab::Types::WorkflowRunsStatus, nil] Filter by single run status (deprecated, use 'statuses')
16
- # @param statuses [String, nil] Filter by multiple statuses (comma-separated: pending,queued,running,completed,error,failed,awaiting_review,cancelled)
15
+ # @param status [Retab::Types::WorkflowRunsStatus, nil] Filter by run status
17
16
  # @param exclude_status [Retab::Types::WorkflowRunsExcludeStatus, nil] Exclude runs with this status
18
- # @param trigger_type [Retab::Types::WorkflowRunsTriggerType, nil] Filter by single trigger type (deprecated, use 'trigger_types')
19
- # @param trigger_types [String, nil] Filter by multiple trigger types (comma-separated: manual,api,schedule,webhook,email,restart)
17
+ # @param trigger_type [Retab::Types::WorkflowRunsTriggerType, nil] Filter by trigger type
20
18
  # @param from_date [String, nil] Filter runs created on or after this date (YYYY-MM-DD)
21
19
  # @param to_date [String, nil] Filter runs created on or before this date (YYYY-MM-DD)
22
20
  # @param min_duration_ms [Integer, nil] Filter runs with duration >= this value in milliseconds
@@ -32,10 +30,8 @@ module Retab
32
30
  def list(
33
31
  workflow_id: nil,
34
32
  status: nil,
35
- statuses: nil,
36
33
  exclude_status: nil,
37
34
  trigger_type: nil,
38
- trigger_types: nil,
39
35
  from_date: nil,
40
36
  to_date: nil,
41
37
  min_duration_ms: nil,
@@ -51,10 +47,8 @@ module Retab
51
47
  params = {
52
48
  "workflow_id" => workflow_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
  "min_duration_ms" => min_duration_ms,
@@ -77,10 +71,8 @@ module Retab
77
71
  list(
78
72
  workflow_id: workflow_id,
79
73
  status: status,
80
- statuses: statuses,
81
74
  exclude_status: exclude_status,
82
75
  trigger_type: trigger_type,
83
- trigger_types: trigger_types,
84
76
  from_date: from_date,
85
77
  to_date: to_date,
86
78
  min_duration_ms: min_duration_ms,
@@ -100,10 +92,8 @@ module Retab
100
92
  filters: {
101
93
  workflow_id: workflow_id,
102
94
  status: status,
103
- statuses: statuses,
104
95
  exclude_status: exclude_status,
105
96
  trigger_type: trigger_type,
106
- trigger_types: trigger_types,
107
97
  from_date: from_date,
108
98
  to_date: to_date,
109
99
  min_duration_ms: min_duration_ms,
@@ -165,9 +155,9 @@ module Retab
165
155
  # @param exclude_status [Retab::Types::WorkflowExportPayloadRequestExcludeStatus, nil] Optional status exclusion filter (intersects with completed-only export scope)
166
156
  # @param from_date [String, nil] Optional start date filter (YYYY-MM-DD)
167
157
  # @param to_date [String, nil] Optional end date filter (YYYY-MM-DD)
168
- # @param trigger_types [Array<Retab::Types::WorkflowExportPayloadRequestTriggerTypes>, nil] Optional trigger type filters
158
+ # @param trigger_type [Retab::Types::WorkflowExportPayloadRequestTriggerType, nil] Optional trigger type filter
169
159
  # @param preferred_columns [Array<String>, nil] Preferred data column order
170
- # @param delimiter [String, nil] CSV field delimiter. Default is ';' (Excel-EU locale default); pass ',' for RFC 4180 / pandas compatibility. Cell values are always quoted when they contain the delimiter, the line terminator, or the quote character, with embedded quotes doubled per RFC 4180.
160
+ # @param delimiter [String, nil] CSV field delimiter. Default is ';' (the Excel EU-locale default); pass ',' for RFC 4180 compatibility. Cell values are always quoted when they contain the delimiter, the line terminator, or the quote character, with embedded quotes doubled per RFC 4180.
171
161
  # @param line_delimiter [String, nil] CSV line delimiter
172
162
  # @param quote [String, nil] CSV quote character
173
163
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
@@ -182,7 +172,7 @@ module Retab
182
172
  exclude_status: nil,
183
173
  from_date: nil,
184
174
  to_date: nil,
185
- trigger_types: nil,
175
+ trigger_type: nil,
186
176
  preferred_columns: nil,
187
177
  delimiter: nil,
188
178
  line_delimiter: nil,
@@ -199,7 +189,7 @@ module Retab
199
189
  "exclude_status" => exclude_status,
200
190
  "from_date" => from_date,
201
191
  "to_date" => to_date,
202
- "trigger_types" => trigger_types,
192
+ "trigger_type" => trigger_type,
203
193
  "preferred_columns" => preferred_columns,
204
194
  "delimiter" => delimiter,
205
195
  "line_delimiter" => line_delimiter,
@@ -40,12 +40,12 @@ module Retab
40
40
  @block_count = hash[:block_count]
41
41
  @edge_count = hash[:edge_count]
42
42
  @diagnostics = hash[:diagnostics] || {}
43
- @format_version = hash[:format_version]
43
+ @format_version = hash[:format_version].nil? ? "workflows-plan/v1" : hash[:format_version]
44
44
  @summary = hash[:summary] ? Retab::DeclarativePlanSummary.new(hash[:summary]) : nil
45
45
  @resource_changes = (hash[:resource_changes] || []).map { |item|
46
46
  item ? Retab::DeclarativePlanResourceChange.new(item) : nil
47
47
  }
48
- @rendered_plan = hash[:rendered_plan]
48
+ @rendered_plan = hash[:rendered_plan].nil? ? "No changes. Workflow spec is up to date." : hash[:rendered_plan]
49
49
  end
50
50
  end
51
51
  end
@@ -35,8 +35,8 @@ module Retab
35
35
  @action = hash[:action]
36
36
  @before = hash[:before]
37
37
  @after = hash[:after]
38
- @before_sensitive = hash[:before_sensitive]
39
- @after_sensitive = hash[:after_sensitive]
38
+ @before_sensitive = hash[:before_sensitive].nil? ? false : hash[:before_sensitive]
39
+ @after_sensitive = hash[:after_sensitive].nil? ? false : hash[:after_sensitive]
40
40
  @unified_diff = hash[:unified_diff]
41
41
  end
42
42
  end
@@ -37,12 +37,12 @@ module Retab
37
37
  @block_count = hash[:block_count]
38
38
  @edge_count = hash[:edge_count]
39
39
  @diagnostics = hash[:diagnostics] || {}
40
- @format_version = hash[:format_version]
40
+ @format_version = hash[:format_version].nil? ? "workflows-plan/v1" : hash[:format_version]
41
41
  @summary = hash[:summary] ? Retab::DeclarativePlanSummary.new(hash[:summary]) : nil
42
42
  @resource_changes = (hash[:resource_changes] || []).map { |item|
43
43
  item ? Retab::DeclarativePlanResourceChange.new(item) : nil
44
44
  }
45
- @rendered_plan = hash[:rendered_plan]
45
+ @rendered_plan = hash[:rendered_plan].nil? ? "No changes. Workflow spec is up to date." : hash[:rendered_plan]
46
46
  end
47
47
  end
48
48
  end
@@ -34,7 +34,7 @@ module Retab
34
34
  @replace = hash[:replace]
35
35
  @noop = hash[:noop]
36
36
  @total = hash[:total]
37
- @has_changes = hash[:has_changes]
37
+ @has_changes = hash[:has_changes].nil? ? false : hash[:has_changes]
38
38
  end
39
39
  end
40
40
  end