retab 0.1.10 → 0.1.11

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retab/client.rb +4 -0
  3. data/lib/retab/paginated_list.rb +1 -1
  4. data/lib/retab/splits/reconstruct_document_ref.rb +28 -0
  5. data/lib/retab/splits/reconstruct_enriched_row.rb +20 -0
  6. data/lib/retab/splits/reconstruct_enriched_table.rb +31 -0
  7. data/lib/retab/splits/reconstruct_enrichment_options.rb +28 -0
  8. data/lib/retab/splits/reconstruct_request.rb +25 -0
  9. data/lib/retab/splits/reconstruct_response.rb +20 -0
  10. data/lib/retab/splits/reconstruct_subdocument.rb +31 -0
  11. data/lib/retab/splits/sheet_region.rb +40 -0
  12. data/lib/retab/splits/split_result.rb +5 -2
  13. data/lib/retab/splits.rb +30 -0
  14. data/lib/retab/types/usage_order.rb +9 -0
  15. data/lib/retab/usage/usage_block_record.rb +49 -0
  16. data/lib/retab/usage/usage_primitive_document.rb +25 -0
  17. data/lib/retab/usage/usage_primitive_record.rb +73 -0
  18. data/lib/retab/usage/usage_primitive_triggered_by.rb +37 -0
  19. data/lib/retab/usage/usage_run_record.rb +55 -0
  20. data/lib/retab/usage.rb +267 -0
  21. data/lib/retab/version.rb +1 -1
  22. data/lib/retab/workflow_experiments.rb +5 -1
  23. data/lib/retab/workflow_reviews/review.rb +0 -2
  24. data/lib/retab/workflow_reviews/review_all_of.rb +0 -2
  25. data/lib/retab/workflow_reviews/review_any_of.rb +0 -2
  26. data/lib/retab/workflow_runs/create_workflow_run_request.rb +5 -2
  27. data/lib/retab/workflow_runs/workflow_run.rb +5 -2
  28. data/lib/retab/workflow_runs.rb +9 -1
  29. data/lib/retab/workflow_steps.rb +5 -0
  30. data/lib/retab/workflows/workflow.rb +2 -8
  31. data/lib/retab.rb +1 -0
  32. data/rbi/retab/client.rbi +3 -0
  33. data/rbi/retab/create_workflow_run_request.rbi +6 -0
  34. data/rbi/retab/{review_field_confidence_lt.rbi → reconstruct_document_ref.rbi} +11 -11
  35. data/rbi/retab/reconstruct_enriched_row.rbi +24 -0
  36. data/rbi/retab/reconstruct_enriched_table.rbi +42 -0
  37. data/rbi/retab/reconstruct_enrichment_options.rbi +36 -0
  38. data/rbi/retab/reconstruct_request.rbi +30 -0
  39. data/rbi/retab/reconstruct_response.rbi +24 -0
  40. data/rbi/retab/reconstruct_subdocument.rbi +42 -0
  41. data/rbi/retab/review.rbi +2 -2
  42. data/rbi/retab/review_all_of.rbi +2 -2
  43. data/rbi/retab/review_any_of.rbi +2 -2
  44. data/rbi/retab/sheet_region.rbi +60 -0
  45. data/rbi/retab/split_result.rbi +6 -0
  46. data/rbi/retab/splits.rbi +9 -0
  47. data/rbi/retab/usage.rbi +68 -0
  48. data/rbi/retab/usage_block_record.rbi +78 -0
  49. data/rbi/retab/usage_primitive_document.rbi +30 -0
  50. data/rbi/retab/usage_primitive_record.rbi +126 -0
  51. data/rbi/retab/usage_primitive_triggered_by.rbi +54 -0
  52. data/rbi/retab/usage_run_record.rbi +90 -0
  53. data/rbi/retab/workflow.rbi +0 -12
  54. data/rbi/retab/workflow_experiment.rbi +2 -2
  55. data/rbi/retab/workflow_experiments.rbi +2 -1
  56. data/rbi/retab/workflow_run.rbi +6 -0
  57. data/rbi/retab/workflow_runs.rbi +4 -2
  58. data/rbi/retab/workflow_steps.rbi +2 -1
  59. metadata +31 -6
  60. data/lib/retab/types/workflow_authz_status.rb +0 -16
  61. data/lib/retab/types/workflow_capabilities.rb +0 -26
  62. data/lib/retab/workflow_reviews/review_field_confidence_lt.rb +0 -28
