openai 0.91.0 → 0.92.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/beta/beta_tool.rb +16 -0
  5. data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +16 -0
  6. data/lib/openai/models/realtime/realtime_session_create_response.rb +16 -0
  7. data/lib/openai/models/realtime/realtime_tools_config_union.rb +16 -0
  8. data/lib/openai/models/responses/tool.rb +16 -0
  9. data/lib/openai/models/webhooks/deleted_webhook_endpoint.rb +38 -0
  10. data/lib/openai/models/webhooks/event_type_list_params.rb +16 -0
  11. data/lib/openai/models/webhooks/webhook_create_params.rb +73 -0
  12. data/lib/openai/models/webhooks/webhook_delete_params.rb +22 -0
  13. data/lib/openai/models/webhooks/webhook_endpoint.rb +85 -0
  14. data/lib/openai/models/webhooks/webhook_endpoint_list.rb +55 -0
  15. data/lib/openai/models/webhooks/webhook_endpoint_test_result.rb +58 -0
  16. data/lib/openai/models/webhooks/webhook_endpoint_with_secret.rb +105 -0
  17. data/lib/openai/models/webhooks/webhook_event_type_list.rb +28 -0
  18. data/lib/openai/models/webhooks/webhook_list_params.rb +34 -0
  19. data/lib/openai/models/webhooks/webhook_retrieve_params.rb +22 -0
  20. data/lib/openai/models/webhooks/webhook_rotate_secret_params.rb +34 -0
  21. data/lib/openai/models/webhooks/webhook_test_params.rb +59 -0
  22. data/lib/openai/models/webhooks/webhook_update_params.rb +80 -0
  23. data/lib/openai/resources/webhooks/event_types.rb +35 -0
  24. data/lib/openai/resources/webhooks.rb +195 -0
  25. data/lib/openai/version.rb +1 -1
  26. data/lib/openai.rb +15 -0
  27. data/rbi/openai/models/beta/beta_tool.rbi +12 -0
  28. data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +12 -0
  29. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +12 -0
  30. data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +12 -0
  31. data/rbi/openai/models/responses/tool.rbi +12 -0
  32. data/rbi/openai/models/webhooks/deleted_webhook_endpoint.rbi +67 -0
  33. data/rbi/openai/models/webhooks/event_type_list_params.rbi +37 -0
  34. data/rbi/openai/models/webhooks/webhook_create_params.rbi +139 -0
  35. data/rbi/openai/models/webhooks/webhook_delete_params.rbi +53 -0
  36. data/rbi/openai/models/webhooks/webhook_endpoint.rbi +126 -0
  37. data/rbi/openai/models/webhooks/webhook_endpoint_list.rbi +91 -0
  38. data/rbi/openai/models/webhooks/webhook_endpoint_test_result.rbi +87 -0
  39. data/rbi/openai/models/webhooks/webhook_endpoint_with_secret.rbi +138 -0
  40. data/rbi/openai/models/webhooks/webhook_event_type_list.rbi +58 -0
  41. data/rbi/openai/models/webhooks/webhook_list_params.rbi +67 -0
  42. data/rbi/openai/models/webhooks/webhook_retrieve_params.rbi +53 -0
  43. data/rbi/openai/models/webhooks/webhook_rotate_secret_params.rbi +71 -0
  44. data/rbi/openai/models/webhooks/webhook_test_params.rbi +124 -0
  45. data/rbi/openai/models/webhooks/webhook_update_params.rbi +156 -0
  46. data/rbi/openai/resources/webhooks/event_types.rbi +24 -0
  47. data/rbi/openai/resources/webhooks.rbi +126 -0
  48. data/sig/openai/models/webhooks/deleted_webhook_endpoint.rbs +28 -0
  49. data/sig/openai/models/webhooks/event_type_list_params.rbs +16 -0
  50. data/sig/openai/models/webhooks/webhook_create_params.rbs +83 -0
  51. data/sig/openai/models/webhooks/webhook_delete_params.rbs +25 -0
  52. data/sig/openai/models/webhooks/webhook_endpoint.rbs +59 -0
  53. data/sig/openai/models/webhooks/webhook_endpoint_list.rbs +42 -0
  54. data/sig/openai/models/webhooks/webhook_endpoint_test_result.rbs +42 -0
  55. data/sig/openai/models/webhooks/webhook_endpoint_with_secret.rbs +64 -0
  56. data/sig/openai/models/webhooks/webhook_event_type_list.rbs +17 -0
  57. data/sig/openai/models/webhooks/webhook_list_params.rbs +35 -0
  58. data/sig/openai/models/webhooks/webhook_retrieve_params.rbs +25 -0
  59. data/sig/openai/models/webhooks/webhook_rotate_secret_params.rbs +35 -0
  60. data/sig/openai/models/webhooks/webhook_test_params.rbs +78 -0
  61. data/sig/openai/models/webhooks/webhook_update_params.rbs +96 -0
  62. data/sig/openai/resources/webhooks/event_types.rbs +13 -0
  63. data/sig/openai/resources/webhooks.rbs +45 -0
  64. metadata +46 -1
