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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/beta_tool.rb +16 -0
- data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +16 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +16 -0
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +16 -0
- data/lib/openai/models/responses/tool.rb +16 -0
- data/lib/openai/models/webhooks/deleted_webhook_endpoint.rb +38 -0
- data/lib/openai/models/webhooks/event_type_list_params.rb +16 -0
- data/lib/openai/models/webhooks/webhook_create_params.rb +73 -0
- data/lib/openai/models/webhooks/webhook_delete_params.rb +22 -0
- data/lib/openai/models/webhooks/webhook_endpoint.rb +85 -0
- data/lib/openai/models/webhooks/webhook_endpoint_list.rb +55 -0
- data/lib/openai/models/webhooks/webhook_endpoint_test_result.rb +58 -0
- data/lib/openai/models/webhooks/webhook_endpoint_with_secret.rb +105 -0
- data/lib/openai/models/webhooks/webhook_event_type_list.rb +28 -0
- data/lib/openai/models/webhooks/webhook_list_params.rb +34 -0
- data/lib/openai/models/webhooks/webhook_retrieve_params.rb +22 -0
- data/lib/openai/models/webhooks/webhook_rotate_secret_params.rb +34 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +59 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +80 -0
- data/lib/openai/resources/webhooks/event_types.rb +35 -0
- data/lib/openai/resources/webhooks.rb +195 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +15 -0
- data/rbi/openai/models/beta/beta_tool.rbi +12 -0
- data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +12 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +12 -0
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +12 -0
- data/rbi/openai/models/webhooks/deleted_webhook_endpoint.rbi +67 -0
- data/rbi/openai/models/webhooks/event_type_list_params.rbi +37 -0
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +139 -0
- data/rbi/openai/models/webhooks/webhook_delete_params.rbi +53 -0
- data/rbi/openai/models/webhooks/webhook_endpoint.rbi +126 -0
- data/rbi/openai/models/webhooks/webhook_endpoint_list.rbi +91 -0
- data/rbi/openai/models/webhooks/webhook_endpoint_test_result.rbi +87 -0
- data/rbi/openai/models/webhooks/webhook_endpoint_with_secret.rbi +138 -0
- data/rbi/openai/models/webhooks/webhook_event_type_list.rbi +58 -0
- data/rbi/openai/models/webhooks/webhook_list_params.rbi +67 -0
- data/rbi/openai/models/webhooks/webhook_retrieve_params.rbi +53 -0
- data/rbi/openai/models/webhooks/webhook_rotate_secret_params.rbi +71 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +124 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +156 -0
- data/rbi/openai/resources/webhooks/event_types.rbi +24 -0
- data/rbi/openai/resources/webhooks.rbi +126 -0
- data/sig/openai/models/webhooks/deleted_webhook_endpoint.rbs +28 -0
- data/sig/openai/models/webhooks/event_type_list_params.rbs +16 -0
- data/sig/openai/models/webhooks/webhook_create_params.rbs +83 -0
- data/sig/openai/models/webhooks/webhook_delete_params.rbs +25 -0
- data/sig/openai/models/webhooks/webhook_endpoint.rbs +59 -0
- data/sig/openai/models/webhooks/webhook_endpoint_list.rbs +42 -0
- data/sig/openai/models/webhooks/webhook_endpoint_test_result.rbs +42 -0
- data/sig/openai/models/webhooks/webhook_endpoint_with_secret.rbs +64 -0
- data/sig/openai/models/webhooks/webhook_event_type_list.rbs +17 -0
- data/sig/openai/models/webhooks/webhook_list_params.rbs +35 -0
- data/sig/openai/models/webhooks/webhook_retrieve_params.rbs +25 -0
- data/sig/openai/models/webhooks/webhook_rotate_secret_params.rbs +35 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +78 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +96 -0
- data/sig/openai/resources/webhooks/event_types.rbs +13 -0
- data/sig/openai/resources/webhooks.rbs +45 -0
- metadata +46 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookEndpointTestResult < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Webhooks::WebhookEndpointTestResult,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The event type sent in the test.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :event_type
|
|
20
|
+
|
|
21
|
+
# The object type, which is always webhook_endpoint.test.
|
|
22
|
+
sig { returns(Symbol) }
|
|
23
|
+
attr_accessor :object
|
|
24
|
+
|
|
25
|
+
# The HTTP status code returned by the endpoint.
|
|
26
|
+
sig { returns(Integer) }
|
|
27
|
+
attr_accessor :status_code
|
|
28
|
+
|
|
29
|
+
# Whether the test request completed. Always true for returned results; use
|
|
30
|
+
# status_code to determine the endpoint response.
|
|
31
|
+
sig { returns(T::Boolean) }
|
|
32
|
+
attr_accessor :success
|
|
33
|
+
|
|
34
|
+
# The ID of the webhook endpoint that received the test.
|
|
35
|
+
sig { returns(String) }
|
|
36
|
+
attr_accessor :webhook_endpoint_id
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
|
|
41
|
+
event_type: String,
|
|
42
|
+
|
|
43
|
+
status_code: Integer,
|
|
44
|
+
|
|
45
|
+
success: T::Boolean,
|
|
46
|
+
|
|
47
|
+
webhook_endpoint_id: String,
|
|
48
|
+
|
|
49
|
+
object: Symbol
|
|
50
|
+
)
|
|
51
|
+
.returns(T.attached_class)
|
|
52
|
+
end
|
|
53
|
+
def self.new(
|
|
54
|
+
|
|
55
|
+
# The event type sent in the test.
|
|
56
|
+
event_type:,
|
|
57
|
+
|
|
58
|
+
# The HTTP status code returned by the endpoint.
|
|
59
|
+
status_code:,
|
|
60
|
+
|
|
61
|
+
# Whether the test request completed. Always true for returned results; use
|
|
62
|
+
# status_code to determine the endpoint response.
|
|
63
|
+
success:,
|
|
64
|
+
|
|
65
|
+
# The ID of the webhook endpoint that received the test.
|
|
66
|
+
webhook_endpoint_id:,
|
|
67
|
+
|
|
68
|
+
# The object type, which is always webhook_endpoint.test.
|
|
69
|
+
|
|
70
|
+
object: :"webhook_endpoint.test"
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
sig do
|
|
75
|
+
override.returns(
|
|
76
|
+
{event_type: String, object: Symbol, status_code: Integer, success: T::Boolean, webhook_endpoint_id: String}
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
def to_hash
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookEndpointWithSecret < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Webhooks::WebhookEndpointWithSecret,
|
|
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
|
+
# The endpoint's signing secret. This is returned only when the endpoint is
|
|
38
|
+
# created or the secret is rotated.
|
|
39
|
+
sig { returns(String) }
|
|
40
|
+
attr_accessor :signing_secret
|
|
41
|
+
|
|
42
|
+
# A masked hint for the endpoint's signing secret.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :signing_secret_hint
|
|
45
|
+
|
|
46
|
+
# The HTTPS URL that receives webhook deliveries.
|
|
47
|
+
sig { returns(String) }
|
|
48
|
+
attr_accessor :url
|
|
49
|
+
|
|
50
|
+
# The Unix timestamp of the last endpoint configuration or signing-secret change.
|
|
51
|
+
# Initialized at creation; tests and unchanged updates do not advance it.
|
|
52
|
+
sig { returns(T.nilable(Integer)) }
|
|
53
|
+
attr_reader :updated_at
|
|
54
|
+
|
|
55
|
+
sig { params(updated_at: Integer).void }
|
|
56
|
+
attr_writer :updated_at
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
|
|
61
|
+
id: String,
|
|
62
|
+
|
|
63
|
+
created_at: Integer,
|
|
64
|
+
|
|
65
|
+
event_types: T::Array[String],
|
|
66
|
+
|
|
67
|
+
name: String,
|
|
68
|
+
|
|
69
|
+
signing_secret: String,
|
|
70
|
+
|
|
71
|
+
signing_secret_hint: T.nilable(String),
|
|
72
|
+
|
|
73
|
+
url: String,
|
|
74
|
+
|
|
75
|
+
updated_at: Integer,
|
|
76
|
+
|
|
77
|
+
object: Symbol
|
|
78
|
+
)
|
|
79
|
+
.returns(T.attached_class)
|
|
80
|
+
end
|
|
81
|
+
def self.new(
|
|
82
|
+
|
|
83
|
+
# The unique ID of the webhook endpoint.
|
|
84
|
+
id:,
|
|
85
|
+
|
|
86
|
+
# The Unix timestamp when the endpoint was created.
|
|
87
|
+
created_at:,
|
|
88
|
+
|
|
89
|
+
# The event types that trigger deliveries to this endpoint.
|
|
90
|
+
event_types:,
|
|
91
|
+
|
|
92
|
+
# The human-readable name of the endpoint.
|
|
93
|
+
name:,
|
|
94
|
+
|
|
95
|
+
# The endpoint's signing secret. This is returned only when the endpoint is
|
|
96
|
+
# created or the secret is rotated.
|
|
97
|
+
signing_secret:,
|
|
98
|
+
|
|
99
|
+
# A masked hint for the endpoint's signing secret.
|
|
100
|
+
signing_secret_hint:,
|
|
101
|
+
|
|
102
|
+
# The HTTPS URL that receives webhook deliveries.
|
|
103
|
+
url:,
|
|
104
|
+
|
|
105
|
+
# The Unix timestamp of the last endpoint configuration or signing-secret change.
|
|
106
|
+
# Initialized at creation; tests and unchanged updates do not advance it.
|
|
107
|
+
updated_at: nil,
|
|
108
|
+
|
|
109
|
+
# The object type, which is always webhook_endpoint.
|
|
110
|
+
|
|
111
|
+
object: :webhook_endpoint
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
sig do
|
|
116
|
+
override.returns(
|
|
117
|
+
{
|
|
118
|
+
id: String,
|
|
119
|
+
created_at: Integer,
|
|
120
|
+
event_types: T::Array[String],
|
|
121
|
+
name: String,
|
|
122
|
+
object: Symbol,
|
|
123
|
+
signing_secret: String,
|
|
124
|
+
signing_secret_hint: T.nilable(String),
|
|
125
|
+
url: String,
|
|
126
|
+
updated_at: Integer
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
def to_hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookEventTypeList < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Webhooks::WebhookEventTypeList,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The webhook event types available to the authenticated project.
|
|
18
|
+
sig { returns(T::Array[String]) }
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# The object type, which is always list.
|
|
22
|
+
sig { returns(Symbol) }
|
|
23
|
+
attr_accessor :object
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
|
|
28
|
+
data: T::Array[String],
|
|
29
|
+
|
|
30
|
+
object: Symbol
|
|
31
|
+
)
|
|
32
|
+
.returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
|
|
36
|
+
# The webhook event types available to the authenticated project.
|
|
37
|
+
data:,
|
|
38
|
+
|
|
39
|
+
# The object type, which is always list.
|
|
40
|
+
|
|
41
|
+
object: :list
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{data: T::Array[String], object: Symbol}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
def to_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookListParams < 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::WebhookListParams,
|
|
16
|
+
OpenAI::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# ID of the last webhook endpoint from the previous page.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :after
|
|
23
|
+
|
|
24
|
+
# Maximum number of webhook endpoints to return. Defaults to 20.
|
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
|
26
|
+
attr_reader :limit
|
|
27
|
+
|
|
28
|
+
sig { params(limit: Integer).void }
|
|
29
|
+
attr_writer :limit
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
|
|
34
|
+
after: T.nilable(String),
|
|
35
|
+
|
|
36
|
+
limit: Integer,
|
|
37
|
+
|
|
38
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
39
|
+
)
|
|
40
|
+
.returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
|
|
44
|
+
# ID of the last webhook endpoint from the previous page.
|
|
45
|
+
after: nil,
|
|
46
|
+
|
|
47
|
+
# Maximum number of webhook endpoints to return. Defaults to 20.
|
|
48
|
+
limit: nil,
|
|
49
|
+
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
override.returns(
|
|
56
|
+
{after: T.nilable(String), limit: Integer, request_options: OpenAI::RequestOptions}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookRetrieveParams < 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::WebhookRetrieveParams,
|
|
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,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookRotateSecretParams < 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::WebhookRotateSecretParams,
|
|
16
|
+
OpenAI::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :webhook_endpoint_id
|
|
22
|
+
|
|
23
|
+
# Whether to keep the previous signing secret valid for 24 hours after rotation.
|
|
24
|
+
# Defaults to false, which invalidates the previous secret immediately.
|
|
25
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
26
|
+
attr_reader :keep_old_secret_active_for_24_hours
|
|
27
|
+
|
|
28
|
+
sig { params(keep_old_secret_active_for_24_hours: T::Boolean).void }
|
|
29
|
+
attr_writer :keep_old_secret_active_for_24_hours
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
|
|
34
|
+
webhook_endpoint_id: String,
|
|
35
|
+
|
|
36
|
+
keep_old_secret_active_for_24_hours: T::Boolean,
|
|
37
|
+
|
|
38
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
39
|
+
)
|
|
40
|
+
.returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
|
|
44
|
+
webhook_endpoint_id:,
|
|
45
|
+
|
|
46
|
+
# Whether to keep the previous signing secret valid for 24 hours after rotation.
|
|
47
|
+
# Defaults to false, which invalidates the previous secret immediately.
|
|
48
|
+
keep_old_secret_active_for_24_hours: nil,
|
|
49
|
+
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
override.returns(
|
|
56
|
+
{
|
|
57
|
+
webhook_endpoint_id: String,
|
|
58
|
+
keep_old_secret_active_for_24_hours: T::Boolean,
|
|
59
|
+
request_options: OpenAI::RequestOptions
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
def to_hash
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Webhooks
|
|
7
|
+
|
|
8
|
+
class WebhookTestParams < 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::WebhookTestParams,
|
|
16
|
+
OpenAI::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :webhook_endpoint_id
|
|
22
|
+
|
|
23
|
+
# The event type to send as a sample delivery.
|
|
24
|
+
sig { returns(OpenAI::Webhooks::WebhookTestParams::EventType::OrSymbol) }
|
|
25
|
+
attr_accessor :event_type
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
|
|
30
|
+
webhook_endpoint_id: String,
|
|
31
|
+
|
|
32
|
+
event_type: OpenAI::Webhooks::WebhookTestParams::EventType::OrSymbol,
|
|
33
|
+
|
|
34
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
35
|
+
)
|
|
36
|
+
.returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
|
|
40
|
+
webhook_endpoint_id:,
|
|
41
|
+
|
|
42
|
+
# The event type to send as a sample delivery.
|
|
43
|
+
event_type:,
|
|
44
|
+
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
webhook_endpoint_id: String,
|
|
53
|
+
event_type: OpenAI::Webhooks::WebhookTestParams::EventType::OrSymbol,
|
|
54
|
+
request_options: OpenAI::RequestOptions
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# The event type to send as a sample delivery.
|
|
62
|
+
module EventType
|
|
63
|
+
extend OpenAI::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Webhooks::WebhookTestParams::EventType) }
|
|
66
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
67
|
+
|
|
68
|
+
BATCH_COMPLETED = T.let(:"batch.completed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
69
|
+
BATCH_FAILED = T.let(:"batch.failed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
70
|
+
BATCH_EXPIRED = T.let(:"batch.expired", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
71
|
+
BATCH_CANCELLED = T.let(:"batch.cancelled", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
72
|
+
RESPONSE_COMPLETED = T.let(
|
|
73
|
+
:"response.completed",
|
|
74
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
75
|
+
)
|
|
76
|
+
RESPONSE_FAILED = T.let(:"response.failed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
77
|
+
RESPONSE_CANCELLED = T.let(
|
|
78
|
+
:"response.cancelled",
|
|
79
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
80
|
+
)
|
|
81
|
+
RESPONSE_INCOMPLETE = T.let(
|
|
82
|
+
:"response.incomplete",
|
|
83
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
84
|
+
)
|
|
85
|
+
EVAL_RUN_SUCCEEDED = T.let(
|
|
86
|
+
:"eval.run.succeeded",
|
|
87
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
88
|
+
)
|
|
89
|
+
EVAL_RUN_FAILED = T.let(:"eval.run.failed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
90
|
+
EVAL_RUN_CANCELED = T.let(:"eval.run.canceled", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
91
|
+
FINE_TUNING_JOB_SUCCEEDED = T.let(
|
|
92
|
+
:"fine_tuning.job.succeeded",
|
|
93
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
94
|
+
)
|
|
95
|
+
FINE_TUNING_JOB_FAILED = T.let(
|
|
96
|
+
:"fine_tuning.job.failed",
|
|
97
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
98
|
+
)
|
|
99
|
+
FINE_TUNING_JOB_CANCELLED = T.let(
|
|
100
|
+
:"fine_tuning.job.cancelled",
|
|
101
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
102
|
+
)
|
|
103
|
+
REALTIME_CALL_INCOMING = T.let(
|
|
104
|
+
:"realtime.call.incoming",
|
|
105
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
106
|
+
)
|
|
107
|
+
VIDEO_COMPLETED = T.let(:"video.completed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
108
|
+
VIDEO_FAILED = T.let(:"video.failed", OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol)
|
|
109
|
+
SAFETY_ALERT_CREATED = T.let(
|
|
110
|
+
:"safety.alert.created",
|
|
111
|
+
OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
sig { override.returns(T::Array[OpenAI::Webhooks::WebhookTestParams::EventType::TaggedSymbol]) }
|
|
115
|
+
def self.values
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
end
|
|
124
|
+
end
|