retab 0.1.6 → 0.1.7

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retab/base_client.rb +9 -2
  3. data/lib/retab/experiment_runs/experiment_run.rb +9 -0
  4. data/lib/retab/multipart.rb +73 -0
  5. data/lib/retab/secrets.rb +6 -6
  6. data/lib/retab/tables/{body_create_table_v_1_tables_post.rb → create_workflow_table_upload_request.rb} +6 -3
  7. data/lib/retab/tables/{body_replace_table_v_1_tables_table_id_put.rb → replace_workflow_table_upload_request.rb} +1 -1
  8. data/lib/retab/tables/workflow_table.rb +3 -0
  9. data/lib/retab/tables.rb +40 -35
  10. data/lib/retab/types/artifact_drift_status.rb +15 -0
  11. data/lib/retab/types/artifact_freshness_reasons.rb +16 -0
  12. data/lib/retab/types/artifact_freshness_status.rb +14 -0
  13. data/lib/retab/types/workflow_authz_status.rb +16 -0
  14. data/lib/retab/types/workflow_block_version_type.rb +9 -0
  15. data/lib/retab/types/workflow_capabilities.rb +26 -0
  16. data/lib/retab/types/workflow_config_block_type.rb +9 -0
  17. data/lib/retab/types/workflow_table_validation_column_rule_type.rb +18 -0
  18. data/lib/retab/workflow_blocks/workflow_block_version.rb +64 -0
  19. data/lib/retab/workflow_blocks/workflow_block_version_diff.rb +31 -0
  20. data/lib/retab/workflow_blocks/workflow_version_field_diff.rb +28 -0
  21. data/lib/retab/workflow_blocks.rb +135 -1
  22. data/lib/retab/workflow_edges/workflow_edge_version.rb +49 -0
  23. data/lib/retab/workflow_edges/workflow_edge_version_diff.rb +31 -0
  24. data/lib/retab/workflow_edges.rb +134 -0
  25. data/lib/retab/workflow_experiments/artifact_drift.rb +28 -0
  26. data/lib/retab/workflow_experiments/artifact_freshness.rb +34 -0
  27. data/lib/retab/workflow_experiments/workflow_experiment.rb +8 -2
  28. data/lib/retab/workflow_review_versions.rb +3 -3
  29. data/lib/retab/workflow_reviews.rb +4 -4
  30. data/lib/retab/workflow_runs.rb +1 -1
  31. data/lib/retab/workflow_spec.rb +6 -57
  32. data/lib/retab/workflow_test_runs/workflow_test_run.rb +5 -2
  33. data/lib/retab/workflow_tests/latest_block_test_run_summary.rb +6 -0
  34. data/lib/retab/workflow_tests/workflow_test.rb +6 -0
  35. data/lib/retab/workflows/create_workflow_request.rb +5 -2
  36. data/lib/retab/{workflow_spec → workflows}/declarative_workflow_request.rb +7 -2
  37. data/lib/retab/workflows/workflow.rb +11 -2
  38. data/lib/retab/workflows/workflow_block_position.rb +25 -0
  39. data/lib/retab/workflows/workflow_config_block.rb +46 -0
  40. data/lib/retab/workflows/workflow_config_edge.rb +37 -0
  41. data/lib/retab/workflows/workflow_graph_version.rb +40 -0
  42. data/lib/retab/workflows/workflow_graph_version_diff.rb +43 -0
  43. data/lib/retab/workflows.rb +209 -3
  44. data/rbi/retab/artifact_drift.rbi +36 -0
  45. data/rbi/retab/artifact_freshness.rbi +48 -0
  46. data/rbi/retab/create_upload_response.rbi +2 -2
  47. data/rbi/retab/create_workflow_request.rbi +6 -0
  48. data/rbi/retab/{body_create_table_v_1_tables_post.rbi → create_workflow_table_upload_request.rbi} +7 -1
  49. data/rbi/retab/declarative_workflow_request.rbi +6 -0
  50. data/rbi/retab/experiment_run.rbi +18 -0
  51. data/rbi/retab/latest_block_test_run_summary.rbi +12 -0
  52. data/rbi/retab/{body_replace_table_v_1_tables_table_id_put.rbi → replace_workflow_table_upload_request.rbi} +1 -1
  53. data/rbi/retab/secret_list_response.rbi +2 -2
  54. data/rbi/retab/tables.rbi +6 -4
  55. data/rbi/retab/workflow.rbi +18 -0
  56. data/rbi/retab/workflow_block_position.rbi +30 -0
  57. data/rbi/retab/workflow_block_version.rbi +108 -0
  58. data/rbi/retab/workflow_block_version_diff.rbi +42 -0
  59. data/rbi/retab/workflow_blocks.rbi +38 -0
  60. data/rbi/retab/workflow_config_block.rbi +72 -0
  61. data/rbi/retab/workflow_config_edge.rbi +54 -0
  62. data/rbi/retab/workflow_edge_version.rbi +78 -0
  63. data/rbi/retab/workflow_edge_version_diff.rbi +42 -0
  64. data/rbi/retab/workflow_edges.rbi +38 -0
  65. data/rbi/retab/workflow_experiment.rbi +12 -0
  66. data/rbi/retab/workflow_graph_version.rbi +60 -0
  67. data/rbi/retab/workflow_graph_version_diff.rbi +66 -0
  68. data/rbi/retab/workflow_spec.rbi +2 -17
  69. data/rbi/retab/workflow_table.rbi +6 -0
  70. data/rbi/retab/workflow_table_list_response.rbi +2 -2
  71. data/rbi/retab/workflow_table_schema_response.rbi +2 -2
  72. data/rbi/retab/workflow_test.rbi +12 -0
  73. data/rbi/retab/workflow_test_run.rbi +6 -0
  74. data/rbi/retab/workflow_version_field_diff.rbi +36 -0
  75. data/rbi/retab/workflows.rbi +61 -2
  76. metadata +45 -12
  77. /data/lib/retab/{workflow_spec → workflows}/declarative_apply_response.rb +0 -0
  78. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_change.rb +0 -0
  79. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_field_change.rb +0 -0
  80. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_resource_change.rb +0 -0
  81. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_response.rb +0 -0
  82. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_summary.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 567e2e76bac62e208e33807bd9106e8e2b03973a06a1d1f9bffb7c794efd4474
