openai 0.120.0 → 0.121.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/beta/agents/automation.rb +27 -0
  5. data/lib/openai/models/beta/agents/automation_agent_config.rb +142 -0
  6. data/lib/openai/models/beta/agents/automation_create_params.rb +27 -0
  7. data/lib/openai/models/beta/agents/automation_created_by.rb +65 -0
  8. data/lib/openai/models/beta/agents/automation_delete_params.rb +24 -0
  9. data/lib/openai/models/beta/agents/automation_deleted.rb +40 -0
  10. data/lib/openai/models/beta/agents/automation_environment.rb +484 -0
  11. data/lib/openai/models/beta/agents/automation_list_params.rb +68 -0
  12. data/lib/openai/models/beta/agents/automation_pause_params.rb +24 -0
  13. data/lib/openai/models/beta/agents/automation_resume_params.rb +24 -0
  14. data/lib/openai/models/beta/agents/automation_retrieve_params.rb +24 -0
  15. data/lib/openai/models/beta/agents/automation_schedule_param.rb +124 -0
  16. data/lib/openai/models/beta/agents/automation_target.rb +153 -0
  17. data/lib/openai/models/beta/agents/automation_target_param.rb +312 -0
  18. data/lib/openai/models/beta/agents/automation_update_params.rb +79 -0
  19. data/lib/openai/models/beta/agents/automations/automation_invocation.rb +148 -0
  20. data/lib/openai/models/beta/agents/automations/automation_invocation_source.rb +59 -0
  21. data/lib/openai/models/beta/agents/automations/invocation_create_params.rb +26 -0
  22. data/lib/openai/models/beta/agents/automations/invocation_list_params.rb +68 -0
  23. data/lib/openai/models/beta/agents/automations/invocation_retrieve_params.rb +32 -0
  24. data/lib/openai/models/beta/agents/environments/file_create_params.rb +11 -1
  25. data/lib/openai/models/beta/agents/one_time_automation.rb +118 -0
  26. data/lib/openai/models/beta/agents/periodic_automation.rb +126 -0
  27. data/lib/openai/models/beta/beta_responses_client_event.rb +3 -0
  28. data/lib/openai/models/beta/response_compact_params.rb +3 -0
  29. data/lib/openai/models/beta/response_create_params.rb +3 -0
  30. data/lib/openai/resources/beta/agents/automations/invocations.rb +103 -0
  31. data/lib/openai/resources/beta/agents/automations.rb +211 -0
  32. data/lib/openai/resources/beta/agents.rb +4 -0
  33. data/lib/openai/version.rb +1 -1
  34. data/lib/openai.rb +24 -0
  35. data/rbi/openai/models/beta/agents/automation.rbi +32 -0
  36. data/rbi/openai/models/beta/agents/automation_agent_config.rbi +255 -0
  37. data/rbi/openai/models/beta/agents/automation_create_params.rbi +75 -0
  38. data/rbi/openai/models/beta/agents/automation_created_by.rbi +124 -0
  39. data/rbi/openai/models/beta/agents/automation_delete_params.rbi +57 -0
  40. data/rbi/openai/models/beta/agents/automation_deleted.rbi +71 -0
  41. data/rbi/openai/models/beta/agents/automation_environment.rbi +795 -0
  42. data/rbi/openai/models/beta/agents/automation_list_params.rbi +122 -0
  43. data/rbi/openai/models/beta/agents/automation_pause_params.rbi +57 -0
  44. data/rbi/openai/models/beta/agents/automation_resume_params.rbi +57 -0
  45. data/rbi/openai/models/beta/agents/automation_retrieve_params.rbi +57 -0
  46. data/rbi/openai/models/beta/agents/automation_schedule_param.rbi +228 -0
  47. data/rbi/openai/models/beta/agents/automation_target.rbi +250 -0
  48. data/rbi/openai/models/beta/agents/automation_target_param.rbi +564 -0
  49. data/rbi/openai/models/beta/agents/automation_update_params.rbi +161 -0
  50. data/rbi/openai/models/beta/agents/automations/automation_invocation.rbi +233 -0
  51. data/rbi/openai/models/beta/agents/automations/automation_invocation_source.rbi +123 -0
  52. data/rbi/openai/models/beta/agents/automations/invocation_create_params.rbi +61 -0
  53. data/rbi/openai/models/beta/agents/automations/invocation_list_params.rbi +125 -0
  54. data/rbi/openai/models/beta/agents/automations/invocation_retrieve_params.rbi +68 -0
  55. data/rbi/openai/models/beta/agents/environments/file_create_params.rbi +27 -1
  56. data/rbi/openai/models/beta/agents/one_time_automation.rbi +168 -0
  57. data/rbi/openai/models/beta/agents/periodic_automation.rbi +177 -0
  58. data/rbi/openai/models/beta/beta_responses_client_event.rbi +4 -0
  59. data/rbi/openai/models/beta/response_compact_params.rbi +1 -0
  60. data/rbi/openai/models/beta/response_create_params.rbi +1 -0
  61. data/rbi/openai/resources/beta/agents/automations/invocations.rbi +67 -0
  62. data/rbi/openai/resources/beta/agents/automations.rbi +141 -0
  63. data/rbi/openai/resources/beta/agents.rbi +3 -0
  64. data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbs +1 -4
  65. data/sig/openai/models/beta/agents/automation.rbs +17 -0
  66. data/sig/openai/models/beta/agents/automation_agent_config.rbs +143 -0
  67. data/sig/openai/models/beta/agents/automation_create_params.rbs +33 -0
  68. data/sig/openai/models/beta/agents/automation_created_by.rbs +62 -0
  69. data/sig/openai/models/beta/agents/automation_delete_params.rbs +27 -0
  70. data/sig/openai/models/beta/agents/automation_deleted.rbs +39 -0
  71. data/sig/openai/models/beta/agents/automation_environment.rbs +428 -0
  72. data/sig/openai/models/beta/agents/automation_list_params.rbs +85 -0
  73. data/sig/openai/models/beta/agents/automation_pause_params.rbs +27 -0
  74. data/sig/openai/models/beta/agents/automation_resume_params.rbs +27 -0
  75. data/sig/openai/models/beta/agents/automation_retrieve_params.rbs +27 -0
  76. data/sig/openai/models/beta/agents/automation_schedule_param.rbs +127 -0
  77. data/sig/openai/models/beta/agents/automation_target.rbs +157 -0
  78. data/sig/openai/models/beta/agents/automation_target_param.rbs +299 -0
  79. data/sig/openai/models/beta/agents/automation_update_params.rbs +97 -0
  80. data/sig/openai/models/beta/agents/automations/automation_invocation.rbs +134 -0
  81. data/sig/openai/models/beta/agents/automations/automation_invocation_source.rbs +62 -0
  82. data/sig/openai/models/beta/agents/automations/invocation_create_params.rbs +29 -0
  83. data/sig/openai/models/beta/agents/automations/invocation_list_params.rbs +81 -0
  84. data/sig/openai/models/beta/agents/automations/invocation_retrieve_params.rbs +37 -0
  85. data/sig/openai/models/beta/agents/environments/file_create_params.rbs +12 -1
  86. data/sig/openai/models/beta/agents/one_time_automation.rbs +111 -0
  87. data/sig/openai/models/beta/agents/periodic_automation.rbs +118 -0
  88. data/sig/openai/models/beta/beta_responses_client_event.rbs +2 -0
  89. data/sig/openai/models/beta/response_compact_params.rbs +2 -0
  90. data/sig/openai/models/beta/response_create_params.rbs +2 -0
  91. data/sig/openai/resources/beta/agents/automations/invocations.rbs +32 -0
  92. data/sig/openai/resources/beta/agents/automations.rbs +57 -0
  93. data/sig/openai/resources/beta/agents.rbs +2 -0
  94. metadata +73 -1
