import { z } from "zod";
import {
  createCrudOpenApiFactory,
  createPagedListResponseSchema as createSharedPagedListResponseSchema,
  defaultCreateResponseSchema as sharedDefaultCreateResponseSchema
} from "@open-mercato/shared/lib/openapi/crud";
const defaultCreateResponseSchema = sharedDefaultCreateResponseSchema;
const defaultOkResponseSchema = z.object({ ok: z.boolean() });
const defaultDeleteRequestSchema = z.object({ id: z.string().uuid() });
function createPagedListResponseSchema(itemSchema) {
  return createSharedPagedListResponseSchema(itemSchema);
}
const buildSalesCrudOpenApi = createCrudOpenApiFactory({
  defaultTag: "Sales",
  defaultCreateResponseSchema,
  defaultOkResponseSchema,
  makeListDescription: ({ pluralLower }) => `Returns a paginated collection of ${pluralLower} that belong to the current organization.`,
  makeUpdateRequestBodyDescription: ({ resourceLower }) => `Fields to update on the target ${resourceLower}.`
});
function createSalesCrudOpenApi(options) {
  return buildSalesCrudOpenApi(options);
}
export {
  createPagedListResponseSchema,
  createSalesCrudOpenApi,
  defaultCreateResponseSchema,
  defaultDeleteRequestSchema,
  defaultOkResponseSchema
};
//# sourceMappingURL=openapi.js.map