4
- data.tar.gz: 94eb206cd48778a4f64be7ce9ac52c4f78e4c69a5b2277f6ba66dec5938726af
3
+ metadata.gz: 67452b4ad04cd58f0437012ee63e052194150a619474218838fe392949156eba
4
+ data.tar.gz: 51cca52e0f5df37488678232d8a41de500613b1ce709b54c98bf1dc4725a72af
5
5
  SHA512:
6
- metadata.gz: 2bdfce3ca56f7d285a347649e6c085b31ca780c43cd4a120f5d818cd47e3c114098b6264a0f3ca7edb9aa8625f460a0773b6dba7a3062b68a20c33521f18ebf9
7
- data.tar.gz: '0169629387665c14a306b6f0869281c8531ccf9ea590629b381e8a2cdce9ed79f8d1a555f076c23b127d3c5c6115fb43bb0c348fe38c3a1365a3b0dacdcf4489'
6
+ metadata.gz: 329580bdb99646157f8da23afc794d5252fcf925fd21eb988815ef30e61150b900f3a2f63e73eabbc96e5dda2471bd6a2561ed30345bb79ca2d4d7f91ea7580b
7
+ data.tar.gz: 9b8a20793769cf85431a7172bb8be1629f72e39c80f8fdaa6fafcccd32666b1bb6ecf159adec60dbcc88b89ffb869b905fe9d972260b21a30c8b5bc976a52bd2
@@ -86,8 +86,15 @@ module Retab
86
86
  extra_headers = request_options[:headers] || request_options["headers"] || {}
87
87
  extra_headers.each { |k, v| req[k.to_s] = v.to_s }
88
88
  if body && %i[post put patch].include?(method.to_sym)
89
- req["Content-Type"] = "application/json"
90
- req.body = body.is_a?(String) ? body : JSON.generate(body)
89
+ if body.is_a?(Retab::Multipart)
90
+ # multipart/form-data (e.g. table create/replace). Let net/http build
91
+ # the multipart body and set the `Content-Type:
92
+ # multipart/form-data; boundary=...` header itself — never JSON.
93
+ req.set_form(body.to_form_parts, "multipart/form-data")
94
+ else
95
+ req["Content-Type"] = "application/json"
96
+ req.body = body.is_a?(String) ? body : JSON.generate(body)
97
+ end
91
98
  end