@@ -0,0 +1,267 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ require "json"
6
+
7
+ module Retab
8
+ class Usage
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ # List Usage Blocks
14
+ # @param limit [Integer, nil] Maximum number of block rows to return.
15
+ # @param order [Retab::Types::UsageOrder, nil] Sort direction on block id.
16
+ # @param before [String, nil] Return blocks before this cursor (opaque token from a prior page's list_metadata).
17
+ # @param after [String, nil] Return blocks after this cursor (opaque token from a prior page's list_metadata).
18
+ # @param workflow_id [String, nil] Filter to a single workflow id.
19
+ # @param block_type [String, nil] Filter by block type (e.g. extract, classify, split, parse, edit, partition).
20
+ # @param from_date [String, nil] Inclusive activity lower bound (YYYY-MM-DD, UTC).
21
+ # @param to_date [String, nil] Inclusive activity upper bound (YYYY-MM-DD, UTC).
22
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
23
+ # @return [Retab::PaginatedList<Retab::UsageBlockRecord>]
24
+ def list_blocks(
25
+ limit: 20,
26
+ order: "desc",
27
+ before: nil,
28
+ after: nil,
29
+ workflow_id: nil,
30
+ block_type: nil,
31
+ from_date: nil,
32
+ to_date: nil,
33
+ request_options: {}
34
+ )
35
+ params = {
36
+ "limit" => limit,
37
+ "order" => order,
38
+ "before" => before,
39
+ "after" => after,
40
+ "workflow_id" => workflow_id,
41
+ "block_type" => block_type,
42
+ "from_date" => from_date,
43
+ "to_date" => to_date
44
+ }.compact
45
+ response = @client.request(
46
+ method: :get,
47
+ path: "/v1/usage/blocks",
48
+ auth: true,
49
+ params: params,
50
+ request_options: request_options
51
+ )
52
+ fetch_next = -> (cursor) {
53
+ list_blocks(
54
+ limit: limit,
55
+ order: order,
56
+ before: before,
57
+ after: cursor,
58
+ workflow_id: workflow_id,
59
+ block_type: block_type,
60
+ from_date: from_date,
61
+ to_date: to_date,
62
+ request_options: request_options
63
+ )
64
+ }
65
+ Retab::PaginatedList.from_response(
66
+ response,
67
+ model: Retab::UsageBlockRecord,
68
+ filters: {
69
+ limit: limit,
70
+ order: order,
71
+ before: before,
72
+ workflow_id: workflow_id,
73
+ block_type: block_type,
74
+ from_date: from_date,
75
+ to_date: to_date
76
+ },
77
+ fetch_next: fetch_next
78
+ )
79
+ end
80
+
81
+ # List Usage Primitives
82
+ # @param limit [Integer, nil] Maximum number of execution rows to return.
83
+ # @param order [Retab::Types::UsageOrder, nil] Sort direction on execution created_at.
84
+ # @param before [String, nil] Return executions before this primitive-execution id (keyset cursor).
85
+ # @param after [String, nil] Return executions after this primitive-execution id (keyset cursor).
86
+ # @param environment_id [String, nil] Scope the export to this environment id within the caller's organization. Defaults to the authenticated identity's environment.
87
+ # @param workflow_id [String, nil] Filter to a single workflow id (origin workflow).
88
+ # @param project_id [String, nil] Filter to executions owned by a single project id.
89
+ # @param api_key_id [String, nil] Filter to executions triggered by a single API key id (the api_key_id returned under triggered_by).
90
+ # @param access_token_id [String, nil] Filter to executions triggered by a single access token id (the access_token_id returned under triggered_by).
91
+ # @param user_id [String, nil] Filter to executions triggered by a single user id (the user_id returned under triggered_by).
92
+ # @param run_id [String, nil] Filter to a single workflow run id (origin run).
93
+ # @param block_id [String, nil] Filter to a single workflow block id (origin block).
94
+ # @param operation [String, nil] Filter by operation (extraction, classify, split, parse, edit, schema_generation).
95
+ # @param status [String, nil] Filter by execution lifecycle status.
96
+ # @param metadata [String, nil] Filter by metadata equality: a JSON object of string key/value pairs (e.g. {"tenant":"acme"}). Pairs AND together.
97
+ # @param from_date [String, nil] Inclusive created_at lower bound (YYYY-MM-DD, UTC).
98
+ # @param to_date [String, nil] Inclusive created_at upper bound (YYYY-MM-DD, UTC).
99
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
100
+ # @return [Retab::PaginatedList<Retab::UsagePrimitiveRecord>]
101
+ def list_primitives(
102
+ limit: 20,
103
+ order: "desc",
104
+ before: nil,
105
+ after: nil,
106
+ environment_id: nil,
107
+ workflow_id: nil,
108
+ project_id: nil,
109
+ api_key_id: nil,
110
+ access_token_id: nil,
111
+ user_id: nil,
112
+ run_id: nil,
113
+ block_id: nil,
114
+ operation: nil,
115
+ status: nil,
116
+ metadata: nil,
117
+ from_date: nil,
118
+ to_date: nil,
119
+ request_options: {}
120
+ )
121
+ params = {
122
+ "limit" => limit,
123
+ "order" => order,
124
+ "before" => before,
125
+ "after" => after,
126
+ "environment_id" => environment_id,
127
+ "workflow_id" => workflow_id,
128
+ "project_id" => project_id,
129
+ "api_key_id" => api_key_id,
130
+ "access_token_id" => access_token_id,
131
+ "user_id" => user_id,
132
+ "run_id" => run_id,
133
+ "block_id" => block_id,
134
+ "operation" => operation,
135
+ "status" => status,
136
+ "metadata" => metadata,
137
+ "from_date" => from_date,
138
+ "to_date" => to_date
139
+ }.compact
140
+ response = @client.request(
141
+ method: :get,
142
+ path: "/v1/usage/primitives",
143
+ auth: true,
144
+ params: params,
145
+ request_options: request_options
146
+ )
147
+ fetch_next = -> (cursor) {
148
+ list_primitives(
149
+ limit: limit,
150
+ order: order,
151
+ before: before,
152
+ after: cursor,
153
+ environment_id: environment_id,
154
+ workflow_id: workflow_id,
155
+ project_id: project_id,
156
+ api_key_id: api_key_id,
157
+ access_token_id: access_token_id,
158
+ user_id: user_id,
159
+ run_id: run_id,
160
+ block_id: block_id,
161
+ operation: operation,
162
+ status: status,
163
+ metadata: metadata,
164
+ from_date: from_date,
165
+ to_date: to_date,
166
+ request_options: request_options
167
+ )
168
+ }
169
+ Retab::PaginatedList.from_response(
170
+ response,
171
+ model: Retab::UsagePrimitiveRecord,
172
+ filters: {
173
+ limit: limit,
174
+ order: order,
175
+ before: before,
176
+ environment_id: environment_id,
177
+ workflow_id: workflow_id,
178
+ project_id: project_id,
179
+ api_key_id: api_key_id,
180
+ access_token_id: access_token_id,
181
+ user_id: user_id,
182
+ run_id: run_id,
183
+ block_id: block_id,
184
+ operation: operation,
185
+ status: status,
186
+ metadata: metadata,
187
+ from_date: from_date,
188
+ to_date: to_date
189
+ },
190
+ fetch_next: fetch_next
191
+ )
192
+ end
193
+
194
+ # List Usage Runs
195
+ # @param limit [Integer, nil] Maximum number of run rows to return.
196
+ # @param order [Retab::Types::UsageOrder, nil] Sort direction on run created_at.
197
+ # @param before [String, nil] Return runs before this run id (keyset cursor).
198
+ # @param after [String, nil] Return runs after this run id (keyset cursor).
199
+ # @param workflow_id [String, nil] Filter to a single workflow id.
200
+ # @param status [String, nil] Filter by lifecycle status: pending, queued, running, completed, error, failed, awaiting_review, or cancelled.
201
+ # @param trigger_type [String, nil] Filter by trigger type: manual, api, schedule, webhook, email, or restart.
202
+ # @param from_date [String, nil] Inclusive created_at lower bound (YYYY-MM-DD, UTC).
203
+ # @param to_date [String, nil] Inclusive created_at upper bound (YYYY-MM-DD, UTC).
204
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
205
+ # @return [Retab::PaginatedList<Retab::UsageRunRecord>]
206
+ def list_runs(
207
+ limit: 20,
208
+ order: "desc",
209
+ before: nil,
210
+ after: nil,
211
+ workflow_id: nil,
212
+ status: nil,
213
+ trigger_type: nil,
214
+ from_date: nil,
215
+ to_date: nil,
216
+ request_options: {}
217
+ )
218
+ params = {
219
+ "limit" => limit,
220
+ "order" => order,
221
+ "before" => before,
222
+ "after" => after,
223
+ "workflow_id" => workflow_id,
224
+ "status" => status,
225
+ "trigger_type" => trigger_type,
226
+ "from_date" => from_date,
227
+ "to_date" => to_date
228
+ }.compact
229
+ response = @client.request(
230
+ method: :get,
231
+ path: "/v1/usage/runs",
232
+ auth: true,
233
+ params: params,
234
+ request_options: request_options
235
+ )
236
+ fetch_next = -> (cursor) {
237
+ list_runs(
238
+ limit: limit,
239
+ order: order,
240
+ before: before,
241
+ after: cursor,
242
+ workflow_id: workflow_id,
243
+ status: status,
244
+ trigger_type: trigger_type,
245
+ from_date: from_date,
246
+ to_date: to_date,
247
+ request_options: request_options
248
+ )
249
+ }
250
+ Retab::PaginatedList.from_response(
251
+ response,
252
+ model: Retab::UsageRunRecord,
253
+ filters: {
254
+ limit: limit,
255
+ order: order,
256
+ before: before,
257
+ workflow_id: workflow_id,
258
+ status: status,
259
+ trigger_type: trigger_type,
260
+ from_date: from_date,
261
+ to_date: to_date
262
+ },
263
+ fetch_next: fetch_next
264
+ )
265
+ end
266
+ end
267
+ end
data/lib/retab/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
  # @oagen-ignore-file
