retab 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/retab/base_client.rb +168 -33
- data/lib/retab/classifications/category.rb +3 -1
- data/lib/retab/classifications/classification.rb +3 -1
- data/lib/retab/classifications/classification_consensus.rb +3 -1
- data/lib/retab/classifications/classification_decision.rb +3 -1
- data/lib/retab/classifications/classification_request.rb +3 -1
- data/lib/retab/classifications.rb +40 -25
- data/lib/retab/client.rb +0 -68
- data/lib/retab/configuration.rb +8 -6
- data/lib/retab/edit_templates/create_edit_template_request.rb +3 -1
- data/lib/retab/edit_templates/edit_template.rb +3 -1
- data/lib/retab/edit_templates/update_edit_template_request.rb +3 -1
- data/lib/retab/edit_templates.rb +36 -24
- data/lib/retab/edits/edit.rb +6 -1
- data/lib/retab/edits/edit_request.rb +3 -1
- data/lib/retab/edits.rb +45 -25
- data/lib/retab/errors.rb +21 -4
- data/lib/retab/experiment_run_metrics/experiment_by_document_metrics_response.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_by_document_target_metric.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_by_target_document_metric.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb +6 -2
- data/lib/retab/experiment_run_metrics/experiment_confusion_flow_metric.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_confusion_summary_aggregate.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_extract_summary_aggregate.rb +1 -0
- data/lib/retab/experiment_run_metrics/experiment_metric_document_ref.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_metrics_missing_error.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_summary_metric_document.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +6 -2
- data/lib/retab/experiment_run_metrics/experiment_target_confusion_metric.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_vote_row.rb +3 -1
- data/lib/retab/experiment_run_metrics/experiment_votes_metrics_response.rb +3 -1
- data/lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb +3 -1
- data/lib/retab/experiment_run_metrics.rb +9 -9
- data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +3 -1
- data/lib/retab/experiment_run_results/experiment_result.rb +21 -2
- data/lib/retab/experiment_run_results/experiment_result_timing.rb +3 -1
- data/lib/retab/experiment_run_results.rb +32 -8
- data/lib/retab/experiment_runs/cancel_workflow_experiment_run_response.rb +21 -2
- data/lib/retab/experiment_runs/create_experiment_run_request.rb +3 -1
- data/lib/retab/experiment_runs/experiment_run.rb +21 -2
- data/lib/retab/experiment_runs/experiment_run_timing.rb +3 -1
- data/lib/retab/experiment_runs/experiment_run_trigger.rb +1 -0
- data/lib/retab/experiment_runs.rb +56 -33
- data/lib/retab/extractions/extraction.rb +3 -1
- data/lib/retab/extractions/extraction_consensus.rb +3 -1
- data/lib/retab/extractions/extraction_request.rb +8 -3
- data/lib/retab/extractions/file_ref.rb +3 -1
- data/lib/retab/extractions/retab_usage.rb +1 -0
- data/lib/retab/extractions/sources_response.rb +3 -1
- data/lib/retab/extractions.rb +59 -33
- data/lib/retab/files/complete_file_upload_request.rb +1 -0
- data/lib/retab/files/create_upload_response.rb +3 -1
- data/lib/retab/files/file.rb +6 -1
- data/lib/retab/files/file_link.rb +3 -1
- data/lib/retab/files/upload_file_request.rb +3 -1
- data/lib/retab/files.rb +55 -29
- data/lib/retab/jobs/create_job_request.rb +3 -1
- data/lib/retab/jobs/job.rb +3 -1
- data/lib/retab/jobs/job_error.rb +3 -1
- data/lib/retab/jobs/job_response.rb +3 -1
- data/lib/retab/jobs.rb +73 -37
- data/lib/retab/mime.rb +69 -38
- data/lib/retab/paginated_list.rb +86 -0
- data/lib/retab/parses/parse.rb +3 -1
- data/lib/retab/parses/parse_output.rb +3 -1
- data/lib/retab/parses/parse_request.rb +3 -1
- data/lib/retab/parses.rb +39 -24
- data/lib/retab/partitions/partition.rb +3 -1
- data/lib/retab/partitions/partition_chunk.rb +3 -1
- data/lib/retab/partitions/partition_chunk_likelihood.rb +3 -1
- data/lib/retab/partitions/partition_consensus.rb +6 -2
- data/lib/retab/partitions/partition_request.rb +3 -1
- data/lib/retab/partitions.rb +40 -25
- data/lib/retab/schemas/generate_schema_request.rb +3 -1
- data/lib/retab/schemas/partial_schema.rb +3 -1
- data/lib/retab/schemas.rb +13 -9
- data/lib/retab/shared/http_validation_error.rb +1 -0
- data/lib/retab/shared/validation_error.rb +3 -1
- data/lib/retab/splits/split.rb +3 -1
- data/lib/retab/splits/split_consensus.rb +6 -2
- data/lib/retab/splits/split_request.rb +3 -1
- data/lib/retab/splits/split_result.rb +3 -1
- data/lib/retab/splits/split_subdocument_likelihood.rb +3 -1
- data/lib/retab/splits/subdocument.rb +3 -1
- data/lib/retab/splits.rb +39 -24
- data/lib/retab/types/actor_kind.rb +3 -3
- data/lib/retab/types/api_response.rb +2 -0
- data/lib/retab/types/assertion_drift_status.rb +3 -3
- data/lib/retab/types/assertion_outcome.rb +3 -3
- data/lib/retab/types/base_model.rb +34 -9
- data/lib/retab/types/cancel_workflow_response_cancellation_status.rb +3 -3
- data/lib/retab/types/classifications_order.rb +2 -2
- data/lib/retab/types/condition_evaluation_details_logical_operator.rb +2 -2
- data/lib/retab/types/create_experiment_request_n_consensus.rb +3 -3
- data/lib/retab/types/create_job_request_endpoint.rb +24 -12
- data/lib/retab/types/declarative_apply_response_action.rb +3 -3
- data/lib/retab/types/declarative_plan_field_change_action.rb +3 -3
- data/lib/retab/types/declarative_plan_resource_change_target.rb +3 -3
- data/lib/retab/types/declarative_plan_resource_change_type.rb +44 -22
- data/lib/retab/types/error_step_lifecycle_category.rb +3 -3
- data/lib/retab/types/error_step_lifecycle_stage.rb +7 -7
- data/lib/retab/types/experiment_block_type.rb +4 -4
- data/lib/retab/types/experiment_public_status.rb +5 -5
- data/lib/retab/types/experiment_run_metrics_view.rb +4 -4
- data/lib/retab/types/experiment_run_results_order.rb +9 -0
- data/lib/retab/types/experiment_schema_drift_status.rb +4 -4
- data/lib/retab/types/field_type.rb +2 -2
- data/lib/retab/types/generate_schema_request_reasoning_effort.rb +6 -6
- data/lib/retab/types/handle_payload_type.rb +3 -3
- data/lib/retab/types/job_status.rb +7 -7
- data/lib/retab/types/jobs_source.rb +3 -3
- data/lib/retab/types/latest_block_test_run_summary_status.rb +6 -6
- data/lib/retab/types/length_compare_condition_op.rb +6 -6
- data/lib/retab/types/list_struct.rb +13 -50
- data/lib/retab/types/parse_request_table_parsing_format.rb +4 -4
- data/lib/retab/types/request_options.rb +2 -0
- data/lib/retab/types/resume_status.rb +3 -3
- data/lib/retab/types/review_decision_status.rb +5 -5
- data/lib/retab/types/review_evaluation_review_decision.rb +2 -2
- data/lib/retab/types/similarity_gte_condition_method.rb +2 -2
- data/lib/retab/types/sources_response_document_type.rb +6 -6
- data/lib/retab/types/step_artifact_ref_operation.rb +24 -12
- data/lib/retab/types/submission_status.rb +3 -3
- data/lib/retab/types/update_workflow_block_request_config_mode.rb +2 -2
- data/lib/retab/types/while_loop_termination_termination_reason.rb +3 -3
- data/lib/retab/types/workflow_block_create_request_type.rb +30 -15
- data/lib/retab/types/workflow_block_executions_order.rb +9 -0
- data/lib/retab/types/workflow_block_type.rb +40 -20
- data/lib/retab/types/workflow_experiments_order.rb +9 -0
- data/lib/retab/types/workflow_export_payload_request_exclude_status.rb +8 -8
- data/lib/retab/types/workflow_export_payload_request_export_source.rb +2 -2
- data/lib/retab/types/workflow_export_payload_request_trigger_types.rb +6 -6
- data/lib/retab/types/workflow_test_run_results_order.rb +9 -0
- data/lib/retab/types/{workflow_config_block_type.rb → workflow_tests_order.rb} +1 -1
- data/lib/retab/util.rb +4 -2
- data/lib/retab/version.rb +3 -1
- data/lib/retab/workflow_artifacts/api_call_attempt.rb +3 -1
- data/lib/retab/workflow_artifacts/api_call_invocation.rb +3 -1
- data/lib/retab/workflow_artifacts/b_box.rb +3 -1
- data/lib/retab/workflow_artifacts/classification_workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts/condition_evaluation_details.rb +6 -2
- data/lib/retab/workflow_artifacts/condition_evaluation_per_item.rb +3 -1
- data/lib/retab/workflow_artifacts/condition_evaluation_result.rb +6 -2
- data/lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb +3 -1
- data/lib/retab/workflow_artifacts/conditional_evaluation.rb +3 -1
- data/lib/retab/workflow_artifacts/edit_config.rb +1 -0
- data/lib/retab/workflow_artifacts/edit_result.rb +3 -1
- data/lib/retab/workflow_artifacts/edit_workflow_artifact.rb +6 -1
- data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts/form_field.rb +3 -1
- data/lib/retab/workflow_artifacts/function_invocation.rb +3 -1
- data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts/partition_workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts/review_evaluation.rb +3 -1
- data/lib/retab/workflow_artifacts/split_workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts/while_loop_termination.rb +3 -1
- data/lib/retab/workflow_artifacts/workflow_artifact.rb +3 -1
- data/lib/retab/workflow_artifacts.rb +20 -13
- data/lib/retab/workflow_block_executions/completed_block_execution_lifecycle.rb +1 -0
- data/lib/retab/workflow_block_executions/create_block_execution_request.rb +3 -1
- data/lib/retab/workflow_block_executions/error_block_execution_lifecycle.rb +3 -1
- data/lib/retab/workflow_block_executions/skipped_block_execution_lifecycle.rb +3 -1
- data/lib/retab/workflow_block_executions/stored_block_execution.rb +15 -2
- data/lib/retab/workflow_block_executions.rb +40 -15
- data/lib/retab/workflow_blocks/update_workflow_block_request.rb +3 -1
- data/lib/retab/workflow_blocks/workflow_block.rb +3 -1
- data/lib/retab/workflow_blocks/workflow_block_create_request.rb +3 -1
- data/lib/retab/workflow_blocks.rb +52 -36
- data/lib/retab/workflow_edges/workflow_edge_create_request.rb +3 -1
- data/lib/retab/workflow_edges/workflow_edge_doc.rb +3 -1
- data/lib/retab/workflow_edges.rb +36 -22
- data/lib/retab/workflow_experiments/create_experiment_request.rb +9 -3
- data/lib/retab/workflow_experiments/experiment_document_capture_request.rb +3 -1
- data/lib/retab/workflow_experiments/experiment_document_provenance.rb +3 -1
- data/lib/retab/workflow_experiments/explicit_experiment_document_request.rb +3 -1
- data/lib/retab/workflow_experiments/update_experiment_request.rb +9 -3
- data/lib/retab/workflow_experiments/workflow_experiment.rb +3 -1
- data/lib/retab/workflow_experiments.rb +70 -23
- data/lib/retab/workflow_review_versions/create_review_version_request.rb +3 -1
- data/lib/retab/workflow_review_versions/review_version.rb +3 -1
- data/lib/retab/workflow_review_versions.rb +25 -17
- data/lib/retab/workflow_reviews/actor.rb +3 -1
- data/lib/retab/workflow_reviews/approve_review_request.rb +1 -0
- data/lib/retab/workflow_reviews/reject_review_request.rb +3 -1
- data/lib/retab/workflow_reviews/review.rb +37 -2
- data/lib/retab/workflow_reviews/review_all_of.rb +39 -2
- data/lib/retab/workflow_reviews/review_always.rb +1 -0
- data/lib/retab/workflow_reviews/review_any_of.rb +39 -2
- data/lib/retab/workflow_reviews/review_any_required_field_null.rb +1 -0
- data/lib/retab/workflow_reviews/review_any_split_pages_lt.rb +3 -1
- data/lib/retab/workflow_reviews/review_boundary_confidence_lt.rb +3 -1
- data/lib/retab/workflow_reviews/review_branch_in.rb +3 -1
- data/lib/retab/workflow_reviews/review_category_in.rb +3 -1
- data/lib/retab/workflow_reviews/review_confidence_lt.rb +3 -1
- data/lib/retab/workflow_reviews/review_decision.rb +3 -1
- data/lib/retab/workflow_reviews/review_field_confidence_lt.rb +3 -1
- data/lib/retab/workflow_reviews/review_json_condition.rb +3 -1
- data/lib/retab/workflow_reviews/review_split_count_neq.rb +3 -1
- data/lib/retab/workflow_reviews/review_top_margin_lt.rb +3 -1
- data/lib/retab/workflow_reviews/review_validation_failed.rb +1 -0
- data/lib/retab/workflow_reviews/submit_decision_response.rb +3 -1
- data/lib/retab/workflow_reviews.rb +47 -22
- data/lib/retab/workflow_runs/api_trigger.rb +3 -1
- data/lib/retab/workflow_runs/awaiting_review_run.rb +3 -1
- data/lib/retab/workflow_runs/cancel_workflow_request.rb +1 -0
- data/lib/retab/workflow_runs/cancel_workflow_response.rb +3 -1
- data/lib/retab/workflow_runs/cancelled_terminal.rb +3 -1
- data/lib/retab/workflow_runs/create_workflow_run_request.rb +16 -0
- data/lib/retab/workflow_runs/email_trigger.rb +3 -1
- data/lib/retab/workflow_runs/error_details.rb +3 -1
- data/lib/retab/workflow_runs/error_terminal.rb +3 -1
- data/lib/retab/workflow_runs/manual_trigger.rb +3 -1
- data/lib/retab/workflow_runs/pending_run.rb +1 -0
- data/lib/retab/workflow_runs/restart_trigger.rb +3 -1
- data/lib/retab/workflow_runs/run_inputs.rb +3 -1
- data/lib/retab/workflow_runs/run_timing.rb +3 -1
- data/lib/retab/workflow_runs/running_run.rb +1 -0
- data/lib/retab/workflow_runs/schedule_trigger.rb +3 -1
- data/lib/retab/workflow_runs/webhook_trigger.rb +3 -1
- data/lib/retab/workflow_runs/workflow_export_payload_request.rb +3 -1
- data/lib/retab/workflow_runs/workflow_export_payload_response.rb +3 -1
- data/lib/retab/workflow_runs/workflow_run.rb +39 -3
- data/lib/retab/workflow_runs/workflow_snapshot_ref.rb +3 -1
- data/lib/retab/workflow_runs.rb +97 -47
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_apply_response.rb +6 -2
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_export_response.rb +3 -1
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_plan_change.rb +6 -2
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_plan_field_change.rb +3 -1
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_plan_resource_change.rb +3 -1
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_plan_response.rb +6 -2
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_plan_summary.rb +3 -1
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_validation_response.rb +3 -1
- data/lib/retab/{workflow_specs → workflow_spec}/declarative_workflow_request.rb +1 -0
- data/lib/retab/{workflow_specs.rb → workflow_spec.rb} +29 -13
- data/lib/retab/workflow_steps/awaiting_review_step_lifecycle.rb +1 -0
- data/lib/retab/workflow_steps/cancelled_step_lifecycle.rb +3 -1
- data/lib/retab/workflow_steps/container_context_data.rb +3 -1
- data/lib/retab/workflow_steps/error_step_lifecycle.rb +3 -1
- data/lib/retab/workflow_steps/handle_payload.rb +3 -1
- data/lib/retab/workflow_steps/queued_step_lifecycle.rb +1 -0
- data/lib/retab/workflow_steps/step_artifact_ref.rb +3 -1
- data/lib/retab/workflow_steps/workflow_run_step.rb +28 -3
- data/lib/retab/workflow_steps.rb +34 -17
- data/lib/retab/workflow_test_run_results/assertion_failure.rb +3 -1
- data/lib/retab/workflow_test_run_results/assertion_result.rb +3 -1
- data/lib/retab/workflow_test_run_results/file_handle_input.rb +3 -1
- data/lib/retab/workflow_test_run_results/json_handle_input.rb +3 -1
- data/lib/retab/workflow_test_run_results/manual_workflow_test_source.rb +3 -1
- data/lib/retab/workflow_test_run_results/materialized_document.rb +3 -1
- data/lib/retab/workflow_test_run_results/run_step_workflow_test_source.rb +3 -1
- data/lib/retab/workflow_test_run_results/verdict_summary.rb +3 -1
- data/lib/retab/workflow_test_run_results/workflow_test_result.rb +31 -3
- data/lib/retab/workflow_test_run_results.rb +35 -8
- data/lib/retab/workflow_test_runs/block_test_batch_execution_counts.rb +3 -1
- data/lib/retab/workflow_test_runs/block_test_lifecycle_counts.rb +3 -1
- data/lib/retab/workflow_test_runs/block_test_outcome_counts.rb +3 -1
- data/lib/retab/workflow_test_runs/create_workflow_test_run_request.rb +30 -1
- data/lib/retab/workflow_test_runs/workflow_test_block_target.rb +3 -1
- data/lib/retab/workflow_test_runs/workflow_test_run.rb +39 -3
- data/lib/retab/{workflows/workflow_diagnosis_issue.rb → workflow_test_runs/workflow_test_run_block_scope.rb} +7 -11
- data/lib/retab/workflow_test_runs/workflow_test_run_single_scope.rb +25 -0
- data/lib/retab/workflow_test_runs/workflow_test_run_timing.rb +3 -1
- data/lib/retab/{workflows/workflow_block_position.rb → workflow_test_runs/workflow_test_run_workflow_scope.rb} +5 -8
- data/lib/retab/workflow_test_runs.rb +66 -32
- data/lib/retab/workflow_tests/all_items_match_condition.rb +39 -2
- data/lib/retab/workflow_tests/any_item_matches_condition.rb +39 -2
- data/lib/retab/workflow_tests/array_contains_condition.rb +3 -1
- data/lib/retab/workflow_tests/assertion_schema_dep.rb +3 -1
- data/lib/retab/workflow_tests/assertion_spec.rb +39 -2
- data/lib/retab/workflow_tests/between_condition.rb +3 -1
- data/lib/retab/workflow_tests/contain_condition.rb +3 -1
- data/lib/retab/workflow_tests/create_workflow_test_request.rb +13 -2
- data/lib/retab/workflow_tests/ends_with_condition.rb +3 -1
- data/lib/retab/workflow_tests/equal_condition.rb +3 -1
- data/lib/retab/workflow_tests/exist_condition.rb +1 -0
- data/lib/retab/workflow_tests/json_schema_valid_condition.rb +3 -1
- data/lib/retab/workflow_tests/latest_block_test_run_summary.rb +3 -1
- data/lib/retab/workflow_tests/length_compare_condition.rb +3 -1
- data/lib/retab/workflow_tests/llm_judged_as_condition.rb +3 -1
- data/lib/retab/workflow_tests/llm_not_judged_as_condition.rb +3 -1
- data/lib/retab/workflow_tests/matche_regex_condition.rb +3 -1
- data/lib/retab/workflow_tests/not_contains_condition.rb +3 -1
- data/lib/retab/workflow_tests/not_equals_condition.rb +3 -1
- data/lib/retab/workflow_tests/not_exists_condition.rb +1 -0
- data/lib/retab/workflow_tests/number_compare_condition.rb +3 -1
- data/lib/retab/workflow_tests/object_contains_condition.rb +3 -1
- data/lib/retab/workflow_tests/output_target.rb +3 -1
- data/lib/retab/workflow_tests/similarity_gte_condition.rb +3 -1
- data/lib/retab/workflow_tests/split_iou_condition.rb +3 -1
- data/lib/retab/workflow_tests/start_with_condition.rb +3 -1
- data/lib/retab/workflow_tests/update_workflow_test_request.rb +13 -2
- data/lib/retab/workflow_tests/workflow_test.rb +19 -4
- data/lib/retab/workflow_tests.rb +68 -21
- data/lib/retab/workflows/create_workflow_request.rb +3 -1
- data/lib/retab/workflows/publish_workflow_request.rb +1 -0
- data/lib/retab/workflows/update_workflow_request.rb +3 -1
- data/lib/retab/workflows/workflow.rb +3 -4
- data/lib/retab/workflows/workflow_published.rb +3 -1
- data/lib/retab/workflows.rb +76 -55
- data/lib/retab.rb +6 -6
- data/rbi/retab/classifications.rbi +1 -1
- data/rbi/retab/client.rbi +0 -51
- data/rbi/retab/create_workflow_run_request.rbi +24 -0
- data/rbi/retab/create_workflow_test_run_request.rbi +12 -0
- data/rbi/retab/edit.rbi +6 -0
- data/rbi/retab/edit_template.rbi +4 -4
- data/rbi/retab/edit_templates.rbi +1 -1
- data/rbi/retab/edit_workflow_artifact.rbi +6 -0
- data/rbi/retab/edits.rbi +4 -1
- data/rbi/retab/email_trigger.rbi +2 -2
- data/rbi/retab/experiment_run_results.rbi +5 -2
- data/rbi/retab/experiment_runs.rbi +2 -3
- data/rbi/retab/extraction_request.rbi +6 -0
- data/rbi/retab/extractions.rbi +3 -2
- data/rbi/retab/file.rbi +10 -4
- data/rbi/retab/files.rbi +2 -2
- data/rbi/retab/jobs.rbi +1 -1
- data/rbi/retab/parses.rbi +1 -1
- data/rbi/retab/partitions.rbi +1 -1
- data/rbi/retab/splits.rbi +1 -1
- data/rbi/retab/workflow.rbi +0 -6
- data/rbi/retab/workflow_artifacts.rbi +1 -1
- data/rbi/retab/workflow_block_executions.rbi +5 -2
- data/rbi/retab/workflow_blocks.rbi +4 -1
- data/rbi/retab/workflow_edges.rbi +1 -1
- data/rbi/retab/workflow_experiments.rbi +15 -2
- data/rbi/retab/workflow_review_versions.rbi +1 -1
- data/rbi/retab/workflow_reviews.rbi +4 -1
- data/rbi/retab/workflow_runs.rbi +6 -2
- data/rbi/retab/{workflow_specs.rbi → workflow_spec.rbi} +1 -1
- data/rbi/retab/workflow_steps.rbi +3 -2
- data/rbi/retab/{workflow_diagnosis_issue.rbi → workflow_test_run_block_scope.rbi} +4 -16
- data/rbi/retab/workflow_test_run_results.rbi +6 -2
- data/rbi/retab/workflow_test_run_single_scope.rbi +30 -0
- data/rbi/retab/{workflow_block_position.rbi → workflow_test_run_workflow_scope.rbi} +5 -11
- data/rbi/retab/workflow_test_runs.rbi +5 -4
- data/rbi/retab/workflow_tests.rbi +11 -2
- data/rbi/retab/workflows.rbi +28 -12
- metadata +25 -31
- data/lib/retab/types/workflow_diagnosis_issue_severity.rb +0 -14
- data/lib/retab/workflows/workflow_config_block.rb +0 -44
- data/lib/retab/workflows/workflow_config_edge.rb +0 -35
- data/lib/retab/workflows/workflow_diagnosis_response.rb +0 -29
- data/lib/retab/workflows/workflow_diagnosis_stats.rb +0 -29
- data/lib/retab/workflows/workflow_email_trigger.rb +0 -23
- data/lib/retab/workflows/workflow_graph_diagnosis_request.rb +0 -26
- data/rbi/retab/workflow_config_block.rbi +0 -72
- data/rbi/retab/workflow_config_edge.rbi +0 -54
- data/rbi/retab/workflow_diagnosis_response.rbi +0 -42
- data/rbi/retab/workflow_diagnosis_stats.rbi +0 -42
- data/rbi/retab/workflow_email_trigger.rbi +0 -30
- data/rbi/retab/workflow_graph_diagnosis_request.rbi +0 -36
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
api_key_id: :api_key_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:type,
|
|
15
15
|
:api_key_id
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@type = hash[:type]
|
|
20
22
|
@api_key_id = hash[:api_key_id]
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
waiting_for_block_ids: :waiting_for_block_ids
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:status,
|
|
15
15
|
:waiting_for_block_ids
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@status = hash[:status]
|
|
20
22
|
@waiting_for_block_ids = (hash[:waiting_for_block_ids] || [])
|
|
@@ -11,12 +11,14 @@ module Retab
|
|
|
11
11
|
cancellation_status: :cancellation_status
|
|
12
12
|
}.freeze
|
|
13
13
|
|
|
14
|
-
attr_accessor
|
|
14
|
+
attr_accessor(
|
|
15
15
|
:run,
|
|
16
16
|
:redis_available,
|
|
17
17
|
:cancellation_status
|
|
18
|
+
)
|
|
18
19
|
|
|
19
20
|
def initialize(json)
|
|
21
|
+
super()
|
|
20
22
|
hash = self.class.normalize(json)
|
|
21
23
|
@run = hash[:run] ? Retab::WorkflowRun.new(hash[:run]) : nil
|
|
22
24
|
@redis_available = hash[:redis_available]
|
|
@@ -6,10 +6,26 @@ module Retab
|
|
|
6
6
|
class CreateWorkflowRunRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
|
+
workflow_id: :workflow_id,
|
|
10
|
+
documents: :documents,
|
|
11
|
+
json_inputs: :json_inputs,
|
|
12
|
+
version: :version
|
|
9
13
|
}.freeze
|
|
10
14
|
|
|
15
|
+
attr_accessor(
|
|
16
|
+
:workflow_id,
|
|
17
|
+
:documents,
|
|
18
|
+
:json_inputs,
|
|
19
|
+
:version
|
|
20
|
+
)
|
|
21
|
+
|
|
11
22
|
def initialize(json)
|
|
23
|
+
super()
|
|
12
24
|
hash = self.class.normalize(json)
|
|
25
|
+
@workflow_id = hash[:workflow_id]
|
|
26
|
+
@documents = hash[:documents] || {}
|
|
27
|
+
@json_inputs = hash[:json_inputs] || {}
|
|
28
|
+
@version = hash[:version]
|
|
13
29
|
end
|
|
14
30
|
end
|
|
15
31
|
end
|
|
@@ -11,12 +11,14 @@ module Retab
|
|
|
11
11
|
subject: :subject
|
|
12
12
|
}.freeze
|
|
13
13
|
|
|
14
|
-
attr_accessor
|
|
14
|
+
attr_accessor(
|
|
15
15
|
:type,
|
|
16
16
|
:sender,
|
|
17
17
|
:subject
|
|
18
|
+
)
|
|
18
19
|
|
|
19
20
|
def initialize(json)
|
|
21
|
+
super()
|
|
20
22
|
hash = self.class.normalize(json)
|
|
21
23
|
@type = hash[:type]
|
|
22
24
|
@sender = hash[:sender]
|
|
@@ -14,15 +14,17 @@ module Retab
|
|
|
14
14
|
context: :context
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
|
-
attr_accessor
|
|
17
|
+
attr_accessor(
|
|
18
18
|
:message,
|
|
19
19
|
:stack_trace,
|
|
20
20
|
:block_id,
|
|
21
21
|
:block_name,
|
|
22
22
|
:error_code,
|
|
23
23
|
:context
|
|
24
|
+
)
|
|
24
25
|
|
|
25
26
|
def initialize(json)
|
|
27
|
+
super()
|
|
26
28
|
hash = self.class.normalize(json)
|
|
27
29
|
@message = hash[:message]
|
|
28
30
|
@stack_trace = hash[:stack_trace]
|
|
@@ -14,15 +14,17 @@ module Retab
|
|
|
14
14
|
failing_step_id: :failing_step_id
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
|
-
attr_accessor
|
|
17
|
+
attr_accessor(
|
|
18
18
|
:status,
|
|
19
19
|
:message,
|
|
20
20
|
:stage,
|
|
21
21
|
:category,
|
|
22
22
|
:details,
|
|
23
23
|
:failing_step_id
|
|
24
|
+
)
|
|
24
25
|
|
|
25
26
|
def initialize(json)
|
|
27
|
+
super()
|
|
26
28
|
hash = self.class.normalize(json)
|
|
27
29
|
@status = hash[:status]
|
|
28
30
|
@message = hash[:message]
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
parent_run_id: :parent_run_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:type,
|
|
15
15
|
:parent_run_id
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@type = hash[:type]
|
|
20
22
|
@parent_run_id = hash[:parent_run_id]
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
json_data: :json_data
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:documents,
|
|
15
15
|
:json_data
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@documents = hash[:documents] || {}
|
|
20
22
|
@json_data = hash[:json_data] || {}
|
|
@@ -14,15 +14,17 @@ module Retab
|
|
|
14
14
|
duration_ms: :duration_ms
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
|
-
attr_accessor
|
|
17
|
+
attr_accessor(
|
|
18
18
|
:created_at,
|
|
19
19
|
:started_at,
|
|
20
20
|
:completed_at,
|
|
21
21
|
:review_waiting_started_at,
|
|
22
22
|
:accumulated_review_waiting_ms,
|
|
23
23
|
:duration_ms
|
|
24
|
+
)
|
|
24
25
|
|
|
25
26
|
def initialize(json)
|
|
27
|
+
super()
|
|
26
28
|
hash = self.class.normalize(json)
|
|
27
29
|
@created_at = hash[:created_at]
|
|
28
30
|
@started_at = hash[:started_at]
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
schedule_id: :schedule_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:type,
|
|
15
15
|
:schedule_id
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@type = hash[:type]
|
|
20
22
|
@schedule_id = hash[:schedule_id]
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
webhook_id: :webhook_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:type,
|
|
15
15
|
:webhook_id
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@type = hash[:type]
|
|
20
22
|
@webhook_id = hash[:webhook_id]
|
|
@@ -22,7 +22,7 @@ module Retab
|
|
|
22
22
|
quote: :quote
|
|
23
23
|
}.freeze
|
|
24
24
|
|
|
25
|
-
attr_accessor
|
|
25
|
+
attr_accessor(
|
|
26
26
|
:workflow_id,
|
|
27
27
|
:block_id,
|
|
28
28
|
:export_source,
|
|
@@ -37,8 +37,10 @@ module Retab
|
|
|
37
37
|
:delimiter,
|
|
38
38
|
:line_delimiter,
|
|
39
39
|
:quote
|
|
40
|
+
)
|
|
40
41
|
|
|
41
42
|
def initialize(json)
|
|
43
|
+
super()
|
|
42
44
|
hash = self.class.normalize(json)
|
|
43
45
|
@workflow_id = hash[:workflow_id]
|
|
44
46
|
@block_id = hash[:block_id]
|
|
@@ -11,12 +11,14 @@ module Retab
|
|
|
11
11
|
columns: :columns
|
|
12
12
|
}.freeze
|
|
13
13
|
|
|
14
|
-
attr_accessor
|
|
14
|
+
attr_accessor(
|
|
15
15
|
:csv_data,
|
|
16
16
|
:rows,
|
|
17
17
|
:columns
|
|
18
|
+
)
|
|
18
19
|
|
|
19
20
|
def initialize(json)
|
|
21
|
+
super()
|
|
20
22
|
hash = self.class.normalize(json)
|
|
21
23
|
@csv_data = hash[:csv_data]
|
|
22
24
|
@rows = hash[:rows]
|
|
@@ -14,20 +14,56 @@ module Retab
|
|
|
14
14
|
inputs: :inputs
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
|
-
attr_accessor
|
|
17
|
+
attr_accessor(
|
|
18
18
|
:id,
|
|
19
19
|
:workflow,
|
|
20
20
|
:trigger,
|
|
21
21
|
:lifecycle,
|
|
22
22
|
:timing,
|
|
23
23
|
:inputs
|
|
24
|
+
)
|
|
24
25
|
|
|
25
26
|
def initialize(json)
|
|
27
|
+
super()
|
|
26
28
|
hash = self.class.normalize(json)
|
|
27
29
|
@id = hash[:id]
|
|
28
30
|
@workflow = hash[:workflow] ? Retab::WorkflowSnapshotRef.new(hash[:workflow]) : nil
|
|
29
|
-
@trigger = hash[:trigger] ? (
|
|
30
|
-
|
|
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
|
|
49
|
+
@lifecycle = hash[:lifecycle] ? (
|
|
50
|
+
case hash[:lifecycle][:status]
|
|
51
|
+
when "awaiting_review"
|
|
52
|
+
Retab::AwaitingReviewRun.new(hash[:lifecycle])
|
|
53
|
+
when "cancelled"
|
|
54
|
+
Retab::CancelledTerminal.new(hash[:lifecycle])
|
|
55
|
+
when "completed"
|
|
56
|
+
Retab::CompletedTerminal.new(hash[:lifecycle])
|
|
57
|
+
when "error"
|
|
58
|
+
Retab::ErrorTerminal.new(hash[:lifecycle])
|
|
59
|
+
when "pending"
|
|
60
|
+
Retab::PendingRun.new(hash[:lifecycle])
|
|
61
|
+
when "running"
|
|
62
|
+
Retab::RunningRun.new(hash[:lifecycle])
|
|
63
|
+
else
|
|
64
|
+
hash[:lifecycle]
|
|
65
|
+
end
|
|
66
|
+
) : nil
|
|
31
67
|
@timing = hash[:timing] ? Retab::RunTiming.new(hash[:timing]) : nil
|
|
32
68
|
@inputs = hash[:inputs] ? Retab::RunInputs.new(hash[:inputs]) : nil
|
|
33
69
|
end
|
|
@@ -12,13 +12,15 @@ module Retab
|
|
|
12
12
|
requested_version: :requested_version
|
|
13
13
|
}.freeze
|
|
14
14
|
|
|
15
|
-
attr_accessor
|
|
15
|
+
attr_accessor(
|
|
16
16
|
:workflow_id,
|
|
17
17
|
:version_id,
|
|
18
18
|
:name_at_run_time,
|
|
19
19
|
:requested_version
|
|
20
|
+
)
|
|
20
21
|
|
|
21
22
|
def initialize(json)
|
|
23
|
+
super()
|
|
22
24
|
hash = self.class.normalize(json)
|
|
23
25
|
@workflow_id = hash[:workflow_id]
|
|
24
26
|
@version_id = hash[:version_id]
|
data/lib/retab/workflow_runs.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
|
-
require
|
|
5
|
+
require "json"
|
|
6
6
|
|
|
7
7
|
module Retab
|
|
8
8
|
class WorkflowRuns
|
|
@@ -28,7 +28,7 @@ module Retab
|
|
|
28
28
|
# @param order [Retab::Types::WorkflowRunsOrder, nil]
|
|
29
29
|
# @param sort_by [String, nil]
|
|
30
30
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
31
|
-
# @return [Retab::
|
|
31
|
+
# @return [Retab::PaginatedList<Retab::WorkflowRun>]
|
|
32
32
|
def list(
|
|
33
33
|
workflow_id: nil,
|
|
34
34
|
status: nil,
|
|
@@ -44,36 +44,36 @@ module Retab
|
|
|
44
44
|
before: nil,
|
|
45
45
|
after: nil,
|
|
46
46
|
limit: 20,
|
|
47
|
-
order:
|
|
48
|
-
sort_by:
|
|
47
|
+
order: "desc",
|
|
48
|
+
sort_by: "timing.created_at",
|
|
49
49
|
request_options: {}
|
|
50
50
|
)
|
|
51
51
|
params = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
"workflow_id" => workflow_id,
|
|
53
|
+
"status" => status,
|
|
54
|
+
"statuses" => statuses,
|
|
55
|
+
"exclude_status" => exclude_status,
|
|
56
|
+
"trigger_type" => trigger_type,
|
|
57
|
+
"trigger_types" => trigger_types,
|
|
58
|
+
"from_date" => from_date,
|
|
59
|
+
"to_date" => to_date,
|
|
60
|
+
"min_duration_ms" => min_duration_ms,
|
|
61
|
+
"max_duration_ms" => max_duration_ms,
|
|
62
|
+
"search" => search,
|
|
63
|
+
"before" => before,
|
|
64
|
+
"after" => after,
|
|
65
|
+
"limit" => limit,
|
|
66
|
+
"order" => order,
|
|
67
|
+
"sort_by" => sort_by
|
|
68
68
|
}.compact
|
|
69
69
|
response = @client.request(
|
|
70
70
|
method: :get,
|
|
71
|
-
path:
|
|
71
|
+
path: "/v1/workflows/runs",
|
|
72
72
|
auth: true,
|
|
73
73
|
params: params,
|
|
74
74
|
request_options: request_options
|
|
75
75
|
)
|
|
76
|
-
fetch_next = ->(cursor) {
|
|
76
|
+
fetch_next = -> (cursor) {
|
|
77
77
|
list(
|
|
78
78
|
workflow_id: workflow_id,
|
|
79
79
|
status: status,
|
|
@@ -94,26 +94,64 @@ module Retab
|
|
|
94
94
|
request_options: request_options
|
|
95
95
|
)
|
|
96
96
|
}
|
|
97
|
-
Retab::
|
|
97
|
+
Retab::PaginatedList.from_response(
|
|
98
98
|
response,
|
|
99
99
|
model: Retab::WorkflowRun,
|
|
100
|
-
filters: {
|
|
100
|
+
filters: {
|
|
101
|
+
workflow_id: workflow_id,
|
|
102
|
+
status: status,
|
|
103
|
+
statuses: statuses,
|
|
104
|
+
exclude_status: exclude_status,
|
|
105
|
+
trigger_type: trigger_type,
|
|
106
|
+
trigger_types: trigger_types,
|
|
107
|
+
from_date: from_date,
|
|
108
|
+
to_date: to_date,
|
|
109
|
+
min_duration_ms: min_duration_ms,
|
|
110
|
+
max_duration_ms: max_duration_ms,
|
|
111
|
+
search: search,
|
|
112
|
+
before: before,
|
|
113
|
+
limit: limit,
|
|
114
|
+
order: order,
|
|
115
|
+
sort_by: sort_by
|
|
116
|
+
},
|
|
101
117
|
fetch_next: fetch_next
|
|
102
118
|
)
|
|
103
119
|
end
|
|
104
120
|
|
|
105
121
|
# Create Workflow Run Route
|
|
122
|
+
# @param workflow_id [String] Workflow id for the fresh run.
|
|
123
|
+
# @param documents [Hash{String => Retab::MimeData, Retab::FileRef, Pathname, IO, String, Hash}, nil] Mapping of start_document block IDs to their input documents.
|
|
124
|
+
# @param json_inputs [Hash{String => Object}, nil] Mapping of start-json block IDs to their input JSON data.
|
|
125
|
+
# @param version [String, nil] Workflow version to run: 'production', 'draft', or a pinned version id like 'ver_...'. Only valid for fresh-run creation.
|
|
106
126
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
107
127
|
# @return [Retab::WorkflowRun]
|
|
108
|
-
def create(
|
|
128
|
+
def create(
|
|
129
|
+
workflow_id:,
|
|
130
|
+
documents: nil,
|
|
131
|
+
json_inputs: nil,
|
|
132
|
+
version: nil,
|
|
133
|
+
request_options: {}
|
|
134
|
+
)
|
|
135
|
+
documents = Retab::MimeData.coerce_document_map(documents) unless documents.nil?
|
|
136
|
+
body = {
|
|
137
|
+
"workflow_id" => workflow_id,
|
|
138
|
+
"documents" => documents,
|
|
139
|
+
"json_inputs" => json_inputs,
|
|
140
|
+
"version" => version
|
|
141
|
+
}.compact
|
|
109
142
|
response = @client.request(
|
|
110
143
|
method: :post,
|
|
111
|
-
path:
|
|
144
|
+
path: "/v1/workflows/runs",
|
|
112
145
|
auth: true,
|
|
146
|
+
body: body,
|
|
113
147
|
request_options: request_options
|
|
114
148
|
)
|
|
115
149
|
result = Retab::WorkflowRun.new(response.body)
|
|
116
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
150
|
+
result.last_response = Retab::Types::ApiResponse.new(
|
|
151
|
+
http_status: response.code.to_i,
|
|
152
|
+
http_headers: response.each_header.to_h,
|
|
153
|
+
request_id: response["x-request-id"]
|
|
154
|
+
)
|
|
117
155
|
result
|
|
118
156
|
end
|
|
119
157
|
|
|
@@ -152,30 +190,34 @@ module Retab
|
|
|
152
190
|
request_options: {}
|
|
153
191
|
)
|
|
154
192
|
body = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
193
|
+
"workflow_id" => workflow_id,
|
|
194
|
+
"block_id" => block_id,
|
|
195
|
+
"export_source" => export_source,
|
|
196
|
+
"selected_run_ids" => selected_run_ids,
|
|
197
|
+
"selected_doc_types" => selected_doc_types,
|
|
198
|
+
"status" => status,
|
|
199
|
+
"exclude_status" => exclude_status,
|
|
200
|
+
"from_date" => from_date,
|
|
201
|
+
"to_date" => to_date,
|
|
202
|
+
"trigger_types" => trigger_types,
|
|
203
|
+
"preferred_columns" => preferred_columns,
|
|
204
|
+
"delimiter" => delimiter,
|
|
205
|
+
"line_delimiter" => line_delimiter,
|
|
206
|
+
"quote" => quote
|
|
169
207
|
}.compact
|
|
170
208
|
response = @client.request(
|
|
171
209
|
method: :post,
|
|
172
|
-
path:
|
|
210
|
+
path: "/v1/workflows/runs/export",
|
|
173
211
|
auth: true,
|
|
174
212
|
body: body,
|
|
175
213
|
request_options: request_options
|
|
176
214
|
)
|
|
177
215
|
result = Retab::WorkflowExportPayloadResponse.new(response.body)
|
|
178
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
216
|
+
result.last_response = Retab::Types::ApiResponse.new(
|
|
217
|
+
http_status: response.code.to_i,
|
|
218
|
+
http_headers: response.each_header.to_h,
|
|
219
|
+
request_id: response["x-request-id"]
|
|
220
|
+
)
|
|
179
221
|
result
|
|
180
222
|
end
|
|
181
223
|
|
|
@@ -194,7 +236,11 @@ module Retab
|
|
|
194
236
|
request_options: request_options
|
|
195
237
|
)
|
|
196
238
|
result = Retab::WorkflowRun.new(response.body)
|
|
197
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
239
|
+
result.last_response = Retab::Types::ApiResponse.new(
|
|
240
|
+
http_status: response.code.to_i,
|
|
241
|
+
http_headers: response.each_header.to_h,
|
|
242
|
+
request_id: response["x-request-id"]
|
|
243
|
+
)
|
|
198
244
|
result
|
|
199
245
|
end
|
|
200
246
|
|
|
@@ -206,7 +252,7 @@ module Retab
|
|
|
206
252
|
run_id:,
|
|
207
253
|
request_options: {}
|
|
208
254
|
)
|
|
209
|
-
|
|
255
|
+
@client.request(
|
|
210
256
|
method: :delete,
|
|
211
257
|
path: "/v1/workflows/runs/#{Retab::Util.encode_path(run_id)}",
|
|
212
258
|
auth: true,
|
|
@@ -226,7 +272,7 @@ module Retab
|
|
|
226
272
|
request_options: {}
|
|
227
273
|
)
|
|
228
274
|
body = {
|
|
229
|
-
|
|
275
|
+
"command_id" => command_id
|
|
230
276
|
}.compact
|
|
231
277
|
response = @client.request(
|
|
232
278
|
method: :post,
|
|
@@ -236,7 +282,11 @@ module Retab
|
|
|
236
282
|
request_options: request_options
|
|
237
283
|
)
|
|
238
284
|
result = Retab::CancelWorkflowResponse.new(response.body)
|
|
239
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
285
|
+
result.last_response = Retab::Types::ApiResponse.new(
|
|
286
|
+
http_status: response.code.to_i,
|
|
287
|
+
http_headers: response.each_header.to_h,
|
|
288
|
+
request_id: response["x-request-id"]
|
|
289
|
+
)
|
|
240
290
|
result
|
|
241
291
|
end
|
|
242
292
|
end
|
|
@@ -18,7 +18,7 @@ module Retab
|
|
|
18
18
|
rendered_plan: :rendered_plan
|
|
19
19
|
}.freeze
|
|
20
20
|
|
|
21
|
-
attr_accessor
|
|
21
|
+
attr_accessor(
|
|
22
22
|
:workflow_id,
|
|
23
23
|
:action,
|
|
24
24
|
:created,
|
|
@@ -29,8 +29,10 @@ module Retab
|
|
|
29
29
|
:summary,
|
|
30
30
|
:resource_changes,
|
|
31
31
|
:rendered_plan
|
|
32
|
+
)
|
|
32
33
|
|
|
33
34
|
def initialize(json)
|
|
35
|
+
super()
|
|
34
36
|
hash = self.class.normalize(json)
|
|
35
37
|
@workflow_id = hash[:workflow_id]
|
|
36
38
|
@action = hash[:action]
|
|
@@ -40,7 +42,9 @@ module Retab
|
|
|
40
42
|
@diagnostics = hash[:diagnostics] || {}
|
|
41
43
|
@format_version = hash[:format_version]
|
|
42
44
|
@summary = hash[:summary] ? Retab::DeclarativePlanSummary.new(hash[:summary]) : nil
|
|
43
|
-
@resource_changes = (hash[:resource_changes] || []).map { |item|
|
|
45
|
+
@resource_changes = (hash[:resource_changes] || []).map { |item|
|
|
46
|
+
item ? Retab::DeclarativePlanResourceChange.new(item) : nil
|
|
47
|
+
}
|
|
44
48
|
@rendered_plan = hash[:rendered_plan]
|
|
45
49
|
end
|
|
46
50
|
end
|
|
@@ -10,11 +10,13 @@ module Retab
|
|
|
10
10
|
yaml_definition: :yaml_definition
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
14
|
:workflow_id,
|
|
15
15
|
:yaml_definition
|
|
16
|
+
)
|
|
16
17
|
|
|
17
18
|
def initialize(json)
|
|
19
|
+
super()
|
|
18
20
|
hash = self.class.normalize(json)
|
|
19
21
|
@workflow_id = hash[:workflow_id]
|
|
20
22
|
@yaml_definition = hash[:yaml_definition]
|