Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 1377b90

Browse files
authored
Merge pull request #6 from unkeyed/speakeasy-sdk-regen-1744717157
chore: 🐝 Update SDK - Generate 2.0.0-alpha.6
2 parents fc5cfb3 + ec6f546 commit 1377b90

File tree

102 files changed

+4164
-673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4164
-673
lines changed

β€Ž.speakeasy/gen.lockβ€Ž

Lines changed: 138 additions & 83 deletions
Large diffs are not rendered by default.

β€Ž.speakeasy/gen.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ generation:
1818
oAuth2ClientCredentialsEnabled: true
1919
oAuth2PasswordEnabled: true
2020
typescript:
21-
version: 2.0.0-alpha.5
21+
version: 2.0.0-alpha.6
2222
additionalDependencies:
2323
dependencies: {}
2424
devDependencies: {}

β€Ž.speakeasy/workflow.lockβ€Ž

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
speakeasyVersion: 1.527.1
1+
speakeasyVersion: 1.531.5
22
sources:
33
Unkey API:
44
sourceNamespace: unkey-api
5-
sourceRevisionDigest: sha256:e1d115461bc53fbff48cbf74e110ec3548b6aba76f4572d5a3baebeb368b4e62
6-
sourceBlobDigest: sha256:411d7a08cddea23554e812add92b683e49ce24e0ab269bd188bc98ffaf5763d9
5+
sourceRevisionDigest: sha256:be6ef646e25ea0195b1e69fed0dd466effb054e0f36e60d2bf82f830646d33b9
6+
sourceBlobDigest: sha256:78855d7ad5e9ac63ac7b52384ff1ece6b7789424432f6f5f433dd11d2c729252
77
tags:
88
- latest
9+
- speakeasy-sdk-regen-1744717157
910
- 2.0.0
1011
targets:
1112
unkey:
1213
source: Unkey API
1314
sourceNamespace: unkey-api
14-
sourceRevisionDigest: sha256:e1d115461bc53fbff48cbf74e110ec3548b6aba76f4572d5a3baebeb368b4e62
15-
sourceBlobDigest: sha256:411d7a08cddea23554e812add92b683e49ce24e0ab269bd188bc98ffaf5763d9
15+
sourceRevisionDigest: sha256:be6ef646e25ea0195b1e69fed0dd466effb054e0f36e60d2bf82f830646d33b9
16+
sourceBlobDigest: sha256:78855d7ad5e9ac63ac7b52384ff1ece6b7789424432f6f5f433dd11d2c729252
1617
codeSamplesNamespace: unkey-api-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:946255c559bb8dee685b500169ecde3cc95bc72a6b0b4a9c4e2bed38c5d4cead
18+
codeSamplesRevisionDigest: sha256:d19b955662953a1ec8c7b4807eab1b982755b343b0ed7c0a7ec3383243e54d63
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest

