retab 0.1.4 → 0.1.6
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/classification.rb +6 -0
- data/lib/retab/classifications/classification_request.rb +5 -2
- data/lib/retab/{jobs/job_error.rb → classifications/primitive_error.rb} +1 -1
- data/lib/retab/classifications.rb +38 -1
- data/lib/retab/client.rb +8 -4
- data/lib/retab/edits/edit.rb +6 -0
- data/lib/retab/edits/edit_request.rb +5 -2
- data/lib/retab/edits.rb +38 -1
- data/lib/retab/extractions/extraction.rb +6 -0
- data/lib/retab/extractions/extraction_request.rb +3 -0
- data/lib/retab/extractions.rb +37 -0
- data/lib/retab/files/create_file_blueprint_request.rb +31 -0
- data/lib/retab/files/file_blueprint.rb +52 -0
- data/lib/retab/files.rb +88 -0
- data/lib/retab/parses/parse.rb +6 -0
- data/lib/retab/parses/parse_request.rb +5 -2
- data/lib/retab/parses.rb +33 -1
- data/lib/retab/partitions/partition.rb +6 -0
- data/lib/retab/partitions/partition_request.rb +5 -2
- data/lib/retab/partitions.rb +38 -1
- data/lib/retab/schemas/generate_schema_request.rb +3 -3
- data/lib/retab/schemas/{partial_schema.rb → schema_generation.rb} +12 -3
- data/lib/retab/schemas.rb +5 -5
- data/lib/retab/{jobs/job_response.rb → secrets/create_secret_request.rb} +7 -7
- data/lib/retab/secrets/secret.rb +34 -0
- data/lib/retab/secrets/secret_list_response.rb +20 -0
- data/lib/retab/secrets/secret_response.rb +20 -0
- data/lib/retab/secrets/secret_value.rb +28 -0
- data/lib/retab/secrets/secret_value_response.rb +20 -0
- data/lib/retab/secrets/set_secret_request.rb +20 -0
- data/lib/retab/secrets.rb +154 -0
- data/lib/retab/splits/split.rb +6 -0
- data/lib/retab/splits/split_request.rb +5 -2
- data/lib/retab/splits.rb +38 -1
- data/lib/retab/tables/body_create_table_v_1_tables_post.rb +28 -0
- data/lib/retab/tables/body_replace_table_v_1_tables_table_id_put.rb +25 -0
- data/lib/retab/tables/query_workflow_table_request.rb +72 -0
- data/lib/retab/{jobs/create_job_request.rb → tables/update_workflow_table_request.rb} +4 -7
- data/lib/retab/tables/workflow_table.rb +55 -0
- data/lib/retab/tables/workflow_table_aggregation_request.rb +28 -0
- data/lib/retab/tables/workflow_table_column.rb +34 -0
- data/lib/retab/tables/workflow_table_distinct_request.rb +20 -0
- data/lib/retab/tables/workflow_table_explain.rb +54 -0
- data/lib/retab/tables/workflow_table_filter_rule.rb +28 -0
- data/lib/retab/tables/workflow_table_list_response.rb +20 -0
- data/lib/retab/tables/workflow_table_profile_column.rb +49 -0
- data/lib/retab/tables/workflow_table_profile_response.rb +28 -0
- data/lib/retab/tables/workflow_table_response.rb +20 -0
- data/lib/retab/tables/workflow_table_row.rb +28 -0
- data/lib/retab/tables/workflow_table_rows_response.rb +52 -0
- data/lib/retab/tables/workflow_table_sample_request.rb +20 -0
- data/lib/retab/tables/workflow_table_schema_response.rb +25 -0
- data/lib/retab/tables/workflow_table_search_request.rb +25 -0
- data/lib/retab/tables/workflow_table_sort_rule.rb +25 -0
- data/lib/retab/{jobs/job_warning.rb → tables/workflow_table_tail_request.rb} +1 -1
- data/lib/retab/tables/workflow_table_validation_column_rule.rb +28 -0
- data/lib/retab/tables/workflow_table_validation_diagnostic.rb +31 -0
- data/lib/retab/tables/workflow_table_validation_request.rb +28 -0
- data/lib/retab/tables/workflow_table_validation_response.rb +30 -0
- data/lib/retab/tables.rb +356 -0
- data/lib/retab/types/{job_status.rb → classification_status.rb} +3 -4
- data/lib/retab/types/classification_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/{supported_endpoint.rb → classifications_status.rb} +1 -1
- data/lib/retab/types/create_file_blueprint_request_mode.rb +13 -0
- data/lib/retab/types/declarative_plan_resource_change_type.rb +0 -2
- data/lib/retab/types/{jobs_order.rb → edit_status.rb} +1 -1
- data/lib/retab/types/edit_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/{jobs_status.rb → edits_status.rb} +1 -1
- data/lib/retab/types/{jobs_endpoint.rb → extraction_status.rb} +1 -1
- data/lib/retab/types/extraction_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/extractions_status.rb +9 -0
- data/lib/retab/types/file_blueprint_mode.rb +9 -0
- data/lib/retab/types/file_blueprint_status.rb +9 -0
- data/lib/retab/types/parse_status.rb +9 -0
- data/lib/retab/types/parse_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/partition_status.rb +9 -0
- data/lib/retab/types/partition_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/partitions_status.rb +9 -0
- data/lib/retab/types/schema_generation_status.rb +9 -0
- data/lib/retab/types/split_status.rb +9 -0
- data/lib/retab/types/split_workflow_artifact_status.rb +9 -0
- data/lib/retab/types/splits_status.rb +9 -0
- data/lib/retab/types/validate_workflow_block_config_request_config_mode.rb +9 -0
- data/lib/retab/types/workflow_block_type.rb +0 -2
- data/lib/retab/types/workflow_table_aggregation_function.rb +17 -0
- data/lib/retab/types/workflow_table_filter_operator.rb +46 -0
- data/lib/retab/types/workflow_table_sort_direction.rb +9 -0
- data/lib/retab/types/workflow_table_validation_severity.rb +13 -0
- data/lib/retab/workflow_artifacts/classification_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_artifacts/edit_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_artifacts/partition_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_artifacts/split_workflow_artifact.rb +6 -0
- data/lib/retab/workflow_blocks/validate_workflow_block_config_request.rb +25 -0
- data/lib/retab/workflow_blocks/validate_workflow_block_config_response.rb +34 -0
- data/lib/retab/workflow_blocks/workflow_block.rb +6 -0
- data/lib/retab/workflow_blocks.rb +38 -0
- data/lib/retab/workflow_steps.rb +2 -2
- data/lib/retab.rb +2 -1
- data/rbi/retab/body_create_table_v_1_tables_post.rbi +36 -0
- data/rbi/retab/body_replace_table_v_1_tables_table_id_put.rbi +30 -0
- data/rbi/retab/classification.rbi +14 -2
- data/rbi/retab/classification_request.rbi +6 -0
- data/rbi/retab/classification_workflow_artifact.rbi +14 -2
- data/rbi/retab/classifications.rbi +14 -3
- data/rbi/retab/client.rbi +6 -3
- data/rbi/retab/create_file_blueprint_request.rbi +42 -0
- data/rbi/retab/create_secret_request.rbi +30 -0
- data/rbi/retab/edit.rbi +14 -2
- data/rbi/retab/edit_request.rbi +6 -0
- data/rbi/retab/edit_workflow_artifact.rbi +14 -2
- data/rbi/retab/edits.rbi +14 -3
- data/rbi/retab/extraction.rbi +12 -0
- data/rbi/retab/extraction_request.rbi +6 -0
- data/rbi/retab/extraction_workflow_artifact.rbi +12 -0
- data/rbi/retab/extractions.rbi +14 -3
- data/rbi/retab/{job.rbi → file_blueprint.rbi} +29 -65
- data/rbi/retab/files.rbi +28 -0
- data/rbi/retab/generate_schema_request.rbi +2 -2
- data/rbi/retab/parse.rbi +12 -0
- data/rbi/retab/parse_request.rbi +6 -0
- data/rbi/retab/parse_workflow_artifact.rbi +12 -0
- data/rbi/retab/parses.rbi +12 -2
- data/rbi/retab/partition.rbi +12 -0
- data/rbi/retab/partition_request.rbi +6 -0
- data/rbi/retab/partition_workflow_artifact.rbi +12 -0
- data/rbi/retab/partitions.rbi +14 -3
- data/rbi/retab/{job_error.rbi → primitive_error.rbi} +1 -1
- data/rbi/retab/query_workflow_table_request.rbi +120 -0
- data/rbi/retab/{partial_schema.rbi → schema_generation.rbi} +19 -1
- data/rbi/retab/schemas.rbi +3 -3
- data/rbi/retab/secret.rbi +48 -0
- data/rbi/retab/secret_list_response.rbi +24 -0
- data/rbi/retab/secret_response.rbi +24 -0
- data/rbi/retab/secret_value.rbi +36 -0
- data/rbi/retab/secret_value_response.rbi +24 -0
- data/rbi/retab/secrets.rbi +62 -0
- data/rbi/retab/set_secret_request.rbi +24 -0
- data/rbi/retab/split.rbi +14 -2
- data/rbi/retab/split_request.rbi +6 -0
- data/rbi/retab/split_workflow_artifact.rbi +14 -2
- data/rbi/retab/splits.rbi +14 -3
- data/rbi/retab/tables.rbi +127 -0
- data/rbi/retab/update_workflow_table_request.rbi +30 -0
- data/rbi/retab/{job_response.rbi → validate_workflow_block_config_request.rbi} +9 -9
- data/rbi/retab/validate_workflow_block_config_response.rbi +48 -0
- data/rbi/retab/workflow_block.rbi +12 -0
- data/rbi/retab/workflow_blocks.rbi +11 -0
- data/rbi/retab/workflow_table.rbi +90 -0
- data/rbi/retab/workflow_table_aggregation_request.rbi +36 -0
- data/rbi/retab/workflow_table_column.rbi +48 -0
- data/rbi/retab/workflow_table_distinct_request.rbi +24 -0
- data/rbi/retab/workflow_table_explain.rbi +84 -0
- data/rbi/retab/workflow_table_filter_rule.rbi +36 -0
- data/rbi/retab/workflow_table_list_response.rbi +24 -0
- data/rbi/retab/workflow_table_profile_column.rbi +78 -0
- data/rbi/retab/workflow_table_profile_response.rbi +36 -0
- data/rbi/retab/workflow_table_response.rbi +24 -0
- data/rbi/retab/{job_warning.rbi → workflow_table_row.rbi} +11 -11
- data/rbi/retab/workflow_table_rows_response.rbi +84 -0
- data/rbi/retab/workflow_table_sample_request.rbi +24 -0
- data/rbi/retab/workflow_table_schema_response.rbi +30 -0
- data/rbi/retab/workflow_table_search_request.rbi +30 -0
- data/rbi/retab/workflow_table_sort_rule.rbi +30 -0
- data/rbi/retab/workflow_table_tail_request.rbi +24 -0
- data/rbi/retab/workflow_table_validation_column_rule.rbi +36 -0
- data/rbi/retab/workflow_table_validation_diagnostic.rbi +42 -0
- data/rbi/retab/workflow_table_validation_request.rbi +36 -0
- data/rbi/retab/workflow_table_validation_response.rbi +36 -0
- metadata +107 -22
- data/lib/retab/jobs/job.rb +0 -70
- data/lib/retab/jobs.rb +0 -252
- data/lib/retab/types/create_job_request_endpoint.rb +0 -34
- data/lib/retab/types/jobs_source.rb +0 -14
- data/rbi/retab/create_job_request.rbi +0 -36
- data/rbi/retab/jobs.rbi +0 -76
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
module Types
|
|
7
|
+
class WorkflowTableFilterOperator
|
|
8
|
+
EQ = "eq"
|
|
9
|
+
NE = "ne"
|
|
10
|
+
GT = "gt"
|
|
11
|
+
GTE = "gte"
|
|
12
|
+
LT = "lt"
|
|
13
|
+
LTE = "lte"
|
|
14
|
+
CONTAINS = "contains"
|
|
15
|
+
NOT_CONTAINS = "not_contains"
|
|
16
|
+
STARTS_WITH = "starts_with"
|
|
17
|
+
ENDS_WITH = "ends_with"
|
|
18
|
+
IN = "in"
|
|
19
|
+
NOT_IN = "not_in"
|
|
20
|
+
BETWEEN = "between"
|
|
21
|
+
IS_EMPTY = "is_empty"
|
|
22
|
+
IS_NOT_EMPTY = "is_not_empty"
|
|
23
|
+
IS_NULL = "is_null"
|
|
24
|
+
IS_NOT_NULL = "is_not_null"
|
|
25
|
+
ALL = [
|
|
26
|
+
EQ,
|
|
27
|
+
NE,
|
|
28
|
+
GT,
|
|
29
|
+
GTE,
|
|
30
|
+
LT,
|
|
31
|
+
LTE,
|
|
32
|
+
CONTAINS,
|
|
33
|
+
NOT_CONTAINS,
|
|
34
|
+
STARTS_WITH,
|
|
35
|
+
ENDS_WITH,
|
|
36
|
+
IN,
|
|
37
|
+
NOT_IN,
|
|
38
|
+
BETWEEN,
|
|
39
|
+
IS_EMPTY,
|
|
40
|
+
IS_NOT_EMPTY,
|
|
41
|
+
IS_NULL,
|
|
42
|
+
IS_NOT_NULL
|
|
43
|
+
].freeze
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -13,6 +13,8 @@ module Retab
|
|
|
13
13
|
n_consensus: :n_consensus,
|
|
14
14
|
instructions: :instructions,
|
|
15
15
|
output: :output,
|
|
16
|
+
status: :status,
|
|
17
|
+
error: :error,
|
|
16
18
|
consensus: :consensus,
|
|
17
19
|
usage: :usage,
|
|
18
20
|
created_at: :created_at,
|
|
@@ -27,6 +29,8 @@ module Retab
|
|
|
27
29
|
:n_consensus,
|
|
28
30
|
:instructions,
|
|
29
31
|
:output,
|
|
32
|
+
:status,
|
|
33
|
+
:error,
|
|
30
34
|
:consensus,
|
|
31
35
|
:usage,
|
|
32
36
|
:created_at,
|
|
@@ -43,6 +47,8 @@ module Retab
|
|
|
43
47
|
@n_consensus = hash[:n_consensus]
|
|
44
48
|
@instructions = hash[:instructions]
|
|
45
49
|
@output = hash[:output] ? Retab::ClassificationDecision.new(hash[:output]) : nil
|
|
50
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
51
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
46
52
|
@consensus = hash[:consensus] ? Retab::ClassificationConsensus.new(hash[:consensus]) : nil
|
|
47
53
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
48
54
|
@created_at = hash[:created_at]
|
|
@@ -13,6 +13,8 @@ module Retab
|
|
|
13
13
|
config: :config,
|
|
14
14
|
template_id: :template_id,
|
|
15
15
|
output: :output,
|
|
16
|
+
status: :status,
|
|
17
|
+
error: :error,
|
|
16
18
|
filled_document_ref: :filled_document_ref,
|
|
17
19
|
usage: :usage,
|
|
18
20
|
created_at: :created_at,
|
|
@@ -27,6 +29,8 @@ module Retab
|
|
|
27
29
|
:config,
|
|
28
30
|
:template_id,
|
|
29
31
|
:output,
|
|
32
|
+
:status,
|
|
33
|
+
:error,
|
|
30
34
|
:filled_document_ref,
|
|
31
35
|
:usage,
|
|
32
36
|
:created_at,
|
|
@@ -43,6 +47,8 @@ module Retab
|
|
|
43
47
|
@config = hash[:config] ? Retab::EditConfig.new(hash[:config]) : nil
|
|
44
48
|
@template_id = hash[:template_id]
|
|
45
49
|
@output = hash[:output] ? Retab::EditResult.new(hash[:output]) : nil
|
|
50
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
51
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
46
52
|
@filled_document_ref = hash[:filled_document_ref] ? Retab::FileRef.new(hash[:filled_document_ref]) : nil
|
|
47
53
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
48
54
|
@created_at = hash[:created_at]
|
|
@@ -14,6 +14,8 @@ module Retab
|
|
|
14
14
|
image_resolution_dpi: :image_resolution_dpi,
|
|
15
15
|
instructions: :instructions,
|
|
16
16
|
output: :output,
|
|
17
|
+
status: :status,
|
|
18
|
+
error: :error,
|
|
17
19
|
consensus: :consensus,
|
|
18
20
|
metadata: :metadata,
|
|
19
21
|
usage: :usage,
|
|
@@ -30,6 +32,8 @@ module Retab
|
|
|
30
32
|
:image_resolution_dpi,
|
|
31
33
|
:instructions,
|
|
32
34
|
:output,
|
|
35
|
+
:status,
|
|
36
|
+
:error,
|
|
33
37
|
:consensus,
|
|
34
38
|
:metadata,
|
|
35
39
|
:usage,
|
|
@@ -48,6 +52,8 @@ module Retab
|
|
|
48
52
|
@image_resolution_dpi = hash[:image_resolution_dpi]
|
|
49
53
|
@instructions = hash[:instructions]
|
|
50
54
|
@output = hash[:output] || {}
|
|
55
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
56
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
51
57
|
@consensus = hash[:consensus] ? Retab::ExtractionConsensus.new(hash[:consensus]) : nil
|
|
52
58
|
@metadata = hash[:metadata] || {}
|
|
53
59
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
@@ -13,6 +13,8 @@ module Retab
|
|
|
13
13
|
image_resolution_dpi: :image_resolution_dpi,
|
|
14
14
|
instructions: :instructions,
|
|
15
15
|
output: :output,
|
|
16
|
+
status: :status,
|
|
17
|
+
error: :error,
|
|
16
18
|
usage: :usage,
|
|
17
19
|
created_at: :created_at,
|
|
18
20
|
operation: :operation
|
|
@@ -26,6 +28,8 @@ module Retab
|
|
|
26
28
|
:image_resolution_dpi,
|
|
27
29
|
:instructions,
|
|
28
30
|
:output,
|
|
31
|
+
:status,
|
|
32
|
+
:error,
|
|
29
33
|
:usage,
|
|
30
34
|
:created_at,
|
|
31
35
|
:operation
|
|
@@ -41,6 +45,8 @@ module Retab
|
|
|
41
45
|
@image_resolution_dpi = hash[:image_resolution_dpi]
|
|
42
46
|
@instructions = hash[:instructions]
|
|
43
47
|
@output = hash[:output] ? Retab::ParseOutput.new(hash[:output]) : nil
|
|
48
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
49
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
44
50
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
45
51
|
@created_at = hash[:created_at]
|
|
46
52
|
@operation = hash[:operation].nil? ? "parse" : hash[:operation]
|
|
@@ -14,6 +14,8 @@ module Retab
|
|
|
14
14
|
n_consensus: :n_consensus,
|
|
15
15
|
allow_overlap: :allow_overlap,
|
|
16
16
|
output: :output,
|
|
17
|
+
status: :status,
|
|
18
|
+
error: :error,
|
|
17
19
|
consensus: :consensus,
|
|
18
20
|
usage: :usage,
|
|
19
21
|
created_at: :created_at,
|
|
@@ -29,6 +31,8 @@ module Retab
|
|
|
29
31
|
:n_consensus,
|
|
30
32
|
:allow_overlap,
|
|
31
33
|
:output,
|
|
34
|
+
:status,
|
|
35
|
+
:error,
|
|
32
36
|
:consensus,
|
|
33
37
|
:usage,
|
|
34
38
|
:created_at,
|
|
@@ -46,6 +50,8 @@ module Retab
|
|
|
46
50
|
@n_consensus = hash[:n_consensus]
|
|
47
51
|
@allow_overlap = hash[:allow_overlap].nil? ? true : hash[:allow_overlap]
|
|
48
52
|
@output = (hash[:output] || []).map { |item| item ? Retab::PartitionChunk.new(item) : nil }
|
|
53
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
54
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
49
55
|
@consensus = hash[:consensus] ? Retab::PartitionConsensus.new(hash[:consensus]) : nil
|
|
50
56
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
51
57
|
@created_at = hash[:created_at]
|
|
@@ -13,6 +13,8 @@ module Retab
|
|
|
13
13
|
n_consensus: :n_consensus,
|
|
14
14
|
instructions: :instructions,
|
|
15
15
|
output: :output,
|
|
16
|
+
status: :status,
|
|
17
|
+
error: :error,
|
|
16
18
|
consensus: :consensus,
|
|
17
19
|
usage: :usage,
|
|
18
20
|
created_at: :created_at,
|
|
@@ -27,6 +29,8 @@ module Retab
|
|
|
27
29
|
:n_consensus,
|
|
28
30
|
:instructions,
|
|
29
31
|
:output,
|
|
32
|
+
:status,
|
|
33
|
+
:error,
|
|
30
34
|
:consensus,
|
|
31
35
|
:usage,
|
|
32
36
|
:created_at,
|
|
@@ -43,6 +47,8 @@ module Retab
|
|
|
43
47
|
@n_consensus = hash[:n_consensus]
|
|
44
48
|
@instructions = hash[:instructions]
|
|
45
49
|
@output = (hash[:output] || []).map { |item| item ? Retab::SplitResult.new(item) : nil }
|
|
50
|
+
@status = hash[:status].nil? ? "pending" : hash[:status]
|
|
51
|
+
@error = hash[:error] ? Retab::PrimitiveError.new(hash[:error]) : nil
|
|
46
52
|
@consensus = hash[:consensus] ? Retab::SplitConsensus.new(hash[:consensus]) : nil
|
|
47
53
|
@usage = hash[:usage] ? Retab::RetabUsage.new(hash[:usage]) : nil
|
|
48
54
|
@created_at = hash[:created_at]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class ValidateWorkflowBlockConfigRequest < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
config: :config,
|
|
10
|
+
config_mode: :config_mode
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor(
|
|
14
|
+
:config,
|
|
15
|
+
:config_mode
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
super()
|
|
20
|
+
hash = self.class.normalize(json)
|
|
21
|
+
@config = hash[:config] || {}
|
|
22
|
+
@config_mode = hash[:config_mode].nil? ? "replace" : hash[:config_mode]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class ValidateWorkflowBlockConfigResponse < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
ok: :ok,
|
|
10
|
+
workflow_id: :workflow_id,
|
|
11
|
+
block_id: :block_id,
|
|
12
|
+
block_type: :block_type,
|
|
13
|
+
config_hash: :config_hash
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor(
|
|
17
|
+
:ok,
|
|
18
|
+
:workflow_id,
|
|
19
|
+
:block_id,
|
|
20
|
+
:block_type,
|
|
21
|
+
:config_hash
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
super()
|
|
26
|
+
hash = self.class.normalize(json)
|
|
27
|
+
@ok = hash[:ok].nil? ? true : hash[:ok]
|
|
28
|
+
@workflow_id = hash[:workflow_id]
|
|
29
|
+
@block_id = hash[:block_id]
|
|
30
|
+
@block_type = hash[:block_type]
|
|
31
|
+
@config_hash = hash[:config_hash]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -16,6 +16,8 @@ module Retab
|
|
|
16
16
|
height: :height,
|
|
17
17
|
config: :config,
|
|
18
18
|
parent_id: :parent_id,
|
|
19
|
+
declarative_path: :declarative_path,
|
|
20
|
+
declarative_source_block_id: :declarative_source_block_id,
|
|
19
21
|
updated_at: :updated_at,
|
|
20
22
|
resolved_schemas: :resolved_schemas
|
|
21
23
|
}.freeze
|
|
@@ -31,6 +33,8 @@ module Retab
|
|
|
31
33
|
:height,
|
|
32
34
|
:config,
|
|
33
35
|
:parent_id,
|
|
36
|
+
:declarative_path,
|
|
37
|
+
:declarative_source_block_id,
|
|
34
38
|
:updated_at,
|
|
35
39
|
:resolved_schemas
|
|
36
40
|
)
|
|
@@ -48,6 +52,8 @@ module Retab
|
|
|
48
52
|
@height = hash[:height]
|
|
49
53
|
@config = hash[:config] || {}
|
|
50
54
|
@parent_id = hash[:parent_id]
|
|
55
|
+
@declarative_path = hash[:declarative_path]
|
|
56
|
+
@declarative_source_block_id = hash[:declarative_source_block_id]
|
|
51
57
|
@updated_at = hash[:updated_at]
|
|
52
58
|
@resolved_schemas = hash[:resolved_schemas] || {}
|
|
53
59
|
end
|
|
@@ -219,5 +219,43 @@ module Retab
|
|
|
219
219
|
)
|
|
220
220
|
nil
|
|
221
221
|
end
|
|
222
|
+
|
|
223
|
+
# Validate Block Config Dry Run
|
|
224
|
+
# @param block_id [String]
|
|
225
|
+
# @param config [Hash{String => Object}] Assembled block config to validate.
|
|
226
|
+
# @param config_mode [Retab::Types::ValidateWorkflowBlockConfigRequestConfigMode, nil] How to apply the config before validation. 'replace' validates the config as the full block config; 'merge' validates the result of merging it into the existing block config.
|
|
227
|
+
# @param workflow_id [String, nil] Workflow ID to disambiguate legacy duplicate block IDs. Omit for normal server-generated block IDs.
|
|
228
|
+
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
229
|
+
# @return [Retab::ValidateWorkflowBlockConfigResponse]
|
|
230
|
+
def create_block_validate_config(
|
|
231
|
+
block_id:,
|
|
232
|
+
config:,
|
|
233
|
+
config_mode: nil,
|
|
234
|
+
workflow_id: nil,
|
|
235
|
+
request_options: {}
|
|
236
|
+
)
|
|
237
|
+
params = {
|
|
238
|
+
"workflow_id" => workflow_id
|
|
239
|
+
}.compact
|
|
240
|
+
body = {
|
|
241
|
+
"config" => config,
|
|
242
|
+
"config_mode" => config_mode
|
|
243
|
+
}.compact
|
|
244
|
+
response = @client.request(
|
|
245
|
+
method: :post,
|
|
246
|
+
path: "/v1/workflows/blocks/#{Retab::Util.encode_path(block_id)}/validate-config",
|
|
247
|
+
auth: true,
|
|
248
|
+
params: params,
|
|
249
|
+
body: body,
|
|
250
|
+
request_options: request_options
|
|
251
|
+
)
|
|
252
|
+
result = Retab::ValidateWorkflowBlockConfigResponse.new(response.body)
|
|
253
|
+
result.last_response = Retab::Types::ApiResponse.new(
|
|
254
|
+
http_status: response.code.to_i,
|
|
255
|
+
http_headers: response.each_header.to_h,
|
|
256
|
+
request_id: response["x-request-id"]
|
|
257
|
+
)
|
|
258
|
+
result
|
|
259
|
+
end
|
|
222
260
|
end
|
|
223
261
|
end
|
data/lib/retab/workflow_steps.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Retab
|
|
|
18
18
|
# @param status [Array<String>, nil] Optional step lifecycle status filter. Repeat the query parameter for multiple values.
|
|
19
19
|
# @param before [String, nil] Step id cursor: return the page before this id (mutually exclusive with `after`).
|
|
20
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).
|
|
21
|
+
# @param limit [Integer, nil] Maximum number of steps to return per page (1-1000). Each step hydrates its handle payloads from the artifact store, so raise it deliberately for larger pages and use cursor pagination for the rest.
|
|
22
22
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
23
23
|
# @return [Retab::PaginatedList<Retab::WorkflowRunStep>]
|
|
24
24
|
def list(
|
|
@@ -29,7 +29,7 @@ module Retab
|
|
|
29
29
|
status: nil,
|
|
30
30
|
before: nil,
|
|
31
31
|
after: nil,
|
|
32
|
-
limit:
|
|
32
|
+
limit: 20,
|
|
33
33
|
request_options: {}
|
|
34
34
|
)
|
|
35
35
|
params = {
|
data/lib/retab.rb
CHANGED
|
@@ -18,12 +18,13 @@ loader.collapse("#{__dir__}/retab/experiment_run_results")
|
|
|
18
18
|
loader.collapse("#{__dir__}/retab/experiment_runs")
|
|
19
19
|
loader.collapse("#{__dir__}/retab/extractions")
|
|
20
20
|
loader.collapse("#{__dir__}/retab/files")
|
|
21
|
-
loader.collapse("#{__dir__}/retab/jobs")
|
|
22
21
|
loader.collapse("#{__dir__}/retab/parses")
|
|
23
22
|
loader.collapse("#{__dir__}/retab/partitions")
|
|
24
23
|
loader.collapse("#{__dir__}/retab/schemas")
|
|
24
|
+
loader.collapse("#{__dir__}/retab/secrets")
|
|
25
25
|
loader.collapse("#{__dir__}/retab/shared")
|
|
26
26
|
loader.collapse("#{__dir__}/retab/splits")
|
|
27
|
+
loader.collapse("#{__dir__}/retab/tables")
|
|
27
28
|
loader.collapse("#{__dir__}/retab/workflow_artifacts")
|
|
28
29
|
loader.collapse("#{__dir__}/retab/workflow_block_executions")
|
|
29
30
|
loader.collapse("#{__dir__}/retab/workflow_blocks")
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module Retab
|
|
8
|
+
class BodyCreateTableV1TablesPost
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def name; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def name=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
def file; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: String).returns(String) }
|
|
22
|
+
def file=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
def column_schema_overrides; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
28
|
+
def column_schema_overrides=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
31
|
+
def to_h; end
|
|
32
|
+
|
|
33
|
+
sig { params(args: T.untyped).returns(String) }
|
|
34
|
+
def to_json(*args); end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module Retab
|
|
8
|
+
class BodyReplaceTableV1TablesTableIdPut
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def file; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def file=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
def column_schema_overrides; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
22
|
+
def column_schema_overrides=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
25
|
+
def to_h; end
|
|
26
|
+
|
|
27
|
+
sig { params(args: T.untyped).returns(String) }
|
|
28
|
+
def to_json(*args); end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -45,12 +45,24 @@ module Retab
|
|
|
45
45
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
46
|
def instructions=(value); end
|
|
47
47
|
|
|
48
|
-
sig { returns(Retab::ClassificationDecision) }
|
|
48
|
+
sig { returns(T.nilable(Retab::ClassificationDecision)) }
|
|
49
49
|
def output; end
|
|
50
50
|
|
|
51
|
-
sig { params(value: Retab::ClassificationDecision).returns(Retab::ClassificationDecision) }
|
|
51
|
+
sig { params(value: T.nilable(Retab::ClassificationDecision)).returns(T.nilable(Retab::ClassificationDecision)) }
|
|
52
52
|
def output=(value); end
|
|
53
53
|
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
def status; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
|
+
def status=(value); end
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(Retab::PrimitiveError)) }
|
|
61
|
+
def error; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(Retab::PrimitiveError)).returns(T.nilable(Retab::PrimitiveError)) }
|
|
64
|
+
def error=(value); end
|
|
65
|
+
|
|
54
66
|
sig { returns(T.nilable(Retab::ClassificationConsensus)) }
|
|
55
67
|
def consensus; end
|
|
56
68
|
|
|
@@ -51,6 +51,12 @@ module Retab
|
|
|
51
51
|
sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
|
52
52
|
def bust_cache=(value); end
|
|
53
53
|
|
|
54
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
55
|
+
def background; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
|
58
|
+
def background=(value); end
|
|
59
|
+
|
|
54
60
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
55
61
|
def to_h; end
|
|
56
62
|
|
|
@@ -45,12 +45,24 @@ module Retab
|
|
|
45
45
|
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
46
46
|
def instructions=(value); end
|
|
47
47
|
|
|
48
|
-
sig { returns(Retab::ClassificationDecision) }
|
|
48
|
+
sig { returns(T.nilable(Retab::ClassificationDecision)) }
|
|
49
49
|
def output; end
|
|
50
50
|
|
|
51
|
-
sig { params(value: Retab::ClassificationDecision).returns(Retab::ClassificationDecision) }
|
|
51
|
+
sig { params(value: T.nilable(Retab::ClassificationDecision)).returns(T.nilable(Retab::ClassificationDecision)) }
|
|
52
52
|
def output=(value); end
|
|
53
53
|
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
def status; end
|
|
56
|
+
|
|
57
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
58
|
+
def status=(value); end
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(Retab::PrimitiveError)) }
|
|
61
|
+
def error; end
|
|
62
|
+
|
|
63
|
+
sig { params(value: T.nilable(Retab::PrimitiveError)).returns(T.nilable(Retab::PrimitiveError)) }
|
|
64
|
+
def error=(value); end
|
|
65
|
+
|
|
54
66
|
sig { returns(T.nilable(Retab::ClassificationConsensus)) }
|
|
55
67
|
def consensus; end
|
|
56
68
|
|
|
@@ -16,12 +16,13 @@ module Retab
|
|
|
16
16
|
limit: T.nilable(Integer),
|
|
17
17
|
order: T.nilable(String),
|
|
18
18
|
filename: T.nilable(String),
|
|
19
|
+
status: T.nilable(String),
|
|
19
20
|
from_date: T.nilable(String),
|
|
20
21
|
to_date: T.nilable(String),
|
|
21
22
|
request_options: T::Hash[Symbol, T.untyped]
|
|
22
23
|
).returns(Retab::PaginatedList[Retab::Classification])
|
|
23
24
|
end
|
|
24
|
-
def list(before:, after:, limit:, order:, filename:, from_date:, to_date:, request_options:); end
|
|
25
|
+
def list(before:, after:, limit:, order:, filename:, status:, from_date:, to_date:, request_options:); end
|
|
25
26
|
|
|
26
27
|
sig do
|
|
27
28
|
params(
|
|
@@ -32,18 +33,20 @@ module Retab
|
|
|
32
33
|
instructions: T.nilable(String),
|
|
33
34
|
n_consensus: T.nilable(Integer),
|
|
34
35
|
bust_cache: T.nilable(T::Boolean),
|
|
36
|
+
background: T.nilable(T::Boolean),
|
|
35
37
|
request_options: T::Hash[Symbol, T.untyped]
|
|
36
38
|
).returns(Retab::Classification)
|
|
37
39
|
end
|
|
38
|
-
def create(document:, categories:, model:, first_n_pages:, instructions:, n_consensus:, bust_cache:, request_options:); end
|
|
40
|
+
def create(document:, categories:, model:, first_n_pages:, instructions:, n_consensus:, bust_cache:, background:, request_options:); end
|
|
39
41
|
|
|
40
42
|
sig do
|
|
41
43
|
params(
|
|
42
44
|
classification_id: String,
|
|
45
|
+
include_output: T.nilable(T::Boolean),
|
|
43
46
|
request_options: T::Hash[Symbol, T.untyped]
|
|
44
47
|
).returns(Retab::Classification)
|
|
45
48
|
end
|
|
46
|
-
def get(classification_id:, request_options:); end
|
|
49
|
+
def get(classification_id:, include_output:, request_options:); end
|
|
47
50
|
|
|
48
51
|
sig do
|
|
49
52
|
params(
|
|
@@ -53,5 +56,13 @@ module Retab
|
|
|
53
56
|
end
|
|
54
57
|
def delete(classification_id:, request_options:); end
|
|
55
58
|
|
|
59
|
+
sig do
|
|
60
|
+
params(
|
|
61
|
+
classification_id: String,
|
|
62
|
+
request_options: T::Hash[Symbol, T.untyped]
|
|
63
|
+
).returns(Retab::Classification)
|
|
64
|
+
end
|
|
65
|
+
def create_classification_cancel(classification_id:, request_options:); end
|
|
66
|
+
|
|
56
67
|
end
|
|
57
68
|
end
|
data/rbi/retab/client.rbi
CHANGED
|
@@ -18,9 +18,6 @@ module Retab
|
|
|
18
18
|
sig { returns(Retab::Files) }
|
|
19
19
|
def files; end
|
|
20
20
|
|
|
21
|
-
sig { returns(Retab::Jobs) }
|
|
22
|
-
def jobs; end
|
|
23
|
-
|
|
24
21
|
sig { returns(Retab::Parses) }
|
|
25
22
|
def parses; end
|
|
26
23
|
|
|
@@ -30,9 +27,15 @@ module Retab
|
|
|
30
27
|
sig { returns(Retab::Schemas) }
|
|
31
28
|
def schemas; end
|
|
32
29
|
|
|
30
|
+
sig { returns(Retab::Secrets) }
|
|
31
|
+
def secrets; end
|
|
32
|
+
|
|
33
33
|
sig { returns(Retab::Splits) }
|
|
34
34
|
def splits; end
|
|
35
35
|
|
|
36
|
+
sig { returns(Retab::Tables) }
|
|
37
|
+
def tables; end
|
|
38
|
+
|
|
36
39
|
sig { returns(Retab::Workflows) }
|
|
37
40
|
def workflows; end
|
|
38
41
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
# typed: strong
|
|
6
|
+
|
|
7
|
+
module Retab
|
|
8
|
+
class CreateFileBlueprintRequest
|
|
9
|
+
sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
|
|
10
|
+
def initialize(json); end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
def file_id; end
|
|
14
|
+
|
|
15
|
+
sig { params(value: String).returns(String) }
|
|
16
|
+
def file_id=(value); end
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
def mode; end
|
|
20
|
+
|
|
21
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
22
|
+
def mode=(value); end
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
def intent; end
|
|
26
|
+
|
|
27
|
+
sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
|
|
28
|
+
def intent=(value); end
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
31
|
+
def background; end
|
|
32
|
+
|
|
33
|
+
sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
|
34
|
+
def background=(value); end
|
|
35
|
+
|
|
36
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
37
|
+
def to_h; end
|
|
38
|
+
|
|
39
|
+
sig { params(args: T.untyped).returns(String) }
|
|
40
|
+
def to_json(*args); end
|
|
41
|
+
end
|
|
42
|
+
end
|