Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fifty-elephants-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@clerk/backend": minor
"@clerk/clerk-js": minor
"@clerk/shared": patch
---

Removed internal parameter when creating API keys
1 change: 0 additions & 1 deletion packages/backend/src/api/endpoints/APIKeysApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type GetAPIKeyListParams = ClerkPaginationRequest<{
}>;

type CreateAPIKeyParams = {
type?: 'api_key';
/**
* API key name
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/modules/apiKeys/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class APIKeys implements APIKeysNamespace {
path: '/api_keys',
method: 'POST',
body: JSON.stringify({
type: params.type ?? 'api_key',
type: 'api_key',
name: params.name,
subject: params.subject ?? BaseResource.clerk.organization?.id ?? BaseResource.clerk.user?.id ?? '',
description: params.description,
Expand Down
10 changes: 1 addition & 9 deletions packages/shared/src/types/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1954,17 +1954,10 @@ type PortalRoot = HTMLElement | null | undefined;
export type PricingTableProps = PricingTableBaseProps & PricingTableDefaultProps;

export type APIKeysProps = {
/**
* The type of API key to filter by.
* Currently, only 'api_key' is supported.
*
* @default 'api_key'
*/
type?: 'api_key';
/**
* The number of API keys to show per page.
*
* @default 5
* @default 10
*/
perPage?: number;
/**
Expand All @@ -1987,7 +1980,6 @@ export type GetAPIKeysParams = ClerkPaginationParams<{
}>;

export type CreateAPIKeyParams = {
type?: 'api_key';
name: string;
subject?: string;
secondsUntilExpiration?: number;
Expand Down
Loading