92
99
 
93
100
  req
@@ -17,6 +17,9 @@ module Retab
17
17
  lifecycle: :lifecycle,
18
18
  timing: :timing,
19
19
  parent_run_id: :parent_run_id,
20
+ block_version_id: :block_version_id,
21
+ metrics_validity_fingerprint: :metrics_validity_fingerprint,
22
+ metrics_validity_fingerprint_version: :metrics_validity_fingerprint_version,
20
23
  definition_fingerprint: :definition_fingerprint,
21
24
  documents_fingerprint: :documents_fingerprint,
22
25
  score: :score,
@@ -38,6 +41,9 @@ module Retab
38
41
  :lifecycle,
39
42
  :timing,
40
43
  :parent_run_id,
44
+ :block_version_id,
45
+ :metrics_validity_fingerprint,
46
+ :metrics_validity_fingerprint_version,
41
47
  :definition_fingerprint,
42
48
  :documents_fingerprint,
43
49
  :score,
@@ -78,6 +84,9 @@ module Retab
78
84
  ) : nil
79
85
  @timing = hash[:timing] ? Retab::ExperimentRunTiming.new(hash[:timing]) : nil
80
86
  @parent_run_id = hash[:parent_run_id]
87
+ @block_version_id = hash[:block_version_id]
88
+ @metrics_validity_fingerprint = hash[:metrics_validity_fingerprint]
89
+ @metrics_validity_fingerprint_version = hash[:metrics_validity_fingerprint_version]
81
90
  @definition_fingerprint = hash[:definition_fingerprint]
82
91
  @documents_fingerprint = hash[:documents_fingerprint]
83
92
  @score = hash[:score]
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # @oagen-ignore-file
6
+ #
7
+ # Hand-maintained multipart/form-data marker. Spec-derived resource methods
8
+ # whose operation declares a `multipart/form-data` request body (e.g.
9
+ # `tables.create` / `tables.replace`) build a `Retab::Multipart`
10
+ # instead of a plain Hash. `BaseClient#build_request` detects it and calls
11
+ # `Net::HTTP::Post#set_form(..., 'multipart/form-data')` so net/http emits the
12
+ # boundary itself — never a JSON body. The gateway requires a real multipart
13
+ # file upload for the binary part and rejects JSON ("Expected a
14
+ # multipart/form-data file upload").
15
+
16
+ require "stringio"
17
+
18
+ module Retab
19
+ # A multipart/form-data request body. `fields` maps wire field name =>
20
+ # value, where each value is either a plain scalar (sent as a text part via
21
+ # `#to_s`) or a `FilePart` (sent as a binary file part).
22
+ class Multipart
23
+ attr_reader :fields
24
+
25
+ def initialize(fields = {})
26
+ @fields = fields
27
+ end
28
+
29
+ # Build the `[name, value]` pairs net/http's `#set_form` expects. Binary
30
+ # parts become `[name, io, { filename:, content_type: }]`; scalar parts
31
+ # become `[name, string]`.
32
+ def to_form_parts
33
+ @fields.map do |name, value|
34
+ if value.is_a?(FilePart)
35
+ [name.to_s, value.io, value.form_opts]
36
+ else
37
+ [name.to_s, value.to_s]
38
+ end
39
+ end
40
+ end
41
+
42
+ # A single binary file part. `content` may be a String of bytes, a
43
+ # `Pathname`, or any IO-like object (File/StringIO). Normalised to an IO
44
+ # so net/http streams it as a real file upload.
45
+ class FilePart
46
+ DEFAULT_CONTENT_TYPE = "application/octet-stream"
47
+
48
+ attr_reader :filename, :content_type
49
+
50
+ def initialize(content, filename: "file", content_type: DEFAULT_CONTENT_TYPE)
51
+ @content = content
52
+ @filename = filename
53
+ @content_type = content_type
54
+ end
55
+
56
+ # An IO net/http can read the bytes from. Strings are wrapped in a
57
+ # StringIO; Pathnames are opened in binary mode; existing IOs pass
58
+ # through unchanged.
59
+ def io
60
+ return @content if @content.respond_to?(:read)
61
+ if defined?(Pathname) && @content.is_a?(Pathname)
62
+ return @content.open("rb")
63
+ end
64
+
65
+ StringIO.new(@content.to_s)
66
+ end
67
+
68
+ def form_opts
69
+ {filename: @filename, content_type: @content_type}
70
+ end
71
+ end
72
+ end
73
+ end
data/lib/retab/secrets.rb CHANGED
@@ -10,7 +10,7 @@ module Retab
10
10
  @client = client
