Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup go
uses: actions/setup-go@v5
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/imagekit-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup go
uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.1.0"
".": "2.1.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 48
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-c028a7584d3508f268ce5c5b824b50af88eaa140620dd03a1b35f409f510603c.yml
openapi_spec_hash: f9b780b2398a87678a13355e48cd515f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-84f0d75048a9268981a84800b4190e3691997ce57dcfc0876f38a5b3fce6bacd.yml
openapi_spec_hash: 35607d4e850c8a60524223ff632c83bb
config_hash: aeb6eb949d73382270bbd8bbf2e4cf2a
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 2.1.1 (2026-01-20)

Full Changelog: [v2.1.0...v2.1.1](https://github.com/imagekit-developer/imagekit-go/compare/v2.1.0...v2.1.1)

### Bug Fixes

* **docs:** add missing pointer prefix to api.md return types ([f3a6f9f](https://github.com/imagekit-developer/imagekit-go/commit/f3a6f9fa69c8d6c41a018fcdd5534f0dbd00b7a9))
* vocab field is required ([b18d890](https://github.com/imagekit-developer/imagekit-go/commit/b18d89015fc6f7eb213c89071fb43582ee98ca17))


### Chores

* **internal:** update `actions/checkout` version ([f0a9fc0](https://github.com/imagekit-developer/imagekit-go/commit/f0a9fc0d1c3e84934e78815169f763b468c22de6))

## 2.1.0 (2026-01-16)

Full Changelog: [v2.0.0...v2.1.0](https://github.com/imagekit-developer/imagekit-go/compare/v2.0.0...v2.1.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/imagekit-developer/imagekit-go/[email protected].0'
go get -u 'github.com/imagekit-developer/imagekit-go/[email protected].1'
```

<!-- x-release-please-end -->
Expand Down
86 changes: 43 additions & 43 deletions api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion betav2file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ func TestBetaV2FileUploadWithOptionalParams(t *testing.T) {
Tasks: []shared.ExtensionAITasksTaskUnionParam{{
OfSelectTags: &shared.ExtensionAITasksTaskSelectTagsParam{
Instruction: "What types of clothing items are visible in this image?",
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
MaxSelections: imagekit.Int(1),
MinSelections: imagekit.Int(0),
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
},
}, {
OfYesNo: &shared.ExtensionAITasksTaskYesNoParam{
Expand Down
2 changes: 1 addition & 1 deletion dummy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func TestDummyNewWithOptionalParams(t *testing.T) {
Tasks: []shared.ExtensionAITasksTaskUnionParam{{
OfSelectTags: &shared.ExtensionAITasksTaskSelectTagsParam{
Instruction: "What types of clothing items are visible in this image?",
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
MaxSelections: imagekit.Int(1),
MinSelections: imagekit.Int(0),
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
},
}, {
OfYesNo: &shared.ExtensionAITasksTaskYesNoParam{
Expand Down
4 changes: 2 additions & 2 deletions file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func TestFileUpdateWithOptionalParams(t *testing.T) {
Tasks: []shared.ExtensionAITasksTaskUnionParam{{
OfSelectTags: &shared.ExtensionAITasksTaskSelectTagsParam{
Instruction: "What types of clothing items are visible?",
Vocabulary: []string{"shirt", "dress", "jacket"},
MaxSelections: imagekit.Int(1),
MinSelections: imagekit.Int(0),
Vocabulary: []string{"shirt", "dress", "jacket"},
},
}},
},
Expand Down Expand Up @@ -278,9 +278,9 @@ func TestFileUploadWithOptionalParams(t *testing.T) {
Tasks: []shared.ExtensionAITasksTaskUnionParam{{
OfSelectTags: &shared.ExtensionAITasksTaskSelectTagsParam{
Instruction: "What types of clothing items are visible in this image?",
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
MaxSelections: imagekit.Int(1),
MinSelections: imagekit.Int(0),
Vocabulary: []string{"shirt", "tshirt", "dress", "trousers", "jacket"},
},
}, {
OfYesNo: &shared.ExtensionAITasksTaskYesNoParam{
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "2.1.0" // x-release-please-version
const PackageVersion = "2.1.1" // x-release-please-version
34 changes: 17 additions & 17 deletions shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ func (r *ExtensionConfigAITasks) UnmarshalJSON(data []byte) error {
type ExtensionConfigAITasksTaskUnion struct {
Instruction string `json:"instruction"`
// Any of "select_tags", "select_metadata", "yes_no".
Type string `json:"type"`
Type string `json:"type"`
MaxSelections int64 `json:"max_selections"`
MinSelections int64 `json:"min_selections"`
// This field is a union of [[]string],
// [[]ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion]
Vocabulary ExtensionConfigAITasksTaskUnionVocabulary `json:"vocabulary"`
MaxSelections int64 `json:"max_selections"`
MinSelections int64 `json:"min_selections"`
Vocabulary ExtensionConfigAITasksTaskUnionVocabulary `json:"vocabulary"`
// This field is from variant [ExtensionConfigAITasksTaskSelectMetadata].
Field string `json:"field"`
// This field is from variant [ExtensionConfigAITasksTaskYesNo].
Expand All @@ -292,9 +292,9 @@ type ExtensionConfigAITasksTaskUnion struct {
JSON struct {
Instruction respjson.Field
Type respjson.Field
Vocabulary respjson.Field
MaxSelections respjson.Field
MinSelections respjson.Field
Vocabulary respjson.Field
Field respjson.Field
OnNo respjson.Field
OnUnknown respjson.Field
Expand Down Expand Up @@ -386,20 +386,20 @@ type ExtensionConfigAITasksTaskSelectTags struct {
Instruction string `json:"instruction,required"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
Type constant.SelectTags `json:"type,required"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary,required"`
// Maximum number of tags to select from the vocabulary.
MaxSelections int64 `json:"max_selections"`
// Minimum number of tags to select from the vocabulary.
MinSelections int64 `json:"min_selections"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Instruction respjson.Field
Type respjson.Field
Vocabulary respjson.Field
MaxSelections respjson.Field
MinSelections respjson.Field
Vocabulary respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
Expand Down Expand Up @@ -1377,17 +1377,17 @@ func init() {
)
}

// The properties Instruction, Type, Vocabulary are required.
// The properties Instruction, Type are required.
type ExtensionConfigAITasksTaskSelectTagsParam struct {
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction,required"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary,omitzero,required"`
// Maximum number of tags to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of tags to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary,omitzero"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_tags".
Expand Down Expand Up @@ -2181,17 +2181,17 @@ func init() {
)
}

// The properties Instruction, Type, Vocabulary are required.
// The properties Instruction, Type are required.
type ExtensionAITasksTaskSelectTagsParam struct {
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction,required"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary,omitzero,required"`
// Maximum number of tags to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of tags to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// Array of possible tag values. Combined length of all strings must not exceed 500
// characters. Cannot contain the `%` character.
Vocabulary []string `json:"vocabulary,omitzero"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_tags".
Expand Down
Loading