Skip to content

Commit b4c2a83

Browse files
feat(api): add BaseWebhookEvent
1 parent 5ce5d1f commit b4c2a83

19 files changed

+3
-78
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-3d7da4b8ef2ed30aa32c4fb3e98e498e67402e91aaa5fd4c628fc080bfe82ea1.yml
3-
openapi_spec_hash: aaa50fcbccec6f2cf1165f34bc6ac886
4-
config_hash: 9f8a678d9d4d06daec522e8deb49e3ad
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-667f7f4988b44bc587d6eb9960ff5c8326e9f7e9b072f3f724f9f54166eff8b1.yml
3+
openapi_spec_hash: f2081864a4abee0480e5ff991b4c936a
4+
config_hash: 4e73c7e12a531edcd1366dab7eccc360

lib/imagekit/models/unsafe_unwrap_webhook_event.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,21 @@
22

33
module Imagekit
44
module Models
5-
# Triggered when a new video transformation request is accepted for processing.
6-
# This event confirms that ImageKit has received and queued your transformation
7-
# request. Use this for debugging and tracking transformation lifecycle.
85
module UnsafeUnwrapWebhookEvent
96
extend Imagekit::Internal::Type::Union
107

11-
# Triggered when a new video transformation request is accepted for processing. This event confirms that ImageKit has received and queued your transformation request. Use this for debugging and tracking transformation lifecycle.
128
variant -> { Imagekit::VideoTransformationAcceptedEvent }
139

14-
# Triggered when video encoding is finished and the transformed resource is ready to be served. This is the key event to listen for - update your database or CMS flags when you receive this so your application can start showing the transformed video to users.
1510
variant -> { Imagekit::VideoTransformationReadyEvent }
1611

17-
# Triggered when an error occurs during video encoding. Listen to this webhook to log error reasons and debug issues. Check your origin and URL endpoint settings if the reason is related to download failure. For other errors, contact ImageKit support.
1812
variant -> { Imagekit::VideoTransformationErrorEvent }
1913

20-
# Triggered when a pre-transformation completes successfully. The file has been processed with the requested transformation and is now available in the Media Library.
2114
variant -> { Imagekit::UploadPreTransformSuccessEvent }
2215

23-
# Triggered when a pre-transformation fails. The file upload may have been accepted, but the requested transformation could not be applied.
2416
variant -> { Imagekit::UploadPreTransformErrorEvent }
2517

26-
# Triggered when a post-transformation completes successfully. The transformed version of the file is now ready and can be accessed via the provided URL. Note that each post-transformation generates a separate webhook event.
2718
variant -> { Imagekit::UploadPostTransformSuccessEvent }
2819

29-
# Triggered when a post-transformation fails. The original file remains available, but the requested transformation could not be generated.
3020
variant -> { Imagekit::UploadPostTransformErrorEvent }
3121

3222
# @!method self.variants

lib/imagekit/models/unwrap_webhook_event.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,21 @@
22

33
module Imagekit
44
module Models
5-
# Triggered when a new video transformation request is accepted for processing.
6-
# This event confirms that ImageKit has received and queued your transformation
7-
# request. Use this for debugging and tracking transformation lifecycle.
85
module UnwrapWebhookEvent
96
extend Imagekit::Internal::Type::Union
107

11-
# Triggered when a new video transformation request is accepted for processing. This event confirms that ImageKit has received and queued your transformation request. Use this for debugging and tracking transformation lifecycle.
128
variant -> { Imagekit::VideoTransformationAcceptedEvent }
139

14-
# Triggered when video encoding is finished and the transformed resource is ready to be served. This is the key event to listen for - update your database or CMS flags when you receive this so your application can start showing the transformed video to users.
1510
variant -> { Imagekit::VideoTransformationReadyEvent }
1611

17-
# Triggered when an error occurs during video encoding. Listen to this webhook to log error reasons and debug issues. Check your origin and URL endpoint settings if the reason is related to download failure. For other errors, contact ImageKit support.
1812
variant -> { Imagekit::VideoTransformationErrorEvent }
1913

20-
# Triggered when a pre-transformation completes successfully. The file has been processed with the requested transformation and is now available in the Media Library.
2114
variant -> { Imagekit::UploadPreTransformSuccessEvent }
2215

23-
# Triggered when a pre-transformation fails. The file upload may have been accepted, but the requested transformation could not be applied.
2416
variant -> { Imagekit::UploadPreTransformErrorEvent }
2517

26-
# Triggered when a post-transformation completes successfully. The transformed version of the file is now ready and can be accessed via the provided URL. Note that each post-transformation generates a separate webhook event.
2718
variant -> { Imagekit::UploadPostTransformSuccessEvent }
2819