@@ -70,6 +70,10 @@ module OpenAI
70
70
  # service connectors
71
71
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
72
72
  #
73
+ # This field is deprecated for models released after September 1, 2026. Use
74
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
75
+ # through a Secure MCP Tunnel.
76
+ #
73
77
  # Currently supported `connector_id` values are:
74
78
  #
75
79
  # - Dropbox: `connector_dropbox`
@@ -194,6 +198,10 @@ module OpenAI
194
198
  # service connectors
195
199
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
196
200
  #
201
+ # This field is deprecated for models released after September 1, 2026. Use
202
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
203
+ # through a Secure MCP Tunnel.
204
+ #
197
205
  # Currently supported `connector_id` values are:
198
206
  #
199
207
  # - Dropbox: `connector_dropbox`
@@ -358,6 +366,10 @@ module OpenAI
358
366
  # service connectors
359
367
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
360
368
  #
369
+ # This field is deprecated for models released after September 1, 2026. Use
370
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
371
+ # through a Secure MCP Tunnel.
372
+ #
361
373
  # Currently supported `connector_id` values are:
362
374
  #
363
375
  # - Dropbox: `connector_dropbox`
@@ -50,6 +50,10 @@ module OpenAI
50
50
  # service connectors
51
51
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
52
52
  #
53
+ # This field is deprecated for models released after September 1, 2026. Use
54
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
55
+ # through a Secure MCP Tunnel.
56
+ #
53
57
  # Currently supported `connector_id` values are:
54
58
  #
55
59
  # - Dropbox: `connector_dropbox`
@@ -179,6 +183,10 @@ module OpenAI
179
183
  # service connectors
180
184
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
181
185
  #
186
+ # This field is deprecated for models released after September 1, 2026. Use
187
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
188
+ # through a Secure MCP Tunnel.
189
+ #
182
190
  # Currently supported `connector_id` values are:
183
191
  #
184
192
  # - Dropbox: `connector_dropbox`
@@ -350,6 +358,10 @@ module OpenAI
350
358
  # service connectors
351
359
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
352
360
  #
361
+ # This field is deprecated for models released after September 1, 2026. Use
362
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
363
+ # through a Secure MCP Tunnel.
364
+ #
353
365
  # Currently supported `connector_id` values are:
354
366
  #
355
367
  # - Dropbox: `connector_dropbox`
@@ -1320,6 +1320,10 @@ module OpenAI
1320
1320
  # service connectors
1321
1321
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
1322
1322
  #
1323
+ # This field is deprecated for models released after September 1, 2026. Use
1324
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
1325
+ # through a Secure MCP Tunnel.
1326
+ #
1323
1327
  # Currently supported `connector_id` values are:
1324
1328
  #
1325
1329
  # - Dropbox: `connector_dropbox`
@@ -1453,6 +1457,10 @@ module OpenAI
1453
1457
  # service connectors
1454
1458
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
1455
1459
  #
1460
+ # This field is deprecated for models released after September 1, 2026. Use
1461
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
1462
+ # through a Secure MCP Tunnel.
1463
+ #
1456
1464
  # Currently supported `connector_id` values are:
1457
1465
  #
1458
1466
  # - Dropbox: `connector_dropbox`
@@ -1637,6 +1645,10 @@ module OpenAI
1637
1645
  # service connectors
1638
1646
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
1639
1647
  #
1648
+ # This field is deprecated for models released after September 1, 2026. Use
1649
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
1650
+ # through a Secure MCP Tunnel.
1651
+ #
1640
1652
  # Currently supported `connector_id` values are:
1641
1653
  #
1642
1654
  # - Dropbox: `connector_dropbox`
@@ -64,6 +64,10 @@ module OpenAI
64
64
  # service connectors
65
65
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
66
66
  #
67
+ # This field is deprecated for models released after September 1, 2026. Use
68
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
69
+ # through a Secure MCP Tunnel.
70
+ #
67
71
  # Currently supported `connector_id` values are:
68
72
  #
69
73
  # - Dropbox: `connector_dropbox`
@@ -193,6 +197,10 @@ module OpenAI
193
197
  # service connectors
