diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index ace120f..567f583 100755
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: 4fc4737a-135f-4840-8e6d-42a2b2a2884b
management:
- docChecksum: 9ef18a373ab97ecd377d1039e3d02538
+ docChecksum: 3188b1c3a0851732a5d0f06231f3b62d
docVersion: 1.0.0
- speakeasyVersion: 1.296.1
- generationVersion: 2.338.1
- releaseVersion: 0.3.0
- configChecksum: 2498dd6a83123f53e18f3a1cf63243d3
+ speakeasyVersion: 1.299.6
+ generationVersion: 2.338.12
+ releaseVersion: 0.3.1
+ configChecksum: a9aa36dc0f0b5fa4a5fd7a8b4424246b
repoURL: https://github.com/unkeyed/unkey-go.git
installationURL: https://github.com/unkeyed/unkey-go
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
- core: 3.4.10
+ core: 3.4.11
deprecations: 2.81.1
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
@@ -63,6 +63,7 @@ generatedFiles:
- /models/operations/deletekeys.go
- /models/operations/limit.go
- /models/operations/v1migrationscreatekeys.go
+ - /models/operations/v1migrationsenqueuekeys.go
- /models/components/httpmetadata.go
- /models/components/key.go
- /models/components/v1keysverifykeyresponse.go
@@ -135,6 +136,16 @@ generatedFiles:
- docs/models/operations/requestbody.md
- docs/models/operations/v1migrationscreatekeysresponsebody.md
- docs/models/operations/v1migrationscreatekeysresponse.md
+ - docs/models/operations/v1migrationsenqueuekeysvariant.md
+ - docs/models/operations/v1migrationsenqueuekeyshash.md
+ - docs/models/operations/v1migrationsenqueuekeysinterval.md
+ - docs/models/operations/v1migrationsenqueuekeysrefill.md
+ - docs/models/operations/v1migrationsenqueuekeystype.md
+ - docs/models/operations/v1migrationsenqueuekeysratelimit.md
+ - docs/models/operations/keys.md
+ - docs/models/operations/v1migrationsenqueuekeysrequestbody.md
+ - docs/models/operations/v1migrationsenqueuekeysresponsebody.md
+ - docs/models/operations/v1migrationsenqueuekeysresponse.md
- docs/models/components/httpmetadata.md
- docs/models/components/interval.md
- docs/models/components/refill.md
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 126da07..6abf1f6 100755
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
- version: 0.3.0
+ version: 0.3.1
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 5eb1938..3c4871f 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,9 +1,9 @@
-speakeasyVersion: 1.296.1
+speakeasyVersion: 1.299.6
sources:
openapi.json:
sourceNamespace: openapi-json
- sourceRevisionDigest: sha256:05b10ec1f0babf41de0f75b23d22fb8832b0be7a230046afcda6632b38133871
- sourceBlobDigest: sha256:f8f5d1be63f97653cc910a7d31f5c89f65df52988c9fd4d1a303d7a5ecfaf4c1
+ sourceRevisionDigest: sha256:a2b5ad618b785ff72011e1081eedc6c8a8790b3447a31ad5ebad20c72acb2220
+ sourceBlobDigest: sha256:ba213955d102f59e4c11f384d41944a4d09ab26aea94f8bfb5cee29e0156e7f5
tags:
- latest
- main
@@ -11,8 +11,8 @@ targets:
go:
source: openapi.json
sourceNamespace: openapi-json
- sourceRevisionDigest: sha256:05b10ec1f0babf41de0f75b23d22fb8832b0be7a230046afcda6632b38133871
- sourceBlobDigest: sha256:f8f5d1be63f97653cc910a7d31f5c89f65df52988c9fd4d1a303d7a5ecfaf4c1
+ sourceRevisionDigest: sha256:a2b5ad618b785ff72011e1081eedc6c8a8790b3447a31ad5ebad20c72acb2220
+ sourceBlobDigest: sha256:ba213955d102f59e4c11f384d41944a4d09ab26aea94f8bfb5cee29e0156e7f5
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
diff --git a/README.md b/README.md
index dd3a3f2..d1dc617 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,7 @@ func main() {
### [Migrations](docs/sdks/migrations/README.md)
* [V1MigrationsCreateKeys](docs/sdks/migrations/README.md#v1migrationscreatekeys)
+* [V1MigrationsEnqueueKeys](docs/sdks/migrations/README.md#v1migrationsenqueuekeys)
diff --git a/RELEASES.md b/RELEASES.md
index 14da83a..2394318 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -48,4 +48,14 @@ Based on:
### Generated
- [go v0.3.0] .
### Releases
-- [Go v0.3.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.3.0 - .
\ No newline at end of file
+- [Go v0.3.0] https://github.com/unkeyed/unkey-go/releases/tag/v0.3.0 - .
+
+## 2024-06-04 12:28:53
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.299.6 (2.338.12) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [go v0.3.1] .
+### Releases
+- [Go v0.3.1] https://github.com/unkeyed/unkey-go/releases/tag/v0.3.1 - .
\ No newline at end of file
diff --git a/docs/models/components/v1keysverifykeyresponse.md b/docs/models/components/v1keysverifykeyresponse.md
index b80f0b0..e8d1105 100644
--- a/docs/models/components/v1keysverifykeyresponse.md
+++ b/docs/models/components/v1keysverifykeyresponse.md
@@ -10,9 +10,9 @@
| `Name` | **string* | :heavy_minus_sign: | The name of the key, give keys a name to easily identifiy 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"
} |
-| `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. | 123 |
+| `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. | 123 |
| `Ratelimit` | [*components.V1KeysVerifyKeyResponseRatelimit](../../models/components/v1keysverifykeyresponseratelimit.md) | :heavy_minus_sign: | The ratelimit configuration for this key. If this field is null or undefined, the key has no ratelimit. | {
"limit": 10,
"remaining": 9,
"reset": 3600000
} |
-| `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 |
+| `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 |
| `Code` | [components.Code](../../models/components/code.md) | :heavy_check_mark: | A machine readable code why the key is not valid.
Possible values are:
- VALID: the key is valid and you should proceed
- NOT_FOUND: the key does not exist or has expired
- FORBIDDEN: the key is not allowed to access the api
- USAGE_EXCEEDED: the key has exceeded its request limit
- RATE_LIMITED: the key has been ratelimited
- UNAUTHORIZED: the key is not authorized
- DISABLED: the key is disabled
- INSUFFICIENT_PERMISSIONS: you do not have the required permissions to perform this action
| |
| `Enabled` | **bool* | :heavy_minus_sign: | Sets the key to be enabled or disabled. Disabled keys will not verify. | |
| `Permissions` | []*string* | :heavy_minus_sign: | A list of all the permissions this key is connected to. | [
"dns.record.update",
"dns.record.delete"
] |
diff --git a/docs/models/components/v1keysverifykeyresponseratelimit.md b/docs/models/components/v1keysverifykeyresponseratelimit.md
index 73f6ef9..e5fe2cd 100644
--- a/docs/models/components/v1keysverifykeyresponseratelimit.md
+++ b/docs/models/components/v1keysverifykeyresponseratelimit.md
@@ -7,6 +7,6 @@ The ratelimit configuration for this key. If this field is null or undefined, th
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| `Limit` | *float64* | :heavy_check_mark: | Maximum number of requests that can be made inside a window | 10 |
-| `Remaining` | *float64* | :heavy_check_mark: | Remaining requests after this verification | 9 |
-| `Reset` | *float64* | :heavy_check_mark: | Unix timestamp in milliseconds when the ratelimit will reset | 3600000 |
\ No newline at end of file
+| `Limit` | *int64* | :heavy_check_mark: | Maximum number of requests that can be made inside a window | 10 |
+| `Remaining` | *int64* | :heavy_check_mark: | Remaining requests after this verification | 9 |
+| `Reset` | *int64* | :heavy_check_mark: | Unix timestamp in milliseconds when the ratelimit will reset | 3600000 |
\ No newline at end of file
diff --git a/docs/models/operations/createkeyrequestbody.md b/docs/models/operations/createkeyrequestbody.md
index 814c74b..e93b458 100644
--- a/docs/models/operations/createkeyrequestbody.md
+++ b/docs/models/operations/createkeyrequestbody.md
@@ -12,6 +12,7 @@
| `OwnerID` | **string* | :heavy_minus_sign: | Your user’s Id. This will provide a link between Unkey and your customer record.
When validating a key, we will return this back to you, so you can clearly identify your user from their api key. | team_123 |
| `Meta` | map[string]*any* | :heavy_minus_sign: | This is a place for dynamic meta data, anything that feels useful for you should go here | {
"billingTier": "PRO",
"trialEnds": "2023-06-16T17:16:37.161Z"
} |
| `Roles` | []*string* | :heavy_minus_sign: | A list of roles that this key should have. If the role does not exist, an error is thrown | [
"admin",
"finance"
] |
+| `Permissions` | []*string* | :heavy_minus_sign: | A list of permissions that this key should have. If the permission does not exist, an error is thrown | [
"domains.create_record",
"say_hello"
] |
| `Expires` | **int64* | :heavy_minus_sign: | You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again. | 1623869797161 |
| `Remaining` | **int64* | :heavy_minus_sign: | You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
[Learn more](https://unkey.dev/docs/features/remaining) | 1000 |
| `Refill` | [*operations.Refill](../../models/operations/refill.md) | :heavy_minus_sign: | Unkey enables you to refill verifications for each key at regular intervals. | {
"interval": "daily",
"amount": 100
} |
diff --git a/docs/models/operations/keys.md b/docs/models/operations/keys.md
new file mode 100644
index 0000000..419b9c8
--- /dev/null
+++ b/docs/models/operations/keys.md
@@ -0,0 +1,22 @@
+# Keys
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `Prefix` | **string* | :heavy_minus_sign: | To make it easier for your users to understand which product an api key belongs to, you can add prefix them.
For example Stripe famously prefixes their customer ids with cus_ or their api keys with sk_live_.
The underscore is automatically added if you are defining a prefix, for example: "prefix": "abc" will result in a key like abc_xxxxxxxxx
| |
+| `Name` | **string* | :heavy_minus_sign: | The name for your Key. This is not customer facing. | my key |
+| `Plaintext` | **string* | :heavy_minus_sign: | The raw key in plaintext. If provided, unkey encrypts this value and stores it securely. Provide either `hash` or `plaintext` | |
+| `Hash` | [*operations.V1MigrationsEnqueueKeysHash](../../models/operations/v1migrationsenqueuekeyshash.md) | :heavy_minus_sign: | Provide either `hash` or `plaintext` | |
+| `Start` | **string* | :heavy_minus_sign: | The first 4 characters of the key. If a prefix is used, it should be the prefix plus 4 characters. | unkey_32kq |
+| `OwnerID` | **string* | :heavy_minus_sign: | Your user’s Id. This will provide a link between Unkey and your customer record.
When validating a key, we will return this back to you, so you can clearly identify your user from their api key. | team_123 |
+| `Meta` | map[string]*any* | :heavy_minus_sign: | This is a place for dynamic meta data, anything that feels useful for you should go here | {
"billingTier": "PRO",
"trialEnds": "2023-06-16T17:16:37.161Z"
} |
+| `Roles` | []*string* | :heavy_minus_sign: | A list of roles that this key should have. If the role does not exist, an error is thrown | [
"admin",
"finance"
] |
+| `Permissions` | []*string* | :heavy_minus_sign: | A list of permissions that this key should have. If the permission does not exist, an error is thrown | [
"domains.create_record",
"say_hello"
] |
+| `Expires` | **int64* | :heavy_minus_sign: | You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again. | 1623869797161 |
+| `Remaining` | **int64* | :heavy_minus_sign: | You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
[Learn more](https://unkey.dev/docs/features/remaining) | 1000 |
+| `Refill` | [*operations.V1MigrationsEnqueueKeysRefill](../../models/operations/v1migrationsenqueuekeysrefill.md) | :heavy_minus_sign: | Unkey enables you to refill verifications for each key at regular intervals. | {
"interval": "daily",
"amount": 100
} |
+| `Ratelimit` | [*operations.V1MigrationsEnqueueKeysRatelimit](../../models/operations/v1migrationsenqueuekeysratelimit.md) | :heavy_minus_sign: | Unkey comes with per-key fixed-window ratelimiting out of the box. | {
"type": "fast",
"limit": 10,
"duration": 60000
} |
+| `Enabled` | **bool* | :heavy_minus_sign: | Sets if key is enabled or disabled. Disabled keys are not valid. | false |
+| `Environment` | **string* | :heavy_minus_sign: | Environments allow you to divide your keyspace.
Some applications like Stripe, Clerk, WorkOS and others have a concept of "live" and "test" keys to
give the developer a way to develop their own application without the risk of modifying real world
resources.
When you set an environment, we will return it back to you when validating the key, so you can
handle it correctly.
| |
\ No newline at end of file
diff --git a/docs/models/operations/limitrequestbody.md b/docs/models/operations/limitrequestbody.md
index d0cc724..3639ad2 100644
--- a/docs/models/operations/limitrequestbody.md
+++ b/docs/models/operations/limitrequestbody.md
@@ -3,13 +3,13 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `Namespace` | **string* | :heavy_minus_sign: | Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. | email.outbound |
-| `Identifier` | *string* | :heavy_check_mark: | Identifier of your user, this can be their userId, an email, an ip or anything else. | user_123 |
-| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass in a given window. | 10 |
-| `Duration` | *int64* | :heavy_check_mark: | The window duration in milliseconds | 60000 |
-| `Cost` | **int64* | :heavy_minus_sign: | Expensive requests may use up more tokens. You can specify a cost to the request here and we'll deduct this many tokens in the current window. If there are not enough tokens left, the request is denied. | 2 |
-| `Async` | **bool* | :heavy_minus_sign: | Async will return a response immediately, lowering latency at the cost of accuracy. | |
-| `Meta` | map[string]*any* | :heavy_minus_sign: | Attach any metadata to this request | |
-| `Resources` | [][operations.Resources](../../models/operations/resources.md) | :heavy_minus_sign: | Resources that are about to be accessed by the user | [
{
"type": "project",
"id": "p_123",
"name": "dub"
}
] |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `Namespace` | **string* | :heavy_minus_sign: | Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. | email.outbound |
+| `Identifier` | *string* | :heavy_check_mark: | Identifier of your user, this can be their userId, an email, an ip or anything else. | user_123 |
+| `Limit` | *int64* | :heavy_check_mark: | How many requests may pass in a given window. | 10 |
+| `Duration` | *int64* | :heavy_check_mark: | The window duration in milliseconds | 60000 |
+| `Cost` | **int64* | :heavy_minus_sign: | Expensive requests may use up more tokens. You can specify a cost to the request here and we'll deduct this many tokens in the current window.
If there are not enough tokens left, the request is denied.
Set it to 0 to receive the current limit without changing anything. | 2 |
+| `Async` | **bool* | :heavy_minus_sign: | Async will return a response immediately, lowering latency at the cost of accuracy. | |
+| `Meta` | map[string]*any* | :heavy_minus_sign: | Attach any metadata to this request | |
+| `Resources` | [][operations.Resources](../../models/operations/resources.md) | :heavy_minus_sign: | Resources that are about to be accessed by the user | [
{
"type": "project",
"id": "p_123",
"name": "dub"
}
] |
\ No newline at end of file
diff --git a/docs/models/operations/limitresponsebody.md b/docs/models/operations/limitresponsebody.md
index 5bf52c0..fd1f866 100644
--- a/docs/models/operations/limitresponsebody.md
+++ b/docs/models/operations/limitresponsebody.md
@@ -6,6 +6,6 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `Success` | *bool* | :heavy_check_mark: | Returns true if the request should be processed, false if it was rejected. | true |
-| `Limit` | *float64* | :heavy_check_mark: | How many requests are allowed within a window. | 10 |
-| `Remaining` | *float64* | :heavy_check_mark: | How many requests can still be made in the current window. | 9 |
-| `Reset` | *float64* | :heavy_check_mark: | A unix millisecond timestamp when the limits reset. | 1709804263654 |
\ No newline at end of file
+| `Limit` | *int64* | :heavy_check_mark: | How many requests are allowed within a window. | 10 |
+| `Remaining` | *int64* | :heavy_check_mark: | How many requests can still be made in the current window. | 9 |
+| `Reset` | *int64* | :heavy_check_mark: | A unix millisecond timestamp when the limits reset. | 1709804263654 |
\ No newline at end of file
diff --git a/docs/models/operations/ratelimit.md b/docs/models/operations/ratelimit.md
index 87c5b11..eaa05f3 100644
--- a/docs/models/operations/ratelimit.md
+++ b/docs/models/operations/ratelimit.md
@@ -7,9 +7,9 @@ Unkey comes with per-key fixed-window ratelimiting out of the box.
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `Async` | **bool* | :heavy_minus_sign: | Async will return a response immediately, lowering latency at the cost of accuracy.
[Learn more](https://unkey.dev/docs/features/ratelimiting) | |
+| `Async` | **bool* | :heavy_minus_sign: | Async will return a response immediately, lowering latency at the cost of accuracy. Will be required soon.
[Learn more](https://unkey.dev/docs/features/ratelimiting) | |
| ~~`Type`~~ | [*operations.Type](../../models/operations/type.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated, used `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
[Learn more](https://unkey.dev/docs/features/ratelimiting) | |
| `Limit` | *int64* | :heavy_check_mark: | The total amount of requests in a given interval. | |
-| `Duration` | *int64* | :heavy_check_mark: | The window duration in milliseconds | 60000 |
+| `Duration` | **int64* | :heavy_minus_sign: | The window duration in milliseconds. Will be required soon. | 60000 |
| ~~`RefillRate`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
How many tokens to refill during each refillInterval. | |
| ~~`RefillInterval`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
The refill timeframe, in milliseconds. | |
\ No newline at end of file
diff --git a/docs/models/operations/requestbody.md b/docs/models/operations/requestbody.md
index 1b0a47c..fb2becb 100644
--- a/docs/models/operations/requestbody.md
+++ b/docs/models/operations/requestbody.md
@@ -14,6 +14,7 @@
| `OwnerID` | **string* | :heavy_minus_sign: | Your user’s Id. This will provide a link between Unkey and your customer record.
When validating a key, we will return this back to you, so you can clearly identify your user from their api key. | team_123 |
| `Meta` | map[string]*any* | :heavy_minus_sign: | This is a place for dynamic meta data, anything that feels useful for you should go here | {
"billingTier": "PRO",
"trialEnds": "2023-06-16T17:16:37.161Z"
} |
| `Roles` | []*string* | :heavy_minus_sign: | A list of roles that this key should have. If the role does not exist, an error is thrown | [
"admin",
"finance"
] |
+| `Permissions` | []*string* | :heavy_minus_sign: | A list of permissions that this key should have. If the permission does not exist, an error is thrown | [
"domains.create_record",
"say_hello"
] |
| `Expires` | **int64* | :heavy_minus_sign: | You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again. | 1623869797161 |
| `Remaining` | **int64* | :heavy_minus_sign: | You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
[Learn more](https://unkey.dev/docs/features/remaining) | 1000 |
| `Refill` | [*operations.V1MigrationsCreateKeysRefill](../../models/operations/v1migrationscreatekeysrefill.md) | :heavy_minus_sign: | Unkey enables you to refill verifications for each key at regular intervals. | {
"interval": "daily",
"amount": 100
} |
diff --git a/docs/models/operations/v1migrationsenqueuekeyshash.md b/docs/models/operations/v1migrationsenqueuekeyshash.md
new file mode 100644
index 0000000..7246866
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeyshash.md
@@ -0,0 +1,11 @@
+# V1MigrationsEnqueueKeysHash
+
+Provide either `hash` or `plaintext`
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
+| `Value` | *string* | :heavy_check_mark: | The hashed and encoded key |
+| `Variant` | [operations.V1MigrationsEnqueueKeysVariant](../../models/operations/v1migrationsenqueuekeysvariant.md) | :heavy_check_mark: | The algorithm for hashing and encoding, currently only sha256 and base64 are supported |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysinterval.md b/docs/models/operations/v1migrationsenqueuekeysinterval.md
new file mode 100644
index 0000000..aac3363
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysinterval.md
@@ -0,0 +1,11 @@
+# V1MigrationsEnqueueKeysInterval
+
+Unkey will automatically refill verifications at the set interval.
+
+
+## Values
+
+| Name | Value |
+| ---------------------------------------- | ---------------------------------------- |
+| `V1MigrationsEnqueueKeysIntervalDaily` | daily |
+| `V1MigrationsEnqueueKeysIntervalMonthly` | monthly |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysratelimit.md b/docs/models/operations/v1migrationsenqueuekeysratelimit.md
new file mode 100644
index 0000000..a49618b
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysratelimit.md
@@ -0,0 +1,15 @@
+# V1MigrationsEnqueueKeysRatelimit
+
+Unkey comes with per-key fixed-window ratelimiting out of the box.
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `Async` | **bool* | :heavy_minus_sign: | Async will return a response immediately, lowering latency at the cost of accuracy.
[Learn more](https://unkey.dev/docs/features/ratelimiting) | |
+| ~~`Type`~~ | [*operations.V1MigrationsEnqueueKeysType](../../models/operations/v1migrationsenqueuekeystype.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
Deprecated, use `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
[Learn more](https://unkey.dev/docs/features/ratelimiting) | |
+| `Limit` | *int64* | :heavy_check_mark: | The total amount of requests in a given interval. | |
+| `Duration` | *int64* | :heavy_check_mark: | The window duration in milliseconds | 60000 |
+| ~~`RefillRate`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
How many tokens to refill during each refillInterval. | |
+| ~~`RefillInterval`~~ | **int64* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
The refill timeframe, in milliseconds. | |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysrefill.md b/docs/models/operations/v1migrationsenqueuekeysrefill.md
new file mode 100644
index 0000000..ca8276e
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysrefill.md
@@ -0,0 +1,11 @@
+# V1MigrationsEnqueueKeysRefill
+
+Unkey enables you to refill verifications for each key at regular intervals.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
+| `Interval` | [operations.V1MigrationsEnqueueKeysInterval](../../models/operations/v1migrationsenqueuekeysinterval.md) | :heavy_check_mark: | Unkey will automatically refill verifications at the set interval. |
+| `Amount` | *int64* | :heavy_check_mark: | The number of verifications to refill for each occurrence is determined individually for each key. |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysrequestbody.md b/docs/models/operations/v1migrationsenqueuekeysrequestbody.md
new file mode 100644
index 0000000..f7c35f3
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysrequestbody.md
@@ -0,0 +1,10 @@
+# V1MigrationsEnqueueKeysRequestBody
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
+| `MigrationID` | *string* | :heavy_check_mark: | Contact support@unkey.dev to receive your migration id. |
+| `APIID` | *string* | :heavy_check_mark: | The id of the api, you want to migrate keys to |
+| `Keys` | [][operations.Keys](../../models/operations/keys.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysresponse.md b/docs/models/operations/v1migrationsenqueuekeysresponse.md
new file mode 100644
index 0000000..8d944c6
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysresponse.md
@@ -0,0 +1,9 @@
+# V1MigrationsEnqueueKeysResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
+| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
+| `Object` | [*operations.V1MigrationsEnqueueKeysResponseBody](../../models/operations/v1migrationsenqueuekeysresponsebody.md) | :heavy_minus_sign: | The key ids of all created keys |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysresponsebody.md b/docs/models/operations/v1migrationsenqueuekeysresponsebody.md
new file mode 100644
index 0000000..53d4984
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysresponsebody.md
@@ -0,0 +1,9 @@
+# V1MigrationsEnqueueKeysResponseBody
+
+The key ids of all created keys
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------- | ----------- | ----------- | ----------- |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeystype.md b/docs/models/operations/v1migrationsenqueuekeystype.md
new file mode 100644
index 0000000..de1256c
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeystype.md
@@ -0,0 +1,16 @@
+# ~~V1MigrationsEnqueueKeysType~~
+
+Deprecated, use `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
+
+Learn more
+
+
+> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
+
+
+## Values
+
+| Name | Value |
+| --------------------------------------- | --------------------------------------- |
+| `V1MigrationsEnqueueKeysTypeFast` | fast |
+| `V1MigrationsEnqueueKeysTypeConsistent` | consistent |
\ No newline at end of file
diff --git a/docs/models/operations/v1migrationsenqueuekeysvariant.md b/docs/models/operations/v1migrationsenqueuekeysvariant.md
new file mode 100644
index 0000000..1b33f37
--- /dev/null
+++ b/docs/models/operations/v1migrationsenqueuekeysvariant.md
@@ -0,0 +1,10 @@
+# V1MigrationsEnqueueKeysVariant
+
+The algorithm for hashing and encoding, currently only sha256 and base64 are supported
+
+
+## Values
+
+| Name | Value |
+| -------------------------------------------- | -------------------------------------------- |
+| `V1MigrationsEnqueueKeysVariantSha256Base64` | sha256_base64 |
\ No newline at end of file
diff --git a/docs/sdks/keys/README.md b/docs/sdks/keys/README.md
index 06ac4dc..449adcf 100644
--- a/docs/sdks/keys/README.md
+++ b/docs/sdks/keys/README.md
@@ -149,6 +149,10 @@ func main() {
"admin",
"finance",
},
+ Permissions: []string{
+ "domains.create_record",
+ "say_hello",
+ },
Expires: unkeygo.Int64(1623869797161),
Remaining: unkeygo.Int64(1000),
Refill: &operations.Refill{
@@ -157,7 +161,7 @@ func main() {
},
Ratelimit: &operations.Ratelimit{
Limit: 10,
- Duration: 60000,
+ Duration: unkeygo.Int64(60000),
},
Enabled: unkeygo.Bool(false),
}
diff --git a/docs/sdks/migrations/README.md b/docs/sdks/migrations/README.md
index 67e3f33..d1d0412 100644
--- a/docs/sdks/migrations/README.md
+++ b/docs/sdks/migrations/README.md
@@ -4,6 +4,7 @@
### Available Operations
* [V1MigrationsCreateKeys](#v1migrationscreatekeys)
+* [V1MigrationsEnqueueKeys](#v1migrationsenqueuekeys)
## V1MigrationsCreateKeys
@@ -37,6 +38,10 @@ func main() {
"admin",
"finance",
},
+ Permissions: []string{
+ "domains.create_record",
+ "say_hello",
+ },
Expires: unkeygo.Int64(1623869797161),
Remaining: unkeygo.Int64(1000),
Refill: &operations.V1MigrationsCreateKeysRefill{
@@ -83,3 +88,88 @@ func main() {
| sdkerrors.ErrTooManyRequests | 429 | application/json |
| sdkerrors.ErrInternalServerError | 500 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |
+
+## V1MigrationsEnqueueKeys
+
+### Example Usage
+
+```go
+package main
+
+import(
+ unkeygo "github.com/unkeyed/unkey-go"
+ "github.com/unkeyed/unkey-go/models/operations"
+ "context"
+ "log"
+)
+
+func main() {
+ s := unkeygo.New(
+ unkeygo.WithSecurity(""),
+ )
+ request := operations.V1MigrationsEnqueueKeysRequestBody{
+ MigrationID: "",
+ APIID: "",
+ Keys: []operations.Keys{
+ operations.Keys{
+ Name: unkeygo.String("my key"),
+ Start: unkeygo.String("unkey_32kq"),
+ OwnerID: unkeygo.String("team_123"),
+ Meta: map[string]any{
+ "billingTier": "PRO",
+ "trialEnds": "2023-06-16T17:16:37.161Z",
+ },
+ Roles: []string{
+ "admin",
+ "finance",
+ },
+ Permissions: []string{
+ "domains.create_record",
+ "say_hello",
+ },
+ Expires: unkeygo.Int64(1623869797161),
+ Remaining: unkeygo.Int64(1000),
+ Refill: &operations.V1MigrationsEnqueueKeysRefill{
+ Interval: operations.V1MigrationsEnqueueKeysIntervalDaily,
+ Amount: 100,
+ },
+ Ratelimit: &operations.V1MigrationsEnqueueKeysRatelimit{
+ Limit: 10,
+ Duration: 60000,
+ },
+ Enabled: unkeygo.Bool(false),
+ },
+ },
+ }
+ ctx := context.Background()
+ res, err := s.Migrations.V1MigrationsEnqueueKeys(ctx, request)
+ if err != nil {
+ log.Fatal(err)
+ }
+ if res.Object != nil {
+ // handle response
+ }
+}
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
+| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
+| `request` | [operations.V1MigrationsEnqueueKeysRequestBody](../../models/operations/v1migrationsenqueuekeysrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[*operations.V1MigrationsEnqueueKeysResponse](../../models/operations/v1migrationsenqueuekeysresponse.md), error**
+| Error Object | Status Code | Content Type |
+| -------------------------------- | -------------------------------- | -------------------------------- |
+| sdkerrors.ErrBadRequest | 400 | application/json |
+| sdkerrors.ErrUnauthorized | 401 | application/json |
+| sdkerrors.ErrForbidden | 403 | application/json |
+| sdkerrors.ErrNotFound | 404 | application/json |
+| sdkerrors.ErrConflict | 409 | application/json |
+| sdkerrors.ErrTooManyRequests | 429 | application/json |
+| sdkerrors.ErrInternalServerError | 500 | application/json |
+| sdkerrors.SDKError | 4xx-5xx | */* |
diff --git a/migrations.go b/migrations.go
index cc4c01b..28f712c 100644
--- a/migrations.go
+++ b/migrations.go
@@ -208,3 +208,186 @@ func (s *Migrations) V1MigrationsCreateKeys(ctx context.Context, request []opera
return res, nil
}
+
+func (s *Migrations) V1MigrationsEnqueueKeys(ctx context.Context, request operations.V1MigrationsEnqueueKeysRequestBody) (*operations.V1MigrationsEnqueueKeysResponse, error) {
+ hookCtx := hooks.HookContext{
+ Context: ctx,
+ OperationID: "v1.migrations.enqueueKeys",
+ OAuth2Scopes: []string{},
+ SecuritySource: s.sdkConfiguration.Security,
+ }
+
+ baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
+ opURL, err := url.JoinPath(baseURL, "/v1/migrations.enqueueKeys")
+ if err != nil {
+ return nil, fmt.Errorf("error generating URL: %w", err)
+ }
+
+ bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
+ if err != nil {
+ return nil, fmt.Errorf("error creating request: %w", err)
+ }
+ req.Header.Set("Accept", "application/json")
+ req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
+ req.Header.Set("Content-Type", reqContentType)
+
+ if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
+ return nil, err
+ }
+
+ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
+ if err != nil {
+ return nil, err
+ }
+
+ httpRes, err := s.sdkConfiguration.Client.Do(req)
+ if err != nil || httpRes == nil {
+ if err != nil {
+ err = fmt.Errorf("error sending request: %w", err)
+ } else {
+ err = fmt.Errorf("error sending request: no response")
+ }
+
+ _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
+ return nil, err
+ } else if utils.MatchStatusCodes([]string{"400", "401", "403", "404", "409", "429", "4XX", "500", "5XX"}, httpRes.StatusCode) {
+ _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
+ if err != nil {
+ return nil, err
+ } else if _httpRes != nil {
+ httpRes = _httpRes
+ }
+ } else {
+ httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ res := &operations.V1MigrationsEnqueueKeysResponse{
+ HTTPMeta: components.HTTPMetadata{
+ Request: req,
+ Response: httpRes,
+ },
+ }
+
+ rawBody, err := io.ReadAll(httpRes.Body)
+ if err != nil {
+ return nil, fmt.Errorf("error reading response body: %w", err)
+ }
+ httpRes.Body.Close()
+ httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
+
+ switch {
+ case httpRes.StatusCode == 202:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out operations.V1MigrationsEnqueueKeysResponseBody
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ res.Object = &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 400:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrBadRequest
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 401:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrUnauthorized
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 403:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrForbidden
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 404:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrNotFound
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 409:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrConflict
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode == 429:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrTooManyRequests
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
+ fallthrough
+ case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
+ return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
+ case httpRes.StatusCode == 500:
+ switch {
+ case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
+ var out sdkerrors.ErrInternalServerError
+ if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
+ return nil, err
+ }
+
+ return nil, &out
+ default:
+ return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
+ }
+ default:
+ return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
+ }
+
+ return res, nil
+
+}
diff --git a/models/components/v1keysverifykeyresponse.go b/models/components/v1keysverifykeyresponse.go
index 69b3236..3c7adfd 100644
--- a/models/components/v1keysverifykeyresponse.go
+++ b/models/components/v1keysverifykeyresponse.go
@@ -10,30 +10,30 @@ import (
// V1KeysVerifyKeyResponseRatelimit - The ratelimit configuration for this key. If this field is null or undefined, the key has no ratelimit.
type V1KeysVerifyKeyResponseRatelimit struct {
// Maximum number of requests that can be made inside a window
- Limit float64 `json:"limit"`
+ Limit int64 `json:"limit"`
// Remaining requests after this verification
- Remaining float64 `json:"remaining"`
+ Remaining int64 `json:"remaining"`
// Unix timestamp in milliseconds when the ratelimit will reset
- Reset float64 `json:"reset"`
+ Reset int64 `json:"reset"`
}
-func (o *V1KeysVerifyKeyResponseRatelimit) GetLimit() float64 {
+func (o *V1KeysVerifyKeyResponseRatelimit) GetLimit() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Limit
}
-func (o *V1KeysVerifyKeyResponseRatelimit) GetRemaining() float64 {
+func (o *V1KeysVerifyKeyResponseRatelimit) GetRemaining() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Remaining
}
-func (o *V1KeysVerifyKeyResponseRatelimit) GetReset() float64 {
+func (o *V1KeysVerifyKeyResponseRatelimit) GetReset() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Reset
}
@@ -105,11 +105,11 @@ type V1KeysVerifyKeyResponse 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"`
// The ratelimit configuration for this key. If this field is null or undefined, the key has no ratelimit.
Ratelimit *V1KeysVerifyKeyResponseRatelimit `json:"ratelimit,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"`
// A machine readable code why the key is not valid.
// Possible values are:
// - VALID: the key is valid and you should proceed
@@ -165,7 +165,7 @@ func (o *V1KeysVerifyKeyResponse) GetMeta() map[string]any {
return o.Meta
}
-func (o *V1KeysVerifyKeyResponse) GetExpires() *float64 {
+func (o *V1KeysVerifyKeyResponse) GetExpires() *int64 {
if o == nil {
return nil
}
@@ -179,7 +179,7 @@ func (o *V1KeysVerifyKeyResponse) GetRatelimit() *V1KeysVerifyKeyResponseRatelim
return o.Ratelimit
}
-func (o *V1KeysVerifyKeyResponse) GetRemaining() *float64 {
+func (o *V1KeysVerifyKeyResponse) GetRemaining() *int64 {
if o == nil {
return nil
}
diff --git a/models/operations/createkey.go b/models/operations/createkey.go
index ed0b7d6..8117b68 100644
--- a/models/operations/createkey.go
+++ b/models/operations/createkey.go
@@ -91,16 +91,16 @@ func (e *Type) UnmarshalJSON(data []byte) error {
// Ratelimit - Unkey comes with per-key fixed-window ratelimiting out of the box.
type Ratelimit struct {
- // Async will return a response immediately, lowering latency at the cost of accuracy.
- Async *bool `default:"false" json:"async"`
+ // Async will return a response immediately, lowering latency at the cost of accuracy. Will be required soon.
+ Async *bool `default:"true" json:"async"`
// Deprecated, used `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
//
// Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
Type *Type `default:"fast" json:"type"`
// The total amount of requests in a given interval.
Limit int64 `json:"limit"`
- // The window duration in milliseconds
- Duration int64 `json:"duration"`
+ // The window duration in milliseconds. Will be required soon.
+ Duration *int64 `json:"duration,omitempty"`
// How many tokens to refill during each refillInterval.
//
// Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
@@ -143,9 +143,9 @@ func (o *Ratelimit) GetLimit() int64 {
return o.Limit
}
-func (o *Ratelimit) GetDuration() int64 {
+func (o *Ratelimit) GetDuration() *int64 {
if o == nil {
- return 0
+ return nil
}
return o.Duration
}
@@ -185,6 +185,8 @@ type CreateKeyRequestBody struct {
Meta map[string]any `json:"meta,omitempty"`
// A list of roles that this key should have. If the role does not exist, an error is thrown
Roles []string `json:"roles,omitempty"`
+ // A list of permissions that this key should have. If the permission does not exist, an error is thrown
+ Permissions []string `json:"permissions,omitempty"`
// You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again.
Expires *int64 `json:"expires,omitempty"`
// You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
@@ -267,6 +269,13 @@ func (o *CreateKeyRequestBody) GetRoles() []string {
return o.Roles
}
+func (o *CreateKeyRequestBody) GetPermissions() []string {
+ if o == nil {
+ return nil
+ }
+ return o.Permissions
+}
+
func (o *CreateKeyRequestBody) GetExpires() *int64 {
if o == nil {
return nil
diff --git a/models/operations/limit.go b/models/operations/limit.go
index c75c543..0ee0cb0 100644
--- a/models/operations/limit.go
+++ b/models/operations/limit.go
@@ -55,7 +55,10 @@ type LimitRequestBody struct {
Limit int64 `json:"limit"`
// The window duration in milliseconds
Duration int64 `json:"duration"`
- // Expensive requests may use up more tokens. You can specify a cost to the request here and we'll deduct this many tokens in the current window. If there are not enough tokens left, the request is denied.
+ // Expensive requests may use up more tokens. You can specify a cost to the request here and we'll deduct this many tokens in the current window.
+ // If there are not enough tokens left, the request is denied.
+ //
+ // Set it to 0 to receive the current limit without changing anything.
Cost *int64 `default:"1" json:"cost"`
// Async will return a response immediately, lowering latency at the cost of accuracy.
Async *bool `default:"false" json:"async"`
@@ -136,11 +139,11 @@ type LimitResponseBody struct {
// Returns true if the request should be processed, false if it was rejected.
Success bool `json:"success"`
// How many requests are allowed within a window.
- Limit float64 `json:"limit"`
+ Limit int64 `json:"limit"`
// How many requests can still be made in the current window.
- Remaining float64 `json:"remaining"`
+ Remaining int64 `json:"remaining"`
// A unix millisecond timestamp when the limits reset.
- Reset float64 `json:"reset"`
+ Reset int64 `json:"reset"`
}
func (o *LimitResponseBody) GetSuccess() bool {
@@ -150,23 +153,23 @@ func (o *LimitResponseBody) GetSuccess() bool {
return o.Success
}
-func (o *LimitResponseBody) GetLimit() float64 {
+func (o *LimitResponseBody) GetLimit() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Limit
}
-func (o *LimitResponseBody) GetRemaining() float64 {
+func (o *LimitResponseBody) GetRemaining() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Remaining
}
-func (o *LimitResponseBody) GetReset() float64 {
+func (o *LimitResponseBody) GetReset() int64 {
if o == nil {
- return 0.0
+ return 0
}
return o.Reset
}
diff --git a/models/operations/v1migrationscreatekeys.go b/models/operations/v1migrationscreatekeys.go
index 039a767..a40e6a7 100644
--- a/models/operations/v1migrationscreatekeys.go
+++ b/models/operations/v1migrationscreatekeys.go
@@ -226,6 +226,8 @@ type RequestBody struct {
Meta map[string]any `json:"meta,omitempty"`
// A list of roles that this key should have. If the role does not exist, an error is thrown
Roles []string `json:"roles,omitempty"`
+ // A list of permissions that this key should have. If the permission does not exist, an error is thrown
+ Permissions []string `json:"permissions,omitempty"`
// You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again.
Expires *int64 `json:"expires,omitempty"`
// You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
@@ -322,6 +324,13 @@ func (o *RequestBody) GetRoles() []string {
return o.Roles
}
+func (o *RequestBody) GetPermissions() []string {
+ if o == nil {
+ return nil
+ }
+ return o.Permissions
+}
+
func (o *RequestBody) GetExpires() *int64 {
if o == nil {
return nil
diff --git a/models/operations/v1migrationsenqueuekeys.go b/models/operations/v1migrationsenqueuekeys.go
new file mode 100644
index 0000000..352297b
--- /dev/null
+++ b/models/operations/v1migrationsenqueuekeys.go
@@ -0,0 +1,427 @@
+// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
+
+package operations
+
+import (
+ "encoding/json"
+ "fmt"
+ "github.com/unkeyed/unkey-go/internal/utils"
+ "github.com/unkeyed/unkey-go/models/components"
+)
+
+// V1MigrationsEnqueueKeysVariant - The algorithm for hashing and encoding, currently only sha256 and base64 are supported
+type V1MigrationsEnqueueKeysVariant string
+
+const (
+ V1MigrationsEnqueueKeysVariantSha256Base64 V1MigrationsEnqueueKeysVariant = "sha256_base64"
+)
+
+func (e V1MigrationsEnqueueKeysVariant) ToPointer() *V1MigrationsEnqueueKeysVariant {
+ return &e
+}
+func (e *V1MigrationsEnqueueKeysVariant) UnmarshalJSON(data []byte) error {
+ var v string
+ if err := json.Unmarshal(data, &v); err != nil {
+ return err
+ }
+ switch v {
+ case "sha256_base64":
+ *e = V1MigrationsEnqueueKeysVariant(v)
+ return nil
+ default:
+ return fmt.Errorf("invalid value for V1MigrationsEnqueueKeysVariant: %v", v)
+ }
+}
+
+// V1MigrationsEnqueueKeysHash - Provide either `hash` or `plaintext`
+type V1MigrationsEnqueueKeysHash struct {
+ // The hashed and encoded key
+ Value string `json:"value"`
+ // The algorithm for hashing and encoding, currently only sha256 and base64 are supported
+ Variant V1MigrationsEnqueueKeysVariant `json:"variant"`
+}
+
+func (o *V1MigrationsEnqueueKeysHash) GetValue() string {
+ if o == nil {
+ return ""
+ }
+ return o.Value
+}
+
+func (o *V1MigrationsEnqueueKeysHash) GetVariant() V1MigrationsEnqueueKeysVariant {
+ if o == nil {
+ return V1MigrationsEnqueueKeysVariant("")
+ }
+ return o.Variant
+}
+
+// V1MigrationsEnqueueKeysInterval - Unkey will automatically refill verifications at the set interval.
+type V1MigrationsEnqueueKeysInterval string
+
+const (
+ V1MigrationsEnqueueKeysIntervalDaily V1MigrationsEnqueueKeysInterval = "daily"
+ V1MigrationsEnqueueKeysIntervalMonthly V1MigrationsEnqueueKeysInterval = "monthly"
+)
+
+func (e V1MigrationsEnqueueKeysInterval) ToPointer() *V1MigrationsEnqueueKeysInterval {
+ return &e
+}
+func (e *V1MigrationsEnqueueKeysInterval) UnmarshalJSON(data []byte) error {
+ var v string
+ if err := json.Unmarshal(data, &v); err != nil {
+ return err
+ }
+ switch v {
+ case "daily":
+ fallthrough
+ case "monthly":
+ *e = V1MigrationsEnqueueKeysInterval(v)
+ return nil
+ default:
+ return fmt.Errorf("invalid value for V1MigrationsEnqueueKeysInterval: %v", v)
+ }
+}
+
+// V1MigrationsEnqueueKeysRefill - Unkey enables you to refill verifications for each key at regular intervals.
+type V1MigrationsEnqueueKeysRefill struct {
+ // Unkey will automatically refill verifications at the set interval.
+ Interval V1MigrationsEnqueueKeysInterval `json:"interval"`
+ // The number of verifications to refill for each occurrence is determined individually for each key.
+ Amount int64 `json:"amount"`
+}
+
+func (o *V1MigrationsEnqueueKeysRefill) GetInterval() V1MigrationsEnqueueKeysInterval {
+ if o == nil {
+ return V1MigrationsEnqueueKeysInterval("")
+ }
+ return o.Interval
+}
+
+func (o *V1MigrationsEnqueueKeysRefill) GetAmount() int64 {
+ if o == nil {
+ return 0
+ }
+ return o.Amount
+}
+
+// V1MigrationsEnqueueKeysType - Deprecated, use `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
+//
+// https://unkey.dev/docs/features/ratelimiting - Learn more
+//
+// Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
+type V1MigrationsEnqueueKeysType string
+
+const (
+ V1MigrationsEnqueueKeysTypeFast V1MigrationsEnqueueKeysType = "fast"
+ V1MigrationsEnqueueKeysTypeConsistent V1MigrationsEnqueueKeysType = "consistent"
+)
+
+func (e V1MigrationsEnqueueKeysType) ToPointer() *V1MigrationsEnqueueKeysType {
+ return &e
+}
+func (e *V1MigrationsEnqueueKeysType) UnmarshalJSON(data []byte) error {
+ var v string
+ if err := json.Unmarshal(data, &v); err != nil {
+ return err
+ }
+ switch v {
+ case "fast":
+ fallthrough
+ case "consistent":
+ *e = V1MigrationsEnqueueKeysType(v)
+ return nil
+ default:
+ return fmt.Errorf("invalid value for V1MigrationsEnqueueKeysType: %v", v)
+ }
+}
+
+// V1MigrationsEnqueueKeysRatelimit - Unkey comes with per-key fixed-window ratelimiting out of the box.
+type V1MigrationsEnqueueKeysRatelimit struct {
+ // Async will return a response immediately, lowering latency at the cost of accuracy.
+ Async *bool `default:"true" json:"async"`
+ // Deprecated, use `async`. Fast ratelimiting doesn't add latency, while consistent ratelimiting is more accurate.
+ //
+ // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ Type *V1MigrationsEnqueueKeysType `default:"fast" json:"type"`
+ // The total amount of requests in a given interval.
+ Limit int64 `json:"limit"`
+ // The window duration in milliseconds
+ Duration int64 `json:"duration"`
+ // How many tokens to refill during each refillInterval.
+ //
+ // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ RefillRate *int64 `json:"refillRate,omitempty"`
+ // The refill timeframe, in milliseconds.
+ //
+ // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
+ RefillInterval *int64 `json:"refillInterval,omitempty"`
+}
+
+func (v V1MigrationsEnqueueKeysRatelimit) MarshalJSON() ([]byte, error) {
+ return utils.MarshalJSON(v, "", false)
+}
+
+func (v *V1MigrationsEnqueueKeysRatelimit) UnmarshalJSON(data []byte) error {
+ if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetAsync() *bool {
+ if o == nil {
+ return nil
+ }
+ return o.Async
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetType() *V1MigrationsEnqueueKeysType {
+ if o == nil {
+ return nil
+ }
+ return o.Type
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetLimit() int64 {
+ if o == nil {
+ return 0
+ }
+ return o.Limit
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetDuration() int64 {
+ if o == nil {
+ return 0
+ }
+ return o.Duration
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetRefillRate() *int64 {
+ if o == nil {
+ return nil
+ }
+ return o.RefillRate
+}
+
+func (o *V1MigrationsEnqueueKeysRatelimit) GetRefillInterval() *int64 {
+ if o == nil {
+ return nil
+ }
+ return o.RefillInterval
+}
+
+type Keys struct {
+ // To make it easier for your users to understand which product an api key belongs to, you can add prefix them.
+ //
+ // For example Stripe famously prefixes their customer ids with cus_ or their api keys with sk_live_.
+ //
+ // The underscore is automatically added if you are defining a prefix, for example: "prefix": "abc" will result in a key like abc_xxxxxxxxx
+ //
+ Prefix *string `json:"prefix,omitempty"`
+ // The name for your Key. This is not customer facing.
+ Name *string `json:"name,omitempty"`
+ // The raw key in plaintext. If provided, unkey encrypts this value and stores it securely. Provide either `hash` or `plaintext`
+ Plaintext *string `json:"plaintext,omitempty"`
+ // Provide either `hash` or `plaintext`
+ Hash *V1MigrationsEnqueueKeysHash `json:"hash,omitempty"`
+ // The first 4 characters of the key. If a prefix is used, it should be the prefix plus 4 characters.
+ Start *string `json:"start,omitempty"`
+ // Your user’s Id. This will provide a link between Unkey and your customer record.
+ // When validating a key, we will return this back to you, so you can clearly identify your user from their api key.
+ OwnerID *string `json:"ownerId,omitempty"`
+ // This is a place for dynamic meta data, anything that feels useful for you should go here
+ Meta map[string]any `json:"meta,omitempty"`
+ // A list of roles that this key should have. If the role does not exist, an error is thrown
+ Roles []string `json:"roles,omitempty"`
+ // A list of permissions that this key should have. If the permission does not exist, an error is thrown
+ Permissions []string `json:"permissions,omitempty"`
+ // You can auto expire keys by providing a unix timestamp in milliseconds. Once Keys expire they will automatically be disabled and are no longer valid unless you enable them again.
+ Expires *int64 `json:"expires,omitempty"`
+ // You can limit the number of requests a key can make. Once a key reaches 0 remaining requests, it will automatically be disabled and is no longer valid unless you update it.
+ Remaining *int64 `json:"remaining,omitempty"`
+ // Unkey enables you to refill verifications for each key at regular intervals.
+ Refill *V1MigrationsEnqueueKeysRefill `json:"refill,omitempty"`
+ // Unkey comes with per-key fixed-window ratelimiting out of the box.
+ Ratelimit *V1MigrationsEnqueueKeysRatelimit `json:"ratelimit,omitempty"`
+ // Sets if key is enabled or disabled. Disabled keys are not valid.
+ Enabled *bool `default:"true" json:"enabled"`
+ // Environments allow you to divide your keyspace.
+ //
+ // Some applications like Stripe, Clerk, WorkOS and others have a concept of "live" and "test" keys to
+ // give the developer a way to develop their own application without the risk of modifying real world
+ // resources.
+ //
+ // When you set an environment, we will return it back to you when validating the key, so you can
+ // handle it correctly.
+ //
+ Environment *string `json:"environment,omitempty"`
+}
+
+func (k Keys) MarshalJSON() ([]byte, error) {
+ return utils.MarshalJSON(k, "", false)
+}
+
+func (k *Keys) UnmarshalJSON(data []byte) error {
+ if err := utils.UnmarshalJSON(data, &k, "", false, false); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (o *Keys) GetPrefix() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Prefix
+}
+
+func (o *Keys) GetName() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Name
+}
+
+func (o *Keys) GetPlaintext() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Plaintext
+}
+
+func (o *Keys) GetHash() *V1MigrationsEnqueueKeysHash {
+ if o == nil {
+ return nil
+ }
+ return o.Hash
+}
+
+func (o *Keys) GetStart() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Start
+}
+
+func (o *Keys) GetOwnerID() *string {
+ if o == nil {
+ return nil
+ }
+ return o.OwnerID
+}
+
+func (o *Keys) GetMeta() map[string]any {
+ if o == nil {
+ return nil
+ }
+ return o.Meta
+}
+
+func (o *Keys) GetRoles() []string {
+ if o == nil {
+ return nil
+ }
+ return o.Roles
+}
+
+func (o *Keys) GetPermissions() []string {
+ if o == nil {
+ return nil
+ }
+ return o.Permissions
+}
+
+func (o *Keys) GetExpires() *int64 {
+ if o == nil {
+ return nil
+ }
+ return o.Expires
+}
+
+func (o *Keys) GetRemaining() *int64 {
+ if o == nil {
+ return nil
+ }
+ return o.Remaining
+}
+
+func (o *Keys) GetRefill() *V1MigrationsEnqueueKeysRefill {
+ if o == nil {
+ return nil
+ }
+ return o.Refill
+}
+
+func (o *Keys) GetRatelimit() *V1MigrationsEnqueueKeysRatelimit {
+ if o == nil {
+ return nil
+ }
+ return o.Ratelimit
+}
+
+func (o *Keys) GetEnabled() *bool {
+ if o == nil {
+ return nil
+ }
+ return o.Enabled
+}
+
+func (o *Keys) GetEnvironment() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Environment
+}
+
+type V1MigrationsEnqueueKeysRequestBody struct {
+ // Contact support@unkey.dev to receive your migration id.
+ MigrationID string `json:"migrationId"`
+ // The id of the api, you want to migrate keys to
+ APIID string `json:"apiId"`
+ Keys []Keys `json:"keys"`
+}
+
+func (o *V1MigrationsEnqueueKeysRequestBody) GetMigrationID() string {
+ if o == nil {
+ return ""
+ }
+ return o.MigrationID
+}
+
+func (o *V1MigrationsEnqueueKeysRequestBody) GetAPIID() string {
+ if o == nil {
+ return ""
+ }
+ return o.APIID
+}
+
+func (o *V1MigrationsEnqueueKeysRequestBody) GetKeys() []Keys {
+ if o == nil {
+ return []Keys{}
+ }
+ return o.Keys
+}
+
+// V1MigrationsEnqueueKeysResponseBody - The key ids of all created keys
+type V1MigrationsEnqueueKeysResponseBody struct {
+}
+
+type V1MigrationsEnqueueKeysResponse struct {
+ HTTPMeta components.HTTPMetadata `json:"-"`
+ // The key ids of all created keys
+ Object *V1MigrationsEnqueueKeysResponseBody
+}
+
+func (o *V1MigrationsEnqueueKeysResponse) GetHTTPMeta() components.HTTPMetadata {
+ if o == nil {
+ return components.HTTPMetadata{}
+ }
+ return o.HTTPMeta
+}
+
+func (o *V1MigrationsEnqueueKeysResponse) GetObject() *V1MigrationsEnqueueKeysResponseBody {
+ if o == nil {
+ return nil
+ }
+ return o.Object
+}
diff --git a/unkey.go b/unkey.go
index b3fd4e1..f5d5615 100644
--- a/unkey.go
+++ b/unkey.go
@@ -145,9 +145,9 @@ func New(opts ...SDKOption) *Unkey {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "1.0.0",
- SDKVersion: "0.3.0",
- GenVersion: "2.338.1",
- UserAgent: "speakeasy-sdk/go 0.3.0 2.338.1 1.0.0 github.com/unkeyed/unkey-go",
+ SDKVersion: "0.3.1",
+ GenVersion: "2.338.12",
+ UserAgent: "speakeasy-sdk/go 0.3.1 2.338.12 1.0.0 github.com/unkeyed/unkey-go",
Hooks: hooks.New(),
},
}