retab 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/retab/base_client.rb +9 -2
- data/lib/retab/experiment_run_results/experiment_result.rb +6 -3
- data/lib/retab/experiment_runs/experiment_run.rb +9 -0
- data/lib/retab/multipart.rb +73 -0
- data/lib/retab/secrets.rb +6 -6
- data/lib/retab/tables/{body_create_table_v_1_tables_post.rb → create_workflow_table_upload_request.rb} +6 -3
- data/lib/retab/tables/{body_replace_table_v_1_tables_table_id_put.rb → replace_workflow_table_upload_request.rb} +1 -1
- data/lib/retab/tables/workflow_table.rb +3 -0
- data/lib/retab/tables.rb +40 -35
- data/lib/retab/types/artifact_drift_status.rb +15 -0
- data/lib/retab/types/artifact_freshness_reasons.rb +16 -0
- data/lib/retab/types/artifact_freshness_status.rb +14 -0
- data/lib/retab/types/workflow_authz_status.rb +16 -0
- data/lib/retab/types/workflow_block_version_type.rb +9 -0
- data/lib/retab/types/workflow_capabilities.rb +26 -0
- data/lib/retab/types/workflow_config_block_type.rb +9 -0
- data/lib/retab/types/workflow_table_validation_column_rule_type.rb +18 -0
- data/lib/retab/workflow_block_executions/stored_block_execution.rb +6 -6
- data/lib/retab/workflow_blocks/workflow_block_version.rb +64 -0
- data/lib/retab/workflow_blocks/workflow_block_version_diff.rb +31 -0
- data/lib/retab/workflow_blocks/workflow_version_field_diff.rb +28 -0
- data/lib/retab/workflow_blocks.rb +135 -1
- data/lib/retab/workflow_edges/workflow_edge_version.rb +49 -0
- data/lib/retab/workflow_edges/workflow_edge_version_diff.rb +31 -0
- data/lib/retab/workflow_edges.rb +134 -0
- data/lib/retab/workflow_experiments/artifact_drift.rb +28 -0
- data/lib/retab/workflow_experiments/artifact_freshness.rb +34 -0
- data/lib/retab/workflow_experiments/file_handle_input.rb +1 -1
- data/lib/retab/workflow_experiments/workflow_experiment.rb +8 -2
- data/lib/retab/workflow_review_versions.rb +3 -3
- data/lib/retab/workflow_reviews.rb +4 -4
- data/lib/retab/workflow_runs.rb +1 -1
- data/lib/retab/workflow_spec.rb +6 -57
- data/lib/retab/workflow_test_runs/workflow_test_run.rb +5 -2
- data/lib/retab/workflow_tests/latest_block_test_run_summary.rb +6 -0
- data/lib/retab/workflow_tests/workflow_test.rb +6 -0
- data/lib/retab/workflows/create_workflow_request.rb +5 -2
- data/lib/retab/{workflow_spec → workflows}/declarative_workflow_request.rb +7 -2
- data/lib/retab/workflows/workflow.rb +11 -2
- data/lib/retab/workflows/workflow_block_position.rb +25 -0
- data/lib/retab/workflows/workflow_config_block.rb +46 -0
- data/lib/retab/workflows/workflow_config_edge.rb +37 -0
- data/lib/retab/workflows/workflow_graph_version.rb +40 -0
- data/lib/retab/workflows/workflow_graph_version_diff.rb +43 -0
- data/lib/retab/workflows.rb +209 -3
- data/rbi/retab/artifact_drift.rbi +36 -0
- data/rbi/retab/artifact_freshness.rbi +48 -0
- data/rbi/retab/create_upload_response.rbi +2 -2
- data/rbi/retab/create_workflow_request.rbi +6 -0
- data/rbi/retab/{body_create_table_v_1_tables_post.rbi → create_workflow_table_upload_request.rbi} +7 -1
- data/rbi/retab/declarative_workflow_request.rbi +6 -0
- data/rbi/retab/experiment_result.rbi +8 -2
- data/rbi/retab/experiment_run.rbi +18 -0
- data/rbi/retab/file_handle_input.rbi +2 -2
- data/rbi/retab/latest_block_test_run_summary.rbi +12 -0
- data/rbi/retab/{body_replace_table_v_1_tables_table_id_put.rbi → replace_workflow_table_upload_request.rbi} +1 -1
- data/rbi/retab/stored_block_execution.rbi +4 -4
- data/rbi/retab/tables.rbi +6 -4
- data/rbi/retab/workflow.rbi +18 -0
- data/rbi/retab/workflow_block_position.rbi +30 -0
- data/rbi/retab/workflow_block_version.rbi +108 -0
- data/rbi/retab/workflow_block_version_diff.rbi +42 -0
- data/rbi/retab/workflow_blocks.rbi +38 -0
- data/rbi/retab/workflow_config_block.rbi +72 -0
- data/rbi/retab/workflow_config_edge.rbi +54 -0
- data/rbi/retab/workflow_edge_version.rbi +78 -0
- data/rbi/retab/workflow_edge_version_diff.rbi +42 -0
- data/rbi/retab/workflow_edges.rbi +38 -0
- data/rbi/retab/workflow_experiment.rbi +12 -0
- data/rbi/retab/workflow_graph_version.rbi +60 -0
- data/rbi/retab/workflow_graph_version_diff.rbi +66 -0
- data/rbi/retab/workflow_spec.rbi +2 -17
- data/rbi/retab/workflow_table.rbi +6 -0
- data/rbi/retab/workflow_test.rbi +12 -0
- data/rbi/retab/workflow_test_run.rbi +6 -0
- data/rbi/retab/workflow_version_field_diff.rbi +36 -0
- data/rbi/retab/workflows.rbi +61 -2
- metadata +45 -14
- data/lib/retab/workflow_experiments/materialized_document.rb +0 -37
- data/rbi/retab/materialized_document.rbi +0 -54
- /data/lib/retab/{workflow_spec → workflows}/declarative_apply_response.rb +0 -0
- /data/lib/retab/{workflow_spec → workflows}/declarative_plan_change.rb +0 -0
- /data/lib/retab/{workflow_spec → workflows}/declarative_plan_field_change.rb +0 -0
- /data/lib/retab/{workflow_spec → workflows}/declarative_plan_resource_change.rb +0 -0
- /data/lib/retab/{workflow_spec → workflows}/declarative_plan_response.rb +0 -0
- /data/lib/retab/{workflow_spec → workflows}/declarative_plan_summary.rb +0 -0
data/lib/retab/workflow_spec.rb
CHANGED
|
@@ -10,71 +10,20 @@ module Retab
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Apply Workflow Spec
|
|
14
|
-
# @param yaml_definition [String] Workflow YAML definition
|
|
15
|
-
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
16
|
-
# @return [Retab::DeclarativeApplyResponse]
|
|
17
|
-
def apply(
|
|
18
|
-
yaml_definition:,
|
|
19
|
-
request_options: {}
|
|
20
|
-
)
|
|
21
|
-
body = {
|
|
22
|
-
"yaml_definition" => yaml_definition
|
|
23
|
-
}
|
|
24
|
-
response = @client.request(
|
|
25
|
-
method: :post,
|
|
26
|
-
path: "/v1/workflows/spec/apply",
|
|
27
|
-
auth: true,
|
|
28
|
-
body: body,
|
|
29
|
-
request_options: request_options
|
|
30
|
-
)
|
|
31
|
-
result = Retab::DeclarativeApplyResponse.new(response.body)
|
|
32
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
33
|
-
http_status: response.code.to_i,
|
|
34
|
-
http_headers: response.each_header.to_h,
|
|
35
|
-
request_id: response["x-request-id"]
|
|
36
|
-
)
|
|
37
|
-
result
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Plan Workflow Spec
|
|
41
|
-
# @param yaml_definition [String] Workflow YAML definition
|
|
42
|
-
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
43
|
-
# @return [Retab::DeclarativePlanResponse]
|
|
44
|
-
def plan(
|
|
45
|
-
yaml_definition:,
|
|
46
|
-
request_options: {}
|
|
47
|
-
)
|
|
48
|
-
body = {
|
|
49
|
-
"yaml_definition" => yaml_definition
|
|
50
|
-
}
|
|
51
|
-
response = @client.request(
|
|
52
|
-
method: :post,
|
|
53
|
-
path: "/v1/workflows/spec/plan",
|
|
54
|
-
auth: true,
|
|
55
|
-
body: body,
|
|
56
|
-
request_options: request_options
|
|
57
|
-
)
|
|
58
|
-
result = Retab::DeclarativePlanResponse.new(response.body)
|
|
59
|
-
result.last_response = Retab::Types::ApiResponse.new(
|
|
60
|
-
http_status: response.code.to_i,
|
|
61
|
-
http_headers: response.each_header.to_h,
|
|
62
|
-
request_id: response["x-request-id"]
|
|
63
|
-
)
|
|
64
|
-
result
|
|
65
|
-
end
|
|
66
|
-
|
|
67
13
|
# Validate Workflow Spec
|
|
68
14
|
# @param yaml_definition [String] Workflow YAML definition
|
|
15
|
+
# @param project_id [String, nil] Project that should own a workflow created from this spec. Required when applying a spec that creates a new workflow.
|
|
69
16
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
70
17
|
# @return [Retab::DeclarativeValidationResponse]
|
|
71
18
|
def validate(
|
|
72
19
|
yaml_definition:,
|
|
20
|
+
project_id: nil,
|
|
73
21
|
request_options: {}
|
|
74
22
|
)
|
|
75
23
|
body = {
|
|
76
|
-
"yaml_definition" => yaml_definition
|
|
77
|
-
|
|
24
|
+
"yaml_definition" => yaml_definition,
|
|
25
|
+
"project_id" => project_id
|
|
26
|
+
}.compact
|
|
78
27
|
response = @client.request(
|
|
79
28
|
method: :post,
|
|
80
29
|
path: "/v1/workflows/spec/validate",
|
|
@@ -101,7 +50,7 @@ module Retab
|
|
|
101
50
|
)
|
|
102
51
|
response = @client.request(
|
|
103
52
|
method: :get,
|
|
104
|
-
path: "/v1/workflows
|
|
53
|
+
path: "/v1/workflows/#{Retab::Util.encode_path(workflow_id)}/spec",
|
|
105
54
|
auth: true,
|
|
106
55
|
request_options: request_options
|
|
107
56
|
)
|
|
@@ -15,7 +15,8 @@ module Retab
|
|
|
15
15
|
target: :target,
|
|
16
16
|
test_id: :test_id,
|
|
17
17
|
total_tests: :total_tests,
|
|
18
|
-
counts: :counts
|
|
18
|
+
counts: :counts,
|
|
19
|
+
freshness: :freshness
|
|
19
20
|
}.freeze
|
|
20
21
|
|
|
21
22
|
attr_accessor(
|
|
@@ -28,7 +29,8 @@ module Retab
|
|
|
28
29
|
:target,
|
|
29
30
|
:test_id,
|
|
30
31
|
:total_tests,
|
|
31
|
-
:counts
|
|
32
|
+
:counts,
|
|
33
|
+
:freshness
|
|
32
34
|
)
|
|
33
35
|
|
|
34
36
|
def initialize(json)
|
|
@@ -61,6 +63,7 @@ module Retab
|
|
|
61
63
|
@test_id = hash[:test_id]
|
|
62
64
|
@total_tests = hash[:total_tests]
|
|
63
65
|
@counts = hash[:counts] ? Retab::BlockTestBatchExecutionCounts.new(hash[:counts]) : nil
|
|
66
|
+
@freshness = hash[:freshness] ? Retab::ArtifactFreshness.new(hash[:freshness]) : nil
|
|
64
67
|
end
|
|
65
68
|
end
|
|
66
69
|
end
|
|
@@ -14,6 +14,8 @@ module Retab
|
|
|
14
14
|
duration_ms: :duration_ms,
|
|
15
15
|
workflow_draft_fingerprint: :workflow_draft_fingerprint,
|
|
16
16
|
block_config_fingerprint: :block_config_fingerprint,
|
|
17
|
+
validity_fingerprint: :validity_fingerprint,
|
|
18
|
+
handle_inputs_fingerprint: :handle_inputs_fingerprint,
|
|
17
19
|
assertions_passed: :assertions_passed,
|
|
18
20
|
assertions_failed: :assertions_failed,
|
|
19
21
|
blocked_assertions: :blocked_assertions
|
|
@@ -28,6 +30,8 @@ module Retab
|
|
|
28
30
|
:duration_ms,
|
|
29
31
|
:workflow_draft_fingerprint,
|
|
30
32
|
:block_config_fingerprint,
|
|
33
|
+
:validity_fingerprint,
|
|
34
|
+
:handle_inputs_fingerprint,
|
|
31
35
|
:assertions_passed,
|
|
32
36
|
:assertions_failed,
|
|
33
37
|
:blocked_assertions
|
|
@@ -44,6 +48,8 @@ module Retab
|
|
|
44
48
|
@duration_ms = hash[:duration_ms]
|
|
45
49
|
@workflow_draft_fingerprint = hash[:workflow_draft_fingerprint]
|
|
46
50
|
@block_config_fingerprint = hash[:block_config_fingerprint]
|
|
51
|
+
@validity_fingerprint = hash[:validity_fingerprint]
|
|
52
|
+
@handle_inputs_fingerprint = hash[:handle_inputs_fingerprint]
|
|
47
53
|
@assertions_passed = hash[:assertions_passed]
|
|
48
54
|
@assertions_failed = hash[:assertions_failed]
|
|
49
55
|
@blocked_assertions = hash[:blocked_assertions]
|
|
@@ -16,6 +16,8 @@ module Retab
|
|
|
16
16
|
assertion_drift_status: :assertion_drift_status,
|
|
17
17
|
schema_drift: :schema_drift,
|
|
18
18
|
schema_drift_detail: :schema_drift_detail,
|
|
19
|
+
freshness: :freshness,
|
|
20
|
+
drift: :drift,
|
|
19
21
|
validation_status: :validation_status,
|
|
20
22
|
validation_issues: :validation_issues,
|
|
21
23
|
latest_run_summary: :latest_run_summary,
|
|
@@ -36,6 +38,8 @@ module Retab
|
|
|
36
38
|
:assertion_drift_status,
|
|
37
39
|
:schema_drift,
|
|
38
40
|
:schema_drift_detail,
|
|
41
|
+
:freshness,
|
|
42
|
+
:drift,
|
|
39
43
|
:validation_status,
|
|
40
44
|
:validation_issues,
|
|
41
45
|
:latest_run_summary,
|
|
@@ -67,6 +71,8 @@ module Retab
|
|
|
67
71
|
@assertion_drift_status = hash[:assertion_drift_status]
|
|
68
72
|
@schema_drift = hash[:schema_drift].nil? ? "unknown" : hash[:schema_drift]
|
|
69
73
|
@schema_drift_detail = hash[:schema_drift_detail]
|
|
74
|
+
@freshness = hash[:freshness] ? Retab::ArtifactFreshness.new(hash[:freshness]) : nil
|
|
75
|
+
@drift = hash[:drift] ? Retab::ArtifactDrift.new(hash[:drift]) : nil
|
|
70
76
|
@validation_status = hash[:validation_status].nil? ? "valid" : hash[:validation_status]
|
|
71
77
|
@validation_issues = (hash[:validation_issues] || [])
|
|
72
78
|
@latest_run_summary = hash[:latest_run_summary] ? Retab::LatestBlockTestRunSummary.new(hash[:latest_run_summary]) : nil
|
|
@@ -7,12 +7,14 @@ module Retab
|
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
name: :name,
|
|
10
|
-
description: :description
|
|
10
|
+
description: :description,
|
|
11
|
+
project_id: :project_id
|
|
11
12
|
}.freeze
|
|
12
13
|
|
|
13
14
|
attr_accessor(
|
|
14
15
|
:name,
|
|
15
|
-
:description
|
|
16
|
+
:description,
|
|
17
|
+
:project_id
|
|
16
18
|
)
|
|
17
19
|
|
|
18
20
|
def initialize(json)
|
|
@@ -20,6 +22,7 @@ module Retab
|
|
|
20
22
|
hash = self.class.normalize(json)
|
|
21
23
|
@name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
|
|
22
24
|
@description = hash[:description].nil? ? "" : hash[:description]
|
|
25
|
+
@project_id = hash[:project_id]
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
end
|
|
@@ -6,15 +6,20 @@ module Retab
|
|
|
6
6
|
class DeclarativeWorkflowRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
|
-
yaml_definition: :yaml_definition
|
|
9
|
+
yaml_definition: :yaml_definition,
|
|
10
|
+
project_id: :project_id
|
|
10
11
|
}.freeze
|
|
11
12
|
|
|
12
|
-
attr_accessor
|
|
13
|
+
attr_accessor(
|
|
14
|
+
:yaml_definition,
|
|
15
|
+
:project_id
|
|
16
|
+
)
|
|
13
17
|
|
|
14
18
|
def initialize(json)
|
|
15
19
|
super()
|
|
16
20
|
hash = self.class.normalize(json)
|
|
17
21
|
@yaml_definition = hash[:yaml_definition]
|
|
22
|
+
@project_id = hash[:project_id]
|
|
18
23
|
end
|
|
19
24
|
end
|
|
20
25
|
end
|
|
@@ -9,18 +9,24 @@ module Retab
|
|
|
9
9
|
id: :id,
|
|
10
10
|
name: :name,
|
|
11
11
|
description: :description,
|
|
12
|
+
project_id: :project_id,
|
|
12
13
|
published: :published,
|
|
13
14
|
created_at: :created_at,
|
|
14
|
-
updated_at: :updated_at
|
|
15
|
+
updated_at: :updated_at,
|
|
16
|
+
capabilities: :capabilities,
|
|
17
|
+
authz_status: :authz_status
|
|
15
18
|
}.freeze
|
|
16
19
|
|
|
17
20
|
attr_accessor(
|
|
18
21
|
:id,
|
|
19
22
|
:name,
|
|
20
23
|
:description,
|
|
24
|
+
:project_id,
|
|
21
25
|
:published,
|
|
22
26
|
:created_at,
|
|
23
|
-
:updated_at
|
|
27
|
+
:updated_at,
|
|
28
|
+
:capabilities,
|
|
29
|
+
:authz_status
|
|
24
30
|
)
|
|
25
31
|
|
|
26
32
|
def initialize(json)
|
|
@@ -29,9 +35,12 @@ module Retab
|
|
|
29
35
|
@id = hash[:id]
|
|
30
36
|
@name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
|
|
31
37
|
@description = hash[:description].nil? ? "" : hash[:description]
|
|
38
|
+
@project_id = hash[:project_id]
|
|
32
39
|
@published = hash[:published] ? Retab::WorkflowPublished.new(hash[:published]) : nil
|
|
33
40
|
@created_at = hash[:created_at]
|
|
34
41
|
@updated_at = hash[:updated_at]
|
|
42
|
+
@capabilities = (hash[:capabilities] || [])
|
|
43
|
+
@authz_status = hash[:authz_status]
|
|
35
44
|
end
|
|
36
45
|
end
|
|
37
46
|
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 WorkflowBlockPosition < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
x: :x,
|
|
10
|
+
y: :y
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
attr_accessor(
|
|
14
|
+
:x,
|
|
15
|
+
:y
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def initialize(json)
|
|
19
|
+
super()
|
|
20
|
+
hash = self.class.normalize(json)
|
|
21
|
+
@x = hash[:x]
|
|
22
|
+
@y = hash[:y]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -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
|
+
class WorkflowConfigBlock < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
id: :id,
|
|
10
|
+
type: :type,
|
|
11
|
+
position: :position,
|
|
12
|
+
label: :label,
|
|
13
|
+
config: :config,
|
|
14
|
+
resolved_schemas: :resolved_schemas,
|
|
15
|
+
width: :width,
|
|
16
|
+
height: :height,
|
|
17
|
+
parent_id: :parent_id
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
20
|
+
attr_accessor(
|
|
21
|
+
:id,
|
|
22
|
+
:type,
|
|
23
|
+
:position,
|
|
24
|
+
:label,
|
|
25
|
+
:config,
|
|
26
|
+
:resolved_schemas,
|
|
27
|
+
:width,
|
|
28
|
+
:height,
|
|
29
|
+
:parent_id
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
def initialize(json)
|
|
33
|
+
super()
|
|
34
|
+
hash = self.class.normalize(json)
|
|
35
|
+
@id = hash[:id]
|
|
36
|
+
@type = hash[:type]
|
|
37
|
+
@position = hash[:position] ? Retab::WorkflowBlockPosition.new(hash[:position]) : nil
|
|
38
|
+
@label = hash[:label]
|
|
39
|
+
@config = hash[:config] || {}
|
|
40
|
+
@resolved_schemas = hash[:resolved_schemas] || {}
|
|
41
|
+
@width = hash[:width]
|
|
42
|
+
@height = hash[:height]
|
|
43
|
+
@parent_id = hash[:parent_id]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class WorkflowConfigEdge < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
id: :id,
|
|
10
|
+
source: :source,
|
|
11
|
+
target: :target,
|
|
12
|
+
source_handle: :source_handle,
|
|
13
|
+
target_handle: :target_handle,
|
|
14
|
+
animated: :animated
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor(
|
|
18
|
+
:id,
|
|
19
|
+
:source,
|
|
20
|
+
:target,
|
|
21
|
+
:source_handle,
|
|
22
|
+
:target_handle,
|
|
23
|
+
:animated
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
super()
|
|
28
|
+
hash = self.class.normalize(json)
|
|
29
|
+
@id = hash[:id]
|
|
30
|
+
@source = hash[:source]
|
|
31
|
+
@target = hash[:target]
|
|
32
|
+
@source_handle = hash[:source_handle]
|
|
33
|
+
@target_handle = hash[:target_handle]
|
|
34
|
+
@animated = hash[:animated].nil? ? true : hash[:animated]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class WorkflowGraphVersion < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
id: :id,
|
|
10
|
+
workflow_id: :workflow_id,
|
|
11
|
+
blocks: :blocks,
|
|
12
|
+
edges: :edges,
|
|
13
|
+
block_version_ids: :block_version_ids,
|
|
14
|
+
edge_version_ids: :edge_version_ids,
|
|
15
|
+
created_at: :created_at
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor(
|
|
19
|
+
:id,
|
|
20
|
+
:workflow_id,
|
|
21
|
+
:blocks,
|
|
22
|
+
:edges,
|
|
23
|
+
:block_version_ids,
|
|
24
|
+
:edge_version_ids,
|
|
25
|
+
:created_at
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
def initialize(json)
|
|
29
|
+
super()
|
|
30
|
+
hash = self.class.normalize(json)
|
|
31
|
+
@id = hash[:id]
|
|
32
|
+
@workflow_id = hash[:workflow_id]
|
|
33
|
+
@blocks = (hash[:blocks] || []).map { |item| item ? Retab::WorkflowConfigBlock.new(item) : nil }
|
|
34
|
+
@edges = (hash[:edges] || []).map { |item| item ? Retab::WorkflowConfigEdge.new(item) : nil }
|
|
35
|
+
@block_version_ids = (hash[:block_version_ids] || [])
|
|
36
|
+
@edge_version_ids = (hash[:edge_version_ids] || [])
|
|
37
|
+
@created_at = hash[:created_at]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class WorkflowGraphVersionDiff < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
from_workflow_version_id: :from_workflow_version_id,
|
|
10
|
+
to_workflow_version_id: :to_workflow_version_id,
|
|
11
|
+
added_block_ids: :added_block_ids,
|
|
12
|
+
removed_block_ids: :removed_block_ids,
|
|
13
|
+
changed_block_ids: :changed_block_ids,
|
|
14
|
+
added_edge_ids: :added_edge_ids,
|
|
15
|
+
removed_edge_ids: :removed_edge_ids,
|
|
16
|
+
changed_edge_ids: :changed_edge_ids
|
|
17
|
+
}.freeze
|
|
18
|
+
|
|
19
|
+
attr_accessor(
|
|
20
|
+
:from_workflow_version_id,
|
|
21
|
+
:to_workflow_version_id,
|
|
22
|
+
:added_block_ids,
|
|
23
|
+
:removed_block_ids,
|
|
24
|
+
:changed_block_ids,
|
|
25
|
+
:added_edge_ids,
|
|
26
|
+
:removed_edge_ids,
|
|
27
|
+
:changed_edge_ids
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def initialize(json)
|
|
31
|
+
super()
|
|
32
|
+
hash = self.class.normalize(json)
|
|
33
|
+
@from_workflow_version_id = hash[:from_workflow_version_id]
|
|
34
|
+
@to_workflow_version_id = hash[:to_workflow_version_id]
|
|
35
|
+
@added_block_ids = (hash[:added_block_ids] || [])
|
|
36
|
+
@removed_block_ids = (hash[:removed_block_ids] || [])
|
|
37
|
+
@changed_block_ids = (hash[:changed_block_ids] || [])
|
|
38
|
+
@added_edge_ids = (hash[:added_edge_ids] || [])
|
|
39
|
+
@removed_edge_ids = (hash[:removed_edge_ids] || [])
|
|
40
|
+
@changed_edge_ids = (hash[:changed_edge_ids] || [])
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|