imagekitio 4.10.0 → 4.11.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 +23 -0
- data/README.md +1 -1
- data/lib/imagekitio/models/accounts/webhook.rb +81 -0
- data/lib/imagekitio/models/accounts/webhook_create_params.rb +47 -0
- data/lib/imagekitio/models/accounts/webhook_delete_params.rb +24 -0
- data/lib/imagekitio/models/accounts/webhook_event_type.rb +32 -0
- data/lib/imagekitio/models/accounts/webhook_get_params.rb +24 -0
- data/lib/imagekitio/models/accounts/webhook_list_params.rb +16 -0
- data/lib/imagekitio/models/accounts/webhook_list_response.rb +10 -0
- data/lib/imagekitio/models/accounts/webhook_update_params.rb +54 -0
- data/lib/imagekitio/models/asset_list_params.rb +18 -0
- data/lib/imagekitio/models/beta/v2/file_upload_params.rb +5 -1
- data/lib/imagekitio/models/custom_metadata_field.rb +16 -3
- data/lib/imagekitio/models/custom_metadata_field_create_params.rb +4 -0
- data/lib/imagekitio/models/file_upload_params.rb +5 -1
- data/lib/imagekitio/models/folder.rb +33 -1
- data/lib/imagekitio/models/folder_create_event.rb +35 -0
- data/lib/imagekitio/models/folder_delete_event.rb +47 -0
- data/lib/imagekitio/models/folder_update_event.rb +35 -0
- data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +10 -1
- data/lib/imagekitio/models/unwrap_webhook_event.rb +10 -1
- data/lib/imagekitio/models/update_file_request.rb +5 -0
- data/lib/imagekitio/models.rb +6 -0
- data/lib/imagekitio/resources/accounts/webhooks.rb +146 -0
- data/lib/imagekitio/resources/accounts.rb +4 -0
- data/lib/imagekitio/resources/custom_metadata_fields.rb +2 -2
- data/lib/imagekitio/resources/files/versions.rb +2 -2
- data/lib/imagekitio/resources/files.rb +4 -16
- data/lib/imagekitio/resources/folders.rb +2 -8
- data/lib/imagekitio/resources/webhooks.rb +2 -2
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +12 -5
- data/rbi/imagekitio/models/accounts/webhook.rbi +109 -0
- data/rbi/imagekitio/models/accounts/webhook_create_params.rbi +78 -0
- data/rbi/imagekitio/models/accounts/webhook_delete_params.rbi +45 -0
- data/rbi/imagekitio/models/accounts/webhook_event_type.rbi +101 -0
- data/rbi/imagekitio/models/accounts/webhook_get_params.rbi +45 -0
- data/rbi/imagekitio/models/accounts/webhook_list_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/webhook_list_response.rbi +13 -0
- data/rbi/imagekitio/models/accounts/webhook_update_params.rbi +98 -0
- data/rbi/imagekitio/models/asset_list_params.rbi +27 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_params.rbi +10 -2
- data/rbi/imagekitio/models/custom_metadata_field.rbi +30 -4
- data/rbi/imagekitio/models/custom_metadata_field_create_params.rbi +8 -0
- data/rbi/imagekitio/models/file_upload_params.rbi +10 -2
- data/rbi/imagekitio/models/folder.rbi +49 -0
- data/rbi/imagekitio/models/folder_create_event.rbi +53 -0
- data/rbi/imagekitio/models/folder_delete_event.rbi +83 -0
- data/rbi/imagekitio/models/folder_update_event.rbi +53 -0
- data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +4 -1
- data/rbi/imagekitio/models/unwrap_webhook_event.rbi +4 -1
- data/rbi/imagekitio/models/update_file_request.rbi +10 -0
- data/rbi/imagekitio/models.rbi +6 -0
- data/rbi/imagekitio/resources/accounts/webhooks.rbi +113 -0
- data/rbi/imagekitio/resources/accounts.rbi +3 -0
- data/rbi/imagekitio/resources/assets.rbi +9 -0
- data/rbi/imagekitio/resources/beta/v2/files.rbi +5 -1
- data/rbi/imagekitio/resources/custom_metadata_fields.rbi +5 -1
- data/rbi/imagekitio/resources/files/versions.rbi +1 -1
- data/rbi/imagekitio/resources/files.rbi +7 -3
- data/rbi/imagekitio/resources/folders.rbi +1 -1
- data/rbi/imagekitio/resources/webhooks.rbi +8 -2
- data/sig/imagekitio/models/accounts/webhook.rbs +52 -0
- data/sig/imagekitio/models/accounts/webhook_create_params.rbs +40 -0
- data/sig/imagekitio/models/accounts/webhook_delete_params.rbs +25 -0
- data/sig/imagekitio/models/accounts/webhook_event_type.rbs +44 -0
- data/sig/imagekitio/models/accounts/webhook_get_params.rbs +25 -0
- data/sig/imagekitio/models/accounts/webhook_list_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/webhook_list_response.rbs +9 -0
- data/sig/imagekitio/models/accounts/webhook_update_params.rbs +51 -0
- data/sig/imagekitio/models/folder.rbs +32 -5
- data/sig/imagekitio/models/folder_create_event.rbs +32 -0
- data/sig/imagekitio/models/folder_delete_event.rbs +48 -0
- data/sig/imagekitio/models/folder_update_event.rbs +32 -0
- data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +3 -0
- data/sig/imagekitio/models/unwrap_webhook_event.rbs +3 -0
- data/sig/imagekitio/models.rbs +6 -0
- data/sig/imagekitio/resources/accounts/webhooks.rbs +38 -0
- data/sig/imagekitio/resources/accounts.rbs +2 -0
- data/sig/imagekitio/resources/custom_metadata_fields.rbs +1 -4
- data/sig/imagekitio/resources/files/versions.rbs +1 -1
- data/sig/imagekitio/resources/files.rbs +2 -2
- data/sig/imagekitio/resources/folders.rbs +1 -1
- data/sig/imagekitio/resources/webhooks.rbs +8 -2
- metadata +38 -17
- data/lib/imagekitio/models/custom_metadata_field_delete_response.rb +0 -10
- data/lib/imagekitio/models/file_copy_response.rb +0 -10
- data/lib/imagekitio/models/file_move_response.rb +0 -10
- data/lib/imagekitio/models/files/version_delete_response.rb +0 -12
- data/lib/imagekitio/models/folder_delete_response.rb +0 -10
- data/rbi/imagekitio/models/custom_metadata_field_delete_response.rbi +0 -23
- data/rbi/imagekitio/models/file_copy_response.rbi +0 -23
- data/rbi/imagekitio/models/file_move_response.rbi +0 -23
- data/rbi/imagekitio/models/files/version_delete_response.rbi +0 -25
- data/rbi/imagekitio/models/folder_delete_response.rbi +0 -23
- data/sig/imagekitio/models/custom_metadata_field_delete_response.rbs +0 -11
- data/sig/imagekitio/models/file_copy_response.rbs +0 -11
- data/sig/imagekitio/models/file_move_response.rbs +0 -11
- data/sig/imagekitio/models/files/version_delete_response.rbs +0 -13
- data/sig/imagekitio/models/folder_delete_response.rbs +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 235dad9025731b1abd4a01b1d3efd3359f61e4108a3eb4f389c95f90e3756401
|
|
4
|
+
data.tar.gz: 35f226746a88d656660eee6d93fe41e007e4dc9b078a41f45b4af0c0ac8527ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a59934db8998eb5823c08f1857e02a4b73e80ff8cbdd4e465f35bb1774c205b91876214a7bc8614a8d58955775532e65052b4bfbf414a560d4a51edd9acac6d4
|
|
7
|
+
data.tar.gz: dec48b91ace1963e2a5a3a7bed4908286f225bf35804de1863bea9075bd21bba6a8428fb82cead9101c6b9356dfe58e9e1ef09c1fcc6f4590674ba32804d8242
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.11.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.10.0...v4.11.0) (2026-10-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* webhook crud api ([a3fb0a0](https://github.com/imagekit-developer/imagekit-ruby/commit/a3fb0a0e157c5b9d815b54a5e7adf2f3c9b5b8b5))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* don't parse empty 204 responses for copy, move and delete methods ([0e04d20](https://github.com/imagekit-developer/imagekit-ruby/commit/0e04d2029befbcd689b7c01699c6675cc1c93af8))
|
|
14
|
+
* **openapi:** reference shared CustomMetadata schema from FolderDetail ([56c04d2](https://github.com/imagekit-developer/imagekit-ruby/commit/56c04d2f29703ed1cf613f097162622ec34dd37b))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* pin next release ([68b9912](https://github.com/imagekit-developer/imagekit-ruby/commit/68b9912fbf73117ddb2c7966d2100c3a63384573))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
* describe reserved original creation date field ([b7512b8](https://github.com/imagekit-developer/imagekit-ruby/commit/b7512b8bced102a82f256d674e1eaf2bdf9d1722))
|
|
25
|
+
|
|
3
26
|
## [4.10.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.9.0...v4.10.0) (2026-09-16)
|
|
4
27
|
|
|
5
28
|
|
data/README.md
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#create
|
|
7
|
+
class Webhook < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# Unique identifier for a webhook.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
13
|
+
|
|
14
|
+
# @!attribute created_at
|
|
15
|
+
# ISO 8601 timestamp of when the webhook was created.
|
|
16
|
+
#
|
|
17
|
+
# @return [Time]
|
|
18
|
+
required :created_at, Time, api_name: :createdAt
|
|
19
|
+
|
|
20
|
+
# @!attribute enabled
|
|
21
|
+
# Whether the webhook is enabled. When `false`, ImageKit doesn't send any events
|
|
22
|
+
# to the `endpoint`.
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean]
|
|
25
|
+
required :enabled, Imagekitio::Internal::Type::Boolean
|
|
26
|
+
|
|
27
|
+
# @!attribute endpoint
|
|
28
|
+
# The URL where ImageKit sends webhook events as `POST` requests. Must use the
|
|
29
|
+
# `http` or `https` protocol, and must be unique across all webhooks for your
|
|
30
|
+
# account.
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
required :endpoint, String
|
|
34
|
+
|
|
35
|
+
# @!attribute events
|
|
36
|
+
# The event types this webhook is subscribed to. ImageKit sends a request to the
|
|
37
|
+
# `endpoint` only for these events.
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>]
|
|
40
|
+
required :events, -> { Imagekitio::Internal::Type::ArrayOf[enum: Imagekitio::Accounts::WebhookEventType] }
|
|
41
|
+
|
|
42
|
+
# @!attribute secret
|
|
43
|
+
# Signing secret generated by ImageKit, used to verify that webhook requests come
|
|
44
|
+
# from ImageKit. Starts with `whsec_`. This value can't be set or changed through
|
|
45
|
+
# the API. Learn more about
|
|
46
|
+
# [verifying webhook signatures](https://imagekit.io/docs/webhooks#verify-webhook-signature).
|
|
47
|
+
#
|
|
48
|
+
# @return [String]
|
|
49
|
+
required :secret, String
|
|
50
|
+
|
|
51
|
+
# @!attribute updated_at
|
|
52
|
+
# ISO 8601 timestamp of when the webhook was last updated.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time]
|
|
55
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
56
|
+
|
|
57
|
+
# @!method initialize(id:, created_at:, enabled:, endpoint:, events:, secret:, updated_at:)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Imagekitio::Models::Accounts::Webhook} for more details.
|
|
60
|
+
#
|
|
61
|
+
# A webhook is an HTTP endpoint that ImageKit notifies when subscribed events
|
|
62
|
+
# occur in your account. Learn more about
|
|
63
|
+
# [webhooks](https://imagekit.io/docs/webhooks).
|
|
64
|
+
#
|
|
65
|
+
# @param id [String] Unique identifier for a webhook.
|
|
66
|
+
#
|
|
67
|
+
# @param created_at [Time] ISO 8601 timestamp of when the webhook was created.
|
|
68
|
+
#
|
|
69
|
+
# @param enabled [Boolean] Whether the webhook is enabled. When `false`, ImageKit doesn't send any events t
|
|
70
|
+
#
|
|
71
|
+
# @param endpoint [String] The URL where ImageKit sends webhook events as `POST` requests. Must use the `ht
|
|
72
|
+
#
|
|
73
|
+
# @param events [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>] The event types this webhook is subscribed to. ImageKit sends a request to the `
|
|
74
|
+
#
|
|
75
|
+
# @param secret [String] Signing secret generated by ImageKit, used to verify that webhook requests come
|
|
76
|
+
#
|
|
77
|
+
# @param updated_at [Time] ISO 8601 timestamp of when the webhook was last updated.
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#create
|
|
7
|
+
class WebhookCreateParams < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute endpoint
|
|
12
|
+
# The URL where ImageKit sends webhook events as `POST` requests. Must use the
|
|
13
|
+
# `http` or `https` protocol, and must be unique across all webhooks for your
|
|
14
|
+
# account.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :endpoint, String
|
|
18
|
+
|
|
19
|
+
# @!attribute events
|
|
20
|
+
# The event types this webhook is subscribed to. ImageKit sends a request to the
|
|
21
|
+
# `endpoint` only for these events.
|
|
22
|
+
#
|
|
23
|
+
# @return [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>]
|
|
24
|
+
required :events, -> { Imagekitio::Internal::Type::ArrayOf[enum: Imagekitio::Accounts::WebhookEventType] }
|
|
25
|
+
|
|
26
|
+
# @!attribute enabled
|
|
27
|
+
# Whether the webhook is enabled. When `false`, ImageKit doesn't send any events
|
|
28
|
+
# to the `endpoint`.
|
|
29
|
+
#
|
|
30
|
+
# @return [Boolean, nil]
|
|
31
|
+
optional :enabled, Imagekitio::Internal::Type::Boolean
|
|
32
|
+
|
|
33
|
+
# @!method initialize(endpoint:, events:, enabled: nil, request_options: {})
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Imagekitio::Models::Accounts::WebhookCreateParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# @param endpoint [String] The URL where ImageKit sends webhook events as `POST` requests. Must use the `ht
|
|
38
|
+
#
|
|
39
|
+
# @param events [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>] The event types this webhook is subscribed to. ImageKit sends a request to the `
|
|
40
|
+
#
|
|
41
|
+
# @param enabled [Boolean] Whether the webhook is enabled. When `false`, ImageKit doesn't send any events t
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#delete
|
|
7
|
+
class WebhookDeleteParams < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for a webhook.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!method initialize(id:, request_options: {})
|
|
18
|
+
# @param id [String] Unique identifier for a webhook.
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# A webhook event type. Learn more about the payload of each
|
|
7
|
+
# [webhook event](https://imagekit.io/docs/webhooks#list-of-events).
|
|
8
|
+
module WebhookEventType
|
|
9
|
+
extend Imagekitio::Internal::Type::Enum
|
|
10
|
+
|
|
11
|
+
VIDEO_TRANSFORMATION_ACCEPTED = :"video.transformation.accepted"
|
|
12
|
+
VIDEO_TRANSFORMATION_READY = :"video.transformation.ready"
|
|
13
|
+
VIDEO_TRANSFORMATION_ERROR = :"video.transformation.error"
|
|
14
|
+
UPLOAD_PRE_TRANSFORM_SUCCESS = :"upload.pre-transform.success"
|
|
15
|
+
UPLOAD_PRE_TRANSFORM_ERROR = :"upload.pre-transform.error"
|
|
16
|
+
UPLOAD_POST_TRANSFORM_SUCCESS = :"upload.post-transform.success"
|
|
17
|
+
UPLOAD_POST_TRANSFORM_ERROR = :"upload.post-transform.error"
|
|
18
|
+
FILE_CREATED = :"file.created"
|
|
19
|
+
FILE_UPDATED = :"file.updated"
|
|
20
|
+
FILE_DELETED = :"file.deleted"
|
|
21
|
+
FILE_VERSION_CREATED = :"file-version.created"
|
|
22
|
+
FILE_VERSION_DELETED = :"file-version.deleted"
|
|
23
|
+
FOLDER_CREATED = :"folder.created"
|
|
24
|
+
FOLDER_UPDATED = :"folder.updated"
|
|
25
|
+
FOLDER_DELETED = :"folder.deleted"
|
|
26
|
+
|
|
27
|
+
# @!method self.values
|
|
28
|
+
# @return [Array<Symbol>]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#get
|
|
7
|
+
class WebhookGetParams < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for a webhook.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!method initialize(id:, request_options: {})
|
|
18
|
+
# @param id [String] Unique identifier for a webhook.
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#list
|
|
7
|
+
class WebhookListParams < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!method initialize(request_options: {})
|
|
12
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
module Accounts
|
|
6
|
+
# @see Imagekitio::Resources::Accounts::Webhooks#update
|
|
7
|
+
class WebhookUpdateParams < Imagekitio::Internal::Type::BaseModel
|
|
8
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for a webhook.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute enabled
|
|
18
|
+
# Whether the webhook is enabled. Omit to leave the current value unchanged.
|
|
19
|
+
#
|
|
20
|
+
# @return [Boolean, nil]
|
|
21
|
+
optional :enabled, Imagekitio::Internal::Type::Boolean
|
|
22
|
+
|
|
23
|
+
# @!attribute endpoint
|
|
24
|
+
# The URL where ImageKit sends webhook events as `POST` requests. Must use the
|
|
25
|
+
# `http` or `https` protocol, and must be unique across all webhooks for your
|
|
26
|
+
# account.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :endpoint, String
|
|
30
|
+
|
|
31
|
+
# @!attribute events
|
|
32
|
+
# The event types this webhook is subscribed to. Replaces the existing list. Omit
|
|
33
|
+
# to leave the current value unchanged.
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>, nil]
|
|
36
|
+
optional :events, -> { Imagekitio::Internal::Type::ArrayOf[enum: Imagekitio::Accounts::WebhookEventType] }
|
|
37
|
+
|
|
38
|
+
# @!method initialize(id:, enabled: nil, endpoint: nil, events: nil, request_options: {})
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {Imagekitio::Models::Accounts::WebhookUpdateParams} for more details.
|
|
41
|
+
#
|
|
42
|
+
# @param id [String] Unique identifier for a webhook.
|
|
43
|
+
#
|
|
44
|
+
# @param enabled [Boolean] Whether the webhook is enabled. Omit to leave the current value unchanged.
|
|
45
|
+
#
|
|
46
|
+
# @param endpoint [String] The URL where ImageKit sends webhook events as `POST` requests. Must use the `ht
|
|
47
|
+
#
|
|
48
|
+
# @param events [Array<Symbol, Imagekitio::Models::Accounts::WebhookEventType>] The event types this webhook is subscribed to. Replaces the existing list. Omit
|
|
49
|
+
#
|
|
50
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -62,6 +62,15 @@ module Imagekitio
|
|
|
62
62
|
# Sort the results by one of the supported fields in ascending or descending
|
|
63
63
|
# order.
|
|
64
64
|
#
|
|
65
|
+
# `ASC_ORIGINAL_CREATION_DATE` and `DESC_ORIGINAL_CREATION_DATE` sort files by the
|
|
66
|
+
# value of the reserved `_internal_original_created_datetime` custom metadata
|
|
67
|
+
# field (labelled "Original creation date" in the dashboard). This field exists
|
|
68
|
+
# only after you enable the original creation date setting under the Custom
|
|
69
|
+
# Metadata tab of the media library settings. Files that have no value set for
|
|
70
|
+
# this field fall back to their upload time, so migrated assets carrying a
|
|
71
|
+
# preserved original date and natively uploaded assets are ordered together in a
|
|
72
|
+
# single timeline.
|
|
73
|
+
#
|
|
65
74
|
# @return [Symbol, Imagekitio::Models::AssetListParams::Sort, nil]
|
|
66
75
|
optional :sort, enum: -> { Imagekitio::AssetListParams::Sort }
|
|
67
76
|
|
|
@@ -114,6 +123,15 @@ module Imagekitio
|
|
|
114
123
|
|
|
115
124
|
# Sort the results by one of the supported fields in ascending or descending
|
|
116
125
|
# order.
|
|
126
|
+
#
|
|
127
|
+
# `ASC_ORIGINAL_CREATION_DATE` and `DESC_ORIGINAL_CREATION_DATE` sort files by the
|
|
128
|
+
# value of the reserved `_internal_original_created_datetime` custom metadata
|
|
129
|
+
# field (labelled "Original creation date" in the dashboard). This field exists
|
|
130
|
+
# only after you enable the original creation date setting under the Custom
|
|
131
|
+
# Metadata tab of the media library settings. Files that have no value set for
|
|
132
|
+
# this field fall back to their upload time, so migrated assets carrying a
|
|
133
|
+
# preserved original date and natively uploaded assets are ordered together in a
|
|
134
|
+
# single timeline.
|
|
117
135
|
module Sort
|
|
118
136
|
extend Imagekitio::Internal::Type::Enum
|
|
119
137
|
|
|
@@ -132,7 +132,11 @@ module Imagekitio
|
|
|
132
132
|
|
|
133
133
|
# @!attribute custom_metadata
|
|
134
134
|
# JSON key-value pairs to associate with the asset. Create the custom metadata
|
|
135
|
-
# fields before setting these values.
|
|
135
|
+
# fields before setting these values. To preserve the original creation date of an
|
|
136
|
+
# asset migrated from another system, set the reserved
|
|
137
|
+
# `_internal_original_created_datetime` key to an ISO 8601 date string. This key
|
|
138
|
+
# is available once the original creation date setting is enabled in the media
|
|
139
|
+
# library settings.
|
|
136
140
|
#
|
|
137
141
|
# @return [Hash{Symbol=>Object}, nil]
|
|
138
142
|
optional :custom_metadata,
|
|
@@ -40,8 +40,21 @@ module Imagekitio
|
|
|
40
40
|
optional :description, String
|
|
41
41
|
|
|
42
42
|
# @!attribute reserved
|
|
43
|
-
# Present and set to `true` when the field is reserved.
|
|
44
|
-
#
|
|
43
|
+
# Present and set to `true` when the field is reserved, i.e. created and managed
|
|
44
|
+
# by ImageKit rather than by you. Omitted for regular fields.
|
|
45
|
+
#
|
|
46
|
+
# Currently the only reserved field is `_internal_original_created_datetime`
|
|
47
|
+
# (label "Original creation date", type `Date`). ImageKit creates it when you
|
|
48
|
+
# enable the original creation date setting under the Custom Metadata tab of the
|
|
49
|
+
# media library settings in the dashboard. Use it to preserve the original
|
|
50
|
+
# creation date of assets migrated from another system: set its value through the
|
|
51
|
+
# `customMetadata` object in the upload or update file details API, then sort with
|
|
52
|
+
# `ASC_ORIGINAL_CREATION_DATE` or `DESC_ORIGINAL_CREATION_DATE` in the list and
|
|
53
|
+
# search assets API, or filter with
|
|
54
|
+
# `"customMetadata._internal_original_created_datetime"` in `searchQuery`.
|
|
55
|
+
#
|
|
56
|
+
# Reserved fields cannot be deleted, and their name cannot be reused when creating
|
|
57
|
+
# a new field.
|
|
45
58
|
#
|
|
46
59
|
# @return [Boolean, nil]
|
|
47
60
|
optional :reserved, Imagekitio::Internal::Type::Boolean
|
|
@@ -62,7 +75,7 @@ module Imagekitio
|
|
|
62
75
|
#
|
|
63
76
|
# @param description [String] Optional description of the custom metadata field. Only present when a descripti
|
|
64
77
|
#
|
|
65
|
-
# @param reserved [Boolean] Present and set to `true` when the field is reserved.
|
|
78
|
+
# @param reserved [Boolean] Present and set to `true` when the field is reserved, i.e. created and managed b
|
|
66
79
|
|
|
67
80
|
# @see Imagekitio::Models::CustomMetadataField#schema
|
|
68
81
|
class Schema < Imagekitio::Internal::Type::BaseModel
|
|
@@ -20,6 +20,10 @@ module Imagekitio
|
|
|
20
20
|
# API name of the custom metadata field. This should be unique across all
|
|
21
21
|
# (including deleted) custom metadata fields.
|
|
22
22
|
#
|
|
23
|
+
# `_internal_original_created_datetime` is a reserved name and cannot be used.
|
|
24
|
+
# ImageKit creates that field automatically when you enable the original creation
|
|
25
|
+
# date setting in the media library settings.
|
|
26
|
+
#
|
|
23
27
|
# @return [String]
|
|
24
28
|
required :name, String
|
|
25
29
|
|
|
@@ -130,7 +130,11 @@ module Imagekitio
|
|
|
130
130
|
|
|
131
131
|
# @!attribute custom_metadata
|
|
132
132
|
# JSON key-value pairs to associate with the asset. Create the custom metadata
|
|
133
|
-
# fields before setting these values.
|
|
133
|
+
# fields before setting these values. To preserve the original creation date of an
|
|
134
|
+
# asset migrated from another system, set the reserved
|
|
135
|
+
# `_internal_original_created_datetime` key to an ISO 8601 date string. This key
|
|
136
|
+
# is available once the original creation date setting is enabled in the media
|
|
137
|
+
# library settings.
|
|
134
138
|
#
|
|
135
139
|
# @return [Hash{Symbol=>Object}, nil]
|
|
136
140
|
optional :custom_metadata,
|
|
@@ -10,6 +10,13 @@ module Imagekitio
|
|
|
10
10
|
# @return [Time, nil]
|
|
11
11
|
optional :created_at, Time, api_name: :createdAt
|
|
12
12
|
|
|
13
|
+
# @!attribute created_by
|
|
14
|
+
# Details of the user who created the folder. Present only when this information
|
|
15
|
+
# is available. The `name` is the name of the user at the time of folder creation.
|
|
16
|
+
#
|
|
17
|
+
# @return [Imagekitio::Models::Folder::CreatedBy, nil]
|
|
18
|
+
optional :created_by, -> { Imagekitio::Folder::CreatedBy }, api_name: :createdBy
|
|
19
|
+
|
|
13
20
|
# @!attribute custom_metadata
|
|
14
21
|
# An object with custom metadata for the folder. Returns empty object if no custom
|
|
15
22
|
# metadata is set.
|
|
@@ -53,12 +60,14 @@ module Imagekitio
|
|
|
53
60
|
# @return [Time, nil]
|
|
54
61
|
optional :updated_at, Time, api_name: :updatedAt
|
|
55
62
|
|
|
56
|
-
# @!method initialize(created_at: nil, custom_metadata: nil, folder_id: nil, folder_path: nil, name: nil, type: nil, updated_at: nil)
|
|
63
|
+
# @!method initialize(created_at: nil, created_by: nil, custom_metadata: nil, folder_id: nil, folder_path: nil, name: nil, type: nil, updated_at: nil)
|
|
57
64
|
# Some parameter documentations has been truncated, see
|
|
58
65
|
# {Imagekitio::Models::Folder} for more details.
|
|
59
66
|
#
|
|
60
67
|
# @param created_at [Time] Date and time when the folder was created. The date and time is in ISO8601 forma
|
|
61
68
|
#
|
|
69
|
+
# @param created_by [Imagekitio::Models::Folder::CreatedBy] Details of the user who created the folder. Present only when this information i
|
|
70
|
+
#
|
|
62
71
|
# @param custom_metadata [Hash{Symbol=>Object}] An object with custom metadata for the folder. Returns empty object if no custom
|
|
63
72
|
#
|
|
64
73
|
# @param folder_id [String] Unique identifier of the asset.
|
|
@@ -71,6 +80,29 @@ module Imagekitio
|
|
|
71
80
|
#
|
|
72
81
|
# @param updated_at [Time] Date and time when the folder was last updated. The date and time is in ISO8601
|
|
73
82
|
|
|
83
|
+
# @see Imagekitio::Models::Folder#created_by
|
|
84
|
+
class CreatedBy < Imagekitio::Internal::Type::BaseModel
|
|
85
|
+
# @!attribute email
|
|
86
|
+
# Email of the user who created the folder.
|
|
87
|
+
#
|
|
88
|
+
# @return [String, nil]
|
|
89
|
+
optional :email, String
|
|
90
|
+
|
|
91
|
+
# @!attribute name
|
|
92
|
+
# Name of the user who created the folder.
|
|
93
|
+
#
|
|
94
|
+
# @return [String, nil]
|
|
95
|
+
optional :name, String
|
|
96
|
+
|
|
97
|
+
# @!method initialize(email: nil, name: nil)
|
|
98
|
+
# Details of the user who created the folder. Present only when this information
|
|
99
|
+
# is available. The `name` is the name of the user at the time of folder creation.
|
|
100
|
+
#
|
|
101
|
+
# @param email [String] Email of the user who created the folder.
|
|
102
|
+
#
|
|
103
|
+
# @param name [String] Name of the user who created the folder.
|
|
104
|
+
end
|
|
105
|
+
|
|
74
106
|
# Type of the asset.
|
|
75
107
|
#
|
|
76
108
|
# @see Imagekitio::Models::Folder#type
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FolderCreateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
# @!attribute created_at
|
|
7
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
8
|
+
#
|
|
9
|
+
# @return [Time]
|
|
10
|
+
required :created_at, Time
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Imagekitio::Models::Folder]
|
|
15
|
+
required :data, -> { Imagekitio::Folder }
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
# Type of the webhook event.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"folder.created"]
|
|
21
|
+
required :type, const: :"folder.created"
|
|
22
|
+
|
|
23
|
+
# @!method initialize(created_at:, data:, type: :"folder.created")
|
|
24
|
+
# Triggered when a folder is created, whether explicitly, by copying or moving a
|
|
25
|
+
# folder, or implicitly when an upload creates missing parent folders. Copying or
|
|
26
|
+
# moving a folder tree sends one event per folder in the tree.
|
|
27
|
+
#
|
|
28
|
+
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
29
|
+
#
|
|
30
|
+
# @param data [Imagekitio::Models::Folder]
|
|
31
|
+
#
|
|
32
|
+
# @param type [Symbol, :"folder.created"] Type of the webhook event.
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FolderDeleteEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
# @!attribute created_at
|
|
7
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
8
|
+
#
|
|
9
|
+
# @return [Time]
|
|
10
|
+
required :created_at, Time
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Imagekitio::Models::FolderDeleteEvent::Data]
|
|
15
|
+
required :data, -> { Imagekitio::FolderDeleteEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
# Type of the webhook event.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"folder.deleted"]
|
|
21
|
+
required :type, const: :"folder.deleted"
|
|
22
|
+
|
|
23
|
+
# @!method initialize(created_at:, data:, type: :"folder.deleted")
|
|
24
|
+
# Triggered when a folder is deleted. Deleting a folder tree sends one event per
|
|
25
|
+
# folder in the tree; the files inside it send `file.deleted` events and their
|
|
26
|
+
# versions send `file-version.deleted` events. Moving a folder sends this event
|
|
27
|
+
# for the old `folderId` and `folder.created` for the new one.
|
|
28
|
+
#
|
|
29
|
+
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
30
|
+
#
|
|
31
|
+
# @param data [Imagekitio::Models::FolderDeleteEvent::Data]
|
|
32
|
+
#
|
|
33
|
+
# @param type [Symbol, :"folder.deleted"] Type of the webhook event.
|
|
34
|
+
|
|
35
|
+
class Data < Imagekitio::Internal::Type::BaseModel
|
|
36
|
+
# @!attribute folder_id
|
|
37
|
+
# The unique `folderId` of the deleted folder.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :folder_id, String, api_name: :folderId
|
|
41
|
+
|
|
42
|
+
# @!method initialize(folder_id:)
|
|
43
|
+
# @param folder_id [String] The unique `folderId` of the deleted folder.
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FolderUpdateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
# @!attribute created_at
|
|
7
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
8
|
+
#
|
|
9
|
+
# @return [Time]
|
|
10
|
+
required :created_at, Time
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Imagekitio::Models::Folder]
|
|
15
|
+
required :data, -> { Imagekitio::Folder }
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
# Type of the webhook event.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"folder.updated"]
|
|
21
|
+
required :type, const: :"folder.updated"
|
|
22
|
+
|
|
23
|
+
# @!method initialize(created_at:, data:, type: :"folder.updated")
|
|
24
|
+
# Triggered when a folder is updated, for example when its custom metadata changes
|
|
25
|
+
# or it is renamed. Renaming a folder sends one event per folder in the tree, each
|
|
26
|
+
# with its new `folderPath`.
|
|
27
|
+
#
|
|
28
|
+
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
29
|
+
#
|
|
30
|
+
# @param data [Imagekitio::Models::Folder]
|
|
31
|
+
#
|
|
32
|
+
# @param type [Symbol, :"folder.updated"] Type of the webhook event.
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -46,8 +46,17 @@ module Imagekitio
|
|
|
46
46
|
# Triggered when a file version is deleted.
|
|
47
47
|
variant -> { Imagekitio::FileVersionDeleteEvent }
|
|
48
48
|
|
|
49
|
+
# Triggered when a folder is created, whether explicitly, by copying or moving a folder, or implicitly when an upload creates missing parent folders. Copying or moving a folder tree sends one event per folder in the tree.
|
|
50
|
+
variant -> { Imagekitio::FolderCreateEvent }
|
|
51
|
+
|
|
52
|
+
# Triggered when a folder is updated, for example when its custom metadata changes or it is renamed. Renaming a folder sends one event per folder in the tree, each with its new `folderPath`.
|
|
53
|
+
variant -> { Imagekitio::FolderUpdateEvent }
|
|
54
|
+
|
|
55
|
+
# Triggered when a folder is deleted. Deleting a folder tree sends one event per folder in the tree; the files inside it send `file.deleted` events and their versions send `file-version.deleted` events. Moving a folder sends this event for the old `folderId` and `folder.created` for the new one.
|
|
56
|
+
variant -> { Imagekitio::FolderDeleteEvent }
|
|
57
|
+
|
|
49
58
|
# @!method self.variants
|
|
50
|
-
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent, Imagekitio::Models::FileCreateEvent, Imagekitio::Models::FileUpdateEvent, Imagekitio::Models::FileDeleteEvent, Imagekitio::Models::FileVersionCreateEvent, Imagekitio::Models::FileVersionDeleteEvent)]
|
|
59
|
+
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent, Imagekitio::Models::FileCreateEvent, Imagekitio::Models::FileUpdateEvent, Imagekitio::Models::FileDeleteEvent, Imagekitio::Models::FileVersionCreateEvent, Imagekitio::Models::FileVersionDeleteEvent, Imagekitio::Models::FolderCreateEvent, Imagekitio::Models::FolderUpdateEvent, Imagekitio::Models::FolderDeleteEvent)]
|
|
51
60
|
end
|
|
52
61
|
end
|
|
53
62
|
end
|