conductor_ruby 0.1.0

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 (143) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +142 -0
  3. data/LICENSE +190 -0
  4. data/README.md +517 -0
  5. data/examples/agentic_workflows/llm_chat.rb +106 -0
  6. data/examples/dynamic_workflow.rb +177 -0
  7. data/examples/event_handler.rb +94 -0
  8. data/examples/event_listener_examples.rb +430 -0
  9. data/examples/helloworld/greetings_worker.rb +24 -0
  10. data/examples/helloworld/helloworld.rb +99 -0
  11. data/examples/kitchensink.rb +213 -0
  12. data/examples/metadata_journey.rb +189 -0
  13. data/examples/metrics_example.rb +284 -0
  14. data/examples/new_dsl_demo.rb +141 -0
  15. data/examples/orkes/http_poll.rb +83 -0
  16. data/examples/orkes/secrets_example.rb +69 -0
  17. data/examples/orkes/wait_for_webhook.rb +90 -0
  18. data/examples/prompt_journey.rb +245 -0
  19. data/examples/rag_workflow.rb +167 -0
  20. data/examples/schedule_journey.rb +244 -0
  21. data/examples/simple_worker.rb +125 -0
  22. data/examples/simple_workflow.rb +89 -0
  23. data/examples/task_context_example.rb +257 -0
  24. data/examples/task_listener_example.rb +192 -0
  25. data/examples/worker_configuration_example.rb +282 -0
  26. data/examples/workflow_dsl.rb +316 -0
  27. data/examples/workflow_ops.rb +305 -0
  28. data/lib/conductor/client/authorization_client.rb +238 -0
  29. data/lib/conductor/client/integration_client.rb +108 -0
  30. data/lib/conductor/client/metadata_client.rb +139 -0
  31. data/lib/conductor/client/prompt_client.rb +58 -0
  32. data/lib/conductor/client/scheduler_client.rb +132 -0
  33. data/lib/conductor/client/schema_client.rb +32 -0
  34. data/lib/conductor/client/secret_client.rb +48 -0
  35. data/lib/conductor/client/task_client.rb +168 -0
  36. data/lib/conductor/client/workflow_client.rb +242 -0
  37. data/lib/conductor/configuration/authentication_settings.rb +17 -0
  38. data/lib/conductor/configuration.rb +103 -0
  39. data/lib/conductor/exceptions.rb +86 -0
  40. data/lib/conductor/http/api/application_resource_api.rb +107 -0
  41. data/lib/conductor/http/api/authorization_resource_api.rb +56 -0
  42. data/lib/conductor/http/api/event_resource_api.rb +133 -0
  43. data/lib/conductor/http/api/gateway_auth_resource_api.rb +48 -0
  44. data/lib/conductor/http/api/group_resource_api.rb +76 -0
  45. data/lib/conductor/http/api/integration_resource_api.rb +145 -0
  46. data/lib/conductor/http/api/metadata_resource_api.rb +231 -0
  47. data/lib/conductor/http/api/prompt_resource_api.rb +81 -0
  48. data/lib/conductor/http/api/role_resource_api.rb +60 -0
  49. data/lib/conductor/http/api/scheduler_resource_api.rb +211 -0
  50. data/lib/conductor/http/api/schema_resource_api.rb +82 -0
  51. data/lib/conductor/http/api/secret_resource_api.rb +134 -0
  52. data/lib/conductor/http/api/task_resource_api.rb +321 -0
  53. data/lib/conductor/http/api/token_resource_api.rb +42 -0
  54. data/lib/conductor/http/api/user_resource_api.rb +59 -0
  55. data/lib/conductor/http/api/workflow_bulk_resource_api.rb +91 -0
  56. data/lib/conductor/http/api/workflow_resource_api.rb +451 -0
  57. data/lib/conductor/http/api_client.rb +437 -0
  58. data/lib/conductor/http/models/authentication_config.rb +67 -0
  59. data/lib/conductor/http/models/authorization_request.rb +39 -0
  60. data/lib/conductor/http/models/base_model.rb +162 -0
  61. data/lib/conductor/http/models/bulk_response.rb +39 -0
  62. data/lib/conductor/http/models/conductor_application.rb +39 -0
  63. data/lib/conductor/http/models/conductor_user.rb +53 -0
  64. data/lib/conductor/http/models/create_or_update_application_request.rb +24 -0
  65. data/lib/conductor/http/models/create_or_update_role_request.rb +27 -0
  66. data/lib/conductor/http/models/event_handler.rb +130 -0
  67. data/lib/conductor/http/models/generate_token_request.rb +27 -0
  68. data/lib/conductor/http/models/group.rb +36 -0
  69. data/lib/conductor/http/models/integration.rb +70 -0
  70. data/lib/conductor/http/models/integration_api.rb +53 -0
  71. data/lib/conductor/http/models/integration_api_update.rb +43 -0
  72. data/lib/conductor/http/models/integration_update.rb +36 -0
  73. data/lib/conductor/http/models/permission.rb +24 -0
  74. data/lib/conductor/http/models/poll_data.rb +33 -0
  75. data/lib/conductor/http/models/prompt_template.rb +59 -0
  76. data/lib/conductor/http/models/prompt_template_test_request.rb +43 -0
  77. data/lib/conductor/http/models/rerun_workflow_request.rb +37 -0
  78. data/lib/conductor/http/models/role.rb +27 -0
  79. data/lib/conductor/http/models/schema_def.rb +59 -0
  80. data/lib/conductor/http/models/search_result.rb +187 -0
  81. data/lib/conductor/http/models/skip_task_request.rb +27 -0
  82. data/lib/conductor/http/models/start_workflow_request.rb +68 -0
  83. data/lib/conductor/http/models/subject_ref.rb +35 -0
  84. data/lib/conductor/http/models/tag_object.rb +36 -0
  85. data/lib/conductor/http/models/target_ref.rb +39 -0
  86. data/lib/conductor/http/models/task.rb +156 -0
  87. data/lib/conductor/http/models/task_def.rb +95 -0
  88. data/lib/conductor/http/models/task_exec_log.rb +30 -0
  89. data/lib/conductor/http/models/task_result.rb +115 -0
  90. data/lib/conductor/http/models/task_result_status.rb +24 -0
  91. data/lib/conductor/http/models/token.rb +33 -0
  92. data/lib/conductor/http/models/upsert_group_request.rb +30 -0
  93. data/lib/conductor/http/models/upsert_user_request.rb +39 -0
  94. data/lib/conductor/http/models/workflow.rb +202 -0
  95. data/lib/conductor/http/models/workflow_def.rb +73 -0
  96. data/lib/conductor/http/models/workflow_schedule.rb +100 -0
  97. data/lib/conductor/http/models/workflow_state_update.rb +30 -0
  98. data/lib/conductor/http/models/workflow_status_constants.rb +57 -0
  99. data/lib/conductor/http/models/workflow_task.rb +169 -0
  100. data/lib/conductor/http/models/workflow_test_request.rb +67 -0
  101. data/lib/conductor/http/rest_client.rb +211 -0
  102. data/lib/conductor/orkes/models/access_key.rb +56 -0
  103. data/lib/conductor/orkes/models/granted_permission.rb +27 -0
  104. data/lib/conductor/orkes/models/metadata_tag.rb +15 -0
  105. data/lib/conductor/orkes/models/rate_limit_tag.rb +15 -0
  106. data/lib/conductor/orkes/orkes_clients.rb +69 -0
  107. data/lib/conductor/version.rb +5 -0
  108. data/lib/conductor/worker/events/conductor_event.rb +40 -0
  109. data/lib/conductor/worker/events/global_dispatcher.rb +37 -0
  110. data/lib/conductor/worker/events/http_events.rb +25 -0
  111. data/lib/conductor/worker/events/listener_registry.rb +40 -0
  112. data/lib/conductor/worker/events/listeners.rb +34 -0
  113. data/lib/conductor/worker/events/sync_event_dispatcher.rb +78 -0
  114. data/lib/conductor/worker/events/task_runner_events.rb +271 -0
  115. data/lib/conductor/worker/events/workflow_events.rb +49 -0
  116. data/lib/conductor/worker/fiber_executor.rb +532 -0
  117. data/lib/conductor/worker/ractor_task_runner.rb +501 -0
  118. data/lib/conductor/worker/task_context.rb +114 -0
  119. data/lib/conductor/worker/task_definition_registrar.rb +322 -0
  120. data/lib/conductor/worker/task_handler.rb +360 -0
  121. data/lib/conductor/worker/task_in_progress.rb +60 -0
  122. data/lib/conductor/worker/task_runner.rb +538 -0
  123. data/lib/conductor/worker/telemetry/metrics_collector.rb +196 -0
  124. data/lib/conductor/worker/telemetry/prometheus_backend.rb +224 -0
  125. data/lib/conductor/worker/worker.rb +355 -0
  126. data/lib/conductor/worker/worker_config.rb +154 -0
  127. data/lib/conductor/worker/worker_registry.rb +71 -0
  128. data/lib/conductor/workflow/dsl/input_ref.rb +37 -0
  129. data/lib/conductor/workflow/dsl/output_ref.rb +44 -0
  130. data/lib/conductor/workflow/dsl/parallel_builder.rb +49 -0
  131. data/lib/conductor/workflow/dsl/switch_builder.rb +74 -0
  132. data/lib/conductor/workflow/dsl/task_ref.rb +178 -0
  133. data/lib/conductor/workflow/dsl/workflow_builder.rb +1016 -0
  134. data/lib/conductor/workflow/dsl/workflow_definition.rb +150 -0
  135. data/lib/conductor/workflow/llm/chat_message.rb +47 -0
  136. data/lib/conductor/workflow/llm/embedding_model.rb +19 -0
  137. data/lib/conductor/workflow/llm/tool_call.rb +43 -0
  138. data/lib/conductor/workflow/llm/tool_spec.rb +46 -0
  139. data/lib/conductor/workflow/task_type.rb +68 -0
  140. data/lib/conductor/workflow/timeout_policy.rb +31 -0
  141. data/lib/conductor/workflow/workflow_executor.rb +373 -0
  142. data/lib/conductor.rb +192 -0
  143. metadata +359 -0
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Response from bulk workflow operations
7
+ class BulkResponse < BaseModel
8
+ SWAGGER_TYPES = {
9
+ bulk_error_results: 'Hash<String, String>',
10
+ bulk_successful_results: 'Array<String>'
11
+ }.freeze
12
+
13
+ ATTRIBUTE_MAP = {
14
+ bulk_error_results: :bulkErrorResults,
15
+ bulk_successful_results: :bulkSuccessfulResults
16
+ }.freeze
17
+
18
+ attr_accessor :bulk_error_results, :bulk_successful_results
19
+
20
+ def initialize(params = {})
21
+ @bulk_error_results = params[:bulk_error_results] || {}
22
+ @bulk_successful_results = params[:bulk_successful_results] || []
23
+ end
24
+
25
+ # Check if any errors occurred
26
+ # @return [Boolean]
27
+ def errors?
28
+ !@bulk_error_results.empty?
29
+ end
30
+
31
+ # Check if all operations succeeded
32
+ # @return [Boolean]
33
+ def all_successful?
34
+ @bulk_error_results.empty?
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # ConductorApplication model - represents an application in Conductor
7
+ class ConductorApplication < BaseModel
8
+ SWAGGER_TYPES = {
9
+ id: 'String',
10
+ name: 'String',
11
+ created_by: 'String',
12
+ create_time: 'Integer',
13
+ update_time: 'Integer',
14
+ updated_by: 'String'
15
+ }.freeze
16
+
17
+ ATTRIBUTE_MAP = {
18
+ id: :id,
19
+ name: :name,
20
+ created_by: :createdBy,
21
+ create_time: :createTime,
22
+ update_time: :updateTime,
23
+ updated_by: :updatedBy
24
+ }.freeze
25
+
26
+ attr_accessor :id, :name, :created_by, :create_time, :update_time, :updated_by
27
+
28
+ def initialize(params = {})
29
+ @id = params[:id]
30
+ @name = params[:name]
31
+ @created_by = params[:created_by]
32
+ @create_time = params[:create_time]
33
+ @update_time = params[:update_time]
34
+ @updated_by = params[:updated_by]
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # ConductorUser model - represents a user in Conductor
7
+ class ConductorUser < BaseModel
8
+ SWAGGER_TYPES = {
9
+ id: 'String',
10
+ name: 'String',
11
+ roles: 'Array<Role>',
12
+ groups: 'Array<Group>',
13
+ uuid: 'String',
14
+ application_user: 'Boolean',
15
+ encrypted_id: 'Boolean',
16
+ encrypted_id_display_value: 'String',
17
+ contact_information: 'Hash<String, String>',
18
+ namespace: 'String'
19
+ }.freeze
20
+
21
+ ATTRIBUTE_MAP = {
22
+ id: :id,
23
+ name: :name,
24
+ roles: :roles,
25
+ groups: :groups,
26
+ uuid: :uuid,
27
+ application_user: :applicationUser,
28
+ encrypted_id: :encryptedId,
29
+ encrypted_id_display_value: :encryptedIdDisplayValue,
30
+ contact_information: :contactInformation,
31
+ namespace: :namespace
32
+ }.freeze
33
+
34
+ attr_accessor :id, :name, :roles, :groups, :uuid, :application_user,
35
+ :encrypted_id, :encrypted_id_display_value,
36
+ :contact_information, :namespace
37
+
38
+ def initialize(params = {})
39
+ @id = params[:id]
40
+ @name = params[:name]
41
+ @roles = params[:roles]
42
+ @groups = params[:groups]
43
+ @uuid = params[:uuid]
44
+ @application_user = params[:application_user]
45
+ @encrypted_id = params[:encrypted_id]
46
+ @encrypted_id_display_value = params[:encrypted_id_display_value]
47
+ @contact_information = params[:contact_information]
48
+ @namespace = params[:namespace]
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # CreateOrUpdateApplicationRequest model - request to create or update an application
7
+ class CreateOrUpdateApplicationRequest < BaseModel
8
+ SWAGGER_TYPES = {
9
+ name: 'String'
10
+ }.freeze
11
+
12
+ ATTRIBUTE_MAP = {
13
+ name: :name
14
+ }.freeze
15
+
16
+ attr_accessor :name
17
+
18
+ def initialize(params = {})
19
+ @name = params[:name]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # CreateOrUpdateRoleRequest model - request to create or update a role
7
+ class CreateOrUpdateRoleRequest < BaseModel
8
+ SWAGGER_TYPES = {
9
+ name: 'String',
10
+ permissions: 'Array<String>'
11
+ }.freeze
12
+
13
+ ATTRIBUTE_MAP = {
14
+ name: :name,
15
+ permissions: :permissions
16
+ }.freeze
17
+
18
+ attr_accessor :name, :permissions
19
+
20
+ def initialize(params = {})
21
+ @name = params[:name]
22
+ @permissions = params[:permissions]
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Event handler definition
7
+ class EventHandler < BaseModel
8
+ SWAGGER_TYPES = {
9
+ name: 'String',
10
+ event: 'String',
11
+ condition: 'String',
12
+ actions: 'Array<EventHandlerAction>',
13
+ active: 'Boolean',
14
+ evaluator_type: 'String'
15
+ }.freeze
16
+
17
+ ATTRIBUTE_MAP = {
18
+ name: :name,
19
+ event: :event,
20
+ condition: :condition,
21
+ actions: :actions,
22
+ active: :active,
23
+ evaluator_type: :evaluatorType
24
+ }.freeze
25
+
26
+ attr_accessor :name, :event, :condition, :actions, :active, :evaluator_type
27
+
28
+ def initialize(params = {})
29
+ @name = params[:name]
30
+ @event = params[:event]
31
+ @condition = params[:condition]
32
+ @actions = params[:actions] || []
33
+ @active = params.fetch(:active, true)
34
+ @evaluator_type = params[:evaluator_type]
35
+ end
36
+ end
37
+
38
+ # Action within an event handler
39
+ class EventHandlerAction < BaseModel
40
+ SWAGGER_TYPES = {
41
+ action: 'String',
42
+ start_workflow: 'StartWorkflow',
43
+ complete_task: 'TaskDetails',
44
+ fail_task: 'TaskDetails',
45
+ expand_inline_json: 'Boolean'
46
+ }.freeze
47
+
48
+ ATTRIBUTE_MAP = {
49
+ action: :action,
50
+ start_workflow: :start_workflow,
51
+ complete_task: :complete_task,
52
+ fail_task: :fail_task,
53
+ expand_inline_json: :expandInlineJSON
54
+ }.freeze
55
+
56
+ # Action types
57
+ module ActionType
58
+ START_WORKFLOW = 'start_workflow'
59
+ COMPLETE_TASK = 'complete_task'
60
+ FAIL_TASK = 'fail_task'
61
+ end
62
+
63
+ attr_accessor :action, :start_workflow, :complete_task, :fail_task, :expand_inline_json
64
+
65
+ def initialize(params = {})
66
+ @action = params[:action]
67
+ @start_workflow = params[:start_workflow]
68
+ @complete_task = params[:complete_task]
69
+ @fail_task = params[:fail_task]
70
+ @expand_inline_json = params.fetch(:expand_inline_json, false)
71
+ end
72
+ end
73
+
74
+ # Start workflow action details
75
+ class StartWorkflow < BaseModel
76
+ SWAGGER_TYPES = {
77
+ name: 'String',
78
+ version: 'Integer',
79
+ input: 'Hash<String, Object>',
80
+ correlation_id: 'String',
81
+ task_to_domain: 'Hash<String, String>'
82
+ }.freeze
83
+
84
+ ATTRIBUTE_MAP = {
85
+ name: :name,
86
+ version: :version,
87
+ input: :input,
88
+ correlation_id: :correlationId,
89
+ task_to_domain: :taskToDomain
90
+ }.freeze
91
+
92
+ attr_accessor :name, :version, :input, :correlation_id, :task_to_domain
93
+
94
+ def initialize(params = {})
95
+ @name = params[:name]
96
+ @version = params[:version]
97
+ @input = params[:input] || {}
98
+ @correlation_id = params[:correlation_id]
99
+ @task_to_domain = params[:task_to_domain]
100
+ end
101
+ end
102
+
103
+ # Task details for event handler actions (complete_task / fail_task)
104
+ class TaskDetails < BaseModel
105
+ SWAGGER_TYPES = {
106
+ workflow_id: 'String',
107
+ task_ref_name: 'String',
108
+ output: 'Hash<String, Object>',
109
+ task_id: 'String'
110
+ }.freeze
111
+
112
+ ATTRIBUTE_MAP = {
113
+ workflow_id: :workflowId,
114
+ task_ref_name: :taskRefName,
115
+ output: :output,
116
+ task_id: :taskId
117
+ }.freeze
118
+
119
+ attr_accessor :workflow_id, :task_ref_name, :output, :task_id
120
+
121
+ def initialize(params = {})
122
+ @workflow_id = params[:workflow_id]
123
+ @task_ref_name = params[:task_ref_name]
124
+ @output = params[:output] || {}
125
+ @task_id = params[:task_id]
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # GenerateTokenRequest model - request to generate an authentication token
7
+ class GenerateTokenRequest < BaseModel
8
+ SWAGGER_TYPES = {
9
+ key_id: 'String',
10
+ key_secret: 'String'
11
+ }.freeze
12
+
13
+ ATTRIBUTE_MAP = {
14
+ key_id: :keyId,
15
+ key_secret: :keySecret
16
+ }.freeze
17
+
18
+ attr_accessor :key_id, :key_secret
19
+
20
+ def initialize(params = {})
21
+ @key_id = params[:key_id]
22
+ @key_secret = params[:key_secret]
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Group model - represents a user group
7
+ class Group < BaseModel
8
+ SWAGGER_TYPES = {
9
+ id: 'String',
10
+ description: 'String',
11
+ roles: 'Array<Role>',
12
+ default_access: 'Hash<String, Array<String>>',
13
+ contact_information: 'Hash<String, String>'
14
+ }.freeze
15
+
16
+ ATTRIBUTE_MAP = {
17
+ id: :id,
18
+ description: :description,
19
+ roles: :roles,
20
+ default_access: :defaultAccess,
21
+ contact_information: :contactInformation
22
+ }.freeze
23
+
24
+ attr_accessor :id, :description, :roles, :default_access, :contact_information
25
+
26
+ def initialize(params = {})
27
+ @id = params[:id]
28
+ @description = params[:description]
29
+ @roles = params[:roles]
30
+ @default_access = params[:default_access]
31
+ @contact_information = params[:contact_information]
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Integration category constants
7
+ module IntegrationCategory
8
+ API = 'API'
9
+ AI_MODEL = 'AI_MODEL'
10
+ VECTOR_DB = 'VECTOR_DB'
11
+ RELATIONAL_DB = 'RELATIONAL_DB'
12
+ end
13
+
14
+ # Integration model - represents an integration provider
15
+ class Integration < BaseModel
16
+ SWAGGER_TYPES = {
17
+ category: 'String',
18
+ configuration: 'Hash<String, Object>',
19
+ created_by: 'String',
20
+ created_on: 'Integer',
21
+ description: 'String',
22
+ enabled: 'Boolean',
23
+ models_count: 'Integer',
24
+ name: 'String',
25
+ tags: 'Array<TagObject>',
26
+ type: 'String',
27
+ updated_by: 'String',
28
+ updated_on: 'Integer',
29
+ apis: 'Array<IntegrationApi>'
30
+ }.freeze
31
+
32
+ ATTRIBUTE_MAP = {
33
+ category: :category,
34
+ configuration: :configuration,
35
+ created_by: :createdBy,
36
+ created_on: :createdOn,
37
+ description: :description,
38
+ enabled: :enabled,
39
+ models_count: :modelsCount,
40
+ name: :name,
41
+ tags: :tags,
42
+ type: :type,
43
+ updated_by: :updatedBy,
44
+ updated_on: :updatedOn,
45
+ apis: :apis
46
+ }.freeze
47
+
48
+ attr_accessor :category, :configuration, :created_by, :created_on,
49
+ :description, :enabled, :models_count, :name, :tags,
50
+ :type, :updated_by, :updated_on, :apis
51
+
52
+ def initialize(params = {})
53
+ @category = params[:category]
54
+ @configuration = params[:configuration]
55
+ @created_by = params[:created_by]
56
+ @created_on = params[:created_on]
57
+ @description = params[:description]
58
+ @enabled = params[:enabled]
59
+ @models_count = params[:models_count]
60
+ @name = params[:name]
61
+ @tags = params[:tags]
62
+ @type = params[:type]
63
+ @updated_by = params[:updated_by]
64
+ @updated_on = params[:updated_on]
65
+ @apis = params[:apis]
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # IntegrationApi model - represents an API/model within an integration provider
7
+ class IntegrationApi < BaseModel
8
+ SWAGGER_TYPES = {
9
+ api: 'String',
10
+ configuration: 'Hash<String, Object>',
11
+ created_by: 'String',
12
+ created_on: 'Integer',
13
+ description: 'String',
14
+ enabled: 'Boolean',
15
+ integration_name: 'String',
16
+ tags: 'Array<TagObject>',
17
+ updated_by: 'String',
18
+ updated_on: 'Integer'
19
+ }.freeze
20
+
21
+ ATTRIBUTE_MAP = {
22
+ api: :api,
23
+ configuration: :configuration,
24
+ created_by: :createdBy,
25
+ created_on: :createdOn,
26
+ description: :description,
27
+ enabled: :enabled,
28
+ integration_name: :integrationName,
29
+ tags: :tags,
30
+ updated_by: :updatedBy,
31
+ updated_on: :updatedOn
32
+ }.freeze
33
+
34
+ attr_accessor :api, :configuration, :created_by, :created_on,
35
+ :description, :enabled, :integration_name, :tags,
36
+ :updated_by, :updated_on
37
+
38
+ def initialize(params = {})
39
+ @api = params[:api]
40
+ @configuration = params[:configuration]
41
+ @created_by = params[:created_by]
42
+ @created_on = params[:created_on]
43
+ @description = params[:description]
44
+ @enabled = params[:enabled]
45
+ @integration_name = params[:integration_name]
46
+ @tags = params[:tags]
47
+ @updated_by = params[:updated_by]
48
+ @updated_on = params[:updated_on]
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Frequency constants for integration API updates
7
+ module Frequency
8
+ DAILY = 'daily'
9
+ WEEKLY = 'weekly'
10
+ MONTHLY = 'monthly'
11
+ end
12
+
13
+ # IntegrationApiUpdate model - request to create/update an integration API
14
+ class IntegrationApiUpdate < BaseModel
15
+ SWAGGER_TYPES = {
16
+ configuration: 'Hash<String, Object>',
17
+ description: 'String',
18
+ enabled: 'Boolean',
19
+ max_tokens: 'Integer',
20
+ frequency: 'String'
21
+ }.freeze
22
+
23
+ ATTRIBUTE_MAP = {
24
+ configuration: :configuration,
25
+ description: :description,
26
+ enabled: :enabled,
27
+ max_tokens: :maxTokens,
28
+ frequency: :frequency
29
+ }.freeze
30
+
31
+ attr_accessor :configuration, :description, :enabled, :max_tokens, :frequency
32
+
33
+ def initialize(params = {})
34
+ @configuration = params[:configuration]
35
+ @description = params[:description]
36
+ @enabled = params[:enabled]
37
+ @max_tokens = params[:max_tokens]
38
+ @frequency = params[:frequency]
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # IntegrationUpdate model - request to create/update an integration provider
7
+ class IntegrationUpdate < BaseModel
8
+ SWAGGER_TYPES = {
9
+ category: 'String',
10
+ configuration: 'Hash<String, Object>',
11
+ description: 'String',
12
+ enabled: 'Boolean',
13
+ type: 'String'
14
+ }.freeze
15
+
16
+ ATTRIBUTE_MAP = {
17
+ category: :category,
18
+ configuration: :configuration,
19
+ description: :description,
20
+ enabled: :enabled,
21
+ type: :type
22
+ }.freeze
23
+
24
+ attr_accessor :category, :configuration, :description, :enabled, :type
25
+
26
+ def initialize(params = {})
27
+ @category = params[:category]
28
+ @configuration = params[:configuration]
29
+ @description = params[:description]
30
+ @enabled = params[:enabled]
31
+ @type = params[:type]
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Permission model - represents a permission entry
7
+ class Permission < BaseModel
8
+ SWAGGER_TYPES = {
9
+ name: 'String'
10
+ }.freeze
11
+
12
+ ATTRIBUTE_MAP = {
13
+ name: :name
14
+ }.freeze
15
+
16
+ attr_accessor :name
17
+
18
+ def initialize(params = {})
19
+ @name = params[:name]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Conductor
4
+ module Http
5
+ module Models
6
+ # Poll data for a task queue
7
+ class PollData < BaseModel
8
+ SWAGGER_TYPES = {
9
+ queue_name: 'String',
10
+ domain: 'String',
11
+ worker_id: 'String',
12
+ last_poll_time: 'Integer'
13
+ }.freeze
14
+
15
+ ATTRIBUTE_MAP = {
16
+ queue_name: :queueName,
17
+ domain: :domain,
18
+ worker_id: :workerId,
19
+ last_poll_time: :lastPollTime
20
+ }.freeze
21
+
22
+ attr_accessor :queue_name, :domain, :worker_id, :last_poll_time
23
+
24
+ def initialize(params = {})
25
+ @queue_name = params[:queue_name]
26
+ @domain = params[:domain]
27
+ @worker_id = params[:worker_id]
28
+ @last_poll_time = params[:last_poll_time]
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end