194
198
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
195
199
  #
200
+ # This field is deprecated for models released after September 1, 2026. Use
201
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
202
+ # through a Secure MCP Tunnel.
203
+ #
196
204
  # Currently supported `connector_id` values are:
197
205
  #
198
206
  # - Dropbox: `connector_dropbox`
@@ -366,6 +374,10 @@ module OpenAI
366
374
  # service connectors
367
375
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
368
376
  #
377
+ # This field is deprecated for models released after September 1, 2026. Use
378
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
379
+ # through a Secure MCP Tunnel.
380
+ #
369
381
  # Currently supported `connector_id` values are:
370
382
  #
371
383
  # - Dropbox: `connector_dropbox`
@@ -70,6 +70,10 @@ module OpenAI
70
70
  # service connectors
71
71
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
72
72
  #
73
+ # This field is deprecated for models released after September 1, 2026. Use
74
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
75
+ # through a Secure MCP Tunnel.
76
+ #
73
77
  # Currently supported `connector_id` values are:
74
78
  #
75
79
  # - Dropbox: `connector_dropbox`
@@ -194,6 +198,10 @@ module OpenAI
194
198
  # service connectors
195
199
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
196
200
  #
201
+ # This field is deprecated for models released after September 1, 2026. Use
202
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
203
+ # through a Secure MCP Tunnel.
204
+ #
197
205
  # Currently supported `connector_id` values are:
198
206
  #
199
207
  # - Dropbox: `connector_dropbox`
@@ -358,6 +366,10 @@ module OpenAI
358
366
  # service connectors
359
367
  # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
360
368
  #
369
+ # This field is deprecated for models released after September 1, 2026. Use
370
+ # `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
371
+ # through a Secure MCP Tunnel.
372
+ #
361
373
  # Currently supported `connector_id` values are:
362
374
  #