@@ -0,0 +1,161 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ module Agents
9
+
10
+ class AutomationUpdateParams < OpenAI::Internal::Type::BaseModel
11
+
12
+ extend OpenAI::Internal::Type::RequestParameters::Converter
13
+ include OpenAI::Internal::Type::RequestParameters
14
+
15
+ OrHash = T.type_alias do
16
+ T.any(
17
+ OpenAI::Beta::Agents::AutomationUpdateParams,
18
+ OpenAI::Internal::AnyHash
19
+ )
20
+ end
21
+
22
+ sig { returns(String) }
23
+ attr_accessor :automation_id
24
+
25
+ # Only accepted for periodic automations.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :expression
28
+
29
+ sig { params(expression: String).void }
30
+ attr_writer :expression
31
+
32
+ # Replaces all metadata; omit to leave unchanged.
33
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
34
+ attr_reader :metadata
35
+
36
+ sig { params(metadata: T::Hash[Symbol, String]).void }
37
+ attr_writer :metadata
38
+
39
+ sig { returns(T.nilable(String)) }
40
+ attr_reader :name
41
+
42
+ sig { params(name: String).void }
43
+ attr_writer :name
44
+
45
+ # A future Unix timestamp in seconds; accepted only before a one-time scheduled
46
+ # invocation exists.
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :run_at
49
+
50
+ sig { params(run_at: Integer).void }
51
+ attr_writer :run_at
52
+
53
+ # Replaces the complete target, retaining its type and any creator session.
54
+ sig {
55
+ returns(
56
+ T.nilable(
57
+ T.any(
58
+ OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
59
+ OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
60
+ )
61
+ )
62
+ )
63
+ }
64
+ attr_reader :target
65
+
66
+ sig {
67
+ params(
68
+ target: T.any(
69
+ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::OrHash,
70
+ OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession::OrHash
71
+ )
72
+ )
73
+ .void
74
+ }
75
+ attr_writer :target
76
+
77
+ # Only accepted for periodic automations.
78
+ sig { returns(T.nilable(String)) }
79
+ attr_reader :timezone
80
+
81
+ sig { params(timezone: String).void }
82
+ attr_writer :timezone
83
+
84
+ sig do
85
+ params(
86
+
87
+ automation_id: String,
88
+
89
+ expression: String,
90
+
91
+ metadata: T::Hash[Symbol, String],
92
+
93
+ name: String,
94
+
95
+ run_at: Integer,
96
+
97
+ target: T.any(
98
+ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::OrHash,
99
+ OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession::OrHash
100
+ ),
101
+
102
+ timezone: String,
103
+
104
+ request_options: OpenAI::RequestOptions::OrHash
105
+ )
106
+ .returns(T.attached_class)
107
+ end
108
+ def self.new(
109
+
110
+ automation_id:,
111
+
112
+ # Only accepted for periodic automations.
113
+ expression: nil,
114
+
115
+ # Replaces all metadata; omit to leave unchanged.
116
+ metadata: nil,
117
+
118
+ name: nil,
119
+
120
+ # A future Unix timestamp in seconds; accepted only before a one-time scheduled
121
+ # invocation exists.
122
+ run_at: nil,
123
+
124
+ # Replaces the complete target, retaining its type and any creator session.
125
+ target: nil,
126
+
127
+ # Only accepted for periodic automations.
128
+ timezone: nil,
129
+
130
+ request_options: {}
131
+ )
132
+ end
133
+
134
+ sig do
135
+ override.returns(
136
+ {
137
+ automation_id: String,
138
+ expression: String,
139
+ metadata: T::Hash[Symbol, String],
140
+ name: String,
141
+ run_at: Integer,
142
+ target: T.any(
143
+ OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
144
+ OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
145
+ ),
146
+ timezone: String,
147
+ request_options: OpenAI::RequestOptions
148
+ }
149
+ )
150
+ end
151
+ def to_hash
152
+ end
153
+
154
+ end
155
+
156
+ end
157
+
158
+ end
159
+
160
+ end
161
+ end
@@ -0,0 +1,233 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ module Agents
9
+
10
+ AutomationInvocation = Automations::AutomationInvocation
11
+
12
+ module Automations
13
+
14
+ class AutomationInvocation < OpenAI::Internal::Type::BaseModel
15
+
16
+ OrHash = T.type_alias do
17
+ T.any(
18
+ OpenAI::Beta::Agents::Automations::AutomationInvocation,
19
+ OpenAI::Internal::AnyHash
20
+ )
21
+ end
22
+
23
+ # The invocation ID.
24
+ sig { returns(String) }
25
+ attr_accessor :id
26
+
27
+ # The automation that owns the invocation.
28
+ sig { returns(String) }
29
+ attr_accessor :automation_id
30
+
31
+ # The creation time as a Unix timestamp in seconds.
32
+ sig { returns(Integer) }
33
+ attr_accessor :created_at
34
+
35
+ # The permanent delivery failure, or null when no failure occurred.
36
+ sig { returns(T.nilable(OpenAI::Beta::Agents::Automations::AutomationInvocation::Error)) }
37
+ attr_reader :error
38
+
39
+ sig {
40
+ params(error: T.nilable(OpenAI::Beta::Agents::Automations::AutomationInvocation::Error::OrHash)).void
41
+ }
42
+ attr_writer :error
43
+
44
+ # Always `agent.automation.invocation`.
45
+ sig { returns(Symbol) }
46
+ attr_accessor :object
47
+
48
+ # The intended occurrence as a Unix timestamp in seconds, or null for manual runs.
49
+ sig { returns(T.nilable(Integer)) }
50
+ attr_accessor :scheduled_at
51
+
52
+ # The target or newly created session ID, or null before one is available.
53
+ sig { returns(T.nilable(String)) }
54
+ attr_accessor :session_id
55
+
56
+ # Why an occurrence was skipped, or null when it was not skipped.
57
+ sig { returns(T.nilable(Symbol)) }
58
+ attr_accessor :skip_reason
59
+
60
+ # Whether the invocation was manual or scheduled.
61
+ sig { returns(OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Variants) }
62
+ attr_accessor :source
63
+
64
+ # Delivery status; completed does not mean the agent's work has finished.
65
+ sig { returns(OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol) }
66
+ attr_accessor :status
67
+
68
+ # One attempted delivery by an automation.
69
+ sig do
70
+ params(
71
+
72
+ id: String,
73
+
74
+ automation_id: String,
75
+
76
+ created_at: Integer,
77
+
78
+ error: T.nilable(OpenAI::Beta::Agents::Automations::AutomationInvocation::Error::OrHash),
79
+
80
+ scheduled_at: T.nilable(Integer),
81
+
82
+ session_id: T.nilable(String),
83
+
84
+ source: T.any(
85
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Manual::OrHash,
86
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Automation::OrHash
87
+ ),
88
+
89
+ status: OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::OrSymbol,
90
+
91
+ object: Symbol,
92
+
93
+ skip_reason: T.nilable(Symbol)
94
+ )
95
+ .returns(T.attached_class)
96
+ end
97
+ def self.new(
98
+
99
+ # The invocation ID.
100
+ id:,
101
+
102
+ # The automation that owns the invocation.
103
+ automation_id:,
104
+
105
+ # The creation time as a Unix timestamp in seconds.
106
+ created_at:,
107
+
108
+ # The permanent delivery failure, or null when no failure occurred.
109
+ error:,
110
+
111
+ # The intended occurrence as a Unix timestamp in seconds, or null for manual runs.
112
+ scheduled_at:,
113
+
114
+ # The target or newly created session ID, or null before one is available.
115
+ session_id:,
116
+
117
+ # Whether the invocation was manual or scheduled.
118
+ source:,
119
+
120
+ # Delivery status; completed does not mean the agent's work has finished.
121
+ status:,
122
+
123
+ # Always `agent.automation.invocation`.
124
+ object: :"agent.automation.invocation",
125
+
126
+ # Why an occurrence was skipped, or null when it was not skipped.
127
+
128
+ skip_reason: :pending_delivery
129
+ )
130
+ end
131
+
132
+ sig do
133
+ override.returns(
134
+ {
135
+ id: String,
136
+ automation_id: String,
137
+ created_at: Integer,
138
+ error: T.nilable(OpenAI::Beta::Agents::Automations::AutomationInvocation::Error),
139
+ object: Symbol,
140
+ scheduled_at: T.nilable(Integer),
141
+ session_id: T.nilable(String),
142
+ skip_reason: T.nilable(Symbol),
143
+ source: OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Variants,
144
+ status: OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol
145
+ }
146
+ )
147
+ end
148
+ def to_hash
149
+ end
150
+
151
+ class Error < OpenAI::Internal::Type::BaseModel
152
+ OrHash = T.type_alias do
153
+ T.any(
154
+ OpenAI::Beta::Agents::Automations::AutomationInvocation::Error,
155
+ OpenAI::Internal::AnyHash
156
+ )
157
+ end
158
+
159
+ # A machine-readable error code.
160
+ sig { returns(String) }
161
+ attr_accessor :code
162
+
163
+ # A public explanation of the delivery failure.
164
+ sig { returns(String) }
165
+ attr_accessor :message
166
+
167
+ # The permanent delivery failure, or null when no failure occurred.
168
+ sig do
169
+ params(
170
+
171
+ code: String,
172
+
173
+ message: String
174
+ )
175
+ .returns(T.attached_class)
176
+ end
177
+ def self.new(
178
+
179
+ # A machine-readable error code.
180
+ code:,
181
+
182
+ # A public explanation of the delivery failure.
183
+
184
+ message:
185
+ )
186
+ end
187
+
188
+ sig do
189
+ override.returns(
190
+ {code: String, message: String}
191
+ )
192
+ end
193
+ def to_hash
194
+ end
195
+
196
+ end
197
+
198
+ # Delivery status; completed does not mean the agent's work has finished.
199
+ module Status
200
+ extend OpenAI::Internal::Type::Enum
201
+
202
+ TaggedSymbol = T.type_alias {
203
+ T.all(Symbol, OpenAI::Beta::Agents::Automations::AutomationInvocation::Status)
204
+ }
205
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
206
+
207
+ QUEUED = T.let(:queued, OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol)
208
+ COMPLETED = T.let(
209
+ :completed,
210
+ OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol
211
+ )
212
+ FAILED = T.let(:failed, OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol)
213
+ SKIPPED = T.let(:skipped, OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol)
214
+
215
+ sig {
216
+ override.returns(
217
+ T::Array[OpenAI::Beta::Agents::Automations::AutomationInvocation::Status::TaggedSymbol]
218
+ )
219
+ }
220
+ def self.values
221
+ end
222
+ end
223
+
224
+ end
225
+
226
+ end
227
+
228
+ end
229
+
230
+ end
231
+
232
+ end
233
+ end
@@ -0,0 +1,123 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ module Agents
9
+
10
+ AutomationInvocationSource = Automations::AutomationInvocationSource
11
+
12
+ module Automations
13
+
14
+ module AutomationInvocationSource
15
+ extend OpenAI::Internal::Type::Union
16
+
17
+ Variants = T.type_alias do
18
+ T.any(
19
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Manual,
20
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Automation
21
+ )
22
+ end
23
+
24
+ class Manual < OpenAI::Internal::Type::BaseModel
25
+ OrHash = T.type_alias do
26
+ T.any(
27
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Manual,
28
+ OpenAI::Internal::AnyHash
29
+ )
30
+ end
31
+
32
+ # The type of the object. Always `manual`.
33
+ sig { returns(Symbol) }
34
+ attr_accessor :type
35
+
36
+ sig do
37
+ params(
38
+
39
+ type: Symbol
40
+ )
41
+ .returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+
45
+ # The type of the object. Always `manual`.
46
+
47
+ type: :manual
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {type: Symbol}
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+
59
+ end
60
+
61
+ class Automation < OpenAI::Internal::Type::BaseModel
62
+ OrHash = T.type_alias do
63
+ T.any(
64
+ OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Automation,
65
+ OpenAI::Internal::AnyHash
66
+ )
67
+ end
68
+
69
+ # The automation snapshot for this occurrence, excluding confidential values.
70
+ sig { returns(OpenAI::Beta::Agents::Automation::Variants) }
71
+ attr_accessor :automation
72
+
73
+ # The type of the object. Always `automation`.
74
+ sig { returns(Symbol) }
75
+ attr_accessor :type
76
+
77
+ sig do
78
+ params(
79
+
80
+ automation: T.any(
81
+ OpenAI::Beta::Agents::PeriodicAutomation::OrHash,
82
+ OpenAI::Beta::Agents::OneTimeAutomation::OrHash
83
+ ),
84
+
85
+ type: Symbol
86
+ )
87
+ .returns(T.attached_class)
88
+ end
89
+ def self.new(
90
+
91
+ # The automation snapshot for this occurrence, excluding confidential values.
92
+ automation:,
93
+
94
+ # The type of the object. Always `automation`.
95
+
96
+ type: :automation
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {automation: OpenAI::Beta::Agents::Automation::Variants, type: Symbol}
103
+ )
104
+ end
105
+ def to_hash
106
+ end
107
+
108
+ end
109
+
110
+ sig { override.returns(T::Array[OpenAI::Beta::Agents::Automations::AutomationInvocationSource::Variants]) }
111
+ def self.variants
112
+ end
113
+
114
+ end
115
+
116
+ end
117
+
118
+ end
119
+
120
+ end
121
+
122
+ end
123
+ end
@@ -0,0 +1,61 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ module Agents
9
+
10
+ module Automations
11
+
12
+ class InvocationCreateParams < OpenAI::Internal::Type::BaseModel
13
+
14
+ extend OpenAI::Internal::Type::RequestParameters::Converter
15
+ include OpenAI::Internal::Type::RequestParameters
16
+
17
+ OrHash = T.type_alias do
18
+ T.any(
19
+ OpenAI::Beta::Agents::Automations::InvocationCreateParams,
20
+ OpenAI::Internal::AnyHash
21
+ )
22
+ end
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :automation_id
26
+
27
+ sig do
28
+ params(
29
+
30
+ automation_id: String,
31
+
32
+ request_options: OpenAI::RequestOptions::OrHash
33
+ )
34
+ .returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+
38
+ automation_id:,
39
+
40
+ request_options: {}
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {automation_id: String, request_options: OpenAI::RequestOptions}
47
+ )
48
+ end
49
+ def to_hash
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+
56
+ end
57
+
58
+ end
59
+
60
+ end
61
+ end
@@ -0,0 +1,125 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ module Agents
9
+
10
+ module Automations
11
+
12
+ class InvocationListParams < OpenAI::Internal::Type::BaseModel
13
+
14
+ extend OpenAI::Internal::Type::RequestParameters::Converter
15
+ include OpenAI::Internal::Type::RequestParameters
16
+
17
+ OrHash = T.type_alias do
18
+ T.any(
19
+ OpenAI::Beta::Agents::Automations::InvocationListParams,
20
+ OpenAI::Internal::AnyHash
21
+ )
22
+ end
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :automation_id
26
+
27
+ # Return resources after this resource ID in the selected order.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_reader :after
30
+
31
+ sig { params(after: String).void }
32
+ attr_writer :after
33
+
34
+ # The maximum number of resources to return, between 1 and 100. Defaults to 20.
35
+ sig { returns(T.nilable(Integer)) }
36
+ attr_reader :limit
37
+
38
+ sig { params(limit: Integer).void }
39
+ attr_writer :limit
40
+
41
+ # The order in which resources are returned. Defaults to `desc`.
42
+ sig { returns(T.nilable(OpenAI::Beta::Agents::Automations::InvocationListParams::Order::OrSymbol)) }
43
+ attr_reader :order
44
+
45
+ sig { params(order: OpenAI::Beta::Agents::Automations::InvocationListParams::Order::OrSymbol).void }
46
+ attr_writer :order
47
+
48
+ sig do
49
+ params(
50
+
51
+ automation_id: String,
52
+
53
+ after: String,
54
+
55
+ limit: Integer,
56
+
57
+ order: OpenAI::Beta::Agents::Automations::InvocationListParams::Order::OrSymbol,
58
+
59
+ request_options: OpenAI::RequestOptions::OrHash
60
+ )
61
+ .returns(T.attached_class)
62
+ end
63
+ def self.new(
64
+
65
+ automation_id:,
66
+
67
+ # Return resources after this resource ID in the selected order.
68
+ after: nil,
69
+
70
+ # The maximum number of resources to return, between 1 and 100. Defaults to 20.
71
+ limit: nil,
72
+
73
+ # The order in which resources are returned. Defaults to `desc`.
74
+ order: nil,
75
+
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ sig do
81
+ override.returns(
82
+ {
83
+ automation_id: String,
84
+ after: String,
85
+ limit: Integer,
86
+ order: OpenAI::Beta::Agents::Automations::InvocationListParams::Order::OrSymbol,
87
+ request_options: OpenAI::RequestOptions
88
+ }
89
+ )
90
+ end
91
+ def to_hash
92
+ end
93
+
94
+ # The order in which resources are returned. Defaults to `desc`.
95
+ module Order
96
+ extend OpenAI::Internal::Type::Enum
97
+
98
+ TaggedSymbol = T.type_alias {
99
+ T.all(Symbol, OpenAI::Beta::Agents::Automations::InvocationListParams::Order)
100
+ }
101
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
102
+
103
+ # Returns resources in ascending order.
104
+ ASC = T.let(:asc, OpenAI::Beta::Agents::Automations::InvocationListParams::Order::TaggedSymbol)
105
+
106
+ # Returns resources in descending order.
107
+ DESC = T.let(:desc, OpenAI::Beta::Agents::Automations::InvocationListParams::Order::TaggedSymbol)
108
+
109
+ sig {
110
+ override.returns(T::Array[OpenAI::Beta::Agents::Automations::InvocationListParams::Order::TaggedSymbol])
111
+ }
112
+ def self.values
113
+ end
114
+ end
115
+
116
+ end
117
+
118
+ end
119
+
120
+ end
121
+
122
+ end
123
+
124
+ end
125
+ end