sz-apimatic-sdk 0.0.1

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 (95) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +153 -0
  4. data/bin/console +15 -0
  5. data/lib/seltz_api/api_helper.rb +10 -0
  6. data/lib/seltz_api/apis/agent_api.rb +140 -0
  7. data/lib/seltz_api/apis/answer_api.rb +61 -0
  8. data/lib/seltz_api/apis/base_api.rb +67 -0
  9. data/lib/seltz_api/apis/fetch_api.rb +48 -0
  10. data/lib/seltz_api/apis/monitors_api.rb +161 -0
  11. data/lib/seltz_api/apis/records_api.rb +97 -0
  12. data/lib/seltz_api/apis/runs_api.rb +109 -0
  13. data/lib/seltz_api/apis/search_api.rb +55 -0
  14. data/lib/seltz_api/client.rb +111 -0
  15. data/lib/seltz_api/configuration.rb +165 -0
  16. data/lib/seltz_api/exceptions/api_exception.rb +21 -0
  17. data/lib/seltz_api/exceptions/error_envelope_exception.rb +46 -0
  18. data/lib/seltz_api/http/api_response.rb +19 -0
  19. data/lib/seltz_api/http/auth/custom_header_authentication.rb +52 -0
  20. data/lib/seltz_api/http/http_call_back.rb +10 -0
  21. data/lib/seltz_api/http/http_method_enum.rb +10 -0
  22. data/lib/seltz_api/http/http_request.rb +10 -0
  23. data/lib/seltz_api/http/http_response.rb +10 -0
  24. data/lib/seltz_api/http/proxy_settings.rb +22 -0
  25. data/lib/seltz_api/logging/configuration/api_logging_configuration.rb +186 -0
  26. data/lib/seltz_api/logging/sdk_logger.rb +17 -0
  27. data/lib/seltz_api/models/agent_run.rb +161 -0
  28. data/lib/seltz_api/models/agent_run_citation.rb +85 -0
  29. data/lib/seltz_api/models/agent_run_grounding.rb +94 -0
  30. data/lib/seltz_api/models/agent_run_output.rb +131 -0
  31. data/lib/seltz_api/models/agent_run_output2.rb +131 -0
  32. data/lib/seltz_api/models/agent_run_request.rb +100 -0
  33. data/lib/seltz_api/models/agent_run_request2.rb +100 -0
  34. data/lib/seltz_api/models/agent_run_source.rb +86 -0
  35. data/lib/seltz_api/models/agent_run_status.rb +49 -0
  36. data/lib/seltz_api/models/agent_run_status2.rb +48 -0
  37. data/lib/seltz_api/models/agent_run_stop_reason.rb +53 -0
  38. data/lib/seltz_api/models/agent_run_stop_reason2.rb +52 -0
  39. data/lib/seltz_api/models/answer_http_request.rb +172 -0
  40. data/lib/seltz_api/models/answer_http_response.rb +93 -0
  41. data/lib/seltz_api/models/base_model.rb +110 -0
  42. data/lib/seltz_api/models/content_options.rb +99 -0
  43. data/lib/seltz_api/models/create_agent_run_request.rb +104 -0
  44. data/lib/seltz_api/models/create_monitor_request.rb +143 -0
  45. data/lib/seltz_api/models/create_monitor_response.rb +90 -0
  46. data/lib/seltz_api/models/document.rb +128 -0
  47. data/lib/seltz_api/models/envelope_error.rb +83 -0
  48. data/lib/seltz_api/models/envelope_error1.rb +82 -0
  49. data/lib/seltz_api/models/fetch_error.rb +107 -0
  50. data/lib/seltz_api/models/fetch_error1.rb +108 -0
  51. data/lib/seltz_api/models/fetch_request.rb +144 -0
  52. data/lib/seltz_api/models/fetch_response.rb +87 -0
  53. data/lib/seltz_api/models/fetch_result.rb +176 -0
  54. data/lib/seltz_api/models/fetch_status.rb +36 -0
  55. data/lib/seltz_api/models/fetch_status2.rb +40 -0
  56. data/lib/seltz_api/models/fields.rb +108 -0
  57. data/lib/seltz_api/models/fields2.rb +101 -0
  58. data/lib/seltz_api/models/get_monitor_response.rb +87 -0
  59. data/lib/seltz_api/models/get_run_response.rb +76 -0
  60. data/lib/seltz_api/models/http_citation.rb +86 -0
  61. data/lib/seltz_api/models/list_agent_runs_response.rb +96 -0
  62. data/lib/seltz_api/models/list_monitors_response.rb +97 -0
  63. data/lib/seltz_api/models/list_records_response.rb +96 -0
  64. data/lib/seltz_api/models/list_run_records_response.rb +96 -0
  65. data/lib/seltz_api/models/list_run_requests_response.rb +84 -0
  66. data/lib/seltz_api/models/list_runs_response.rb +96 -0
  67. data/lib/seltz_api/models/monitor.rb +157 -0
  68. data/lib/seltz_api/models/monitor_search_request.rb +110 -0
  69. data/lib/seltz_api/models/monitor_status.rb +47 -0
  70. data/lib/seltz_api/models/monitor_status2.rb +45 -0
  71. data/lib/seltz_api/models/payload.rb +74 -0
  72. data/lib/seltz_api/models/record.rb +116 -0
  73. data/lib/seltz_api/models/record_type.rb +26 -0
  74. data/lib/seltz_api/models/request_status.rb +36 -0
  75. data/lib/seltz_api/models/run.rb +200 -0
  76. data/lib/seltz_api/models/run_request.rb +127 -0
  77. data/lib/seltz_api/models/run_state.rb +40 -0
  78. data/lib/seltz_api/models/run_state2.rb +41 -0
  79. data/lib/seltz_api/models/run_status.rb +47 -0
  80. data/lib/seltz_api/models/schedule.rb +73 -0
  81. data/lib/seltz_api/models/search_record.rb +101 -0
  82. data/lib/seltz_api/models/search_request.rb +208 -0
  83. data/lib/seltz_api/models/search_request_ref.rb +87 -0
  84. data/lib/seltz_api/models/search_response.rb +85 -0
  85. data/lib/seltz_api/models/snippet.rb +76 -0
  86. data/lib/seltz_api/models/snippet_options.rb +151 -0
  87. data/lib/seltz_api/models/update_monitor_request.rb +153 -0
  88. data/lib/seltz_api/models/update_monitor_response.rb +77 -0
  89. data/lib/seltz_api/models/webhook.rb +113 -0
  90. data/lib/seltz_api/models/webhook1.rb +114 -0
  91. data/lib/seltz_api/utilities/date_time_helper.rb +11 -0
  92. data/lib/seltz_api/utilities/file_wrapper.rb +28 -0
  93. data/lib/seltz_api/utilities/union_type_lookup.rb +62 -0
  94. data/lib/seltz_api.rb +115 -0
  95. metadata +178 -0