363
375
  # - Dropbox: `connector_dropbox`
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class DeletedWebhookEndpoint < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Webhooks::DeletedWebhookEndpoint,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The ID of the deleted webhook endpoint.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # Whether the endpoint was deleted.
22
+ sig { returns(T::Boolean) }
23
+ attr_accessor :deleted
24
+
25
+ # The object type, which is always webhook_endpoint.deleted.
26
+ sig { returns(Symbol) }
27
+ attr_accessor :object
28
+
29
+ sig do
30
+ params(
31
+
32
+ id: String,
33
+
34
+ deleted: T::Boolean,
35
+
36
+ object: Symbol
37
+ )
38
+ .returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+
42
+ # The ID of the deleted webhook endpoint.
43
+ id:,
44
+
45
+ # Whether the endpoint was deleted.
46
+ deleted:,
47
+
48
+ # The object type, which is always webhook_endpoint.deleted.
49
+
50
+ object: :"webhook_endpoint.deleted"
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {id: String, deleted: T::Boolean, object: Symbol}
57
+ )
58
+ end
59
+ def to_hash
60
+ end
61
+
62
+ end
63
+
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,37 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class EventTypeListParams < OpenAI::Internal::Type::BaseModel
9
+
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ OrHash = T.type_alias do
14
+ T.any(
15
+ OpenAI::Webhooks::EventTypeListParams,
16
+ OpenAI::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ sig do
21
+ params(request_options: OpenAI::RequestOptions::OrHash).returns(
22
+ T.attached_class
23
+ )
24
+ end
25
+ def self.new(request_options: {})
26
+ end
27
+
28
+ sig { override.returns({request_options: OpenAI::RequestOptions}) }
29
+ def to_hash
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,139 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class WebhookCreateParams < OpenAI::Internal::Type::BaseModel
9
+
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ OrHash = T.type_alias do
14
+ T.any(
15
+ OpenAI::Webhooks::WebhookCreateParams,
16
+ OpenAI::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ # The event types that trigger deliveries to this endpoint.
21
+ sig { returns(T::Array[OpenAI::Webhooks::WebhookCreateParams::EventType::OrSymbol]) }
22
+ attr_accessor :event_types
23
+
24
+ # A human-readable name for the webhook endpoint.
25
+ sig { returns(String) }
26
+ attr_accessor :name
27
+
28
+ # The HTTPS URL that receives webhook deliveries.
29
+ sig { returns(String) }
30
+ attr_accessor :url
31
+
32
+ sig do
33
+ params(
34
+
35
+ event_types: T::Array[OpenAI::Webhooks::WebhookCreateParams::EventType::OrSymbol],
36
+
37
+ name: String,
38
+
39
+ url: String,
40
+
41
+ request_options: OpenAI::RequestOptions::OrHash
42
+ )
43
+ .returns(T.attached_class)
44
+ end
45
+ def self.new(
46
+
47
+ # The event types that trigger deliveries to this endpoint.
48
+ event_types:,
49
+
50
+ # A human-readable name for the webhook endpoint.
51
+ name:,
52
+
53
+ # The HTTPS URL that receives webhook deliveries.
54
+ url:,
55
+
56
+ request_options: {}
57
+ )
58
+ end
59
+
60
+ sig do
61
+ override.returns(
62
+ {
63
+ event_types: T::Array[OpenAI::Webhooks::WebhookCreateParams::EventType::OrSymbol],
64
+ name: String,
65
+ url: String,
66
+ request_options: OpenAI::RequestOptions
67
+ }
68
+ )
69
+ end
70
+ def to_hash
71
+ end
72
+
73
+ # The event type to send as a sample delivery.
74
+ module EventType
75
+ extend OpenAI::Internal::Type::Enum
76
+
77
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Webhooks::WebhookCreateParams::EventType) }
78
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
79
+
80
+ BATCH_COMPLETED = T.let(:"batch.completed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
81
+ BATCH_FAILED = T.let(:"batch.failed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
82
+ BATCH_EXPIRED = T.let(:"batch.expired", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
83
+ BATCH_CANCELLED = T.let(:"batch.cancelled", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
84
+ RESPONSE_COMPLETED = T.let(
85
+ :"response.completed",
86
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
87
+ )
88
+ RESPONSE_FAILED = T.let(:"response.failed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
89
+ RESPONSE_CANCELLED = T.let(
90
+ :"response.cancelled",
91
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
92
+ )
93
+ RESPONSE_INCOMPLETE = T.let(
94
+ :"response.incomplete",
95
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
96
+ )
97
+ EVAL_RUN_SUCCEEDED = T.let(
98
+ :"eval.run.succeeded",
99
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
100
+ )
101
+ EVAL_RUN_FAILED = T.let(:"eval.run.failed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
102
+ EVAL_RUN_CANCELED = T.let(
103
+ :"eval.run.canceled",
104
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
105
+ )
106
+ FINE_TUNING_JOB_SUCCEEDED = T.let(
107
+ :"fine_tuning.job.succeeded",
108
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
109
+ )
110
+ FINE_TUNING_JOB_FAILED = T.let(
111
+ :"fine_tuning.job.failed",
112
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
113
+ )
114
+ FINE_TUNING_JOB_CANCELLED = T.let(
115
+ :"fine_tuning.job.cancelled",
116
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
117
+ )
118
+ REALTIME_CALL_INCOMING = T.let(
119
+ :"realtime.call.incoming",
120
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
121
+ )
122
+ VIDEO_COMPLETED = T.let(:"video.completed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
123
+ VIDEO_FAILED = T.let(:"video.failed", OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol)
124
+ SAFETY_ALERT_CREATED = T.let(
125
+ :"safety.alert.created",
126
+ OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol
127
+ )
128
+
129
+ sig { override.returns(T::Array[OpenAI::Webhooks::WebhookCreateParams::EventType::TaggedSymbol]) }
130
+ def self.values
131
+ end
132
+ end
133
+
134
+ end
135
+
136
+ end
137
+
138
+ end
139
+ end
@@ -0,0 +1,53 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class WebhookDeleteParams < OpenAI::Internal::Type::BaseModel
9
+
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ OrHash = T.type_alias do
14
+ T.any(
15
+ OpenAI::Webhooks::WebhookDeleteParams,
16
+ OpenAI::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :webhook_endpoint_id
22
+
23
+ sig do
24
+ params(
25
+
26
+ webhook_endpoint_id: String,
27
+
28
+ request_options: OpenAI::RequestOptions::OrHash
29
+ )
30
+ .returns(T.attached_class)
31
+ end
32
+ def self.new(
33
+
34
+ webhook_endpoint_id:,
35
+
36
+ request_options: {}
37
+ )
38
+ end
39
+
40
+ sig do
41
+ override.returns(
42
+ {webhook_endpoint_id: String, request_options: OpenAI::RequestOptions}
43
+ )
44
+ end
45
+ def to_hash
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+ end
@@ -0,0 +1,126 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class WebhookEndpoint < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Webhooks::WebhookEndpoint,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The unique ID of the webhook endpoint.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # The Unix timestamp when the endpoint was created.
22
+ sig { returns(Integer) }
23
+ attr_accessor :created_at
24
+
25
+ # The event types that trigger deliveries to this endpoint.
26
+ sig { returns(T::Array[String]) }
27
+ attr_accessor :event_types
28
+
29
+ # The human-readable name of the endpoint.
30
+ sig { returns(String) }
31
+ attr_accessor :name
32
+
33
+ # The object type, which is always webhook_endpoint.
34
+ sig { returns(Symbol) }
35
+ attr_accessor :object
36
+
37
+ # A masked hint for the endpoint's signing secret.
38
+ sig { returns(T.nilable(String)) }
39
+ attr_accessor :signing_secret_hint
40
+
41
+ # The HTTPS URL that receives webhook deliveries.
42
+ sig { returns(String) }
43
+ attr_accessor :url
44
+
45
+ # The Unix timestamp of the last endpoint configuration or signing-secret change.
46
+ # Initialized at creation; tests and unchanged updates do not advance it.
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :updated_at
49
+
50
+ sig { params(updated_at: Integer).void }
51
+ attr_writer :updated_at
52
+
53
+ sig do
54
+ params(
55
+
56
+ id: String,
57
+
58
+ created_at: Integer,
59
+
60
+ event_types: T::Array[String],
61
+
62
+ name: String,
63
+
64
+ signing_secret_hint: T.nilable(String),
65
+
66
+ url: String,
67
+
68
+ updated_at: Integer,
69
+
70
+ object: Symbol
71
+ )
72
+ .returns(T.attached_class)
73
+ end
74
+ def self.new(
75
+
76
+ # The unique ID of the webhook endpoint.
77
+ id:,
78
+
79
+ # The Unix timestamp when the endpoint was created.
80
+ created_at:,
81
+
82
+ # The event types that trigger deliveries to this endpoint.
83
+ event_types:,
84
+
85
+ # The human-readable name of the endpoint.
86
+ name:,
87
+
88
+ # A masked hint for the endpoint's signing secret.
89
+ signing_secret_hint:,
90
+
91
+ # The HTTPS URL that receives webhook deliveries.
92
+ url:,
93
+
94
+ # The Unix timestamp of the last endpoint configuration or signing-secret change.
95
+ # Initialized at creation; tests and unchanged updates do not advance it.
96
+ updated_at: nil,
97
+
98
+ # The object type, which is always webhook_endpoint.
99
+
100
+ object: :webhook_endpoint
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ created_at: Integer,
109
+ event_types: T::Array[String],
110
+ name: String,
111
+ object: Symbol,
112
+ signing_secret_hint: T.nilable(String),
113
+ url: String,
114
+ updated_at: Integer
115
+ }
116
+ )
117
+ end
118
+ def to_hash
119
+ end
120
+
121
+ end
122
+
123
+ end
124
+
125
+ end
126
+ end
@@ -0,0 +1,91 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class WebhookEndpointList < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Webhooks::WebhookEndpointList,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The webhook endpoints in this page.
18
+ sig { returns(T::Array[OpenAI::Webhooks::WebhookEndpoint]) }
19
+ attr_accessor :data
20
+
21
+ # The ID of the first endpoint in this page.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_accessor :first_id
24
+
25
+ # Whether more webhook endpoints are available.
26
+ sig { returns(T::Boolean) }
27
+ attr_accessor :has_more
28
+
29
+ # The ID of the last endpoint in this page.
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :last_id
32
+
33
+ # The object type, which is always list.
34
+ sig { returns(Symbol) }
35
+ attr_accessor :object
36
+
37
+ sig do
38
+ params(
39
+
40
+ data: T::Array[OpenAI::Webhooks::WebhookEndpoint::OrHash],
41
+
42
+ first_id: T.nilable(String),
43
+
44
+ has_more: T::Boolean,
45
+
46
+ last_id: T.nilable(String),
47
+
48
+ object: Symbol
49
+ )
50
+ .returns(T.attached_class)
51
+ end
52
+ def self.new(
53
+
54
+ # The webhook endpoints in this page.
55
+ data:,
56
+
57
+ # The ID of the first endpoint in this page.
58
+ first_id:,
59
+
60
+ # Whether more webhook endpoints are available.
61
+ has_more:,
62
+
63
+ # The ID of the last endpoint in this page.
64
+ last_id:,
65
+
66
+ # The object type, which is always list.
67
+
68
+ object: :list
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ data: T::Array[OpenAI::Webhooks::WebhookEndpoint],
76
+ first_id: T.nilable(String),
77
+ has_more: T::Boolean,
78
+ last_id: T.nilable(String),
79
+ object: Symbol
80
+ }
81
+ )
82
+ end
83
+ def to_hash
84
+ end
85
+
86
+ end
87
+
88
+ end
89
+
90
+ end
91
+ end