@unkey/api 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/commonjs/funcs/keysVerifyKey.d.ts +1 -1
- package/dist/commonjs/funcs/keysVerifyKey.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/keys.d.ts +1 -1
- package/dist/commonjs/sdk/keys.js +1 -1
- package/dist/esm/funcs/keysVerifyKey.d.ts +1 -1
- package/dist/esm/funcs/keysVerifyKey.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/keys.d.ts +1 -1
- package/dist/esm/sdk/keys.js +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/keysVerifyKey.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/sdk/keys.ts +1 -1
package/README.md
CHANGED
|
@@ -218,18 +218,18 @@ run();
|
|
|
218
218
|
<details open>
|
|
219
219
|
<summary>Available methods</summary>
|
|
220
220
|
|
|
221
|
-
### [
|
|
221
|
+
### [Analytics](docs/sdks/analytics/README.md)
|
|
222
222
|
|
|
223
223
|
* [getVerifications](docs/sdks/analytics/README.md#getverifications) - Query key verification data
|
|
224
224
|
|
|
225
|
-
### [
|
|
225
|
+
### [Apis](docs/sdks/apis/README.md)
|
|
226
226
|
|
|
227
227
|
* [createApi](docs/sdks/apis/README.md#createapi) - Create API namespace
|
|
228
228
|
* [deleteApi](docs/sdks/apis/README.md#deleteapi) - Delete API namespace
|
|
229
229
|
* [getApi](docs/sdks/apis/README.md#getapi) - Get API namespace
|
|
230
230
|
* [listKeys](docs/sdks/apis/README.md#listkeys) - List API keys
|
|
231
231
|
|
|
232
|
-
### [
|
|
232
|
+
### [Identities](docs/sdks/identities/README.md)
|
|
233
233
|
|
|
234
234
|
* [createIdentity](docs/sdks/identities/README.md#createidentity) - Create Identity
|
|
235
235
|
* [deleteIdentity](docs/sdks/identities/README.md#deleteidentity) - Delete Identity
|
|
@@ -237,7 +237,7 @@ run();
|
|
|
237
237
|
* [listIdentities](docs/sdks/identities/README.md#listidentities) - List Identities
|
|
238
238
|
* [updateIdentity](docs/sdks/identities/README.md#updateidentity) - Update Identity
|
|
239
239
|
|
|
240
|
-
### [
|
|
240
|
+
### [Keys](docs/sdks/keys/README.md)
|
|
241
241
|
|
|
242
242
|
* [addPermissions](docs/sdks/keys/README.md#addpermissions) - Add key permissions
|
|
243
243
|
* [addRoles](docs/sdks/keys/README.md#addroles) - Add key roles
|
|
@@ -255,7 +255,7 @@ run();
|
|
|
255
255
|
* [verifyKey](docs/sdks/keys/README.md#verifykey) - Verify API key
|
|
256
256
|
* [whoami](docs/sdks/keys/README.md#whoami) - Get API key by hash
|
|
257
257
|
|
|
258
|
-
### [
|
|
258
|
+
### [Permissions](docs/sdks/permissions/README.md)
|
|
259
259
|
|
|
260
260
|
* [createPermission](docs/sdks/permissions/README.md#createpermission) - Create permission
|
|
261
261
|
* [createRole](docs/sdks/permissions/README.md#createrole) - Create role
|
|
@@ -266,7 +266,7 @@ run();
|
|
|
266
266
|
* [listPermissions](docs/sdks/permissions/README.md#listpermissions) - List permissions
|
|
267
267
|
* [listRoles](docs/sdks/permissions/README.md#listroles) - List roles
|
|
268
268
|
|
|
269
|
-
### [
|
|
269
|
+
### [Ratelimit](docs/sdks/ratelimit/README.md)
|
|
270
270
|
|
|
271
271
|
* [deleteOverride](docs/sdks/ratelimit/README.md#deleteoverride) - Delete ratelimit override
|
|
272
272
|
* [getOverride](docs/sdks/ratelimit/README.md#getoverride) - Get ratelimit override
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* - `api.*.verify_key` (verify keys in any API)
|
|
30
30
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
31
31
|
*
|
|
32
|
-
* If you
|
|
32
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
33
33
|
*/
|
|
34
34
|
export declare function keysVerifyKey(client: UnkeyCore, request: components.V2KeysVerifyKeyRequestBody, options?: RequestOptions): APIPromise<Result<components.V2KeysVerifyKeyResponseBody, errors.BadRequestErrorResponse | errors.UnauthorizedErrorResponse | errors.ForbiddenErrorResponse | errors.NotFoundErrorResponse | errors.InternalServerErrorResponse | UnkeyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
35
35
|
//# sourceMappingURL=keysVerifyKey.d.ts.map
|
|
@@ -67,7 +67,7 @@ const async_js_1 = require("../types/async.js");
|
|
|
67
67
|
* - `api.*.verify_key` (verify keys in any API)
|
|
68
68
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
69
69
|
*
|
|
70
|
-
* If you
|
|
70
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
71
71
|
*/
|
|
72
72
|
function keysVerifyKey(client, request, options) {
|
|
73
73
|
return new async_js_1.APIPromise($do(client, request, options));
|
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "2.0.0";
|
|
34
|
-
readonly sdkVersion: "2.2.
|
|
35
|
-
readonly genVersion: "2.
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 2.2.
|
|
34
|
+
readonly sdkVersion: "2.2.1";
|
|
35
|
+
readonly genVersion: "2.779.2";
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 2.2.1 2.779.2 2.0.0 @unkey/api";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
|
|
|
28
28
|
exports.SDK_METADATA = {
|
|
29
29
|
language: "typescript",
|
|
30
30
|
openapiDocVersion: "2.0.0",
|
|
31
|
-
sdkVersion: "2.2.
|
|
32
|
-
genVersion: "2.
|
|
33
|
-
userAgent: "speakeasy-sdk/typescript 2.2.
|
|
31
|
+
sdkVersion: "2.2.1",
|
|
32
|
+
genVersion: "2.779.2",
|
|
33
|
+
userAgent: "speakeasy-sdk/typescript 2.2.1 2.779.2 2.0.0 @unkey/api",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=config.js.map
|
|
@@ -299,7 +299,7 @@ export declare class Keys extends ClientSDK {
|
|
|
299
299
|
* - `api.*.verify_key` (verify keys in any API)
|
|
300
300
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
301
301
|
*
|
|
302
|
-
* If you
|
|
302
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
303
303
|
*/
|
|
304
304
|
verifyKey(request: components.V2KeysVerifyKeyRequestBody, options?: RequestOptions): Promise<components.V2KeysVerifyKeyResponseBody>;
|
|
305
305
|
/**
|
|
@@ -346,7 +346,7 @@ class Keys extends sdks_js_1.ClientSDK {
|
|
|
346
346
|
* - `api.*.verify_key` (verify keys in any API)
|
|
347
347
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
348
348
|
*
|
|
349
|
-
* If you
|
|
349
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
350
350
|
*/
|
|
351
351
|
async verifyKey(request, options) {
|
|
352
352
|
return (0, fp_js_1.unwrapAsync)((0, keysVerifyKey_js_1.keysVerifyKey)(this, request, options));
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* - `api.*.verify_key` (verify keys in any API)
|
|
30
30
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
31
31
|
*
|
|
32
|
-
* If you
|
|
32
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
33
33
|
*/
|
|
34
34
|
export declare function keysVerifyKey(client: UnkeyCore, request: components.V2KeysVerifyKeyRequestBody, options?: RequestOptions): APIPromise<Result<components.V2KeysVerifyKeyResponseBody, errors.BadRequestErrorResponse | errors.UnauthorizedErrorResponse | errors.ForbiddenErrorResponse | errors.NotFoundErrorResponse | errors.InternalServerErrorResponse | UnkeyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
35
35
|
//# sourceMappingURL=keysVerifyKey.d.ts.map
|
|
@@ -31,7 +31,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
31
31
|
* - `api.*.verify_key` (verify keys in any API)
|
|
32
32
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
33
33
|
*
|
|
34
|
-
* If you
|
|
34
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
35
35
|
*/
|
|
36
36
|
export function keysVerifyKey(client, request, options) {
|
|
37
37
|
return new APIPromise($do(client, request, options));
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "2.0.0";
|
|
34
|
-
readonly sdkVersion: "2.2.
|
|
35
|
-
readonly genVersion: "2.
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 2.2.
|
|
34
|
+
readonly sdkVersion: "2.2.1";
|
|
35
|
+
readonly genVersion: "2.779.2";
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 2.2.1 2.779.2 2.0.0 @unkey/api";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -24,8 +24,8 @@ export function serverURLFromOptions(options) {
|
|
|
24
24
|
export const SDK_METADATA = {
|
|
25
25
|
language: "typescript",
|
|
26
26
|
openapiDocVersion: "2.0.0",
|
|
27
|
-
sdkVersion: "2.2.
|
|
28
|
-
genVersion: "2.
|
|
29
|
-
userAgent: "speakeasy-sdk/typescript 2.2.
|
|
27
|
+
sdkVersion: "2.2.1",
|
|
28
|
+
genVersion: "2.779.2",
|
|
29
|
+
userAgent: "speakeasy-sdk/typescript 2.2.1 2.779.2 2.0.0 @unkey/api",
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=config.js.map
|
package/dist/esm/sdk/keys.d.ts
CHANGED
|
@@ -299,7 +299,7 @@ export declare class Keys extends ClientSDK {
|
|
|
299
299
|
* - `api.*.verify_key` (verify keys in any API)
|
|
300
300
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
301
301
|
*
|
|
302
|
-
* If you
|
|
302
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
303
303
|
*/
|
|
304
304
|
verifyKey(request: components.V2KeysVerifyKeyRequestBody, options?: RequestOptions): Promise<components.V2KeysVerifyKeyResponseBody>;
|
|
305
305
|
/**
|
package/dist/esm/sdk/keys.js
CHANGED
|
@@ -343,7 +343,7 @@ export class Keys extends ClientSDK {
|
|
|
343
343
|
* - `api.*.verify_key` (verify keys in any API)
|
|
344
344
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
345
345
|
*
|
|
346
|
-
* If you
|
|
346
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
347
347
|
*/
|
|
348
348
|
async verifyKey(request, options) {
|
|
349
349
|
return unwrapAsync(keysVerifyKey(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ import { Result } from "../types/fp.js";
|
|
|
46
46
|
* - `api.*.verify_key` (verify keys in any API)
|
|
47
47
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
48
48
|
*
|
|
49
|
-
* If you
|
|
49
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
50
50
|
*/
|
|
51
51
|
export function keysVerifyKey(
|
|
52
52
|
client: UnkeyCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0.0",
|
|
61
|
-
sdkVersion: "2.2.
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 2.2.
|
|
61
|
+
sdkVersion: "2.2.1",
|
|
62
|
+
genVersion: "2.779.2",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 2.2.1 2.779.2 2.0.0 @unkey/api",
|
|
64
64
|
} as const;
|
package/src/sdk/keys.ts
CHANGED
|
@@ -450,7 +450,7 @@ export class Keys extends ClientSDK {
|
|
|
450
450
|
* - `api.*.verify_key` (verify keys in any API)
|
|
451
451
|
* - `api.<api_id>.verify_key` (verify keys in specific API)
|
|
452
452
|
*
|
|
453
|
-
* If you
|
|
453
|
+
* **Note**: If your root key has no verify permissions at all, you will receive a `403 Forbidden` error. If your root key has verify permissions for a different API than the key you're verifying, you will receive a `200` response with `code: NOT_FOUND` to avoid leaking key existence.
|
|
454
454
|
*/
|
|
455
455
|
async verifyKey(
|
|
456
456
|
request: components.V2KeysVerifyKeyRequestBody,
|