β€ŽFUNCTIONS.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const unkey = new UnkeyCore({
3232
async function run() {
3333
const res = await ratelimitLimit(unkey, {
3434
namespace: "sms.sign_up",
35-
duration: 455106,
35+
duration: 711276,
3636
identifier: "<value>",
37-
limit: 568662,
37+
limit: 581877,
3838
});
3939

4040
switch (true) {

β€ŽREADME.mdβ€Ž

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ const unkey = new Unkey({
182182
async function run() {
183183
const result = await unkey.ratelimit.limit({
184184
namespace: "sms.sign_up",
185-
duration: 455106,
185+
duration: 711276,
186186
identifier: "<value>",
187-
limit: 568662,
187+
limit: 581877,
188188
});
189189

190190
// Handle the result
@@ -218,9 +218,9 @@ const unkey = new Unkey({
218218
async function run() {
219219
const result = await unkey.ratelimit.limit({
220220
namespace: "sms.sign_up",
221-
duration: 455106,
221+
duration: 711276,
222222
identifier: "<value>",
223-
limit: 568662,
223+
limit: 581877,
224224
});
225225

226226
// Handle the result
@@ -238,6 +238,14 @@ run();
238238
<details open>
239239
<summary>Available methods</summary>
240240

241+
### [apis](docs/sdks/apis/README.md)
242+
243+
* [createApi](docs/sdks/apis/README.md#createapi)
244+
245+
### [identities](docs/sdks/identities/README.md)
246+
247+
* [v2IdentitiesCreateIdentity](docs/sdks/identities/README.md#v2identitiescreateidentity)
248+
241249
### [liveness](docs/sdks/liveness/README.md)
242250

243251
* [check](docs/sdks/liveness/README.md#check) - Liveness check
@@ -247,6 +255,7 @@ run();
247255
* [limit](docs/sdks/ratelimit/README.md#limit) - TODO
248256
* [setOverride](docs/sdks/ratelimit/README.md#setoverride)
249257
* [getOverride](docs/sdks/ratelimit/README.md#getoverride)
258+
* [ratelimitListOverrides](docs/sdks/ratelimit/README.md#ratelimitlistoverrides) - List rate limit overrides
250259
* [deleteOverride](docs/sdks/ratelimit/README.md#deleteoverride)
251260

252261

@@ -268,10 +277,13 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
268277

269278
<summary>Available standalone functions</summary>
270279

280+
- [`apisCreateApi`](docs/sdks/apis/README.md#createapi)
281+
- [`identitiesV2IdentitiesCreateIdentity`](docs/sdks/identities/README.md#v2identitiescreateidentity)
271282
- [`livenessCheck`](docs/sdks/liveness/README.md#check) - Liveness check
272283
- [`ratelimitDeleteOverride`](docs/sdks/ratelimit/README.md#deleteoverride)
273284
- [`ratelimitGetOverride`](docs/sdks/ratelimit/README.md#getoverride)
274285
- [`ratelimitLimit`](docs/sdks/ratelimit/README.md#limit) - TODO
286+
- [`ratelimitRatelimitListOverrides`](docs/sdks/ratelimit/README.md#ratelimitlistoverrides) - List rate limit overrides
275287
- [`ratelimitSetOverride`](docs/sdks/ratelimit/README.md#setoverride)
276288

277289
</details>
@@ -293,9 +305,9 @@ const unkey = new Unkey({
293305
async function run() {
294306
const result = await unkey.ratelimit.limit({
295307
namespace: "sms.sign_up",
296-
duration: 455106,
308+
duration: 711276,
297309
identifier: "<value>",
298-
limit: 568662,
310+
limit: 581877,
299311
}, {
300312
retries: {
301313
strategy: "backoff",
@@ -338,9 +350,9 @@ const unkey = new Unkey({
338350
async function run() {
339351
const result = await unkey.ratelimit.limit({
340352
namespace: "sms.sign_up",
341-
duration: 455106,
353+
duration: 711276,
342354
identifier: "<value>",
343-
limit: 568662,
355+
limit: 581877,
344356
});
345357

346358
// Handle the result
@@ -357,21 +369,26 @@ run();
357369

358370
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `limit` method may throw the following errors:
359371

360-
| Error Type | Status Code | Content Type |
361-
| ---------------------- | ------------- | ------------------------ |
362-
| errors.BadRequestError | 400 | application/problem+json |
363-
| errors.BaseError | 401, 403, 404 | application/problem+json |
364-
| errors.BaseError | 500 | application/problem+json |
365-
| errors.APIError | 4XX, 5XX | \*/\* |
372+
| Error Type | Status Code | Content Type |
373+
| ---------------------------------- | ----------- | ---------------- |
374+
| errors.BadRequestErrorResponse | 400 | application/json |
375+
| errors.UnauthorizedErrorResponse | 401 | application/json |
376+
| errors.ForbiddenErrorResponse | 403 | application/json |
377+
| errors.NotFoundErrorResponse | 404 | application/json |
378+
| errors.InternalServerErrorResponse | 500 | application/json |
379+
| errors.APIError | 4XX, 5XX | \*/\* |
366380

367381
If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`.
368382

369383
```typescript
370384
import { Unkey } from "@unkey/api";
371385
import {
372-
BadRequestError,
373-
BaseError,
386+
BadRequestErrorResponse,
387+
ForbiddenErrorResponse,
388+
InternalServerErrorResponse,
389+
NotFoundErrorResponse,
374390
SDKValidationError,
391+
UnauthorizedErrorResponse,
375392
} from "@unkey/api/models/errors";
376393

377394
const unkey = new Unkey({
@@ -383,9 +400,9 @@ async function run() {
383400
try {
384401
result = await unkey.ratelimit.limit({
385402
namespace: "sms.sign_up",
386-
duration: 455106,
403+
duration: 711276,
387404
identifier: "<value>",
388-
limit: 568662,
405+
limit: 581877,
389406
});
390407

391408
// Handle the result
@@ -400,18 +417,28 @@ async function run() {
400417
console.error(err.rawValue);
401418
return;
402419
}
403-
case (err instanceof BadRequestError): {
404-
// Handle err.data$: BadRequestErrorData
420+
case (err instanceof BadRequestErrorResponse): {
421+
// Handle err.data$: BadRequestErrorResponseData
422+
console.error(err);
423+
return;
424+
}
425+
case (err instanceof UnauthorizedErrorResponse): {
426+
// Handle err.data$: UnauthorizedErrorResponseData
427+
console.error(err);
428+
return;
429+
}
430+
case (err instanceof ForbiddenErrorResponse): {
431+
// Handle err.data$: ForbiddenErrorResponseData
405432
console.error(err);
406433
return;
407434
}
408-
case (err instanceof BaseError): {
409-
// Handle err.data$: BaseErrorData
435+
case (err instanceof NotFoundErrorResponse): {
436+
// Handle err.data$: NotFoundErrorResponseData
410437
console.error(err);
411438
return;
412439
}
413-
case (err instanceof BaseError): {
414-
// Handle err.data$: BaseErrorData
440+
case (err instanceof InternalServerErrorResponse): {
441+
// Handle err.data$: InternalServerErrorResponseData
415442
console.error(err);
416443
return;
417444
}
@@ -457,9 +484,9 @@ const unkey = new Unkey({
457484
async function run() {
458485
const result = await unkey.ratelimit.limit({
459486
namespace: "sms.sign_up",
460-
duration: 455106,
487+
duration: 711276,
461488
identifier: "<value>",
462-
limit: 568662,
489+
limit: 581877,
463490
});
464491

465492
// Handle the result

β€ŽRELEASES.mdβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,14 @@ Based on:
2424
### Generated
2525
- [typescript v2.0.0-alpha.2] .
2626
### Releases
27-
- [NPM v2.0.0-alpha.2] https://www.npmjs.com/package/@unkey/api/v/2.0.0-alpha.2 - .
27+
- [NPM v2.0.0-alpha.2] https://www.npmjs.com/package/@unkey/api/v/2.0.0-alpha.2 - .
28+
29+
## 2025-04-15 11:39:02
30+
### Changes
31+
Based on:
32+
- OpenAPI Doc
33+
- Speakeasy CLI 1.531.5 (2.570.4) https://github.com/speakeasy-api/speakeasy
34+
### Generated
35+
- [typescript v2.0.0-alpha.6] .
36+
### Releases
37+
- [NPM v2.0.0-alpha.6] https://www.npmjs.com/package/@unkey/api/v/2.0.0-alpha.6 - .

β€ŽUSAGE.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const unkey = new Unkey({
99
async function run() {
1010
const result = await unkey.ratelimit.limit({
1111
namespace: "sms.sign_up",
12-
duration: 455106,
12+
duration: 711276,
1313
identifier: "<value>",
14-
limit: 568662,
14+
limit: 581877,
1515
});
1616

1717
// Handle the result
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ApisCreateApiResponseData
2+
3+
## Example Usage
4+
5+
```typescript
6+
import { ApisCreateApiResponseData } from "@unkey/api/models/components";
7+
8+
let value: ApisCreateApiResponseData = {
9+
apiId: "<id>",
10+
name: "<value>",
11+
};
12+
```
13+
14+
## Fields
15+
16+
| Field | Type | Required | Description |
17+
| ------------------- | ------------------- | ------------------- | ------------------- |
18+
| `apiId` | *string* | :heavy_check_mark: | The id of the API |
19+
| `name` | *string* | :heavy_check_mark: | The name of the API |

β€Ždocs/models/errors/badrequesterror.mdβ€Ž renamed to β€Ždocs/models/components/badrequesterrordetails.mdβ€Ž

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
# BadRequestError
1+
# BadRequestErrorDetails
22

33
## Example Usage
44

55
```typescript
6-
import { BadRequestError } from "@unkey/api/models/errors";
6+
import { BadRequestErrorDetails } from "@unkey/api/models/components";
77

8-
// No examples available for this model
8+
let value: BadRequestErrorDetails = {
9+
detail: "Property foo is required but is missing.",
10+
instance: "https://example.com/error-log/abc123",
11+
status: 404,
12+
title: "<value>",
13+
type: "https://example.com/errors/example",
14+
errors: [
15+
{
16+
location: "<value>",
17+
message: "<value>",
18+
},
19+
],
20+
};
921
```
1022

1123
## Fields
1224

1325
| Field | Type | Required | Description | Example |
1426
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
15-
| `requestId` | *string* | :heavy_check_mark: | A unique id for this request. Please always provide this to support. | req_123 |
1627
| `detail` | *string* | :heavy_check_mark: | A human-readable explanation specific to this occurrence of the problem. | Property foo is required but is missing. |
1728
| `instance` | *string* | :heavy_minus_sign: | A URI reference that identifies the specific occurrence of the problem. | https://example.com/error-log/abc123 |
1829
| `status` | *number* | :heavy_check_mark: | HTTP status code | 404 |

β€Ždocs/models/errors/baseerror.mdβ€Ž renamed to β€Ždocs/models/components/baseerror.mdβ€Ž

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33
## Example Usage
44

55
```typescript
6-
import { BaseError } from "@unkey/api/models/errors";
6+
import { BaseError } from "@unkey/api/models/components";
77

8-
// No examples available for this model
8+
let value: BaseError = {
9+
detail: "Property foo is required but is missing.",
10+
instance: "https://example.com/error-log/abc123",
11+
status: 404,
12+
title: "<value>",
13+
type: "https://example.com/errors/example",
14+
};
915
```
1016

1117
## Fields
1218

1319
| Field | Type | Required | Description | Example |
1420
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
15-
| `requestId` | *string* | :heavy_check_mark: | A unique id for this request. Please always provide this to support. | req_123 |
1621
| `detail` | *string* | :heavy_check_mark: | A human-readable explanation specific to this occurrence of the problem. | Property foo is required but is missing. |
1722
| `instance` | *string* | :heavy_minus_sign: | A URI reference that identifies the specific occurrence of the problem. | https://example.com/error-log/abc123 |
1823
| `status` | *number* | :heavy_check_mark: | HTTP status code | 404 |

0 commit comments

Comments
Β (0)