Skip to content

Commit 296ff56

Browse files
authored
Merge pull request #17 from imagekit-developer/release-please--branches--master--changes--next
release: 2.4.0
2 parents fb4c4ee + fc49d27 commit 296ff56

16 files changed

Lines changed: 883 additions & 1440 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.3.0"
2+
".": "2.4.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 48
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-63aff1629530786015da3c86131afa8a9b60545d488884b77641f1d4b89c6e9d.yml
3-
openapi_spec_hash: 586d357bd7e5217d240a99e0d83c6d1f
4-
config_hash: 47cb702ee2cb52c58d803ae39ade9b44
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-70c42eda2bee929830b2537f758400a58dded1f1ef5686a286e2469c35a041a0.yml
3+
openapi_spec_hash: cdaeed824e91657b45092765cf55eb42
4+
config_hash: e3c2679d25f6235381dfb11962fbf3d9

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 2.4.0 (2026-04-13)
4+
5+
Full Changelog: [v2.3.0...v2.4.0](https://github.com/imagekit-developer/imagekit-go/compare/v2.3.0...v2.4.0)
6+
7+
### Features
8+
9+
* **api:** dam related webhook events ([b364b42](https://github.com/imagekit-developer/imagekit-go/commit/b364b4250885a0c3d172d26e0121979970c55990))
10+
* **api:** fix spec indentation ([f254242](https://github.com/imagekit-developer/imagekit-go/commit/f2542428409b7963a25d629c667291292d5b0126))
11+
* **api:** indentation fix ([d9bbacf](https://github.com/imagekit-developer/imagekit-go/commit/d9bbacf78dd49e892ea97ead76000115c863495f))
12+
* **api:** merge with main to bring back missing parameters ([4ab1555](https://github.com/imagekit-developer/imagekit-go/commit/4ab1555f5ecf9f5aeca0de356f67b7e7ce831a7c))
13+
* **api:** update webhook event names and remove DAM prefix ([5054493](https://github.com/imagekit-developer/imagekit-go/commit/5054493498d777340e64c267da0621cc1fa3f804))
14+
15+
16+
### Bug Fixes
17+
18+
* **api:** extract shared schemas to prevent Go webhook union breaking changes ([57ff5e2](https://github.com/imagekit-developer/imagekit-go/commit/57ff5e25ba5dfb11ebed03cdfb145001bf717d40))
19+
* **api:** fix references of schema ([991d381](https://github.com/imagekit-developer/imagekit-go/commit/991d3815942efcb68655192ad7b81ab3fb37b791))
20+
* **api:** remove optional password parameter from client initialization ([e322edc](https://github.com/imagekit-developer/imagekit-go/commit/e322edc056ae3145fcc1e10af75b6a1208692cd0))
21+
* **api:** rename DamFile events to File for consistency ([6d142f5](https://github.com/imagekit-developer/imagekit-go/commit/6d142f5d4d48d2368a7b59d6508062dd63a46c72))
22+
23+
24+
### Documentation
25+
26+
* improve examples ([3953c51](https://github.com/imagekit-developer/imagekit-go/commit/3953c51e4f8582b9ac3e317f846e8fcc17725c05))
27+
28+
29+
### Refactors
30+
31+
* add backwards-compatible type aliases and import removed json package ([e12a0f6](https://github.com/imagekit-developer/imagekit-go/commit/e12a0f663b5fb2f89306aa02f2da40217a18a2b3))
32+
* AITags to singular AITag schema with array items pattern ([1fe0465](https://github.com/imagekit-developer/imagekit-go/commit/1fe04652d68fccf6ce2465a8148b4aa892f9e3e0))
33+
334
## 2.3.0 (2026-04-06)
435

536
Full Changelog: [v2.2.0...v2.3.0](https://github.com/imagekit-developer/imagekit-go/compare/v2.2.0...v2.3.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Or to pin the version:
5959
<!-- x-release-please-start-version -->
6060

6161
```sh
62-
go get -u 'github.com/imagekit-developer/imagekit-go/v2@v2.3.0'
62+
go get -u 'github.com/imagekit-developer/imagekit-go/v2@v2.4.0'
6363
```
6464

6565
<!-- x-release-please-end -->

aliases.go

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ type paramObj = param.APIObject
1616

1717
type Error = apierror.Error
1818

19+
// AI-generated tag associated with an image. These tags can be added using the
20+
// `google-auto-tagging` or `aws-auto-tagging` extensions.
21+
//
22+
// This is an alias to an internal type.
23+
type AITag = shared.AITag
24+
1925
// This is an alias to an internal type.
2026
type BaseOverlayParam = shared.BaseOverlayParam
2127

@@ -55,6 +61,17 @@ const BaseOverlayLayerModeCutout = shared.BaseOverlayLayerModeCutout
5561
// Equals "displace"
5662
const BaseOverlayLayerModeDisplace = shared.BaseOverlayLayerModeDisplace
5763

64+
// A key-value data associated with the asset.
65+
//
66+
// This is an alias to an internal type.
67+
type CustomMetadata = shared.CustomMetadata
68+
69+
// Consolidated embedded metadata associated with the file. It includes exif, iptc,
70+
// and xmp data.
71+
//
72+
// This is an alias to an internal type.
73+
type EmbeddedMetadata = shared.EmbeddedMetadata
74+
5875
// Configuration object for an extension (base extensions only, not saved extension
5976
// references).
6077
//
@@ -518,6 +535,46 @@ type SavedExtension = shared.SavedExtension
518535
// This is an alias to an internal type.
519536
type SavedExtensionParam = shared.SavedExtensionParam
520537

538+
// This field is included in the response only if the Path policy feature is
539+
// available in the plan. It contains schema definitions for the custom metadata
540+
// fields selected for the specified file path. Field selection can only be done
541+
// when the Path policy feature is enabled.
542+
//
543+
// Keys are the names of the custom metadata fields; the value object has details
544+
// about the custom metadata schema.
545+
//
546+
// This is an alias to an internal type.
547+
type SelectedFieldsSchema = shared.SelectedFieldsSchema
548+
549+
// This is an alias to an internal type.
550+
type SelectedFieldsSchemaItem = shared.SelectedFieldsSchemaItem
551+
552+
// The default value for this custom metadata field. The value should match the
553+
// `type` of custom metadata field.
554+
//
555+
// This is an alias to an internal type.
556+
type SelectedFieldsSchemaItemDefaultValueUnion = shared.SelectedFieldsSchemaItemDefaultValueUnion
557+
558+
// This is an alias to an internal type.
559+
type SelectedFieldsSchemaItemDefaultValueMixedItemUnion = shared.SelectedFieldsSchemaItemDefaultValueMixedItemUnion
560+
561+
// Maximum value of the field. Only set if field type is `Date` or `Number`. For
562+
// `Date` type field, the value will be in ISO8601 string format. For `Number` type
563+
// field, it will be a numeric value.
564+
//
565+
// This is an alias to an internal type.
566+
type SelectedFieldsSchemaItemMaxValueUnion = shared.SelectedFieldsSchemaItemMaxValueUnion
567+
568+
// Minimum value of the field. Only set if field type is `Date` or `Number`. For
569+
// `Date` type field, the value will be in ISO8601 string format. For `Number` type
570+
// field, it will be a numeric value.
571+
//
572+
// This is an alias to an internal type.
573+
type SelectedFieldsSchemaItemMinValueUnion = shared.SelectedFieldsSchemaItemMinValueUnion
574+
575+
// This is an alias to an internal type.
576+
type SelectedFieldsSchemaItemSelectOptionUnion = shared.SelectedFieldsSchemaItemSelectOptionUnion
577+
521578
// This is an alias to an internal type.
522579
type SolidColorOverlayParam = shared.SolidColorOverlayParam
523580

@@ -1031,5 +1088,10 @@ const TransformationPositionPath = shared.TransformationPositionPath
10311088
// Equals "query"
10321089
const TransformationPositionQuery = shared.TransformationPositionQuery
10331090

1091+
// An object containing the file or file version's `id` (versionId) and `name`.
1092+
//
1093+
// This is an alias to an internal type.
1094+
type VersionInfo = shared.VersionInfo
1095+
10341096
// This is an alias to an internal type.
10351097
type VideoOverlayParam = shared.VideoOverlayParam

api.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@
2424

2525
# Shared Response Types
2626

27+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#AITag">AITag</a>
28+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#CustomMetadata">CustomMetadata</a>
29+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#EmbeddedMetadata">EmbeddedMetadata</a>
2730
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#ExtensionConfigUnion">ExtensionConfigUnion</a>
2831
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#SavedExtension">SavedExtension</a>
32+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#SelectedFieldsSchema">SelectedFieldsSchema</a>
2933
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#StreamingResolution">StreamingResolution</a>
3034
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#TransformationPosition">TransformationPosition</a>
35+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared">shared</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2/shared#VersionInfo">VersionInfo</a>
3136

3237

3338
# CustomMetadataFields
@@ -236,6 +241,11 @@ Methods:
236241
Response Types:
237242

238243
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#BaseWebhookEvent">BaseWebhookEvent</a>
244+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#FileCreateEvent">FileCreateEvent</a>
245+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#FileDeleteEvent">FileDeleteEvent</a>
246+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#FileUpdateEvent">FileUpdateEvent</a>
247+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#FileVersionCreateEvent">FileVersionCreateEvent</a>
248+
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#FileVersionDeleteEvent">FileVersionDeleteEvent</a>
239249
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#UploadPostTransformErrorEvent">UploadPostTransformErrorEvent</a>
240250
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#UploadPostTransformSuccessEvent">UploadPostTransformSuccessEvent</a>
241251
- <a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2">imagekit</a>.<a href="https://pkg.go.dev/github.com/imagekit-developer/imagekit-go/v2#UploadPreTransformErrorEvent">UploadPreTransformErrorEvent</a>

asset.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/imagekit-developer/imagekit-go/v2/option"
1717
"github.com/imagekit-developer/imagekit-go/v2/packages/param"
1818
"github.com/imagekit-developer/imagekit-go/v2/packages/respjson"
19+
"github.com/imagekit-developer/imagekit-go/v2/shared"
1920
)
2021

2122
// AssetService contains methods and other services that help with interacting with
@@ -56,7 +57,7 @@ func (r *AssetService) List(ctx context.Context, query AssetListParams, opts ...
5657
// Use the methods beginning with 'As' to cast the union to one of its variants.
5758
type AssetListResponseUnion struct {
5859
// This field is from variant [File].
59-
AITags []FileAITag `json:"AITags"`
60+
AITags []shared.AITag `json:"AITags"`
6061
// This field is from variant [File].
6162
AudioCodec string `json:"audioCodec"`
6263
// This field is from variant [File].
@@ -70,7 +71,7 @@ type AssetListResponseUnion struct {
7071
// This field is from variant [File].
7172
Duration int64 `json:"duration"`
7273
// This field is from variant [File].
73-
EmbeddedMetadata map[string]any `json:"embeddedMetadata"`
74+
EmbeddedMetadata shared.EmbeddedMetadata `json:"embeddedMetadata"`
7475
// This field is from variant [File].
7576
FileID string `json:"fileId"`
7677
// This field is from variant [File].
@@ -89,7 +90,7 @@ type AssetListResponseUnion struct {
8990
Mime string `json:"mime"`
9091
Name string `json:"name"`
9192
// This field is from variant [File].
92-
SelectedFieldsSchema map[string]FileSelectedFieldsSchema `json:"selectedFieldsSchema"`
93+
SelectedFieldsSchema shared.SelectedFieldsSchema `json:"selectedFieldsSchema"`
9394
// This field is from variant [File].
9495
Size float64 `json:"size"`
9596
// This field is from variant [File].
@@ -102,7 +103,7 @@ type AssetListResponseUnion struct {
102103
// This field is from variant [File].
103104
URL string `json:"url"`
104105
// This field is from variant [File].
105-
VersionInfo FileVersionInfo `json:"versionInfo"`
106+
VersionInfo shared.VersionInfo `json:"versionInfo"`
106107
// This field is from variant [File].
107108
VideoCodec string `json:"videoCodec"`
108109
// This field is from variant [File].

backcompat.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package imagekit
2+
3+
import "github.com/imagekit-developer/imagekit-go/v2/shared"
4+
5+
// Backwards-compatible type aliases for types consolidated into the shared package.
6+
7+
type FileAITag = shared.AITag
8+
type FileSelectedFieldsSchema = shared.SelectedFieldsSchemaItem
9+
type FileSelectedFieldsSchemaDefaultValueUnion = shared.SelectedFieldsSchemaItemDefaultValueUnion
10+
type FileSelectedFieldsSchemaDefaultValueMixedItemUnion = shared.SelectedFieldsSchemaItemDefaultValueMixedItemUnion
11+
type FileSelectedFieldsSchemaMaxValueUnion = shared.SelectedFieldsSchemaItemMaxValueUnion
12+
type FileSelectedFieldsSchemaMinValueUnion = shared.SelectedFieldsSchemaItemMinValueUnion
13+
type FileSelectedFieldsSchemaSelectOptionUnion = shared.SelectedFieldsSchemaItemSelectOptionUnion
14+
type FileVersionInfo = shared.VersionInfo
15+
16+
type FileUploadResponseAITag = shared.AITag
17+
type FileUploadResponseSelectedFieldsSchema = shared.SelectedFieldsSchemaItem
18+
type FileUploadResponseSelectedFieldsSchemaDefaultValueUnion = shared.SelectedFieldsSchemaItemDefaultValueUnion
19+
type FileUploadResponseSelectedFieldsSchemaDefaultValueMixedItemUnion = shared.SelectedFieldsSchemaItemDefaultValueMixedItemUnion
20+
type FileUploadResponseSelectedFieldsSchemaMaxValueUnion = shared.SelectedFieldsSchemaItemMaxValueUnion
21+
type FileUploadResponseSelectedFieldsSchemaMinValueUnion = shared.SelectedFieldsSchemaItemMinValueUnion
22+
type FileUploadResponseSelectedFieldsSchemaSelectOptionUnion = shared.SelectedFieldsSchemaItemSelectOptionUnion
23+
type FileUploadResponseVersionInfo = shared.VersionInfo
24+
25+
type BetaV2FileUploadResponseAITag = shared.AITag
26+
type BetaV2FileUploadResponseSelectedFieldsSchema = shared.SelectedFieldsSchemaItem
27+
type BetaV2FileUploadResponseSelectedFieldsSchemaDefaultValueUnion = shared.SelectedFieldsSchemaItemDefaultValueUnion
28+
type BetaV2FileUploadResponseSelectedFieldsSchemaDefaultValueMixedItemUnion = shared.SelectedFieldsSchemaItemDefaultValueMixedItemUnion
29+
type BetaV2FileUploadResponseSelectedFieldsSchemaMaxValueUnion = shared.SelectedFieldsSchemaItemMaxValueUnion
30+
type BetaV2FileUploadResponseSelectedFieldsSchemaMinValueUnion = shared.SelectedFieldsSchemaItemMinValueUnion
31+
type BetaV2FileUploadResponseSelectedFieldsSchemaSelectOptionUnion = shared.SelectedFieldsSchemaItemSelectOptionUnion
32+
type BetaV2FileUploadResponseVersionInfo = shared.VersionInfo
33+
34+
type UploadPreTransformSuccessEventDataAITag = shared.AITag
35+
type UploadPreTransformSuccessEventDataSelectedFieldsSchema = shared.SelectedFieldsSchemaItem
36+
type UploadPreTransformSuccessEventDataSelectedFieldsSchemaDefaultValueUnion = shared.SelectedFieldsSchemaItemDefaultValueUnion
37+
type UploadPreTransformSuccessEventDataSelectedFieldsSchemaDefaultValueMixedItemUnion = shared.SelectedFieldsSchemaItemDefaultValueMixedItemUnion
38+
type UploadPreTransformSuccessEventDataSelectedFieldsSchemaMaxValueUnion = shared.SelectedFieldsSchemaItemMaxValueUnion
39+
type UploadPreTransformSuccessEventDataSelectedFieldsSchemaMinValueUnion = shared.SelectedFieldsSchemaItemMinValueUnion
40+
type UploadPreTransformSuccessEventDataSelectedFieldsSchemaSelectOptionUnion = shared.SelectedFieldsSchemaItemSelectOptionUnion
41+
type UploadPreTransformSuccessEventDataVersionInfo = shared.VersionInfo

0 commit comments

Comments
 (0)