import { APIBase } from '@dvn/core/api/apiBase';
export class DevingenApi {
  constructor(endpoint, defaultHeaders = {}) {
    this.createWorkspace = (name) => this.api.post(`workspaces`, { name });
    this.getWorkspaceOwnerships = () => this.api.get('workspace-ownerships');
    this.createProduct = (name, workspaceId, type) => this.api.post(`products`, { name, workspaceId, type });
    this.getProducts = () => this.api.get('products');
    this.getProduct = (id) => this.api.get(`products/${id}`);
    this.api = new APIBase(endpoint, defaultHeaders);
  }
}