6
6
 
7
7
  module Retab
8
- VERSION = "0.1.10"
8
+ VERSION = "0.1.11"
9
9
  end
@@ -24,6 +24,7 @@ module Retab
24
24
 
25
25
  # List Experiments
26
26
  # @param workflow_id [String]
27
+ # @param block_id [String, nil]
27
28
  # @param before [String, nil]
28
29
  # @param after [String, nil]
29
30
  # @param limit [Integer, nil]
@@ -32,6 +33,7 @@ module Retab
32
33
  # @return [Retab::PaginatedList<Retab::WorkflowExperiment>]
33
34
  def list(
34
35
  workflow_id:,
36
+ block_id: nil,
35
37
  before: nil,
36
38
  after: nil,
37
39
  limit: 50,
@@ -40,6 +42,7 @@ module Retab
40
42
  )
41
43
  params = {
42
44
  "workflow_id" => workflow_id,
45
+ "block_id" => block_id,
43
46
  "before" => before,
44
47
  "after" => after,
45
48
  "limit" => limit,
@@ -55,6 +58,7 @@ module Retab
55
58
  fetch_next = -> (cursor) {
56
59
  list(
57
60
  workflow_id: workflow_id,
61
+ block_id: block_id,
58
62
  before: before,
59
63
  after: cursor,
60
64
  limit: limit,
@@ -65,7 +69,7 @@ module Retab
65
69
  Retab::PaginatedList.from_response(
66
70
  response,
67
71
  model: Retab::WorkflowExperiment,
68
- filters: {workflow_id: workflow_id, before: before, limit: limit, order: order},
72
+ filters: {workflow_id: workflow_id, block_id: block_id, before: before, limit: limit, order: order},
69
73
  fetch_next: fetch_next
70
74
  )
71
75
  end
@@ -67,8 +67,6 @@ module Retab
67
67
  Retab::ReviewCategoryIn.new(hash[:triggered_by])
68
68
  when "confidence_lt"
69
69
  Retab::ReviewConfidenceLt.new(hash[:triggered_by])
70
- when "field_confidence_lt"
71
- Retab::ReviewFieldConfidenceLt.new(hash[:triggered_by])
72
70
  when "json_condition"
73
71
  Retab::ReviewJsonCondition.new(hash[:triggered_by])
74
72
  when "split_count_neq"
@@ -40,8 +40,6 @@ module Retab
40
40
  Retab::ReviewCategoryIn.new(item)
41
41
  when "confidence_lt"
42
42
  Retab::ReviewConfidenceLt.new(item)
43
- when "field_confidence_lt"
44
- Retab::ReviewFieldConfidenceLt.new(item)
45
43
  when "json_condition"
46
44
  Retab::ReviewJsonCondition.new(item)
47
45
  when "split_count_neq"
@@ -40,8 +40,6 @@ module Retab
40
40
  Retab::ReviewCategoryIn.new(item)
41
41
  when "confidence_lt"
42
42
  Retab::ReviewConfidenceLt.new(item)
43
- when "field_confidence_lt"
44
- Retab::ReviewFieldConfidenceLt.new(item)
45
43
  when "json_condition"
46
44
  Retab::ReviewJsonCondition.new(item)
47
45
  when "split_count_neq"
@@ -9,14 +9,16 @@ module Retab
9
9
  workflow_id: :workflow_id,
10
10
  documents: :documents,
11
11
  json_inputs: :json_inputs,
12
- version: :version
12
+ version: :version,
13
+ metadata: :metadata
13
14
  }.freeze
14
15
 
15
16
  attr_accessor(
16
17
  :workflow_id,
17
18
  :documents,
18
19
  :json_inputs,
19
- :version
20
+ :version,
21
+ :metadata
20
22
  )
21
23
 
22
24
  def initialize(json)
@@ -26,6 +28,7 @@ module Retab
26
28
  @documents = hash[:documents] || {}
27
29
  @json_inputs = hash[:json_inputs] || {}
28
30
  @version = hash[:version].nil? ? "production" : hash[:version]
31
+ @metadata = hash[:metadata] || {}
29
32
  end
30
33
  end
31
34
  end
@@ -12,7 +12,8 @@ module Retab
12
12
  trigger: :trigger,
13
13
  lifecycle: :lifecycle,
14
14
  timing: :timing,
15
- inputs: :inputs
15
+ inputs: :inputs,
16
+ metadata: :metadata
16
17
  }.freeze
17
18
 
18
19
  attr_accessor(
@@ -22,7 +23,8 @@ module Retab
22
23
  :trigger,
23
24
  :lifecycle,
24
25
  :timing,
25
- :inputs
26
+ :inputs,
27
+ :metadata
26
28
  )
27
29
 
28
30
  def initialize(json)
@@ -52,6 +54,7 @@ module Retab
52
54
  ) : nil
