retab 0.1.5 → 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 (170) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retab/base_client.rb +9 -2
  3. data/lib/retab/client.rb +8 -0
  4. data/lib/retab/experiment_runs/experiment_run.rb +9 -0
  5. data/lib/retab/files/create_file_blueprint_request.rb +31 -0
  6. data/lib/retab/files/file_blueprint.rb +52 -0
  7. data/lib/retab/files.rb +88 -0
  8. data/lib/retab/multipart.rb +73 -0
  9. data/lib/retab/schemas/generate_schema_request.rb +3 -3
  10. data/lib/retab/schemas/{partial_schema.rb → schema_generation.rb} +12 -3
  11. data/lib/retab/schemas.rb +5 -5
  12. data/lib/retab/secrets/create_secret_request.rb +25 -0
  13. data/lib/retab/secrets/secret.rb +34 -0
  14. data/lib/retab/secrets/secret_list_response.rb +20 -0
  15. data/lib/retab/secrets/secret_response.rb +20 -0
  16. data/lib/retab/secrets/secret_value.rb +28 -0
  17. data/lib/retab/secrets/secret_value_response.rb +20 -0
  18. data/lib/retab/secrets/set_secret_request.rb +20 -0
  19. data/lib/retab/secrets.rb +154 -0
  20. data/lib/retab/tables/create_workflow_table_upload_request.rb +31 -0
  21. data/lib/retab/tables/query_workflow_table_request.rb +72 -0
  22. data/lib/retab/tables/replace_workflow_table_upload_request.rb +25 -0
  23. data/lib/retab/tables/update_workflow_table_request.rb +25 -0
  24. data/lib/retab/tables/workflow_table.rb +58 -0
  25. data/lib/retab/tables/workflow_table_aggregation_request.rb +28 -0
  26. data/lib/retab/tables/workflow_table_column.rb +34 -0
  27. data/lib/retab/tables/workflow_table_distinct_request.rb +20 -0
  28. data/lib/retab/tables/workflow_table_explain.rb +54 -0
  29. data/lib/retab/tables/workflow_table_filter_rule.rb +28 -0
  30. data/lib/retab/tables/workflow_table_list_response.rb +20 -0
  31. data/lib/retab/tables/workflow_table_profile_column.rb +49 -0
  32. data/lib/retab/tables/workflow_table_profile_response.rb +28 -0
  33. data/lib/retab/tables/workflow_table_response.rb +20 -0
  34. data/lib/retab/tables/workflow_table_row.rb +28 -0
  35. data/lib/retab/tables/workflow_table_rows_response.rb +52 -0
  36. data/lib/retab/tables/workflow_table_sample_request.rb +20 -0
  37. data/lib/retab/tables/workflow_table_schema_response.rb +25 -0
  38. data/lib/retab/tables/workflow_table_search_request.rb +25 -0
  39. data/lib/retab/tables/workflow_table_sort_rule.rb +25 -0
  40. data/lib/retab/tables/workflow_table_tail_request.rb +7 -0
  41. data/lib/retab/tables/workflow_table_validation_column_rule.rb +28 -0
  42. data/lib/retab/tables/workflow_table_validation_diagnostic.rb +31 -0
  43. data/lib/retab/tables/workflow_table_validation_request.rb +28 -0
  44. data/lib/retab/tables/workflow_table_validation_response.rb +30 -0
  45. data/lib/retab/tables.rb +361 -0
  46. data/lib/retab/types/artifact_drift_status.rb +15 -0
  47. data/lib/retab/types/artifact_freshness_reasons.rb +16 -0
  48. data/lib/retab/types/artifact_freshness_status.rb +14 -0
  49. data/lib/retab/types/create_file_blueprint_request_mode.rb +13 -0
  50. data/lib/retab/types/declarative_plan_resource_change_type.rb +0 -2
  51. data/lib/retab/types/file_blueprint_mode.rb +9 -0
  52. data/lib/retab/types/file_blueprint_status.rb +9 -0
  53. data/lib/retab/types/schema_generation_status.rb +9 -0
  54. data/lib/retab/types/validate_workflow_block_config_request_config_mode.rb +9 -0
  55. data/lib/retab/types/workflow_authz_status.rb +16 -0
  56. data/lib/retab/types/workflow_block_type.rb +0 -2
  57. data/lib/retab/types/workflow_block_version_type.rb +9 -0
  58. data/lib/retab/types/workflow_capabilities.rb +26 -0
  59. data/lib/retab/types/workflow_config_block_type.rb +9 -0
  60. data/lib/retab/types/workflow_table_aggregation_function.rb +17 -0
  61. data/lib/retab/types/workflow_table_filter_operator.rb +46 -0
  62. data/lib/retab/types/workflow_table_sort_direction.rb +9 -0
  63. data/lib/retab/types/workflow_table_validation_column_rule_type.rb +18 -0
  64. data/lib/retab/types/workflow_table_validation_severity.rb +13 -0
  65. data/lib/retab/workflow_blocks/validate_workflow_block_config_request.rb +25 -0
  66. data/lib/retab/workflow_blocks/validate_workflow_block_config_response.rb +34 -0
  67. data/lib/retab/workflow_blocks/workflow_block.rb +6 -0
  68. data/lib/retab/workflow_blocks/workflow_block_version.rb +64 -0
  69. data/lib/retab/workflow_blocks/workflow_block_version_diff.rb +31 -0
  70. data/lib/retab/workflow_blocks/workflow_version_field_diff.rb +28 -0
  71. data/lib/retab/workflow_blocks.rb +172 -0
  72. data/lib/retab/workflow_edges/workflow_edge_version.rb +49 -0
  73. data/lib/retab/workflow_edges/workflow_edge_version_diff.rb +31 -0
  74. data/lib/retab/workflow_edges.rb +134 -0
  75. data/lib/retab/workflow_experiments/artifact_drift.rb +28 -0
  76. data/lib/retab/workflow_experiments/artifact_freshness.rb +34 -0
  77. data/lib/retab/workflow_experiments/workflow_experiment.rb +8 -2
  78. data/lib/retab/workflow_review_versions.rb +3 -3
  79. data/lib/retab/workflow_reviews.rb +4 -4
  80. data/lib/retab/workflow_runs.rb +1 -1
  81. data/lib/retab/workflow_spec.rb +6 -57
  82. data/lib/retab/workflow_test_runs/workflow_test_run.rb +5 -2
  83. data/lib/retab/workflow_tests/latest_block_test_run_summary.rb +6 -0
  84. data/lib/retab/workflow_tests/workflow_test.rb +6 -0
  85. data/lib/retab/workflows/create_workflow_request.rb +5 -2
  86. data/lib/retab/{workflow_spec → workflows}/declarative_workflow_request.rb +7 -2
  87. data/lib/retab/workflows/workflow.rb +11 -2
  88. data/lib/retab/workflows/workflow_block_position.rb +25 -0
  89. data/lib/retab/workflows/workflow_config_block.rb +46 -0
  90. data/lib/retab/workflows/workflow_config_edge.rb +37 -0
  91. data/lib/retab/workflows/workflow_graph_version.rb +40 -0
  92. data/lib/retab/workflows/workflow_graph_version_diff.rb +43 -0
  93. data/lib/retab/workflows.rb +209 -3
  94. data/lib/retab.rb +2 -0
  95. data/rbi/retab/artifact_drift.rbi +36 -0
  96. data/rbi/retab/artifact_freshness.rbi +48 -0
  97. data/rbi/retab/client.rbi +6 -0
  98. data/rbi/retab/create_file_blueprint_request.rbi +42 -0
  99. data/rbi/retab/create_secret_request.rbi +30 -0
  100. data/rbi/retab/create_upload_response.rbi +2 -2
  101. data/rbi/retab/create_workflow_request.rbi +6 -0
  102. data/rbi/retab/create_workflow_table_upload_request.rbi +42 -0
  103. data/rbi/retab/declarative_workflow_request.rbi +6 -0
  104. data/rbi/retab/experiment_run.rbi +18 -0
  105. data/rbi/retab/file_blueprint.rbi +84 -0
  106. data/rbi/retab/files.rbi +28 -0
  107. data/rbi/retab/generate_schema_request.rbi +2 -2
  108. data/rbi/retab/latest_block_test_run_summary.rbi +12 -0
  109. data/rbi/retab/query_workflow_table_request.rbi +120 -0
  110. data/rbi/retab/replace_workflow_table_upload_request.rbi +30 -0
  111. data/rbi/retab/{partial_schema.rbi → schema_generation.rbi} +19 -1
  112. data/rbi/retab/schemas.rbi +3 -3
  113. data/rbi/retab/secret.rbi +48 -0
  114. data/rbi/retab/secret_list_response.rbi +24 -0
  115. data/rbi/retab/secret_response.rbi +24 -0
  116. data/rbi/retab/secret_value.rbi +36 -0
  117. data/rbi/retab/secret_value_response.rbi +24 -0
  118. data/rbi/retab/secrets.rbi +62 -0
  119. data/rbi/retab/set_secret_request.rbi +24 -0
  120. data/rbi/retab/tables.rbi +129 -0
  121. data/rbi/retab/update_workflow_table_request.rbi +30 -0
  122. data/rbi/retab/validate_workflow_block_config_request.rbi +30 -0
  123. data/rbi/retab/validate_workflow_block_config_response.rbi +48 -0
  124. data/rbi/retab/workflow.rbi +18 -0
  125. data/rbi/retab/workflow_block.rbi +12 -0
  126. data/rbi/retab/workflow_block_position.rbi +30 -0
  127. data/rbi/retab/workflow_block_version.rbi +108 -0
  128. data/rbi/retab/workflow_block_version_diff.rbi +42 -0
  129. data/rbi/retab/workflow_blocks.rbi +49 -0
  130. data/rbi/retab/workflow_config_block.rbi +72 -0
  131. data/rbi/retab/workflow_config_edge.rbi +54 -0
  132. data/rbi/retab/workflow_edge_version.rbi +78 -0
  133. data/rbi/retab/workflow_edge_version_diff.rbi +42 -0
  134. data/rbi/retab/workflow_edges.rbi +38 -0
  135. data/rbi/retab/workflow_experiment.rbi +12 -0
  136. data/rbi/retab/workflow_graph_version.rbi +60 -0
  137. data/rbi/retab/workflow_graph_version_diff.rbi +66 -0
  138. data/rbi/retab/workflow_spec.rbi +2 -17
  139. data/rbi/retab/workflow_table.rbi +96 -0
  140. data/rbi/retab/workflow_table_aggregation_request.rbi +36 -0
  141. data/rbi/retab/workflow_table_column.rbi +48 -0
  142. data/rbi/retab/workflow_table_distinct_request.rbi +24 -0
  143. data/rbi/retab/workflow_table_explain.rbi +84 -0
  144. data/rbi/retab/workflow_table_filter_rule.rbi +36 -0
  145. data/rbi/retab/workflow_table_list_response.rbi +24 -0
  146. data/rbi/retab/workflow_table_profile_column.rbi +78 -0
  147. data/rbi/retab/workflow_table_profile_response.rbi +36 -0
  148. data/rbi/retab/workflow_table_response.rbi +24 -0
  149. data/rbi/retab/workflow_table_row.rbi +36 -0
  150. data/rbi/retab/workflow_table_rows_response.rbi +84 -0
  151. data/rbi/retab/workflow_table_sample_request.rbi +24 -0
  152. data/rbi/retab/workflow_table_schema_response.rbi +30 -0
  153. data/rbi/retab/workflow_table_search_request.rbi +30 -0
  154. data/rbi/retab/workflow_table_sort_rule.rbi +30 -0
  155. data/rbi/retab/workflow_table_tail_request.rbi +24 -0
  156. data/rbi/retab/workflow_table_validation_column_rule.rbi +36 -0
  157. data/rbi/retab/workflow_table_validation_diagnostic.rbi +42 -0
  158. data/rbi/retab/workflow_table_validation_request.rbi +36 -0
  159. data/rbi/retab/workflow_table_validation_response.rbi +36 -0
  160. data/rbi/retab/workflow_test.rbi +12 -0
  161. data/rbi/retab/workflow_test_run.rbi +6 -0
  162. data/rbi/retab/workflow_version_field_diff.rbi +36 -0
  163. data/rbi/retab/workflows.rbi +61 -2
  164. metadata +128 -10
  165. /data/lib/retab/{workflow_spec → workflows}/declarative_apply_response.rb +0 -0
  166. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_change.rb +0 -0
  167. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_field_change.rb +0 -0
  168. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_resource_change.rb +0 -0
  169. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_response.rb +0 -0
  170. /data/lib/retab/{workflow_spec → workflows}/declarative_plan_summary.rb +0 -0
