diff --git a/.changeset/fifty-elephants-judge.md b/.changeset/fifty-elephants-judge.md new file mode 100644 index 00000000000..4bc9a972d70 --- /dev/null +++ b/.changeset/fifty-elephants-judge.md @@ -0,0 +1,7 @@ +--- +"@clerk/backend": minor +"@clerk/clerk-js": minor +"@clerk/shared": patch +--- + +Removed internal parameter when creating API keys diff --git a/packages/backend/src/api/endpoints/APIKeysApi.ts b/packages/backend/src/api/endpoints/APIKeysApi.ts index 89e948060b6..1b9b1d6ddb4 100644 --- a/packages/backend/src/api/endpoints/APIKeysApi.ts +++ b/packages/backend/src/api/endpoints/APIKeysApi.ts @@ -21,7 +21,6 @@ type GetAPIKeyListParams = ClerkPaginationRequest<{ }>; type CreateAPIKeyParams = { - type?: 'api_key'; /** * API key name */ diff --git a/packages/clerk-js/src/core/modules/apiKeys/index.ts b/packages/clerk-js/src/core/modules/apiKeys/index.ts index 5504a48b888..2c8a05a49aa 100644 --- a/packages/clerk-js/src/core/modules/apiKeys/index.ts +++ b/packages/clerk-js/src/core/modules/apiKeys/index.ts @@ -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, diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index cd52b13f070..b411f941d5f 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -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; /** @@ -1987,7 +1980,6 @@ export type GetAPIKeysParams = ClerkPaginationParams<{ }>; export type CreateAPIKeyParams = { - type?: 'api_key'; name: string; subject?: string; secondsUntilExpiration?: number;