Skip to content

Commit 49aee77

Browse files
feat(api): add BaseWebhookEvent
1 parent db04859 commit 49aee77

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
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

webhook.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ func (r *WebhookService) Unwrap(payload []byte, headers http.Header, opts ...opt
7070
return res, nil
7171
}
7272

73-
// Triggered when a post-transformation fails. The original file remains available,
74-
// but the requested transformation could not be generated.
7573
type UploadPostTransformErrorEvent struct {
7674
// Unique identifier for the event.
7775
ID string `json:"id,required"`
@@ -205,9 +203,6 @@ func (r *UploadPostTransformErrorEventRequestTransformation) UnmarshalJSON(data
205203
return apijson.UnmarshalRoot(data, r)
206204
}
207205

208-
// Triggered when a post-transformation completes successfully. The transformed
209-
// version of the file is now ready and can be accessed via the provided URL. Note
210-
// that each post-transformation generates a separate webhook event.
211206
type UploadPostTransformSuccessEvent struct {
212207
// Unique identifier for the event.
213208
ID string `json:"id,required"`
@@ -303,8 +298,6 @@ func (r *UploadPostTransformSuccessEventRequestTransformation) UnmarshalJSON(dat
303298
return apijson.UnmarshalRoot(data, r)
304299
}
305300

306-
// Triggered when a pre-transformation fails. The file upload may have been
307-
// accepted, but the requested transformation could not be applied.
308301
type UploadPreTransformErrorEvent struct {
309302
// Unique identifier for the event.
310303
ID string `json:"id,required"`
@@ -406,9 +399,6 @@ func (r *UploadPreTransformErrorEventRequest) UnmarshalJSON(data []byte) error {
406399
return apijson.UnmarshalRoot(data, r)
407400
}
408401

409-
// Triggered when a pre-transformation completes successfully. The file has been
410-
// processed with the requested transformation and is now available in the Media
411-
// Library.
412402
type UploadPreTransformSuccessEvent struct {
413403
// Unique identifier for the event.
414404
ID string `json:"id,required"`
@@ -651,9 +641,6 @@ func (r *UploadPreTransformSuccessEventRequest) UnmarshalJSON(data []byte) error
651641
return apijson.UnmarshalRoot(data, r)
652642
}
653643

654-
// Triggered when a new video transformation request is accepted for processing.
655-
// This event confirms that ImageKit has received and queued your transformation
656-
// request. Use this for debugging and tracking transformation lifecycle.
657644
type VideoTransformationAcceptedEvent struct {
658645
// Unique identifier for the event.
659646
ID string `json:"id,required"`
@@ -817,10 +804,6 @@ func (r *VideoTransformationAcceptedEventRequest) UnmarshalJSON(data []byte) err
817804
return apijson.UnmarshalRoot(data, r)
818805
}
819806

820-
// Triggered when an error occurs during video encoding. Listen to this webhook to
821-
// log error reasons and debug issues. Check your origin and URL endpoint settings
822-
// if the reason is related to download failure. For other errors, contact ImageKit
823-
// support.
824807
type VideoTransformationErrorEvent struct {
825808
// Unique identifier for the event.
826809
ID string `json:"id,required"`
@@ -1007,10 +990,6 @@ func (r *VideoTransformationErrorEventRequest) UnmarshalJSON(data []byte) error
1007990
return apijson.UnmarshalRoot(data, r)
1008991
}
1009992

1010-
// Triggered when video encoding is finished and the transformed resource is ready
1011-
// to be served. This is the key event to listen for - update your database or CMS
1012-
// flags when you receive this so your application can start showing the
1013-
// transformed video to users.
1014993
type VideoTransformationReadyEvent struct {
1015994
// Unique identifier for the event.
1016995
ID string `json:"id,required"`

0 commit comments

Comments
 (0)