@@ -0,0 +1,154 @@
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 Secrets
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ # Secret.List
14
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
15
+ # @return [Retab::SecretListResponse]
16
+ def list_secrets(request_options: {})
17
+ response = @client.request(
18
+ method: :get,
19
+ path: "/v1/secrets",
20
+ auth: true,
21
+ request_options: request_options
22
+ )
23
+ result = Retab::SecretListResponse.new(response.body)
24
+ result.last_response = Retab::Types::ApiResponse.new(
25
+ http_status: response.code.to_i,
26
+ http_headers: response.each_header.to_h,
27
+ request_id: response["x-request-id"]
28
+ )
29
+ result
30
+ end
31
+
32
+ # Secret.Create
33
+ # @param name [String]
34
+ # @param value [String]
35
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
36
+ # @return [Retab::SecretResponse]
37
+ def create_secret(
38
+ name:,
39
+ value:,
40
+ request_options: {}
41
+ )
42
+ body = {
43
+ "name" => name,
44
+ "value" => value
45
+ }
46
+ response = @client.request(
47
+ method: :post,
48
+ path: "/v1/secrets",
49
+ auth: true,
50
+ body: body,
51
+ request_options: request_options
52
+ )
53
+ result = Retab::SecretResponse.new(response.body)
54
+ result.last_response = Retab::Types::ApiResponse.new(
55
+ http_status: response.code.to_i,
56
+ http_headers: response.each_header.to_h,
57
+ request_id: response["x-request-id"]
58
+ )
59
+ result
60
+ end
61
+
62
+ # Secret.Get
63
+ # @param name [String]
64
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
65
+ # @return [Retab::SecretResponse]
66
+ def get_secret(
67
+ name:,
68
+ request_options: {}
69
+ )
70
+ response = @client.request(
71
+ method: :get,
72
+ path: "/v1/secrets/#{Retab::Util.encode_path(name)}",
73
+ auth: true,
74
+ request_options: request_options
75
+ )
76
+ result = Retab::SecretResponse.new(response.body)
77
+ result.last_response = Retab::Types::ApiResponse.new(
78
+ http_status: response.code.to_i,
79
+ http_headers: response.each_header.to_h,
80
+ request_id: response["x-request-id"]
81
+ )
82
+ result
83
+ end
84
+
85
+ # Secret.Set
86
+ # @param name [String]
87
+ # @param value [String]
88
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
89
+ # @return [Retab::SecretResponse]
90
+ def update_secret(
91
+ name:,
92
+ value:,
93
+ request_options: {}
94
+ )
95
+ body = {
96
+ "value" => value
97
+ }
98
+ response = @client.request(
99
+ method: :put,
100
+ path: "/v1/secrets/#{Retab::Util.encode_path(name)}",
101
+ auth: true,
102
+ body: body,
103
+ request_options: request_options
104
+ )
105
+ result = Retab::SecretResponse.new(response.body)
106
+ result.last_response = Retab::Types::ApiResponse.new(
107
+ http_status: response.code.to_i,
108
+ http_headers: response.each_header.to_h,
109
+ request_id: response["x-request-id"]
110
+ )
111
+ result
112
+ end
113
+
114
+ # Secret.Delete
115
+ # @param name [String]
116
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
117
+ # @return [void]
118
+ def delete_secret(
119
+ name:,
120
+ request_options: {}
121
+ )
122
+ @client.request(
123
+ method: :delete,
124
+ path: "/v1/secrets/#{Retab::Util.encode_path(name)}",
125
+ auth: true,
126
+ request_options: request_options
127
+ )
128
+ nil
129
+ end
130
+
131
+ # Secret.Get Value
132
+ # @param name [String]
133
+ # @param request_options [Hash] (see Retab::Types::RequestOptions)
134
+ # @return [Retab::SecretValueResponse]
135
+ def list_secret_value(
136
+ name:,
137
+ request_options: {}
138
+ )
139
+ response = @client.request(
140
+ method: :get,
141
+ path: "/v1/secrets/#{Retab::Util.encode_path(name)}/value",
142
+ auth: true,
143
+ request_options: request_options
144
+ )
145
+ result = Retab::SecretValueResponse.new(response.body)
146
+ result.last_response = Retab::Types::ApiResponse.new(
147
+ http_status: response.code.to_i,
148
+ http_headers: response.each_header.to_h,
149
+ request_id: response["x-request-id"]
150
+ )
151
+ result
152
+ end
153
+ end
154
+ 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 CreateWorkflowTableUploadRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ name: :name,
10
+ file: :file,
11
+ column_schema_overrides: :column_schema_overrides,
12
+ project_id: :project_id
13
+ }.freeze
14
+
15
+ attr_accessor(
16
+ :name,
17
+ :file,
18
+ :column_schema_overrides,
19
+ :project_id
20
+ )
21
+
22
+ def initialize(json)
23
+ super()
24
+ hash = self.class.normalize(json)
25
+ @name = hash[:name]
26
+ @file = hash[:file]
27
+ @column_schema_overrides = hash[:column_schema_overrides]
28
+ @project_id = hash[:project_id]
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class QueryWorkflowTableRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ filters: :filters,
10
+ search: :search,
11
+ case_sensitive: :case_sensitive,
12
+ select: :select,
13
+ distinct: :distinct,
14
+ group_by: :group_by,
15
+ aggregations: :aggregations,
16
+ sort: :sort,
17
+ sample: :sample,
18
+ tail: :tail,
19
+ count_only: :count_only,
20
+ include_explain: :include_explain,
21
+ sort_column: :sort_column,
22
+ sort_direction: :sort_direction,
23
+ viewer_mode: :viewer_mode,
24
+ offset: :offset,
25
+ limit: :limit
26
+ }.freeze
27
+
28
+ attr_accessor(
29
+ :filters,
30
+ :search,
31
+ :case_sensitive,
32
+ :select,
33
+ :distinct,
34
+ :group_by,
35
+ :aggregations,
36
+ :sort,
37
+ :sample,
38
+ :tail,
39
+ :count_only,
40
+ :include_explain,
41
+ :sort_column,
42
+ :sort_direction,
43
+ :viewer_mode,
44
+ :offset,
45
+ :limit
46
+ )
47
+
48
+ def initialize(json)
49
+ super()
50
+ hash = self.class.normalize(json)
51
+ @filters = (hash[:filters] || []).map { |item| item ? Retab::WorkflowTableFilterRule.new(item) : nil }
52
+ @search = hash[:search] ? Retab::WorkflowTableSearchRequest.new(hash[:search]) : nil
53
+ @case_sensitive = hash[:case_sensitive].nil? ? false : hash[:case_sensitive]
54
+ @select = (hash[:select] || [])
55
+ @distinct = hash[:distinct] ? Retab::WorkflowTableDistinctRequest.new(hash[:distinct]) : nil
56
+ @group_by = (hash[:group_by] || [])
57
+ @aggregations = (hash[:aggregations] || []).map { |item|
58
+ item ? Retab::WorkflowTableAggregationRequest.new(item) : nil
59
+ }
60
+ @sort = (hash[:sort] || []).map { |item| item ? Retab::WorkflowTableSortRule.new(item) : nil }
61
+ @sample = hash[:sample] ? Retab::WorkflowTableSampleRequest.new(hash[:sample]) : nil
62
+ @tail = hash[:tail] ? Retab::WorkflowTableTailRequest.new(hash[:tail]) : nil
63
+ @count_only = hash[:count_only].nil? ? false : hash[:count_only]
64
+ @include_explain = hash[:include_explain].nil? ? false : hash[:include_explain]
65
+ @sort_column = hash[:sort_column]
66
+ @sort_direction = hash[:sort_direction]
67
+ @viewer_mode = hash[:viewer_mode]
68
+ @offset = hash[:offset]
69
+ @limit = hash[:limit]
70
+ end
71
+ end
72
+ end
@@ -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 ReplaceWorkflowTableUploadRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ file: :file,
10
+ column_schema_overrides: :column_schema_overrides
11
+ }.freeze
12
+
13
+ attr_accessor(
14
+ :file,
15
+ :column_schema_overrides
16
+ )
17
+
18
+ def initialize(json)
19
+ super()
20
+ hash = self.class.normalize(json)
21
+ @file = hash[:file]
22
+ @column_schema_overrides = hash[:column_schema_overrides]
23
+ end
24
+ end
25
+ end
@@ -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 UpdateWorkflowTableRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ name: :name,
10
+ metadata: :metadata
11
+ }.freeze
12
+
13
+ attr_accessor(
14
+ :name,
15
+ :metadata
16
+ )
17
+
18
+ def initialize(json)
19
+ super()
20
+ hash = self.class.normalize(json)
21
+ @name = hash[:name]
22
+ @metadata = hash[:metadata] || {}
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTable < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ id: :id,
10
+ name: :name,
11
+ filename: :filename,
12
+ project_id: :project_id,
13
+ source_file_id: :source_file_id,
14
+ snapshot_file_id: :snapshot_file_id,
15
+ row_count: :row_count,
16
+ columns: :columns,
17
+ sample_rows: :sample_rows,
18
+ metadata: :metadata,
19
+ uploaded_by_user_id: :uploaded_by_user_id,
20
+ created_at: :created_at,
21
+ updated_at: :updated_at
22
+ }.freeze
23
+
24
+ attr_accessor(
25
+ :id,
26
+ :name,
27
+ :filename,
28
+ :project_id,
29
+ :source_file_id,
30
+ :snapshot_file_id,
31
+ :row_count,
32
+ :columns,
33
+ :sample_rows,
34
+ :metadata,
35
+ :uploaded_by_user_id,
36
+ :created_at,
37
+ :updated_at
38
+ )
39
+
40
+ def initialize(json)
41
+ super()
42
+ hash = self.class.normalize(json)
43
+ @id = hash[:id]
44
+ @name = hash[:name]
45
+ @filename = hash[:filename]
46
+ @project_id = hash[:project_id]
47
+ @source_file_id = hash[:source_file_id].nil? ? "" : hash[:source_file_id]
48
+ @snapshot_file_id = hash[:snapshot_file_id].nil? ? "" : hash[:snapshot_file_id]
49
+ @row_count = hash[:row_count]
50
+ @columns = (hash[:columns] || []).map { |item| item ? Retab::WorkflowTableColumn.new(item) : nil }
51
+ @sample_rows = (hash[:sample_rows] || []).map { |item| item || {} }
52
+ @metadata = hash[:metadata] || {}
53
+ @uploaded_by_user_id = hash[:uploaded_by_user_id]
54
+ @created_at = hash[:created_at]
55
+ @updated_at = hash[:updated_at]
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableAggregationRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ function: :function,
10
+ column: :column,
11
+ alias: :alias
12
+ }.freeze
13
+
14
+ attr_accessor(
15
+ :function,
16
+ :column,
17
+ :alias
18
+ )
19
+
20
+ def initialize(json)
21
+ super()
22
+ hash = self.class.normalize(json)
23
+ @function = hash[:function]
24
+ @column = hash[:column]
25
+ @alias = hash[:alias]
26
+ end
27
+ end
28
+ 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 WorkflowTableColumn < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ name: :name,
10
+ json_schema: :json_schema,
11
+ sample_values: :sample_values,
12
+ required: :required,
13
+ unique: :unique
14
+ }.freeze
15
+
16
+ attr_accessor(
17
+ :name,
18
+ :json_schema,
19
+ :sample_values,
20
+ :required,
21
+ :unique
22
+ )
23
+
24
+ def initialize(json)
25
+ super()
26
+ hash = self.class.normalize(json)
27
+ @name = hash[:name]
28
+ @json_schema = hash[:json_schema] || {}
29
+ @sample_values = (hash[:sample_values] || [])
30
+ @required = hash[:required].nil? ? false : hash[:required]
31
+ @unique = hash[:unique].nil? ? false : hash[:unique]
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableDistinctRequest < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ column: :column
10
+ }.freeze
11
+
12
+ attr_accessor :column
13
+
14
+ def initialize(json)
15
+ super()
16
+ hash = self.class.normalize(json)
17
+ @column = hash[:column]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableExplain < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ table_id: :table_id,
10
+ snapshot_file_id: :snapshot_file_id,
11
+ selected_columns: :selected_columns,
12
+ filters: :filters,
13
+ search: :search,
14
+ sort: :sort,
15
+ offset: :offset,
16
+ limit: :limit,
17
+ distinct: :distinct,
18
+ group_by: :group_by,
19
+ aggregations: :aggregations
20
+ }.freeze
21
+
22
+ attr_accessor(
23
+ :table_id,
24
+ :snapshot_file_id,
25
+ :selected_columns,
26
+ :filters,
27
+ :search,
28
+ :sort,
29
+ :offset,
30
+ :limit,
31
+ :distinct,
32
+ :group_by,
33
+ :aggregations
34
+ )
35
+
36
+ def initialize(json)
37
+ super()
38
+ hash = self.class.normalize(json)
39
+ @table_id = hash[:table_id]
40
+ @snapshot_file_id = hash[:snapshot_file_id].nil? ? "" : hash[:snapshot_file_id]
41
+ @selected_columns = (hash[:selected_columns] || [])
42
+ @filters = (hash[:filters] || []).map { |item| item ? Retab::WorkflowTableFilterRule.new(item) : nil }
43
+ @search = hash[:search] ? Retab::WorkflowTableSearchRequest.new(hash[:search]) : nil
44
+ @sort = (hash[:sort] || []).map { |item| item ? Retab::WorkflowTableSortRule.new(item) : nil }
45
+ @offset = hash[:offset]
46
+ @limit = hash[:limit]
47
+ @distinct = hash[:distinct] ? Retab::WorkflowTableDistinctRequest.new(hash[:distinct]) : nil
48
+ @group_by = (hash[:group_by] || [])
49
+ @aggregations = (hash[:aggregations] || []).map { |item|
50
+ item ? Retab::WorkflowTableAggregationRequest.new(item) : nil
51
+ }
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableFilterRule < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ column: :column,
10
+ operator: :operator,
11
+ value: :value
12
+ }.freeze
13
+
14
+ attr_accessor(
15
+ :column,
16
+ :operator,
17
+ :value
18
+ )
19
+
20
+ def initialize(json)
21
+ super()
22
+ hash = self.class.normalize(json)
23
+ @column = hash[:column]
24
+ @operator = hash[:operator]
25
+ @value = hash[:value]
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableListResponse < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ tables: :tables
10
+ }.freeze
11
+
12
+ attr_accessor :tables
13
+
14
+ def initialize(json)
15
+ super()
16
+ hash = self.class.normalize(json)
17
+ @tables = (hash[:tables] || []).map { |item| item ? Retab::WorkflowTable.new(item) : nil }
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableProfileColumn < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ name: :name,
10
+ json_schema: :json_schema,
11
+ row_count: :row_count,
12
+ null_count: :null_count,
13
+ empty_count: :empty_count,
14
+ distinct_count: :distinct_count,
15
+ min: :min,
16
+ max: :max,
17
+ sample_values: :sample_values,
18
+ is_estimated: :is_estimated
19
+ }.freeze
20
+
21
+ attr_accessor(
22
+ :name,
23
+ :json_schema,
24
+ :row_count,
25
+ :null_count,
26
+ :empty_count,
27
+ :distinct_count,
28
+ :min,
29
+ :max,
30
+ :sample_values,
31
+ :is_estimated
32
+ )
33
+
34
+ def initialize(json)
35
+ super()
36
+ hash = self.class.normalize(json)
37
+ @name = hash[:name]
38
+ @json_schema = hash[:json_schema] || {}
39
+ @row_count = hash[:row_count]
40
+ @null_count = hash[:null_count]
41
+ @empty_count = hash[:empty_count]
42
+ @distinct_count = hash[:distinct_count]
43
+ @min = hash[:min]
44
+ @max = hash[:max]
45
+ @sample_values = (hash[:sample_values] || [])
46
+ @is_estimated = hash[:is_estimated].nil? ? false : hash[:is_estimated]
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableProfileResponse < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ table_id: :table_id,
10
+ row_count: :row_count,
11
+ columns: :columns
12
+ }.freeze
13
+
14
+ attr_accessor(
15
+ :table_id,
16
+ :row_count,
17
+ :columns
18
+ )
19
+
20
+ def initialize(json)
21
+ super()
22
+ hash = self.class.normalize(json)
23
+ @table_id = hash[:table_id]
24
+ @row_count = hash[:row_count]
25
+ @columns = (hash[:columns] || []).map { |item| item ? Retab::WorkflowTableProfileColumn.new(item) : nil }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableResponse < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ table: :table
10
+ }.freeze
11
+
12
+ attr_accessor :table
13
+
14
+ def initialize(json)
15
+ super()
16
+ hash = self.class.normalize(json)
17
+ @table = hash[:table] ? Retab::WorkflowTable.new(hash[:table]) : nil
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ class WorkflowTableRow < Retab::Types::BaseModel
7
+
8
+ HASH_ATTRS = {
9
+ id: :id,
10
+ data: :data,
11
+ position: :position
12
+ }.freeze
13
+
14
+ attr_accessor(
15
+ :id,
16
+ :data,
17
+ :position
18
+ )
19
+
20
+ def initialize(json)
21
+ super()
22
+ hash = self.class.normalize(json)
23
+ @id = hash[:id]
24
+ @data = hash[:data] || {}
25
+ @position = hash[:position]
26
+ end
27
+ end
28
+ end