53
55
  @timing = hash[:timing] ? Retab::RunTiming.new(hash[:timing]) : nil
54
56
  @inputs = hash[:inputs] ? Retab::RunInputs.new(hash[:inputs]) : nil
57
+ @metadata = hash[:metadata] || {}
55
58
  end
56
59
  end
57
60
  end
@@ -20,6 +20,7 @@ module Retab
20
20
  # @param min_duration_ms [Integer, nil] Filter runs with duration >= this value in milliseconds
21
21
  # @param max_duration_ms [Integer, nil] Filter runs with duration <= this value in milliseconds
22
22
  # @param search [String, nil] Search by run ID (partial match)
23
+ # @param metadata [String, nil] Filter by metadata equality: a JSON object of key/value pairs (e.g. {"tenant":"acme"}). Pairs AND together.
23
24
  # @param before [String, nil]
24
25
  # @param after [String, nil]
25
26
  # @param limit [Integer, nil] Items per page
@@ -37,6 +38,7 @@ module Retab
37
38
  min_duration_ms: nil,
38
39
  max_duration_ms: nil,
39
40
  search: nil,
41
+ metadata: nil,
40
42
  before: nil,
41
43
  after: nil,
42
44
  limit: 20,
@@ -54,6 +56,7 @@ module Retab
54
56
  "min_duration_ms" => min_duration_ms,