11
11
  end
12
12
 
13
- # List Secrets
13
+ # Secret.List
14
14
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
15
15
  # @return [Retab::SecretListResponse]
16
16
  def list_secrets(request_options: {})
@@ -29,7 +29,7 @@ module Retab
29
29
  result
30
30
  end
31
31
 
32
- # Create Secret
32
+ # Secret.Create
33
33
  # @param name [String]
34
34
  # @param value [String]
35
35
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
@@ -59,7 +59,7 @@ module Retab
59
59
  result
60
60
  end
61
61
 
62
- # Get Secret
62
+ # Secret.Get
63
63
  # @param name [String]
64
64
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
65
65
  # @return [Retab::SecretResponse]
@@ -82,7 +82,7 @@ module Retab
82
82
  result
83
83
  end
84
84
 
85
- # Set Secret
85
+ # Secret.Set
86
86
  # @param name [String]
87
87
  # @param value [String]
88
88
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
@@ -111,7 +111,7 @@ module Retab
111
111
  result
112
112
  end
113
113
 
114
- # Delete Secret
114
+ # Secret.Delete
115
115
  # @param name [String]
116
116
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
117
117
  # @return [void]
@@ -128,7 +128,7 @@ module Retab
128
128
  nil
129
129
  end
130
130
 
131
- # Get Secret Value
131
+ # Secret.Get Value
132
132
  # @param name [String]
133
133
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
134
134
  # @return [Retab::SecretValueResponse]
@@ -3,18 +3,20 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module Retab
6
- class BodyCreateTableV1TablesPost < Retab::Types::BaseModel
6
+ class CreateWorkflowTableUploadRequest < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
9
  name: :name,
10
10
  file: :file,
11
- column_schema_overrides: :column_schema_overrides
11
+ column_schema_overrides: :column_schema_overrides,
12
+ project_id: :project_id
12
13
  }.freeze
13
14
 
14
15
  attr_accessor(
15
16
  :name,
16
17
  :file,
17
- :column_schema_overrides
18
+ :column_schema_overrides,
19
+ :project_id
18
20
  )
19
21
 
20
22
  def initialize(json)
@@ -23,6 +25,7 @@ module Retab
23
25
  @name = hash[:name]
24
26
  @file = hash[:file]
25
27
  @column_schema_overrides = hash[:column_schema_overrides]
28
+ @project_id = hash[:project_id]
26
29
  end
27
30
  end
28
31
  end
@@ -3,7 +3,7 @@
3
3
  # This file is auto-generated by oagen. Do not edit.
4
4
 
5
5
  module Retab
6
- class BodyReplaceTableV1TablesTableIdPut < Retab::Types::BaseModel
6
+ class ReplaceWorkflowTableUploadRequest < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
9
  file: :file,
@@ -9,6 +9,7 @@ module Retab
9
9
  id: :id,
10
10
  name: :name,
11
11
  filename: :filename,
12
+ project_id: :project_id,
12
13
  source_file_id: :source_file_id,
13
14
  snapshot_file_id: :snapshot_file_id,
14
15
  row_count: :row_count,
@@ -24,6 +25,7 @@ module Retab
24
25
  :id,
25
26
  :name,
26
27
  :filename,
28
+ :project_id,
27
29
  :source_file_id,
28
30
  :snapshot_file_id,
29
31
  :row_count,
@@ -41,6 +43,7 @@ module Retab
41
43
  @id = hash[:id]
42
44
  @name = hash[:name]
43
45
  @filename = hash[:filename]
46
+ @project_id = hash[:project_id]
44
47
  @source_file_id = hash[:source_file_id].nil? ? "" : hash[:source_file_id]
