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
@@ -0,0 +1,156 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class WebhookUpdateParams < 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::WebhookUpdateParams,
16
+ OpenAI::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :webhook_endpoint_id
22
+
23
+ # The complete set of event types that should trigger deliveries.
24
+ sig { returns(T.nilable(T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::OrSymbol])) }
25
+ attr_reader :event_types
26
+
27
+ sig { params(event_types: T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::OrSymbol]).void }
28
+ attr_writer :event_types
29
+
30
+ # A new human-readable name for the webhook endpoint.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_reader :name
33
+
34
+ sig { params(name: String).void }
35
+ attr_writer :name
36
+
37
+ # A new HTTPS URL that receives webhook deliveries.
38
+ sig { returns(T.nilable(String)) }
39
+ attr_reader :url
40
+
41
+ sig { params(url: String).void }
42
+ attr_writer :url
43
+
44
+ sig do
45
+ params(
46
+
47
+ webhook_endpoint_id: String,
48
+
49
+ event_types: T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::OrSymbol],
50
+
51
+ name: String,
52
+
53
+ url: String,
54
+
55
+ request_options: OpenAI::RequestOptions::OrHash
56
+ )
57
+ .returns(T.attached_class)
58
+ end
59
+ def self.new(
60
+
61
+ webhook_endpoint_id:,
62
+
63
+ # The complete set of event types that should trigger deliveries.
64
+ event_types: nil,
65
+
66
+ # A new human-readable name for the webhook endpoint.
67
+ name: nil,
68
+
69
+ # A new HTTPS URL that receives webhook deliveries.
70
+ url: nil,
71
+
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ webhook_endpoint_id: String,
80
+ event_types: T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::OrSymbol],
81
+ name: String,
82
+ url: String,
83
+ request_options: OpenAI::RequestOptions
84
+ }
85
+ )
86
+ end
87
+ def to_hash
88
+ end
89
+
90
+ # The event type to send as a sample delivery.
91
+ module EventType
92
+ extend OpenAI::Internal::Type::Enum
93
+
94
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Webhooks::WebhookUpdateParams::EventType) }
95
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
96
+
97
+ BATCH_COMPLETED = T.let(:"batch.completed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
98
+ BATCH_FAILED = T.let(:"batch.failed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
99
+ BATCH_EXPIRED = T.let(:"batch.expired", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
100
+ BATCH_CANCELLED = T.let(:"batch.cancelled", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
101
+ RESPONSE_COMPLETED = T.let(
102
+ :"response.completed",
103
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
104
+ )
105
+ RESPONSE_FAILED = T.let(:"response.failed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
106
+ RESPONSE_CANCELLED = T.let(
107
+ :"response.cancelled",
108
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
109
+ )
110
+ RESPONSE_INCOMPLETE = T.let(
111
+ :"response.incomplete",
112
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
113
+ )
114
+ EVAL_RUN_SUCCEEDED = T.let(
115
+ :"eval.run.succeeded",
116
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
117
+ )
118
+ EVAL_RUN_FAILED = T.let(:"eval.run.failed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
119
+ EVAL_RUN_CANCELED = T.let(
120
+ :"eval.run.canceled",
121
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
122
+ )
123
+ FINE_TUNING_JOB_SUCCEEDED = T.let(
124
+ :"fine_tuning.job.succeeded",
125
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
126
+ )
127
+ FINE_TUNING_JOB_FAILED = T.let(
128
+ :"fine_tuning.job.failed",
129
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
130
+ )
131
+ FINE_TUNING_JOB_CANCELLED = T.let(
132
+ :"fine_tuning.job.cancelled",
133
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
134
+ )
135
+ REALTIME_CALL_INCOMING = T.let(
136
+ :"realtime.call.incoming",
137
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
138
+ )
139
+ VIDEO_COMPLETED = T.let(:"video.completed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
140
+ VIDEO_FAILED = T.let(:"video.failed", OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol)
141
+ SAFETY_ALERT_CREATED = T.let(
142
+ :"safety.alert.created",
143
+ OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol
144
+ )
145
+
146
+ sig { override.returns(T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::TaggedSymbol]) }
147
+ def self.values
148
+ end
149
+ end
150
+
151
+ end
152
+
153
+ end
154
+
155
+ end
156
+ end
@@ -0,0 +1,24 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Resources
5
+
6
+ class Webhooks
7
+
8
+ class EventTypes
9
+
10
+ # Returns webhook event types visible to the authenticated project.
11
+ sig { params(request_options: OpenAI::RequestOptions::OrHash).returns(OpenAI::Webhooks::WebhookEventTypeList) }
12
+ def list(request_options: {})
13
+ end
14
+
15
+ # @api private
16
+ sig { params(client: OpenAI::Client).returns(T.attached_class) }
17
+ def self.new(client:)
18
+ end
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+ end
@@ -5,6 +5,132 @@ module OpenAI
5
5
 
6
6
  class Webhooks
7
7
 
8
+ sig { returns(OpenAI::Resources::Webhooks::EventTypes) }
9
+ attr_reader :event_types
10
+
11
+ # Creates a webhook endpoint for the authenticated project.
12
+ sig {
13
+ params(
14
+ event_types: T::Array[OpenAI::Webhooks::WebhookCreateParams::EventType::OrSymbol],
15
+ name: String,
16
+ url: String,
17
+ request_options: OpenAI::RequestOptions::OrHash
18
+ )
19
+ .returns(OpenAI::Webhooks::WebhookEndpointWithSecret)
20
+ }
21
+ def create(
22
+ # The event types that trigger deliveries to this endpoint.
23
+ event_types:,
24
+ # A human-readable name for the webhook endpoint.
25
+ name:,
26
+ # The HTTPS URL that receives webhook deliveries.
27
+ url:,
28
+ request_options: {}
29
+ )
30
+ end
31
+
32
+ # Retrieves a webhook endpoint for the authenticated project.
33
+ sig {
34
+ params(webhook_endpoint_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
35
+ OpenAI::Webhooks::WebhookEndpoint
36
+ )
37
+ }
38
+ def retrieve(
39
+ # The ID of the webhook endpoint to retrieve.
40
+ webhook_endpoint_id,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ # Updates a webhook endpoint for the authenticated project.
46
+ sig {
47
+ params(
48
+ webhook_endpoint_id: String,
49
+ event_types: T::Array[OpenAI::Webhooks::WebhookUpdateParams::EventType::OrSymbol],
50
+ name: String,
51
+ url: String,
52
+ request_options: OpenAI::RequestOptions::OrHash
53
+ )
54
+ .returns(OpenAI::Webhooks::WebhookEndpoint)
55
+ }
56
+ def update(
57
+ # The ID of the webhook endpoint to update.
58
+ webhook_endpoint_id,
59
+ # The complete set of event types that should trigger deliveries.
60
+ event_types: nil,
61
+ # A new human-readable name for the webhook endpoint.
62
+ name: nil,
63
+ # A new HTTPS URL that receives webhook deliveries.
64
+ url: nil,
65
+ request_options: {}
66
+ )
67
+ end
68
+
69
+ # Returns webhook endpoints for the authenticated project in newest-first order.
70
+ sig {
71
+ params(after: T.nilable(String), limit: Integer, request_options: OpenAI::RequestOptions::OrHash).returns(
72
+ OpenAI::Internal::CursorPage[OpenAI::Webhooks::WebhookEndpoint]
73
+ )
74
+ }
75
+ def list(
76
+ # ID of the last webhook endpoint from the previous page.
77
+ after: nil,
78
+ # Maximum number of webhook endpoints to return. Defaults to 20.
79
+ limit: nil,
80
+ request_options: {}
81
+ )
82
+ end
83
+
84
+ # Deletes a webhook endpoint for the authenticated project.
85
+ sig {
86
+ params(webhook_endpoint_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
87
+ OpenAI::Webhooks::DeletedWebhookEndpoint
88
+ )
89
+ }
90
+ def delete(
91
+ # The ID of the webhook endpoint to delete.
92
+ webhook_endpoint_id,
93
+ request_options: {}
94
+ )
95
+ end
96
+
97
+ # Rotates the signing secret for a webhook endpoint in the authenticated project.
98
+ sig {
99
+ params(
100
+ webhook_endpoint_id: String,
101
+ keep_old_secret_active_for_24_hours: T::Boolean,
102
+ request_options: OpenAI::RequestOptions::OrHash
103
+ )
104
+ .returns(OpenAI::Webhooks::WebhookEndpointWithSecret)
105
+ }
106
+ def rotate_secret(
107
+ # The ID of the webhook endpoint whose signing secret will be rotated.
108
+ webhook_endpoint_id,
109
+ # Whether to keep the previous signing secret valid for 24 hours after rotation.
110
+ # Defaults to false, which invalidates the previous secret immediately.
111
+ keep_old_secret_active_for_24_hours: nil,
112
+ request_options: {}
113
+ )
114
+ end
115
+
116
+ # Sends a sample event to a webhook endpoint for the authenticated project.
117
+ sig {
118
+ params(
119
+ webhook_endpoint_id: String,
120
+ event_type: OpenAI::Webhooks::WebhookTestParams::EventType::OrSymbol,
121
+ request_options: OpenAI::RequestOptions::OrHash
122
+ )
123
+ .returns(OpenAI::Webhooks::WebhookEndpointTestResult)
124
+ }
125
+ def test_(
126
+ # The ID of the webhook endpoint to test.
127
+ webhook_endpoint_id,
128
+ # The event type to send as a sample delivery.
129
+ event_type:,
130
+ request_options: {}
131
+ )
132
+ end
133
+
8
134
  # Validates that the given payload was sent by OpenAI and parses the payload.
9
135
  sig {
10
136
  params(
@@ -0,0 +1,28 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type deleted_webhook_endpoint =
5
+ { id: String, deleted: bool, ?object: :"webhook_endpoint.deleted" }
6
+
7
+ class DeletedWebhookEndpoint < OpenAI::Internal::Type::BaseModel
8
+ attr_accessor id: String
9
+
10
+ attr_accessor deleted: bool
11
+
12
+ attr_accessor object: :"webhook_endpoint.deleted"
13
+
14
+ def initialize: (
15
+ id: String,
16
+ deleted: bool,
17
+ ?object: :"webhook_endpoint.deleted"
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ id: String,
22
+ deleted: bool,
23
+ ?object: :"webhook_endpoint.deleted"
24
+ }
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,16 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type event_type_list_params = { ?request_options: OpenAI::request_opts }
5
+
6
+ class EventTypeListParams < OpenAI::Internal::Type::BaseModel
7
+ extend OpenAI::Internal::Type::RequestParameters::Converter
8
+ include OpenAI::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: OpenAI::request_opts) -> void
11
+
12
+ def to_hash: -> { ?request_options: OpenAI::RequestOptions }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,83 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_create_params =
5
+ {
6
+ event_types: ::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type],
7
+ name: String,
8
+ url: String,
9
+ ?request_options: OpenAI::request_opts
10
+ }
11
+
12
+ class WebhookCreateParams < OpenAI::Internal::Type::BaseModel
13
+ extend OpenAI::Internal::Type::RequestParameters::Converter
14
+ include OpenAI::Internal::Type::RequestParameters
15
+
16
+ attr_accessor event_types: ::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type]
17
+
18
+ attr_accessor name: String
19
+
20
+ attr_accessor url: String
21
+
22
+ def initialize: (
23
+ event_types: ::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type],
24
+ name: String,
25
+ url: String,
26
+ ?request_options: OpenAI::request_opts
27
+ ) -> void
28
+
29
+ def to_hash: -> {
30
+ event_types: ::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type],
31
+ name: String,
32
+ url: String,
33
+ ?request_options: OpenAI::RequestOptions
34
+ }
35
+
36
+ type event_type =
37
+ :"batch.completed"
38
+ | :"batch.failed"
39
+ | :"batch.expired"
40
+ | :"batch.cancelled"
41
+ | :"response.completed"
42
+ | :"response.failed"
43
+ | :"response.cancelled"
44
+ | :"response.incomplete"
45
+ | :"eval.run.succeeded"
46
+ | :"eval.run.failed"
47
+ | :"eval.run.canceled"
48
+ | :"fine_tuning.job.succeeded"
49
+ | :"fine_tuning.job.failed"
50
+ | :"fine_tuning.job.cancelled"
51
+ | :"realtime.call.incoming"
52
+ | :"video.completed"
53
+ | :"video.failed"
54
+ | :"safety.alert.created"
55
+
56
+ module EventType
57
+ extend OpenAI::Internal::Type::Enum
58
+
59
+ BATCH_COMPLETED: :"batch.completed"
60
+ BATCH_FAILED: :"batch.failed"
61
+ BATCH_EXPIRED: :"batch.expired"
62
+ BATCH_CANCELLED: :"batch.cancelled"
63
+ RESPONSE_COMPLETED: :"response.completed"
64
+ RESPONSE_FAILED: :"response.failed"
65
+ RESPONSE_CANCELLED: :"response.cancelled"
66
+ RESPONSE_INCOMPLETE: :"response.incomplete"
67
+ EVAL_RUN_SUCCEEDED: :"eval.run.succeeded"
68
+ EVAL_RUN_FAILED: :"eval.run.failed"
69
+ EVAL_RUN_CANCELED: :"eval.run.canceled"
70
+ FINE_TUNING_JOB_SUCCEEDED: :"fine_tuning.job.succeeded"
71
+ FINE_TUNING_JOB_FAILED: :"fine_tuning.job.failed"
72
+ FINE_TUNING_JOB_CANCELLED: :"fine_tuning.job.cancelled"
73
+ REALTIME_CALL_INCOMING: :"realtime.call.incoming"
74
+ VIDEO_COMPLETED: :"video.completed"
75
+ VIDEO_FAILED: :"video.failed"
76
+ SAFETY_ALERT_CREATED: :"safety.alert.created"
77
+
78
+ def self?.values: -> ::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type]
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,25 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_delete_params =
5
+ { webhook_endpoint_id: String, ?request_options: OpenAI::request_opts }
6
+
7
+ class WebhookDeleteParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ attr_accessor webhook_endpoint_id: String
12
+
13
+ def initialize: (
14
+ webhook_endpoint_id: String,
15
+ ?request_options: OpenAI::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ webhook_endpoint_id: String,
20
+ ?request_options: OpenAI::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,59 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_endpoint =
5
+ {
6
+ id: String,
7
+ created_at: Integer,
8
+ event_types: ::Array[String],
9
+ name: String,
10
+ ?object: :webhook_endpoint,
11
+ signing_secret_hint: String?,
12
+ url: String,
13
+ ?updated_at: Integer
14
+ }
15
+
16
+ class WebhookEndpoint < OpenAI::Internal::Type::BaseModel
17
+ attr_accessor id: String
18
+
19
+ attr_accessor created_at: Integer
20
+
21
+ attr_accessor event_types: ::Array[String]
22
+
23
+ attr_accessor name: String
24
+
25
+ attr_accessor object: :webhook_endpoint
26
+
27
+ attr_accessor signing_secret_hint: String?
28
+
29
+ attr_accessor url: String
30
+
31
+ attr_reader updated_at: Integer?
32
+
33
+ def updated_at=: (Integer) -> Integer
34
+
35
+ def initialize: (
36
+ id: String,
37
+ created_at: Integer,
38
+ event_types: ::Array[String],
39
+ name: String,
40
+ signing_secret_hint: String?,
41
+ url: String,
42
+ ?updated_at: Integer,
43
+ ?object: :webhook_endpoint
44
+ ) -> void
45
+
46
+ def to_hash: -> {
47
+ id: String,
48
+ created_at: Integer,
49
+ event_types: ::Array[String],
50
+ name: String,
51
+ ?object: :webhook_endpoint,
52
+ signing_secret_hint: String?,
53
+ url: String,
54
+ ?updated_at: Integer
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,42 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_endpoint_list =
5
+ {
6
+ data: ::Array[OpenAI::Webhooks::WebhookEndpoint],
7
+ first_id: String?,
8
+ has_more: bool,
9
+ last_id: String?,
10
+ ?object: :list
11
+ }
12
+
13
+ class WebhookEndpointList < OpenAI::Internal::Type::BaseModel
14
+ attr_accessor data: ::Array[OpenAI::Webhooks::WebhookEndpoint]
15
+
16
+ attr_accessor first_id: String?
17
+
18
+ attr_accessor has_more: bool
19
+
20
+ attr_accessor last_id: String?
21
+
22
+ attr_accessor object: :list
23
+
24
+ def initialize: (
25
+ data: ::Array[OpenAI::Webhooks::WebhookEndpoint],
26
+ first_id: String?,
27
+ has_more: bool,
28
+ last_id: String?,
29
+ ?object: :list
30
+ ) -> void
31
+
32
+ def to_hash: -> {
33
+ data: ::Array[OpenAI::Webhooks::WebhookEndpoint],
34
+ first_id: String?,
35
+ has_more: bool,
36
+ last_id: String?,
37
+ ?object: :list
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_endpoint_test_result =
5
+ {
6
+ event_type: String,
7
+ ?object: :"webhook_endpoint.test",
8
+ status_code: Integer,
9
+ success: bool,
10
+ webhook_endpoint_id: String
11
+ }
12
+
13
+ class WebhookEndpointTestResult < OpenAI::Internal::Type::BaseModel
14
+ attr_accessor event_type: String
15
+
16
+ attr_accessor object: :"webhook_endpoint.test"
17
+
18
+ attr_accessor status_code: Integer
19
+
20
+ attr_accessor success: bool
21
+
22
+ attr_accessor webhook_endpoint_id: String
23
+
24
+ def initialize: (
25
+ event_type: String,
26
+ status_code: Integer,
27
+ success: bool,
28
+ webhook_endpoint_id: String,
29
+ ?object: :"webhook_endpoint.test"
30
+ ) -> void
31
+
32
+ def to_hash: -> {
33
+ event_type: String,
34
+ ?object: :"webhook_endpoint.test",
35
+ status_code: Integer,
36
+ success: bool,
37
+ webhook_endpoint_id: String
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,64 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_endpoint_with_secret =
5
+ {
6
+ id: String,
7
+ created_at: Integer,
8
+ event_types: ::Array[String],
9
+ name: String,
10
+ ?object: :webhook_endpoint,
11
+ signing_secret: String,
12
+ signing_secret_hint: String?,
13
+ url: String,
14
+ ?updated_at: Integer
15
+ }
16
+
17
+ class WebhookEndpointWithSecret < OpenAI::Internal::Type::BaseModel
18
+ attr_accessor id: String
19
+
20
+ attr_accessor created_at: Integer
21
+
22
+ attr_accessor event_types: ::Array[String]
23
+
24
+ attr_accessor name: String
25
+
26
+ attr_accessor object: :webhook_endpoint
27
+
28
+ attr_accessor signing_secret: String
29
+
30
+ attr_accessor signing_secret_hint: String?
31
+
32
+ attr_accessor url: String
33
+
34
+ attr_reader updated_at: Integer?
35
+
36
+ def updated_at=: (Integer) -> Integer
37
+
38
+ def initialize: (
39
+ id: String,
40
+ created_at: Integer,
41
+ event_types: ::Array[String],
42
+ name: String,
43
+ signing_secret: String,
44
+ signing_secret_hint: String?,
45
+ url: String,
46
+ ?updated_at: Integer,
47
+ ?object: :webhook_endpoint
48
+ ) -> void
49
+
50
+ def to_hash: -> {
51
+ id: String,
52
+ created_at: Integer,
53
+ event_types: ::Array[String],
54
+ name: String,
55
+ ?object: :webhook_endpoint,
56
+ signing_secret: String,
57
+ signing_secret_hint: String?,
58
+ url: String,
59
+ ?updated_at: Integer
60
+ }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,17 @@
1
+ module OpenAI
2
+ module Models
3
+ module Webhooks
4
+ type webhook_event_type_list = { data: ::Array[String], ?object: :list }
5
+
6
+ class WebhookEventTypeList < OpenAI::Internal::Type::BaseModel
7
+ attr_accessor data: ::Array[String]
8
+
9
+ attr_accessor object: :list
10
+
11
+ def initialize: (data: ::Array[String], ?object: :list) -> void
12
+
13
+ def to_hash: -> { data: ::Array[String], ?object: :list }
14
+ end
15
+ end
16
+ end
17
+ end