Refactored Stripe payment integration to use a dedicated Stripe model for session data, updating the PaymentSerializer accordingly. Renamed Order.Status to Order.OrderStatus for clarity. Updated configuration app to ensure SiteConfiguration singleton is created post-migration. Removed obsolete seed_app_config command from docker-compose. Adjusted frontend API generated files and moved orval config.
71 lines
1.5 KiB
TypeScript
71 lines
1.5 KiB
TypeScript
import { defineConfig } from "orval";
|
|
import "dotenv/config";
|
|
|
|
const backendUrl = process.env.VITE_BACKEND_URL || "http://localhost:8000";
|
|
|
|
// může se hodit pokud nechceme při buildu generovat klienta (nechat false pro produkci nebo vynechat)
|
|
const SKIP_ORVAL = process.env.SKIP_ORVAL === "true";
|
|
|
|
if (SKIP_ORVAL) {
|
|
console.log("[ORVAL] Generation skipped.");
|
|
process.exit(0);
|
|
}
|
|
|
|
export default defineConfig({
|
|
public: {
|
|
input: {
|
|
target: `${backendUrl}/api/schema/`,
|
|
|
|
filters: {
|
|
mode: "include",
|
|
tags: ["public"],
|
|
},
|
|
},
|
|
output: {
|
|
target: "api/generated/public.ts",
|
|
schemas: "api/generated/public/models",
|
|
|
|
mode: "tags",
|
|
clean: true,
|
|
|
|
client: "react-query",
|
|
httpClient: "axios",
|
|
|
|
override: {
|
|
mutator: {
|
|
path: "api/publicClient.ts", //IMPORTANTE
|
|
name: "publicMutator",
|
|
},
|
|
},
|
|
},
|
|
hooks: {
|
|
afterAllFilesWrite: 'prettier --write',
|
|
}
|
|
},
|
|
private: {
|
|
input: {
|
|
target: `${backendUrl}/api/schema/`,
|
|
},
|
|
output: {
|
|
target: "api/generated/private.ts", //IMPORTANTE
|
|
schemas: "api/generated/private/models",
|
|
|
|
mode: "tags",
|
|
clean: true,
|
|
|
|
client: "react-query",
|
|
httpClient: "axios",
|
|
|
|
override: {
|
|
mutator: {
|
|
path: "api/privateClient.ts",
|
|
name: "privateMutator",
|
|
},
|
|
},
|
|
},
|
|
hooks: {
|
|
afterAllFilesWrite: 'prettier --write',
|
|
}
|
|
},
|
|
});
|