Skip to content

Commit b944ff3

Browse files
authored
chore(clerk-js,backend): Remove internal API keys creation parameter (#7207)
1 parent a1d10fc commit b944ff3

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@clerk/backend": minor
3+
"@clerk/clerk-js": minor
4+
"@clerk/shared": patch
5+
---
6+
7+
Removed internal parameter when creating API keys

packages/backend/src/api/endpoints/APIKeysApi.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type GetAPIKeyListParams = ClerkPaginationRequest<{
2121
}>;
2222

2323
type CreateAPIKeyParams = {
24-
type?: 'api_key';
2524
/**
2625
* API key name
2726
*/

packages/clerk-js/src/core/modules/apiKeys/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class APIKeys implements APIKeysNamespace {
6363
path: '/api_keys',
6464
method: 'POST',
6565
body: JSON.stringify({
66-
type: params.type ?? 'api_key',
66+
type: 'api_key',
6767
name: params.name,
6868
subject: params.subject ?? BaseResource.clerk.organization?.id ?? BaseResource.clerk.user?.id ?? '',
6969
description: params.description,

packages/shared/src/types/clerk.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,17 +1954,10 @@ type PortalRoot = HTMLElement | null | undefined;
19541954
export type PricingTableProps = PricingTableBaseProps & PricingTableDefaultProps;
19551955

19561956
export type APIKeysProps = {
1957-
/**
1958-
* The type of API key to filter by.
1959-
* Currently, only 'api_key' is supported.
1960-
*
1961-
* @default 'api_key'
1962-
*/
1963-
type?: 'api_key';
19641957
/**
19651958
* The number of API keys to show per page.
19661959
*
1967-
* @default 5
1960+
* @default 10
19681961
*/
19691962
perPage?: number;
19701963
/**
@@ -1987,7 +1980,6 @@ export type GetAPIKeysParams = ClerkPaginationParams<{
19871980
}>;
19881981

19891982
export type CreateAPIKeyParams = {
1990-
type?: 'api_key';
19911983
name: string;
19921984
subject?: string;
19931985
secondsUntilExpiration?: number;

0 commit comments

Comments
 (0)