import { baseClient } from './base.js';

export const apiKeysApi = {
  list(workspaceId) {
    return baseClient.get(`/workspaces/${workspaceId}/api-keys`);
  },

  create(workspaceId, name, expiresAt = null, scopes = null) {
    return baseClient.post(`/workspaces/${workspaceId}/api-keys`, { name, expiresAt, scopes });
  },

  delete(workspaceId, id) {
    return baseClient.delete(`/workspaces/${workspaceId}/api-keys/${id}`);
  },
};