55
57
  "max_duration_ms" => max_duration_ms,
56
58
  "search" => search,
59
+ "metadata" => metadata,
57
60
  "before" => before,
58
61
  "after" => after,
59
62
  "limit" => limit,
@@ -78,6 +81,7 @@ module Retab
78
81
  min_duration_ms: min_duration_ms,
79
82
  max_duration_ms: max_duration_ms,
80
83
  search: search,
84
+ metadata: metadata,
81
85
  before: before,
82
86
  after: cursor,
83
87
  limit: limit,
@@ -99,6 +103,7 @@ module Retab
99
103
  min_duration_ms: min_duration_ms,
100
104
  max_duration_ms: max_duration_ms,
101
105
  search: search,
106
+ metadata: metadata,
102
107
  before: before,
103
108
  limit: limit,
104
109
  order: order,
@@ -113,6 +118,7 @@ module Retab
113
118
  # @param documents [Hash{String => Retab::MimeData, Retab::FileRef, Pathname, IO, String, Hash}, nil] Mapping of start_document block IDs to their input documents.
114
119
  # @param json_inputs [Hash{String => Object}, nil] Mapping of start-json block IDs to their input JSON data.
115
120
  # @param version [String, nil] Workflow version to run: 'production', 'draft', or a pinned version id like 'ver_...'. Only valid for fresh-run creation.