45
48
  @snapshot_file_id = hash[:snapshot_file_id].nil? ? "" : hash[:snapshot_file_id]
46
49
  @row_count = hash[:row_count]
data/lib/retab/tables.rb CHANGED
@@ -10,14 +10,22 @@ module Retab
10
10
  @client = client
11
11
  end
12
12
 
13
- # List Tables
13
+ # Table.List
14
+ # @param project_id [String, nil] Only return tables belonging to this project.
14
15
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
15
16
  # @return [Retab::WorkflowTableListResponse]
16
- def list(request_options: {})
17
+ def list(
18
+ project_id: nil,
19
+ request_options: {}
20
+ )
21
+ params = {
22
+ "project_id" => project_id
23
+ }.compact
17
24
  response = @client.request(
18
25
  method: :get,
19
26
  path: "/v1/tables",
20
27
  auth: true,
28
+ params: params,
21
29
  request_options: request_options
22
30
  )
23
31
  result = Retab::WorkflowTableListResponse.new(response.body)
@@ -29,23 +37,26 @@ module Retab
29
37
  result
30
38
  end
31
39
 
32
- # Create Table
40
+ # Table.Create
33
41
  # @param name [String]
34
- # @param file [String]
42
+ # @param file [String, IO, Pathname]
35
43
  # @param column_schema_overrides [String, nil]
44
+ # @param project_id [String, nil]
36
45
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
37
46
  # @return [Retab::WorkflowTableListResponse]
38
47
  def create(
39
48
  name:,
40
49
  file:,
41
50
  column_schema_overrides: nil,
51
+ project_id: nil,
42
52
  request_options: {}
43
53
  )
44
- body = {
45
- "name" => name,
46
- "file" => file,
47
- "column_schema_overrides" => column_schema_overrides
48
- }.compact
54
+ multipart_fields = {}
55
+ multipart_fields["name"] = name unless name.nil?
56
+ multipart_fields["file"] = Retab::Multipart::FilePart.new(file, filename: "file") unless file.nil?
57
+ multipart_fields["column_schema_overrides"] = column_schema_overrides unless column_schema_overrides.nil?
58
+ multipart_fields["project_id"] = project_id unless project_id.nil?
59
+ body = Retab::Multipart.new(multipart_fields)
49
60
  response = @client.request(
50
61
  method: :post,
51
62
  path: "/v1/tables",
@@ -62,7 +73,7 @@ module Retab
62
73
  result
63
74
  end
64
75
 
65
- # Get Table
76
+ # Table.Get
66
77
  # @param table_id [String]
67
78
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
68
79
  # @return [Retab::WorkflowTableResponse]
@@ -85,9 +96,9 @@ module Retab
85
96
  result
86
97
  end
87
98
 
88
- # Replace Table
99
+ # Table.Replace
89
100
  # @param table_id [String]
90
- # @param file [String]
101
+ # @param file [String, IO, Pathname]
91
102
  # @param column_schema_overrides [String, nil]
92
103
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
93
104
  # @return [Retab::WorkflowTableListResponse]
@@ -97,10 +108,10 @@ module Retab
97
108
  column_schema_overrides: nil,
98
109
  request_options: {}
99
110
  )
