From 39ce036a2369e09b79d2b974a2659e0e273fa94b Mon Sep 17 00:00:00 2001 From: Michael Silva Date: Thu, 12 Dec 2024 12:39:06 -0500 Subject: [PATCH] pr changes --- .../ts/ratelimit/override/delete-override.mdx | 8 ++++---- .../libraries/ts/ratelimit/override/get-override.mdx | 10 +++++----- .../libraries/ts/ratelimit/override/list-overrides.mdx | 8 ++++---- .../libraries/ts/ratelimit/override/set-override.mdx | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/docs/libraries/ts/ratelimit/override/delete-override.mdx b/apps/docs/libraries/ts/ratelimit/override/delete-override.mdx index 628e454fd..9f45cd73b 100644 --- a/apps/docs/libraries/ts/ratelimit/override/delete-override.mdx +++ b/apps/docs/libraries/ts/ratelimit/override/delete-override.mdx @@ -12,11 +12,11 @@ Identifier of your user, this can be their userId, an email, an ip or anything e Either `namespaceId` or `namespaceName` is required. Not both. - + The id of the namespace. Either namespaceId or namespaceName must be provided - + Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. Wildcards can also be used, more info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules @@ -28,14 +28,14 @@ No response, but if no error is returned the override has been deleted successfu ```ts -await unkey.deleteOverride({ +const override = await unkey.deleteOverride({ identifier: "user_123", namespaceName: "email.outbound", }) ``` ```ts -await unkey.deleteOverride({ +const override = await unkey.deleteOverride({ identifier: "user_123", namespaceId:"rlns_12345", }) diff --git a/apps/docs/libraries/ts/ratelimit/override/get-override.mdx b/apps/docs/libraries/ts/ratelimit/override/get-override.mdx index 828e92c88..196b9425b 100644 --- a/apps/docs/libraries/ts/ratelimit/override/get-override.mdx +++ b/apps/docs/libraries/ts/ratelimit/override/get-override.mdx @@ -12,11 +12,11 @@ Identifier of your user, this can be their userId, an email, an ip or anything e Either `namespaceId` or `namespaceName` is required. Not both. - + The id of the namespace. Either namespaceId or namespaceName must be provided - + Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. Wildcards can also be used, more info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules @@ -42,7 +42,7 @@ How many requests may pass in a given window. The window duration in milliseconds. - + Async will return a response immediately, lowering latency at the cost of accuracy. @@ -51,14 +51,14 @@ Async will return a response immediately, lowering latency at the cost of accura ```ts -await unkey.getOverride({ +const override = await unkey.getOverride({ identifier:"user.example", namespaceName: "email.outbound" }); ``` ```ts -await unkey.getOverride({ +const override = await unkey.getOverride({ identifier:"user.example", namespaceId: "rlns_1234", }); diff --git a/apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx b/apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx index c2fa9d9d5..1349111e3 100644 --- a/apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx +++ b/apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx @@ -9,11 +9,11 @@ description: "Lists all overrides" Either `namespaceId` or `namespaceName` is required. Not both. - + The id of the namespace. Either namespaceId or namespaceName must be provided - + Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. Wildcards can also be used, more info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules @@ -61,13 +61,13 @@ The cursor to use for pagination ```ts -await unkey.listOverrides({ +const overrides = await unkey.listOverrides({ namespaceName: "email.outbound" }); ``` ```ts -await unkey.listOverrides({ +const overrides = await unkey.listOverrides({ nameSpaceId:"rlns_12345", }); ``` diff --git a/apps/docs/libraries/ts/ratelimit/override/set-override.mdx b/apps/docs/libraries/ts/ratelimit/override/set-override.mdx index 14afecd3f..e96e78d99 100644 --- a/apps/docs/libraries/ts/ratelimit/override/set-override.mdx +++ b/apps/docs/libraries/ts/ratelimit/override/set-override.mdx @@ -22,11 +22,11 @@ The window duration in milliseconds. Either `namespaceId` or `namespaceName` is required. Not both. - + The id of the namespace. Either namespaceId or namespaceName must be provided - + Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes. Wildcards can also be used, more info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules @@ -46,7 +46,7 @@ Async will return a response immediately, lowering latency at the cost of accura ```ts -await unkey.setOverride({ +const override = await unkey.setOverride({ identifier: "user_123", limit: 10, duration: 60000, @@ -56,7 +56,7 @@ await unkey.setOverride({ ``` ```ts -await unkey.setOverride({ +const override = await unkey.setOverride({ identifier: "user_123", limit: 5, duration: 50000,