121
+ # @param metadata [Hash{String => String}, nil] User-defined metadata to associate with this workflow run.
116
122
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
117
123
  # @return [Retab::WorkflowRun]
118
124
  def create(
@@ -120,6 +126,7 @@ module Retab
120
126
  documents: nil,
121
127
  json_inputs: nil,
122
128
  version: nil,
129
+ metadata: nil,
123
130
  request_options: {}
124
131
  )
125
132
  documents = Retab::MimeData.coerce_document_map(documents, client: @client) unless documents.nil?
@@ -127,7 +134,8 @@ module Retab
127
134
  "workflow_id" => workflow_id,
128
135
  "documents" => documents,
129
136
  "json_inputs" => json_inputs,
130
- "version" => version
137
+ "version" => version,
138
+ "metadata" => metadata
131
139
  }.compact
132
140
  response = @client.request(
133
141
  method: :post,
@@ -12,6 +12,7 @@ module Retab
12
12
 
13
13
  # List Workflow Run Steps
14
14
  # @param run_id [String, nil] Optional workflow run ID filter.
15
+ # @param workflow_id [String, nil]
15
16
  # @param block_id [String, nil] Optional logical block ID filter.
16
17
  # @param step_id [String, nil] Optional step ID filter.
17
18
  # @param block_type [Array<String>, nil] Optional block type filter. Repeat the query parameter for multiple values.
@@ -23,6 +24,7 @@ module Retab
23
24
  # @return [Retab::PaginatedList<Retab::WorkflowRunStep>]
24
25
  def list(
25
26
  run_id: nil,
27
+ workflow_id: nil,
26
28
  block_id: nil,
27
29
  step_id: nil,
28
30
  block_type: nil,
@@ -34,6 +36,7 @@ module Retab
34
36
  )
35
37
  params = {
36
38
  "run_id" => run_id,
39
+ "workflow_id" => workflow_id,
37
40
  "block_id" => block_id,
38
41
  "step_id" => step_id,
39
42
  "block_type" => block_type,
@@ -52,6 +55,7 @@ module Retab
52
55
  fetch_next = -> (cursor) {
53
56
  list(
54
57
  run_id: run_id,
58
+ workflow_id: workflow_id,
55
59
  block_id: block_id,
56
60
  step_id: step_id,
57
61
  block_type: block_type,
@@ -67,6 +71,7 @@ module Retab
67
71
  model: Retab::WorkflowRunStep,
68
72
  filters: {
69
73
  run_id: run_id,
74
+ workflow_id: workflow_id,
70
75
  block_id: block_id,
71
76
  step_id: step_id,
72
77
  block_type: block_type,
@@ -12,9 +12,7 @@ module Retab
12
12
  project_id: :project_id,
13
13
  published: :published,
14
14
  created_at: :created_at,
15
- updated_at: :updated_at,
16
- capabilities: :capabilities,
17
- authz_status: :authz_status
15
+ updated_at: :updated_at
18
16
  }.freeze
19
17
 
20
18
  attr_accessor(
@@ -24,9 +22,7 @@ module Retab
24
22
  :project_id,
25
23
  :published,
26
24
  :created_at,
27
- :updated_at,
28
- :capabilities,
29
- :authz_status
25
+ :updated_at
30
26
  )
31
27
 
32
28
  def initialize(json)
@@ -39,8 +35,6 @@ module Retab
39
35
  @published = hash[:published] ? Retab::WorkflowPublished.new(hash[:published]) : nil
40
36
  @created_at = hash[:created_at]
41
37
  @updated_at = hash[:updated_at]
42
- @capabilities = (hash[:capabilities] || [])
43
- @authz_status = hash[:authz_status]
44
38
  end
45
39
  end
46
40
  end
data/lib/retab.rb CHANGED
@@ -25,6 +25,7 @@ loader.collapse("#{__dir__}/retab/secrets")
25
25
  loader.collapse("#{__dir__}/retab/shared")
26
26
  loader.collapse("#{__dir__}/retab/splits")
27
27
  loader.collapse("#{__dir__}/retab/tables")
28
+ loader.collapse("#{__dir__}/retab/usage")
28
29
  loader.collapse("#{__dir__}/retab/workflow_artifacts")
29
30
  loader.collapse("#{__dir__}/retab/workflow_block_executions")
30
31
  loader.collapse("#{__dir__}/retab/workflow_blocks")
data/rbi/retab/client.rbi CHANGED
@@ -36,6 +36,9 @@ module Retab
36
36
  sig { returns(Retab::Tables) }
37
37
  def tables; end
38
38
 
39
+ sig { returns(Retab::Usage) }
40
+ def usage; end
41
+
39
42
  sig { returns(Retab::Workflows) }
40
43
  def workflows; end
41
44
 
@@ -33,6 +33,12 @@ module Retab
33
33
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
34
  def version=(value); end
35
35
 
36
+ sig { returns(T.nilable(T::Hash[String, String])) }
37
+ def metadata; end
38
+
39
+ sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) }
40
+ def metadata=(value); end
41
+
36
42
  sig { returns(T::Hash[Symbol, T.untyped]) }
37
43
  def to_h; end
38
44
 
@@ -5,27 +5,27 @@
5
5
  # typed: strong
6
6
 
7
7
  module Retab
8
- class ReviewFieldConfidenceLt
8
+ class ReconstructDocumentRef
9
9
  sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
10
  def initialize(json); end
11
11
 
12
- sig { returns(T.nilable(String)) }
13
- def kind; end
12
+ sig { returns(String) }
13
+ def filename; end
14
14
 
15
- sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
16
- def kind=(value); end
15
+ sig { params(value: String).returns(String) }
16
+ def filename=(value); end
17
17
 
18
18
  sig { returns(String) }
19
- def path; end
19
+ def id; end
20
20
 
21
21
  sig { params(value: String).returns(String) }
22
- def path=(value); end
22
+ def id=(value); end
23
23
 
24
- sig { returns(Float) }
25
- def threshold; end
24
+ sig { returns(T.nilable(String)) }
25
+ def mime_type; end
26
26
 
27
- sig { params(value: Float).returns(Float) }
28
- def threshold=(value); end
27
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
+ def mime_type=(value); end
29
29
 
30
30
  sig { returns(T::Hash[Symbol, T.untyped]) }
31
31
  def to_h; end
@@ -0,0 +1,24 @@
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 ReconstructEnrichedRow
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(T::Array[String]) }
13
+ def cells; end
14
+
15
+ sig { params(value: T::Array[String]).returns(T::Array[String]) }
16
+ def cells=(value); end
17
+
18
+ sig { returns(T::Hash[Symbol, T.untyped]) }
19
+ def to_h; end
20
+
21
+ sig { params(args: T.untyped).returns(String) }
22
+ def to_json(*args); end
23
+ end
24
+ end
@@ -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 ReconstructEnrichedTable
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 csv; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def csv=(value); end
17
+
18
+ sig { returns(T::Array[String]) }
19
+ def header; end
20
+
21
+ sig { params(value: T::Array[String]).returns(T::Array[String]) }
22
+ def header=(value); end
23
+
24
+ sig { returns(String) }
25
+ def label; end
26
+
27
+ sig { params(value: String).returns(String) }
28
+ def label=(value); end
29
+
30
+ sig { returns(T::Array[Retab::ReconstructEnrichedRow]) }
31
+ def rows; end
32
+
33
+ sig { params(value: T::Array[Retab::ReconstructEnrichedRow]).returns(T::Array[Retab::ReconstructEnrichedRow]) }
34
+ def rows=(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