100
- body = {
101
- "file" => file,
102
- "column_schema_overrides" => column_schema_overrides
103
- }.compact
111
+ multipart_fields = {}
112
+ multipart_fields["file"] = Retab::Multipart::FilePart.new(file, filename: "file") unless file.nil?
113
+ multipart_fields["column_schema_overrides"] = column_schema_overrides unless column_schema_overrides.nil?
114
+ body = Retab::Multipart.new(multipart_fields)
104
115
  response = @client.request(
105
116
  method: :put,
106
117
  path: "/v1/tables/#{Retab::Util.encode_path(table_id)}",
@@ -117,7 +128,7 @@ module Retab
117
128
  result
118
129
  end
119
130
 
120
- # Update Table
131
+ # Table.Update
121
132
  # @param table_id [String]
122
133
  # @param name [String, nil]
123
134
  # @param metadata [Hash{String => Object}, nil]
@@ -149,47 +160,41 @@ module Retab
149
160
  result
150
161
  end
151
162
 
152
- # Delete Table
163
+ # Table.Delete
153
164
  # @param table_id [String]
154
165
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
155
- # @return [Retab::WorkflowTableListResponse]
166
+ # @return [void]
156
167
  def delete(
157
168
  table_id:,
158
169
  request_options: {}
159
170
  )
160
- response = @client.request(
171
+ @client.request(
161
172
  method: :delete,
162
173
  path: "/v1/tables/#{Retab::Util.encode_path(table_id)}",
163
174
  auth: true,
164
175
  request_options: request_options
165
176
  )
166
- result = Retab::WorkflowTableListResponse.new(response.body)
167
- result.last_response = Retab::Types::ApiResponse.new(
168
- http_status: response.code.to_i,
169
- http_headers: response.each_header.to_h,
170
- request_id: response["x-request-id"]
171
- )
172
- result
177
+ nil
173
178
  end
174
179
 
175
- # Download Table Csv
180
+ # Table.Download
176
181
  # @param table_id [String]
177
182
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
178
- # @return [void]
183
+ # @return [String]
179
184
  def download(
180
185
  table_id:,
181
186
  request_options: {}
182
187
  )
183
- @client.request(
188
+ response = @client.request(
184
189
  method: :get,
185
190
  path: "/v1/tables/#{Retab::Util.encode_path(table_id)}/download",
186
191
  auth: true,
187
192
  request_options: request_options
188
193
  )
189
- nil
194
+ response.body
190
195
  end
191
196
 
192
- # Profile Table
197
+ # Table.Get Profile
193
198
  # @param table_id [String]
194
199
  # @param select [Array<String>, nil]
195
200
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
@@ -218,7 +223,7 @@ module Retab
218
223
  result
219
224
  end
220
225
 
221
- # Query Table
226
+ # Table.Query
222
227
  # @param table_id [String]
223
228
  # @param filters [Array<Retab::WorkflowTableFilterRule>, nil]
224
229
  # @param search [Retab::WorkflowTableSearchRequest, nil]
@@ -295,7 +300,7 @@ module Retab
295
300
  result
296
301
  end
297
302
 
298
- # Get Table Schema
303
+ # Table.Get Schema
299
304
  # @param table_id [String]
300
305
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
301
306
  # @return [Retab::WorkflowTableSchemaResponse]
@@ -318,7 +323,7 @@ module Retab
318
323
  result
319
324
  end
320
325
 
321
- # Validate Table
326
+ # Table.Validate
322
327
  # @param table_id [String]
323
328
  # @param required_columns [Array<String>, nil]
324
329
  # @param columns [Hash{String => Retab::WorkflowTableValidationColumnRule}, nil]
@@ -0,0 +1,15 @@
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 ArtifactDriftStatus
8
+ NONE = "none"
9
+ DRIFTED = "drifted"
10
+ BROKEN = "broken"
11
+ UNKNOWN = "unknown"
12
+ ALL = [NONE, DRIFTED, BROKEN, UNKNOWN].freeze
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
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 ArtifactFreshnessReasons
8
+ VALIDITY_CHANGED = "validity_changed"
9
+ INPUTS_CHANGED = "inputs_changed"
10
+ ENGINE_CHANGED = "engine_changed"
11
+ METRICS_ENGINE_CHANGED = "metrics_engine_changed"
12
+ NO_BASELINE = "no_baseline"
13
+ ALL = [VALIDITY_CHANGED, INPUTS_CHANGED, ENGINE_CHANGED, METRICS_ENGINE_CHANGED, NO_BASELINE].freeze
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
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 ArtifactFreshnessStatus
8
+ FRESH = "fresh"
9
+ STALE = "stale"
10
+ UNKNOWN = "unknown"
11
+ ALL = [FRESH, STALE, UNKNOWN].freeze
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
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 WorkflowAuthzStatus
8
+ PROVISIONING = "provisioning"
9
+ READY = "ready"
10
+ FAILED = "failed"
11
+ DELETING = "deleting"
12
+ DELETED = "deleted"
13
+ ALL = [PROVISIONING, READY, FAILED, DELETING, DELETED].freeze
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
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
+ WorkflowBlockVersionType = WorkflowBlockType
8
+ end
9
+ end
@@ -0,0 +1,26 @@
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 WorkflowCapabilities
8
+ WORKFLOW_VIEW = "workflow:view"
9
+ WORKFLOW_EDIT = "workflow:edit"
10
+ WORKFLOW_RUN = "workflow:run"
11
+ WORKFLOW_DELETE = "workflow:delete"
12
+ WORKFLOW_PUBLISH = "workflow:publish"
13
+ WORKFLOW_REVIEW = "workflow:review"
14
+ WORKFLOW_MANAGE = "workflow:manage"
15
+ ALL = [
16
+ WORKFLOW_VIEW,
17
+ WORKFLOW_EDIT,
18
+ WORKFLOW_RUN,
19
+ WORKFLOW_DELETE,
20
+ WORKFLOW_PUBLISH,
21
+ WORKFLOW_REVIEW,
22
+ WORKFLOW_MANAGE
23
+ ].freeze
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
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
+ WorkflowConfigBlockType = WorkflowBlockType
8
+ end
9
+ end
@@ -0,0 +1,18 @@
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 WorkflowTableValidationColumnRuleType
8
+ ARRAY = "array"
9
+ BOOLEAN = "boolean"
10
+ INTEGER = "integer"
11
+ NULL = "null"
12
+ NUMBER = "number"
13
+ OBJECT = "object"
14
+ STRING = "string"
15
+ ALL = [ARRAY, BOOLEAN, INTEGER, NULL, NUMBER, OBJECT, STRING].freeze
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowBlockVersion < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ id: :id,
10
+ block_id: :block_id,
11
+ workflow_id: :workflow_id,
12
+ workflow_version_id: :workflow_version_id,
13
+ type: :type,
14
+ label: :label,
15
+ position_x: :position_x,
16
+ position_y: :position_y,
17
+ width: :width,
18
+ height: :height,
19
+ parent_id: :parent_id,
20
+ config: :config,
21
+ resolved_schemas: :resolved_schemas,
22
+ config_hash: :config_hash,
23
+ created_at: :created_at
24
+ }.freeze
25
+
26
+ attr_accessor(
27
+ :id,
28
+ :block_id,
29
+ :workflow_id,
30
+ :workflow_version_id,
31
+ :type,
32
+ :label,
33
+ :position_x,
34
+ :position_y,
35
+ :width,
36
+ :height,
37
+ :parent_id,
38
+ :config,
39
+ :resolved_schemas,
40
+ :config_hash,
41
+ :created_at
42
+ )
43
+
44
+ def initialize(json)
45
+ super()
46
+ hash = self.class.normalize(json)
47
+ @id = hash[:id]
48
+ @block_id = hash[:block_id]
49
+ @workflow_id = hash[:workflow_id]
50
+ @workflow_version_id = hash[:workflow_version_id]
51
+ @type = hash[:type]
52
+ @label = hash[:label].nil? ? "" : hash[:label]
53
+ @position_x = hash[:position_x]
54
+ @position_y = hash[:position_y]
55
+ @width = hash[:width]
56
+ @height = hash[:height]
57
+ @parent_id = hash[:parent_id]
58
+ @config = hash[:config] || {}
59
+ @resolved_schemas = hash[:resolved_schemas] || {}
60
+ @config_hash = hash[:config_hash].nil? ? "" : hash[:config_hash]
61
+ @created_at = hash[:created_at]
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowBlockVersionDiff < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ from_block_version_id: :from_block_version_id,
10
+ to_block_version_id: :to_block_version_id,
11
+ block_id: :block_id,
12
+ changes: :changes
13
+ }.freeze
14
+
15
+ attr_accessor(
16
+ :from_block_version_id,
17
+ :to_block_version_id,
18
+ :block_id,
19
+ :changes
20
+ )
21
+
22
+ def initialize(json)
23
+ super()
24
+ hash = self.class.normalize(json)
25
+ @from_block_version_id = hash[:from_block_version_id]
26
+ @to_block_version_id = hash[:to_block_version_id]
27
+ @block_id = hash[:block_id]
28
+ @changes = (hash[:changes] || []).map { |item| item ? Retab::WorkflowVersionFieldDiff.new(item) : nil }
29
+ end
30
+ end
31
+ end