@@ -0,0 +1,153 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # UpdateMonitorRequest Model.
8
+ class UpdateMonitorRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :cadence
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :api_key
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :monitor_id
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :name
27
+
28
+ # Replaces the list wholesale when set. An empty list is read as "not set"
29
+ # and keeps the current requests. A request keeps its id and its health when
30
+ # every field of its body is unchanged.
31
+ # @return [Array[SearchRequest]]
32
+ attr_accessor :search_requests
33
+
34
+ # Replaces the list wholesale when set. An empty list is read as "not set"
35
+ # and keeps the current requests. A request keeps its id and its health when
36
+ # every field of its body is unchanged.
37
+ # @return [MonitorStatus]
38
+ attr_accessor :status
39
+
40
+ # Replaces the list wholesale when set. An empty list is read as "not set"
41
+ # and keeps the current requests. A request keeps its id and its health when
42
+ # every field of its body is unchanged.
43
+ # @return [Webhook1]
44
+ attr_accessor :webhook
45
+
46
+ # A mapping from model property names to API property names.
47
+ def self.names
48
+ @_hash = {} if @_hash.nil?
49
+ @_hash['cadence'] = 'cadence'
50
+ @_hash['api_key'] = 'api_key'
51
+ @_hash['monitor_id'] = 'monitor_id'
52
+ @_hash['name'] = 'name'
53
+ @_hash['search_requests'] = 'search_requests'
54
+ @_hash['status'] = 'status'
55
+ @_hash['webhook'] = 'webhook'
56
+ @_hash
57
+ end
58
+
59
+ # An array for optional fields
60
+ def self.optionals
61
+ %w[
62
+ api_key
63
+ monitor_id
64
+ name
65
+ search_requests
66
+ status
67
+ webhook
68
+ ]
69
+ end
70
+
71
+ # An array for nullable fields
72
+ def self.nullables
73
+ %w[
74
+ api_key
75
+ name
76
+ webhook
77
+ ]
78
+ end
79
+
80
+ def initialize(cadence:, api_key: SKIP, monitor_id: SKIP, name: SKIP,
81
+ search_requests: SKIP, status: SKIP, webhook: SKIP,
82
+ additional_properties: nil)
83
+ # Add additional model properties to the instance
84
+ additional_properties = {} if additional_properties.nil?
85
+
86
+ @cadence = cadence
87
+ @api_key = api_key unless api_key == SKIP
88
+ @monitor_id = monitor_id unless monitor_id == SKIP
89
+ @name = name unless name == SKIP
90
+ @search_requests = search_requests unless search_requests == SKIP
91
+ @status = status unless status == SKIP
92
+ @webhook = webhook unless webhook == SKIP
93
+ @additional_properties = additional_properties
94
+ end
95
+
96
+ # Creates an instance of the object from a hash.
97
+ def self.from_hash(hash)
98
+ return nil unless hash
99
+
100
+ # Extract variables from the hash.
101
+ cadence = hash.key?('cadence') ? hash['cadence'] : nil
102
+ api_key = hash.key?('api_key') ? hash['api_key'] : SKIP
103
+ monitor_id = hash.key?('monitor_id') ? hash['monitor_id'] : SKIP
104
+ name = hash.key?('name') ? hash['name'] : SKIP
105
+ # Parameter is an array, so we need to iterate through it
106
+ search_requests = nil
107
+ unless hash['search_requests'].nil?
108
+ search_requests = []
109
+ hash['search_requests'].each do |structure|
110
+ search_requests << (SearchRequest.from_hash(structure) if structure)
111
+ end
112
+ end
113
+
114
+ search_requests = SKIP unless hash.key?('search_requests')
115
+ status = hash.key?('status') ? hash['status'] : SKIP
116
+ webhook = Webhook1.from_hash(hash['webhook']) if hash['webhook']
117
+
118
+ # Create a new hash for additional properties, removing known properties.
119
+ new_hash = hash.reject { |k, _| names.value?(k) }
120
+
121
+ additional_properties = APIHelper.get_additional_properties(
122
+ new_hash, proc { |value| value }
123
+ )
124
+
125
+ # Create object from extracted values.
126
+ UpdateMonitorRequest.new(cadence: cadence,
127
+ api_key: api_key,
128
+ monitor_id: monitor_id,
129
+ name: name,
130
+ search_requests: search_requests,
131
+ status: status,
132
+ webhook: webhook,
133
+ additional_properties: additional_properties)
134
+ end
135
+
136
+ # Provides a human-readable string representation of the object.
137
+ def to_s
138
+ class_name = self.class.name.split('::').last
139
+ "<#{class_name} cadence: #{@cadence}, api_key: #{@api_key}, monitor_id: #{@monitor_id},"\
140
+ " name: #{@name}, search_requests: #{@search_requests}, status: #{@status}, webhook:"\
141
+ " #{@webhook}, additional_properties: #{@additional_properties}>"
142
+ end
143
+
144
+ # Provides a debugging-friendly string with detailed object information.
145
+ def inspect
146
+ class_name = self.class.name.split('::').last
147
+ "<#{class_name} cadence: #{@cadence.inspect}, api_key: #{@api_key.inspect}, monitor_id:"\
148
+ " #{@monitor_id.inspect}, name: #{@name.inspect}, search_requests:"\
149
+ " #{@search_requests.inspect}, status: #{@status.inspect}, webhook: #{@webhook.inspect},"\
150
+ " additional_properties: #{@additional_properties}>"
151
+ end
152
+ end
153
+ end
@@ -0,0 +1,77 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # UpdateMonitorResponse Model.
8
+ class UpdateMonitorResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Monitor]
14
+ attr_accessor :monitor
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['monitor'] = 'monitor'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ monitor
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ %w[
33
+ monitor
34
+ ]
35
+ end
36
+
37
+ def initialize(monitor: SKIP, additional_properties: nil)
38
+ # Add additional model properties to the instance
39
+ additional_properties = {} if additional_properties.nil?
40
+
41
+ @monitor = monitor unless monitor == SKIP
42
+ @additional_properties = additional_properties
43
+ end
44
+
45
+ # Creates an instance of the object from a hash.
46
+ def self.from_hash(hash)
47
+ return nil unless hash
48
+
49
+ # Extract variables from the hash.
50
+ monitor = Monitor.from_hash(hash['monitor']) if hash['monitor']
51
+
52
+ # Create a new hash for additional properties, removing known properties.
53
+ new_hash = hash.reject { |k, _| names.value?(k) }
54
+
55
+ additional_properties = APIHelper.get_additional_properties(
56
+ new_hash, proc { |value| value }
57
+ )
58
+
59
+ # Create object from extracted values.
60
+ UpdateMonitorResponse.new(monitor: monitor,
61
+ additional_properties: additional_properties)
62
+ end
63
+
64
+ # Provides a human-readable string representation of the object.
65
+ def to_s
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} monitor: #{@monitor}, additional_properties: #{@additional_properties}>"
68
+ end
69
+
70
+ # Provides a debugging-friendly string with detailed object information.
71
+ def inspect
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} monitor: #{@monitor.inspect}, additional_properties:"\
74
+ " #{@additional_properties}>"
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,113 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # Webhook Model.
8
+ class Webhook < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Exactly two strings are legal: "run.completed" and "run.failed". An empty
13
+ # list is rejected.
14
+ # "run.completed" means the run finished. Read the run's `record_count` to
15
+ # see whether it produced records and its `status` to see whether every
16
+ # request succeeded. "run.failed" means no request succeeded. Neither fires
17
+ # for a skipped run.
18
+ # @return [Array[String]]
19
+ attr_accessor :events
20
+
21
+ # Always reported on a monitor. Send ACTIVE to turn delivery back on once a
22
+ # failing endpoint is repaired, or DISABLED to stop it yourself.
23
+ # A disabled webhook stops the POST only. The monitor still runs and its
24
+ # records are still readable through the records cursor, so nothing is lost
25
+ # while it is off.
26
+ # On the way in it is the one field of this message that may be omitted: an
27
+ # absent status keeps whatever the monitor already has, so re-sending a
28
+ # webhook body does not by itself restart delivery to a dead endpoint.
29
+ # @return [String]
30
+ attr_accessor :status
31
+
32
+ # Always reported on a monitor. Send ACTIVE to turn delivery back on once a
33
+ # failing endpoint is repaired, or DISABLED to stop it yourself.
34
+ # A disabled webhook stops the POST only. The monitor still runs and its
35
+ # records are still readable through the records cursor, so nothing is lost
36
+ # while it is off.
37
+ # On the way in it is the one field of this message that may be omitted: an
38
+ # absent status keeps whatever the monitor already has, so re-sending a
39
+ # webhook body does not by itself restart delivery to a dead endpoint.
40
+ # @return [String]
41
+ attr_accessor :url
42
+
43
+ # A mapping from model property names to API property names.
44
+ def self.names
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['events'] = 'events'
47
+ @_hash['status'] = 'status'
48
+ @_hash['url'] = 'url'
49
+ @_hash
50
+ end
51
+
52
+ # An array for optional fields
53
+ def self.optionals
54
+ %w[
55
+ events
56
+ status
57
+ url
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(events:, status: SKIP, url: SKIP, additional_properties: nil)
67
+ # Add additional model properties to the instance
68
+ additional_properties = {} if additional_properties.nil?
69
+
70
+ @events = events unless events == SKIP
71
+ @status = status unless status == SKIP
72
+ @url = url unless url == SKIP
73
+ @additional_properties = additional_properties
74
+ end
75
+
76
+ # Creates an instance of the object from a hash.
77
+ def self.from_hash(hash)
78
+ return nil unless hash
79
+
80
+ # Extract variables from the hash.
81
+ events = hash['events'] ||=
82
+ status = hash.key?('status') ? hash['status'] : SKIP
83
+ url = hash.key?('url') ? hash['url'] : SKIP
84
+
85
+ # Create a new hash for additional properties, removing known properties.
86
+ new_hash = hash.reject { |k, _| names.value?(k) }
87
+
88
+ additional_properties = APIHelper.get_additional_properties(
89
+ new_hash, proc { |value| value }
90
+ )
91
+
92
+ # Create object from extracted values.
93
+ Webhook.new(events: events,
94
+ status: status,
95
+ url: url,
96
+ additional_properties: additional_properties)
97
+ end
98
+
99
+ # Provides a human-readable string representation of the object.
100
+ def to_s
101
+ class_name = self.class.name.split('::').last
102
+ "<#{class_name} events: #{@events}, status: #{@status}, url: #{@url},"\
103
+ " additional_properties: #{@additional_properties}>"
104
+ end
105
+
106
+ # Provides a debugging-friendly string with detailed object information.
107
+ def inspect
108
+ class_name = self.class.name.split('::').last
109
+ "<#{class_name} events: #{@events.inspect}, status: #{@status.inspect}, url:"\
110
+ " #{@url.inspect}, additional_properties: #{@additional_properties}>"
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,114 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # JSON `null` clears the webhook; an absent field keeps it. Set
8
+ # `webhook.status` to turn delivery on or off.
9
+ class Webhook1 < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Exactly two strings are legal: "run.completed" and "run.failed". An empty
14
+ # list is rejected.
15
+ # "run.completed" means the run finished. Read the run's `record_count` to
16
+ # see whether it produced records and its `status` to see whether every
17
+ # request succeeded. "run.failed" means no request succeeded. Neither fires
18
+ # for a skipped run.
19
+ # @return [Array[String]]
20
+ attr_accessor :events
21
+
22
+ # Always reported on a monitor. Send ACTIVE to turn delivery back on once a
23
+ # failing endpoint is repaired, or DISABLED to stop it yourself.
24
+ # A disabled webhook stops the POST only. The monitor still runs and its
25
+ # records are still readable through the records cursor, so nothing is lost
26
+ # while it is off.
27
+ # On the way in it is the one field of this message that may be omitted: an
28
+ # absent status keeps whatever the monitor already has, so re-sending a
29
+ # webhook body does not by itself restart delivery to a dead endpoint.
30
+ # @return [String]
31
+ attr_accessor :status
32
+
33
+ # Always reported on a monitor. Send ACTIVE to turn delivery back on once a
34
+ # failing endpoint is repaired, or DISABLED to stop it yourself.
35
+ # A disabled webhook stops the POST only. The monitor still runs and its
36
+ # records are still readable through the records cursor, so nothing is lost
37
+ # while it is off.
38
+ # On the way in it is the one field of this message that may be omitted: an
39
+ # absent status keeps whatever the monitor already has, so re-sending a
40
+ # webhook body does not by itself restart delivery to a dead endpoint.
41
+ # @return [String]
42
+ attr_accessor :url
43
+
44
+ # A mapping from model property names to API property names.
45
+ def self.names
46
+ @_hash = {} if @_hash.nil?
47
+ @_hash['events'] = 'events'
48
+ @_hash['status'] = 'status'
49
+ @_hash['url'] = 'url'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ events
57
+ status
58
+ url
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ []
65
+ end
66
+
67
+ def initialize(events:, status: SKIP, url: SKIP, additional_properties: nil)
68
+ # Add additional model properties to the instance
69
+ additional_properties = {} if additional_properties.nil?
70
+
71
+ @events = events unless events == SKIP
72
+ @status = status unless status == SKIP
73
+ @url = url unless url == SKIP
74
+ @additional_properties = additional_properties
75
+ end
76
+
77
+ # Creates an instance of the object from a hash.
78
+ def self.from_hash(hash)
79
+ return nil unless hash
80
+
81
+ # Extract variables from the hash.
82
+ events = hash['events'] ||=
83
+ status = hash.key?('status') ? hash['status'] : SKIP
84
+ url = hash.key?('url') ? hash['url'] : SKIP
85
+
86
+ # Create a new hash for additional properties, removing known properties.
87
+ new_hash = hash.reject { |k, _| names.value?(k) }
88
+
89
+ additional_properties = APIHelper.get_additional_properties(
90
+ new_hash, proc { |value| value }
91
+ )
92
+
93
+ # Create object from extracted values.
94
+ Webhook1.new(events: events,
95
+ status: status,
96
+ url: url,
97
+ additional_properties: additional_properties)
98
+ end
99
+
100
+ # Provides a human-readable string representation of the object.
101
+ def to_s
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} events: #{@events}, status: #{@status}, url: #{@url},"\
104
+ " additional_properties: #{@additional_properties}>"
105
+ end
106
+
107
+ # Provides a debugging-friendly string with detailed object information.
108
+ def inspect
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} events: #{@events.inspect}, status: #{@status.inspect}, url:"\
111
+ " #{@url.inspect}, additional_properties: #{@additional_properties}>"
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,11 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module SeltzApi
8
+ # A utility that supports dateTime conversion to different formats
9
+ class DateTimeHelper < CoreLibrary::DateTimeHelper
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # A utility to allow users to set the content-type for files
8
+ class FileWrapper < CoreLibrary::FileWrapper
9
+ # The constructor.
10
+ # @param [File] file The file to be sent in the request.
11
+ # @param [string] content_type The content type of the provided file.
12
+ def initialize(file, content_type: 'application/octet-stream')
13
+ super
14
+ end
15
+
16
+ # Provides a human-readable string representation of the object.
17
+ def to_s
18
+ class_name = self.class.name.split('::').last
19
+ "<#{class_name} file: #{@file}, content_type: #{@content_type}>"
20
+ end
21
+
22
+ # Provides a debugging-friendly string with detailed object information.
23
+ def to_inspect
24
+ class_name = self.class.name.split('::').last
25
+ "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,62 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module SeltzApi
7
+ # The `UnionTypeLookUp` class serves as a utility class for
8
+ # storing and managing type combinator templates. It acts as a container for the templates
9
+ # used in handling various oneof/anyof instances within the sdk.
10
+ class UnionTypeLookUp
11
+ include CoreLibrary
12
+ # rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
13
+ def self.union_types
14
+ {
15
+ :FieldsContent => OneOf.new(
16
+ [
17
+ AnyOf.new([LeafType.new(TrueClass), LeafType.new(FalseClass)]),
18
+ LeafType.new(ContentOptions)
19
+ ],
20
+ UnionTypeContext.new(
21
+ is_optional: true
22
+ )
23
+ ),
24
+
25
+ :FieldsSnippets => OneOf.new(
26
+ [
27
+ AnyOf.new([LeafType.new(TrueClass), LeafType.new(FalseClass)]),
28
+ LeafType.new(SnippetOptions)
29
+ ],
30
+ UnionTypeContext.new(
31
+ is_optional: true
32
+ )
33
+ ),
34
+
35
+ :Fields2Content => OneOf.new(
36
+ [
37
+ AnyOf.new([LeafType.new(TrueClass), LeafType.new(FalseClass)]),
38
+ LeafType.new(ContentOptions)
39
+ ],
40
+ UnionTypeContext.new(
41
+ is_optional: true
42
+ )
43
+ ),
44
+
45
+ :Fields2Snippets => OneOf.new(
46
+ [
47
+ AnyOf.new([LeafType.new(TrueClass), LeafType.new(FalseClass)]),
48
+ LeafType.new(SnippetOptions)
49
+ ],
50
+ UnionTypeContext.new(
51
+ is_optional: true
52
+ )
53
+ )
54
+ }
55
+ end
56
+ # rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
57
+
58
+ def self.get(name)
59
+ UnionTypeLookUp.union_types[name]
60
+ end
61
+ end
62
+ end
data/lib/seltz_api.rb ADDED
@@ -0,0 +1,115 @@
1
+ # seltz_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ require 'json'
8
+
9
+ require 'apimatic_core_interfaces'
10
+ require 'apimatic_core'
11
+ require 'apimatic_faraday_client_adapter'
12
+
13
+ require_relative 'seltz_api/api_helper'
14
+ require_relative 'seltz_api/client'
15
+
16
+ # Utilities
17
+ require_relative 'seltz_api/utilities/file_wrapper'
18
+ require_relative 'seltz_api/utilities/date_time_helper'
19
+ require_relative 'seltz_api/utilities/union_type_lookup'
20
+
21
+ # Http
22
+ require_relative 'seltz_api/http/api_response'
23
+ require_relative 'seltz_api/http/http_call_back'
24
+ require_relative 'seltz_api/http/http_method_enum'
25
+ require_relative 'seltz_api/http/http_request'
26
+ require_relative 'seltz_api/http/http_response'
27
+ require_relative 'seltz_api/http/proxy_settings'
28
+
29
+
30
+ # Logger
31
+ require_relative 'seltz_api/logging/configuration/api_logging_configuration'
32
+ require_relative 'seltz_api/logging/sdk_logger'
33
+ require_relative 'seltz_api/http/auth/custom_header_authentication'
34
+
35
+ # Models
36
+ require_relative 'seltz_api/models/base_model'
37
+ require_relative 'seltz_api/models/agent_run'
38
+ require_relative 'seltz_api/models/agent_run_citation'
39
+ require_relative 'seltz_api/models/agent_run_grounding'
40
+ require_relative 'seltz_api/models/agent_run_output'
41
+ require_relative 'seltz_api/models/agent_run_request'
42
+ require_relative 'seltz_api/models/agent_run_source'
43
+ require_relative 'seltz_api/models/answer_http_request'
44
+ require_relative 'seltz_api/models/answer_http_response'
45
+ require_relative 'seltz_api/models/content_options'
46
+ require_relative 'seltz_api/models/create_agent_run_request'
47
+ require_relative 'seltz_api/models/create_monitor_request'
48
+ require_relative 'seltz_api/models/create_monitor_response'
49
+ require_relative 'seltz_api/models/document'
50
+ require_relative 'seltz_api/models/envelope_error'
51
+ require_relative 'seltz_api/models/fetch_error'
52
+ require_relative 'seltz_api/models/fetch_request'
53
+ require_relative 'seltz_api/models/fetch_response'
54
+ require_relative 'seltz_api/models/fetch_result'
55
+ require_relative 'seltz_api/models/fields'
56
+ require_relative 'seltz_api/models/get_monitor_response'
57
+ require_relative 'seltz_api/models/get_run_response'
58
+ require_relative 'seltz_api/models/http_citation'
59
+ require_relative 'seltz_api/models/list_agent_runs_response'
60
+ require_relative 'seltz_api/models/list_monitors_response'
61
+ require_relative 'seltz_api/models/list_records_response'
62
+ require_relative 'seltz_api/models/list_run_records_response'
63
+ require_relative 'seltz_api/models/list_run_requests_response'
64
+ require_relative 'seltz_api/models/list_runs_response'
65
+ require_relative 'seltz_api/models/monitor'
66
+ require_relative 'seltz_api/models/monitor_search_request'
67
+ require_relative 'seltz_api/models/record'
68
+ require_relative 'seltz_api/models/run'
69
+ require_relative 'seltz_api/models/run_request'
70
+ require_relative 'seltz_api/models/search_record'
71
+ require_relative 'seltz_api/models/search_request'
72
+ require_relative 'seltz_api/models/search_request_ref'
73
+ require_relative 'seltz_api/models/search_response'
74
+ require_relative 'seltz_api/models/snippet'
75
+ require_relative 'seltz_api/models/snippet_options'
76
+ require_relative 'seltz_api/models/update_monitor_request'
77
+ require_relative 'seltz_api/models/update_monitor_response'
78
+ require_relative 'seltz_api/models/webhook'
79
+ require_relative 'seltz_api/models/agent_run_output2'
80
+ require_relative 'seltz_api/models/agent_run_request2'
81
+ require_relative 'seltz_api/models/envelope_error1'
82
+ require_relative 'seltz_api/models/fetch_error1'
83
+ require_relative 'seltz_api/models/fields2'
84
+ require_relative 'seltz_api/models/payload'
85
+ require_relative 'seltz_api/models/schedule'
86
+ require_relative 'seltz_api/models/webhook1'
87
+ require_relative 'seltz_api/models/agent_run_status'
88
+ require_relative 'seltz_api/models/agent_run_stop_reason'
89
+ require_relative 'seltz_api/models/fetch_status'
90
+ require_relative 'seltz_api/models/monitor_status'
91
+ require_relative 'seltz_api/models/record_type'
92
+ require_relative 'seltz_api/models/request_status'
93
+ require_relative 'seltz_api/models/run_state'
94
+ require_relative 'seltz_api/models/run_status'
95
+ require_relative 'seltz_api/models/agent_run_status2'
96
+ require_relative 'seltz_api/models/agent_run_stop_reason2'
97
+ require_relative 'seltz_api/models/fetch_status2'
98
+ require_relative 'seltz_api/models/monitor_status2'
99
+ require_relative 'seltz_api/models/run_state2'
100
+
101
+ # Exceptions
102
+ require_relative 'seltz_api/exceptions/api_exception'
103
+ require_relative 'seltz_api/exceptions/error_envelope_exception'
104
+
105
+ require_relative 'seltz_api/configuration'
106
+
107
+ # Controllers
108
+ require_relative 'seltz_api/apis/base_api'
109
+ require_relative 'seltz_api/apis/search_api'
110
+ require_relative 'seltz_api/apis/answer_api'
111
+ require_relative 'seltz_api/apis/monitors_api'
112
+ require_relative 'seltz_api/apis/records_api'
113
+ require_relative 'seltz_api/apis/runs_api'
114
+ require_relative 'seltz_api/apis/agent_api'
115
+ require_relative 'seltz_api/apis/fetch_api'