import { makeCrudRoute } from "@open-mercato/shared/lib/crud/factory";
import { SalesQuote } from "../../data/entities.js";
import { E } from "../../../../generated/entities.ids.generated.js";
import { buildDocumentCrudOptions, buildDocumentOpenApi } from "../documents/factory.js";
const crud = makeCrudRoute(
  buildDocumentCrudOptions({
    kind: "quote",
    entity: SalesQuote,
    entityId: E.sales.sales_quote,
    numberField: "quoteNumber",
    createCommandId: "sales.quotes.create",
    updateCommandId: "sales.quotes.update",
    deleteCommandId: "sales.quotes.delete",
    manageFeature: "sales.quotes.manage",
    viewFeature: "sales.quotes.view"
  })
);
const metadata = crud.metadata;
const GET = crud.GET;
const POST = crud.POST;
const PUT = crud.PUT;
const DELETE = crud.DELETE;
const openApi = buildDocumentOpenApi({
  kind: "quote",
  entity: SalesQuote,
  entityId: E.sales.sales_quote,
  numberField: "quoteNumber",
  createCommandId: "sales.quotes.create",
  updateCommandId: "sales.quotes.update",
  deleteCommandId: "sales.quotes.delete",
  manageFeature: "sales.quotes.manage",
  viewFeature: "sales.quotes.view"
});
export {
  DELETE,
  GET,
  POST,
  PUT,
  metadata,
  openApi
};
//# sourceMappingURL=route.js.map
