From 30986a511941e7b449500c01655d552ebb4bc6b1 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 20 Jul 2024 00:26:04 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.344.1 --- .speakeasy/gen.lock | 10 +++---- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +++---- RELEASES.md | 12 ++++++++- docs/models/components/key.md | 10 +++---- docs/models/components/ratelimits.md | 4 +-- docs/models/components/refill.md | 2 +- .../operations/deletekeysresponsebody.md | 2 +- .../operations/getidentityratelimits.md | 4 +-- .../operations/listidentitiesratelimits.md | 4 +-- docs/models/operations/ratelimits.md | 4 +-- .../operations/updateidentityratelimits.md | 4 +-- .../models/operations/updatekeyrequestbody.md | 4 +-- docs/models/operations/verifications.md | 6 ++--- docs/sdks/keys/README.md | 12 ++++----- models/components/key.go | 26 +++++++++---------- models/components/v1keysverifykeyrequest.go | 8 +++--- models/operations/createidentity.go | 12 ++++----- models/operations/deletekeys.go | 6 ++--- models/operations/getidentity.go | 12 ++++----- models/operations/getverifications.go | 18 ++++++------- models/operations/listidentities.go | 12 ++++----- models/operations/updateidentity.go | 12 ++++----- models/operations/updatekey.go | 8 +++--- unkey.go | 6 ++--- 25 files changed, 110 insertions(+), 100 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2df6c00..0ed0a76 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 4fc4737a-135f-4840-8e6d-42a2b2a2884b management: - docChecksum: 75f7e089853056de07ee9bd3d0b1678d + docChecksum: 29e2d5c7a947cc6ebcfd6934ff2cb957 docVersion: 1.0.0 - speakeasyVersion: 1.340.0 - generationVersion: 2.375.5 - releaseVersion: 0.8.0 - configChecksum: f7715aaf0773d3aaeefa9a127727517d + speakeasyVersion: 1.344.1 + generationVersion: 2.376.2 + releaseVersion: 0.8.1 + configChecksum: 59c27f74f558a409357571bf5f21de66 repoURL: https://github.com/unkeyed/unkey-go.git installationURL: https://github.com/unkeyed/unkey-go features: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4c26642..751b13d 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true go: - version: 0.8.0 + version: 0.8.1 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 62d7942..f27c4ab 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.340.0 +speakeasyVersion: 1.344.1 sources: openapi.json: sourceNamespace: openapi-json - sourceRevisionDigest: sha256:8692dc0ff51ce0350cb69b2465bc3289d63a4986945e5574285cd187a05248c1 - sourceBlobDigest: sha256:249aa19308afcc8b58771b1b2833cd720293edea20e33016faa4e23aef204656 + sourceRevisionDigest: sha256:c3b38fb469289b8fdabbc28051440112c3199ee411dbf4336acd8b2c18a27263 + sourceBlobDigest: sha256:2f792761f282e88f85c1494eb7e382e95031c0a7155cbb121aa049fb68473e55 tags: - latest - main @@ -11,8 +11,8 @@ targets: go: source: openapi.json sourceNamespace: openapi-json - sourceRevisionDigest: sha256:8692dc0ff51ce0350cb69b2465bc3289d63a4986945e5574285cd187a05248c1 - sourceBlobDigest: sha256:249aa19308afcc8b58771b1b2833cd720293edea20e33016faa4e23aef204656 + sourceRevisionDigest: sha256:c3b38fb469289b8fdabbc28051440112c3199ee411dbf4336acd8b2c18a27263 + sourceBlobDigest: sha256:2f792761f282e88f85c1494eb7e382e95031c0a7155cbb121aa049fb68473e55 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index ef30d1d..93d537e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -138,4 +138,14 @@ Based on: ### Generated - [go v0.8.0] . ### Releases -- [Go v0.8.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.8.0 - . \ No newline at end of file +- [Go v0.8.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.8.0 - . + +## 2024-07-20 00:25:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.344.1 (2.376.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.8.1] . +### Releases +- [Go v0.8.1] https://github.com/unkeyed/unkey-go/releases/tag/v0.8.1 - . \ No newline at end of file diff --git a/docs/models/components/key.md b/docs/models/components/key.md index 8d6b2a4..1af7c42 100644 --- a/docs/models/components/key.md +++ b/docs/models/components/key.md @@ -12,11 +12,11 @@ | `Name` | **string* | :heavy_minus_sign: | The name of the key, give keys a name to easily identify their purpose | Customer X | | `OwnerID` | **string* | :heavy_minus_sign: | The id of the tenant associated with this key. Use whatever reference you have in your system to identify the tenant. When verifying the key, we will send this field back to you, so you know who is accessing your API. | user_123 | | `Meta` | map[string]*any* | :heavy_minus_sign: | Any additional metadata you want to store with the key | {
"roles": [
"admin",
"user"
],
"stripeCustomerId": "cus_1234"
} | -| `CreatedAt` | *float64* | :heavy_check_mark: | The unix timestamp in milliseconds when the key was created | 0 | -| `UpdatedAt` | **float64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was last updated | 0 | -| `DeletedAt` | **float64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was deleted. We don't delete the key outright, you can restore it later. | 0 | -| `Expires` | **float64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 0 | -| `Remaining` | **float64* | :heavy_minus_sign: | The number of requests that can be made with this key before it becomes invalid. If this field is null or undefined, the key has no request limit. | 1000 | +| `CreatedAt` | *int64* | :heavy_check_mark: | The unix timestamp in milliseconds when the key was created | 0 | +| `UpdatedAt` | **int64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was last updated | 0 | +| `DeletedAt` | **int64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key was deleted. We don't delete the key outright, you can restore it later. | 0 | +| `Expires` | **int64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 0 | +| `Remaining` | **int64* | :heavy_minus_sign: | The number of requests that can be made with this key before it becomes invalid. If this field is null or undefined, the key has no request limit. | 1000 | | `Refill` | [*components.Refill](../../models/components/refill.md) | :heavy_minus_sign: | Unkey allows you to refill remaining verifications on a key on a regular interval. | {
"interval": "daily",
"amount": 10
} | | `Ratelimit` | [*components.Ratelimit](../../models/components/ratelimit.md) | :heavy_minus_sign: | Unkey comes with per-key ratelimiting out of the box. | {
"async": true,
"limit": 10,
"duration": 60
} | | `Roles` | []*string* | :heavy_minus_sign: | All roles this key belongs to | [
"admin",
"finance"
] | diff --git a/docs/models/components/ratelimits.md b/docs/models/components/ratelimits.md index 38f58bc..70159fa 100644 --- a/docs/models/components/ratelimits.md +++ b/docs/models/components/ratelimits.md @@ -7,5 +7,5 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `Name` | *string* | :heavy_check_mark: | The name of the ratelimit. | tokens | | `Cost` | **int64* | :heavy_minus_sign: | Optionally override how expensive this operation is and how many tokens are deducted from the current limit. | | -| `Limit` | **float64* | :heavy_minus_sign: | Optionally override the limit. | | -| `Duration` | **float64* | :heavy_minus_sign: | Optionally override the ratelimit window duration. | | \ No newline at end of file +| `Limit` | **int64* | :heavy_minus_sign: | Optionally override the limit. | | +| `Duration` | **int64* | :heavy_minus_sign: | Optionally override the ratelimit window duration. | | \ No newline at end of file diff --git a/docs/models/components/refill.md b/docs/models/components/refill.md index 74d1dea..cc3beaa 100644 --- a/docs/models/components/refill.md +++ b/docs/models/components/refill.md @@ -9,4 +9,4 @@ Unkey allows you to refill remaining verifications on a key on a regular interva | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | | `Interval` | [components.Interval](../../models/components/interval.md) | :heavy_check_mark: | Determines the rate at which verifications will be refilled. | daily | | `Amount` | *int64* | :heavy_check_mark: | Resets `remaining` to this value every interval. | 100 | -| `LastRefillAt` | **float64* | :heavy_minus_sign: | The unix timestamp in miliseconds when the key was last refilled. | 100 | \ No newline at end of file +| `LastRefillAt` | **int64* | :heavy_minus_sign: | The unix timestamp in miliseconds when the key was last refilled. | 100 | \ No newline at end of file diff --git a/docs/models/operations/deletekeysresponsebody.md b/docs/models/operations/deletekeysresponsebody.md index 6e04d25..7a77e58 100644 --- a/docs/models/operations/deletekeysresponsebody.md +++ b/docs/models/operations/deletekeysresponsebody.md @@ -7,4 +7,4 @@ The keys have been deleted | Field | Type | Required | Description | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `DeletedKeys` | *float64* | :heavy_check_mark: | The number of keys that were deleted | \ No newline at end of file +| `DeletedKeys` | *int64* | :heavy_check_mark: | The number of keys that were deleted | \ No newline at end of file diff --git a/docs/models/operations/getidentityratelimits.md b/docs/models/operations/getidentityratelimits.md index ea1e581..943f532 100644 --- a/docs/models/operations/getidentityratelimits.md +++ b/docs/models/operations/getidentityratelimits.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `Name` | *string* | :heavy_check_mark: | The name of this limit. You will need to use this again when verifying a key. | tokens | -| `Limit` | *float64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | -| `Duration` | *float64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file +| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | +| `Duration` | *int64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file diff --git a/docs/models/operations/listidentitiesratelimits.md b/docs/models/operations/listidentitiesratelimits.md index 9adfdbb..adbb178 100644 --- a/docs/models/operations/listidentitiesratelimits.md +++ b/docs/models/operations/listidentitiesratelimits.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `Name` | *string* | :heavy_check_mark: | The name of this limit. You will need to use this again when verifying a key. | tokens | -| `Limit` | *float64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | -| `Duration` | *float64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file +| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | +| `Duration` | *int64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file diff --git a/docs/models/operations/ratelimits.md b/docs/models/operations/ratelimits.md index 7ba2948..c1b425f 100644 --- a/docs/models/operations/ratelimits.md +++ b/docs/models/operations/ratelimits.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `Name` | *string* | :heavy_check_mark: | The name of this limit. You will need to use this again when verifying a key. | tokens | -| `Limit` | *float64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | -| `Duration` | *float64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file +| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | +| `Duration` | *int64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file diff --git a/docs/models/operations/updateidentityratelimits.md b/docs/models/operations/updateidentityratelimits.md index e4e95be..1f4bf23 100644 --- a/docs/models/operations/updateidentityratelimits.md +++ b/docs/models/operations/updateidentityratelimits.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `Name` | *string* | :heavy_check_mark: | The name of this limit. You will need to use this again when verifying a key. | tokens | -| `Limit` | *float64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | -| `Duration` | *float64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file +| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass within a given window before requests are rejected. | 10 | +| `Duration` | *int64* | :heavy_check_mark: | The duration for each ratelimit window in milliseconds. | 1000 | \ No newline at end of file diff --git a/docs/models/operations/updatekeyrequestbody.md b/docs/models/operations/updatekeyrequestbody.md index c473db8..1eb2428 100644 --- a/docs/models/operations/updatekeyrequestbody.md +++ b/docs/models/operations/updatekeyrequestbody.md @@ -12,9 +12,9 @@ Update a key's configuration. | `Name` | **string* | :heavy_minus_sign: | The name of the key | Customer X | | `OwnerID` | **string* | :heavy_minus_sign: | The id of the tenant associated with this key. Use whatever reference you have in your system to identify the tenant. When verifying the key, we will send this field back to you, so you know who is accessing your API. | user_123 | | `Meta` | map[string]*any* | :heavy_minus_sign: | Any additional metadata you want to store with the key | {
"roles": [
"admin",
"user"
],
"stripeCustomerId": "cus_1234"
} | -| `Expires` | **float64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 0 | +| `Expires` | **int64* | :heavy_minus_sign: | The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. | 0 | | `Ratelimit` | [*operations.UpdateKeyRatelimit](../../models/operations/updatekeyratelimit.md) | :heavy_minus_sign: | Unkey comes with per-key ratelimiting out of the box. Set `null` to disable. | {
"type": "fast",
"limit": 10,
"refillRate": 1,
"refillInterval": 60
} | -| `Remaining` | **float64* | :heavy_minus_sign: | The number of requests that can be made with this key before it becomes invalid. Set `null` to disable. | 1000 | +| `Remaining` | **int64* | :heavy_minus_sign: | The number of requests that can be made with this key before it becomes invalid. Set `null` to disable. | 1000 | | `Refill` | [*operations.UpdateKeyRefill](../../models/operations/updatekeyrefill.md) | :heavy_minus_sign: | Unkey enables you to refill verifications for each key at regular intervals. | {
"interval": "daily",
"amount": 100
} | | `Enabled` | **bool* | :heavy_minus_sign: | Set if key is enabled or disabled. If disabled, the key cannot be used to verify. | true | | `Roles` | [][operations.Roles](../../models/operations/roles.md) | :heavy_minus_sign: | The roles you want to set for this key. This overwrites all existing roles.
Setting roles requires the `rbac.*.add_role_to_key` permission. | [
{
"id": "perm_123"
},
{
"name": "dns.record.create"
},
{
"name": "dns.record.delete",
"create": true
}
] | diff --git a/docs/models/operations/verifications.md b/docs/models/operations/verifications.md index c4b5bab..704961e 100644 --- a/docs/models/operations/verifications.md +++ b/docs/models/operations/verifications.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | `Time` | *int64* | :heavy_check_mark: | The timestamp of the usage data | 1620000000000 | -| `Success` | *float64* | :heavy_check_mark: | The number of successful requests | 100 | -| `RateLimited` | *float64* | :heavy_check_mark: | The number of requests that were rate limited | 10 | -| `UsageExceeded` | *float64* | :heavy_check_mark: | The number of requests that exceeded the usage limit | 0 | \ No newline at end of file +| `Success` | *int64* | :heavy_check_mark: | The number of successful requests | 100 | +| `RateLimited` | *int64* | :heavy_check_mark: | The number of requests that were rate limited | 10 | +| `UsageExceeded` | *int64* | :heavy_check_mark: | The number of requests that exceeded the usage limit | 0 | \ No newline at end of file diff --git a/docs/sdks/keys/README.md b/docs/sdks/keys/README.md index 5154178..eb251a7 100644 --- a/docs/sdks/keys/README.md +++ b/docs/sdks/keys/README.md @@ -235,13 +235,13 @@ func main() { Ratelimits: []components.Ratelimits{ components.Ratelimits{ Name: "requests", - Limit: unkeygo.Float64(500), - Duration: unkeygo.Float64(3600000), + Limit: unkeygo.Int64(500), + Duration: unkeygo.Int64(3600000), }, components.Ratelimits{ Name: "tokens", - Limit: unkeygo.Float64(20000), - Duration: unkeygo.Float64(86400000), + Limit: unkeygo.Int64(20000), + Duration: unkeygo.Int64(86400000), }, }, } @@ -309,13 +309,13 @@ func main() { }, "stripeCustomerId": "cus_1234", }, - Expires: unkeygo.Float64(0), + Expires: unkeygo.Int64(0), Ratelimit: &operations.UpdateKeyRatelimit{ Limit: 10, RefillRate: unkeygo.Int64(1), RefillInterval: unkeygo.Int64(60), }, - Remaining: unkeygo.Float64(1000), + Remaining: unkeygo.Int64(1000), Refill: &operations.UpdateKeyRefill{ Interval: operations.UpdateKeyIntervalDaily, Amount: 100, diff --git a/models/components/key.go b/models/components/key.go index dc9644a..d9496d9 100644 --- a/models/components/key.go +++ b/models/components/key.go @@ -41,7 +41,7 @@ type Refill struct { // Resets `remaining` to this value every interval. Amount int64 `json:"amount"` // The unix timestamp in miliseconds when the key was last refilled. - LastRefillAt *float64 `json:"lastRefillAt,omitempty"` + LastRefillAt *int64 `json:"lastRefillAt,omitempty"` } func (o *Refill) GetInterval() Interval { @@ -58,7 +58,7 @@ func (o *Refill) GetAmount() int64 { return o.Amount } -func (o *Refill) GetLastRefillAt() *float64 { +func (o *Refill) GetLastRefillAt() *int64 { if o == nil { return nil } @@ -167,15 +167,15 @@ type Key struct { // Any additional metadata you want to store with the key Meta map[string]any `json:"meta,omitempty"` // The unix timestamp in milliseconds when the key was created - CreatedAt float64 `json:"createdAt"` + CreatedAt int64 `json:"createdAt"` // The unix timestamp in milliseconds when the key was last updated - UpdatedAt *float64 `json:"updatedAt,omitempty"` + UpdatedAt *int64 `json:"updatedAt,omitempty"` // The unix timestamp in milliseconds when the key was deleted. We don't delete the key outright, you can restore it later. - DeletedAt *float64 `json:"deletedAt,omitempty"` + DeletedAt *int64 `json:"deletedAt,omitempty"` // The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. - Expires *float64 `json:"expires,omitempty"` + Expires *int64 `json:"expires,omitempty"` // The number of requests that can be made with this key before it becomes invalid. If this field is null or undefined, the key has no request limit. - Remaining *float64 `json:"remaining,omitempty"` + Remaining *int64 `json:"remaining,omitempty"` // Unkey allows you to refill remaining verifications on a key on a regular interval. Refill *Refill `json:"refill,omitempty"` // Unkey comes with per-key ratelimiting out of the box. @@ -239,35 +239,35 @@ func (o *Key) GetMeta() map[string]any { return o.Meta } -func (o *Key) GetCreatedAt() float64 { +func (o *Key) GetCreatedAt() int64 { if o == nil { - return 0.0 + return 0 } return o.CreatedAt } -func (o *Key) GetUpdatedAt() *float64 { +func (o *Key) GetUpdatedAt() *int64 { if o == nil { return nil } return o.UpdatedAt } -func (o *Key) GetDeletedAt() *float64 { +func (o *Key) GetDeletedAt() *int64 { if o == nil { return nil } return o.DeletedAt } -func (o *Key) GetExpires() *float64 { +func (o *Key) GetExpires() *int64 { if o == nil { return nil } return o.Expires } -func (o *Key) GetRemaining() *float64 { +func (o *Key) GetRemaining() *int64 { if o == nil { return nil } diff --git a/models/components/v1keysverifykeyrequest.go b/models/components/v1keysverifykeyrequest.go index 3502f98..15cfc6d 100644 --- a/models/components/v1keysverifykeyrequest.go +++ b/models/components/v1keysverifykeyrequest.go @@ -51,9 +51,9 @@ type Ratelimits struct { // Optionally override how expensive this operation is and how many tokens are deducted from the current limit. Cost *int64 `default:"1" json:"cost"` // Optionally override the limit. - Limit *float64 `json:"limit,omitempty"` + Limit *int64 `json:"limit,omitempty"` // Optionally override the ratelimit window duration. - Duration *float64 `json:"duration,omitempty"` + Duration *int64 `json:"duration,omitempty"` } func (r Ratelimits) MarshalJSON() ([]byte, error) { @@ -81,14 +81,14 @@ func (o *Ratelimits) GetCost() *int64 { return o.Cost } -func (o *Ratelimits) GetLimit() *float64 { +func (o *Ratelimits) GetLimit() *int64 { if o == nil { return nil } return o.Limit } -func (o *Ratelimits) GetDuration() *float64 { +func (o *Ratelimits) GetDuration() *int64 { if o == nil { return nil } diff --git a/models/operations/createidentity.go b/models/operations/createidentity.go index d89e1f8..6874452 100644 --- a/models/operations/createidentity.go +++ b/models/operations/createidentity.go @@ -10,9 +10,9 @@ type Ratelimits struct { // The name of this limit. You will need to use this again when verifying a key. Name string `json:"name"` // How many requests may pass within a given window before requests are rejected. - Limit float64 `json:"limit"` + Limit int64 `json:"limit"` // The duration for each ratelimit window in milliseconds. - Duration float64 `json:"duration"` + Duration int64 `json:"duration"` } func (o *Ratelimits) GetName() string { @@ -22,16 +22,16 @@ func (o *Ratelimits) GetName() string { return o.Name } -func (o *Ratelimits) GetLimit() float64 { +func (o *Ratelimits) GetLimit() int64 { if o == nil { - return 0.0 + return 0 } return o.Limit } -func (o *Ratelimits) GetDuration() float64 { +func (o *Ratelimits) GetDuration() int64 { if o == nil { - return 0.0 + return 0 } return o.Duration } diff --git a/models/operations/deletekeys.go b/models/operations/deletekeys.go index 1dc3542..bff472f 100644 --- a/models/operations/deletekeys.go +++ b/models/operations/deletekeys.go @@ -42,12 +42,12 @@ func (o *DeleteKeysRequestBody) GetPermanent() *bool { // DeleteKeysResponseBody - The keys have been deleted type DeleteKeysResponseBody struct { // The number of keys that were deleted - DeletedKeys float64 `json:"deletedKeys"` + DeletedKeys int64 `json:"deletedKeys"` } -func (o *DeleteKeysResponseBody) GetDeletedKeys() float64 { +func (o *DeleteKeysResponseBody) GetDeletedKeys() int64 { if o == nil { - return 0.0 + return 0 } return o.DeletedKeys } diff --git a/models/operations/getidentity.go b/models/operations/getidentity.go index 6b90152..5e0eff4 100644 --- a/models/operations/getidentity.go +++ b/models/operations/getidentity.go @@ -29,9 +29,9 @@ type GetIdentityRatelimits struct { // The name of this limit. You will need to use this again when verifying a key. Name string `json:"name"` // How many requests may pass within a given window before requests are rejected. - Limit float64 `json:"limit"` + Limit int64 `json:"limit"` // The duration for each ratelimit window in milliseconds. - Duration float64 `json:"duration"` + Duration int64 `json:"duration"` } func (o *GetIdentityRatelimits) GetName() string { @@ -41,16 +41,16 @@ func (o *GetIdentityRatelimits) GetName() string { return o.Name } -func (o *GetIdentityRatelimits) GetLimit() float64 { +func (o *GetIdentityRatelimits) GetLimit() int64 { if o == nil { - return 0.0 + return 0 } return o.Limit } -func (o *GetIdentityRatelimits) GetDuration() float64 { +func (o *GetIdentityRatelimits) GetDuration() int64 { if o == nil { - return 0.0 + return 0 } return o.Duration } diff --git a/models/operations/getverifications.go b/models/operations/getverifications.go index f71d40b..6c86dab 100644 --- a/models/operations/getverifications.go +++ b/models/operations/getverifications.go @@ -92,11 +92,11 @@ type Verifications struct { // The timestamp of the usage data Time int64 `json:"time"` // The number of successful requests - Success float64 `json:"success"` + Success int64 `json:"success"` // The number of requests that were rate limited - RateLimited float64 `json:"rateLimited"` + RateLimited int64 `json:"rateLimited"` // The number of requests that exceeded the usage limit - UsageExceeded float64 `json:"usageExceeded"` + UsageExceeded int64 `json:"usageExceeded"` } func (o *Verifications) GetTime() int64 { @@ -106,23 +106,23 @@ func (o *Verifications) GetTime() int64 { return o.Time } -func (o *Verifications) GetSuccess() float64 { +func (o *Verifications) GetSuccess() int64 { if o == nil { - return 0.0 + return 0 } return o.Success } -func (o *Verifications) GetRateLimited() float64 { +func (o *Verifications) GetRateLimited() int64 { if o == nil { - return 0.0 + return 0 } return o.RateLimited } -func (o *Verifications) GetUsageExceeded() float64 { +func (o *Verifications) GetUsageExceeded() int64 { if o == nil { - return 0.0 + return 0 } return o.UsageExceeded } diff --git a/models/operations/listidentities.go b/models/operations/listidentities.go index e9c4fe6..ad3ef0a 100644 --- a/models/operations/listidentities.go +++ b/models/operations/listidentities.go @@ -49,9 +49,9 @@ type ListIdentitiesRatelimits struct { // The name of this limit. You will need to use this again when verifying a key. Name string `json:"name"` // How many requests may pass within a given window before requests are rejected. - Limit float64 `json:"limit"` + Limit int64 `json:"limit"` // The duration for each ratelimit window in milliseconds. - Duration float64 `json:"duration"` + Duration int64 `json:"duration"` } func (o *ListIdentitiesRatelimits) GetName() string { @@ -61,16 +61,16 @@ func (o *ListIdentitiesRatelimits) GetName() string { return o.Name } -func (o *ListIdentitiesRatelimits) GetLimit() float64 { +func (o *ListIdentitiesRatelimits) GetLimit() int64 { if o == nil { - return 0.0 + return 0 } return o.Limit } -func (o *ListIdentitiesRatelimits) GetDuration() float64 { +func (o *ListIdentitiesRatelimits) GetDuration() int64 { if o == nil { - return 0.0 + return 0 } return o.Duration } diff --git a/models/operations/updateidentity.go b/models/operations/updateidentity.go index 5be11be..4685992 100644 --- a/models/operations/updateidentity.go +++ b/models/operations/updateidentity.go @@ -11,9 +11,9 @@ type UpdateIdentityRatelimits struct { // The name of this limit. You will need to use this again when verifying a key. Name string `json:"name"` // How many requests may pass within a given window before requests are rejected. - Limit float64 `json:"limit"` + Limit int64 `json:"limit"` // The duration for each ratelimit window in milliseconds. - Duration float64 `json:"duration"` + Duration int64 `json:"duration"` } func (o *UpdateIdentityRatelimits) GetName() string { @@ -23,16 +23,16 @@ func (o *UpdateIdentityRatelimits) GetName() string { return o.Name } -func (o *UpdateIdentityRatelimits) GetLimit() float64 { +func (o *UpdateIdentityRatelimits) GetLimit() int64 { if o == nil { - return 0.0 + return 0 } return o.Limit } -func (o *UpdateIdentityRatelimits) GetDuration() float64 { +func (o *UpdateIdentityRatelimits) GetDuration() int64 { if o == nil { - return 0.0 + return 0 } return o.Duration } diff --git a/models/operations/updatekey.go b/models/operations/updatekey.go index f420c02..30a7641 100644 --- a/models/operations/updatekey.go +++ b/models/operations/updatekey.go @@ -244,11 +244,11 @@ type UpdateKeyRequestBody struct { // Any additional metadata you want to store with the key Meta map[string]any `json:"meta,omitempty"` // The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring. - Expires *float64 `json:"expires,omitempty"` + Expires *int64 `json:"expires,omitempty"` // Unkey comes with per-key ratelimiting out of the box. Set `null` to disable. Ratelimit *UpdateKeyRatelimit `json:"ratelimit,omitempty"` // The number of requests that can be made with this key before it becomes invalid. Set `null` to disable. - Remaining *float64 `json:"remaining,omitempty"` + Remaining *int64 `json:"remaining,omitempty"` // Unkey enables you to refill verifications for each key at regular intervals. Refill *UpdateKeyRefill `json:"refill,omitempty"` // Set if key is enabled or disabled. If disabled, the key cannot be used to verify. @@ -289,7 +289,7 @@ func (o *UpdateKeyRequestBody) GetMeta() map[string]any { return o.Meta } -func (o *UpdateKeyRequestBody) GetExpires() *float64 { +func (o *UpdateKeyRequestBody) GetExpires() *int64 { if o == nil { return nil } @@ -303,7 +303,7 @@ func (o *UpdateKeyRequestBody) GetRatelimit() *UpdateKeyRatelimit { return o.Ratelimit } -func (o *UpdateKeyRequestBody) GetRemaining() *float64 { +func (o *UpdateKeyRequestBody) GetRemaining() *int64 { if o == nil { return nil } diff --git a/unkey.go b/unkey.go index a8d4447..d3a368a 100644 --- a/unkey.go +++ b/unkey.go @@ -157,9 +157,9 @@ func New(opts ...SDKOption) *Unkey { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "1.0.0", - SDKVersion: "0.8.0", - GenVersion: "2.375.5", - UserAgent: "speakeasy-sdk/go 0.8.0 2.375.5 1.0.0 github.com/unkeyed/unkey-go", + SDKVersion: "0.8.1", + GenVersion: "2.376.2", + UserAgent: "speakeasy-sdk/go 0.8.1 2.376.2 1.0.0 github.com/unkeyed/unkey-go", Hooks: hooks.New(), }, }