29-
# Triggered when a post-transformation fails. The original file remains available, but the requested transformation could not be generated.
3020
variant -> { Imagekit::UploadPostTransformErrorEvent }
3121

3222
# @!method self.variants

lib/imagekit/models/upload_post_transform_error_event.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ class UploadPostTransformErrorEvent < Imagekit::Internal::Type::BaseModel
3131
required :type, const: :"upload.post-transform.error"
3232

3333
# @!method initialize(id:, created_at:, data:, request:, type: :"upload.post-transform.error")
34-
# Triggered when a post-transformation fails. The original file remains available,
35-
# but the requested transformation could not be generated.
36-
#
3734
# @param id [String] Unique identifier for the event.
3835
#
3936
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.

lib/imagekit/models/upload_post_transform_success_event.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class UploadPostTransformSuccessEvent < Imagekit::Internal::Type::BaseModel
3131
required :type, const: :"upload.post-transform.success"
3232

3333
# @!method initialize(id:, created_at:, data:, request:, type: :"upload.post-transform.success")
34-
# Triggered when a post-transformation completes successfully. The transformed
35-
# version of the file is now ready and can be accessed via the provided URL. Note
36-
# that each post-transformation generates a separate webhook event.
37-
#
3834
# @param id [String] Unique identifier for the event.
3935
#
4036
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.

lib/imagekit/models/upload_pre_transform_error_event.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ class UploadPreTransformErrorEvent < Imagekit::Internal::Type::BaseModel
3131
required :type, const: :"upload.pre-transform.error"
3232

3333
# @!method initialize(id:, created_at:, data:, request:, type: :"upload.pre-transform.error")
34-
# Triggered when a pre-transformation fails. The file upload may have been
35-
# accepted, but the requested transformation could not be applied.
36-
#
3734
# @param id [String] Unique identifier for the event.
3835
#
3936
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.

lib/imagekit/models/upload_pre_transform_success_event.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ class UploadPreTransformSuccessEvent < Imagekit::Internal::Type::BaseModel
3232
required :type, const: :"upload.pre-transform.success"
3333

3434
# @!method initialize(id:, created_at:, data:, request:, type: :"upload.pre-transform.success")
35-
# Triggered when a pre-transformation completes successfully. The file has been
36-
# processed with the requested transformation and is now available in the Media
37-
# Library.
38-
#
3935
# @param id [String] Unique identifier for the event.
4036
#
4137
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.

lib/imagekit/models/video_transformation_accepted_event.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ class VideoTransformationAcceptedEvent < Imagekit::Internal::Type::BaseModel
3232
required :type, const: :"video.transformation.accepted"
3333

3434
# @!method initialize(id:, created_at:, data:, request:, type: :"video.transformation.accepted")
35-
# Triggered when a new video transformation request is accepted for processing.
36-
# This event confirms that ImageKit has received and queued your transformation
37-
# request. Use this for debugging and tracking transformation lifecycle.
38-
#
3935
# @param id [String] Unique identifier for the event.
4036
#
4137
# @param created_at [Time] Timestamp when the event was created in ISO8601 format.

lib/imagekit/models/video_transformation_error_event.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ class VideoTransformationErrorEvent < Imagekit::Internal::Type::BaseModel
3232
required :type, const: :"video.transformation.error"
3333

3434
# @!method initialize(id:, created_at:, data:, request:, type: :"video.transformation.error")
35-
# Triggered when an error occurs during video encoding. Listen to this webhook to
36-
# log error reasons and debug issues. Check your origin and URL endpoint settings
37-
# if the reason is related to download failure. For other errors, contact ImageKit
38-
# support.
39-
#
4035
# @param id [String] Unique identifier for the event.
4136
#
4237
# @param created_at [Time] Timestamp when the event was created in ISO8601 format.

lib/imagekit/models/video_transformation_ready_event.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ class VideoTransformationReadyEvent < Imagekit::Internal::Type::BaseModel
3838
optional :timings, -> { Imagekit::VideoTransformationReadyEvent::Timings }
3939

4040
# @!method initialize(id:, created_at:, data:, request:, timings: nil, type: :"video.transformation.ready")
41-
# Triggered when video encoding is finished and the transformed resource is ready
42-
# to be served. This is the key event to listen for - update your database or CMS
43-
# flags when you receive this so your application can start showing the
44-
# transformed video to users.
45-
#
4641
# @param id [String] Unique identifier for the event.
4742
#
4843
# @param created_at [Time] Timestamp when the event was created in ISO8601 format.

0 commit comments

Comments
 (0)