diff --git a/frontend/openapi-ts.config.ts b/frontend/openapi-ts.config.ts index 1a4e345..1ce4545 100644 --- a/frontend/openapi-ts.config.ts +++ b/frontend/openapi-ts.config.ts @@ -1,8 +1,8 @@ import { defineConfig } from "@hey-api/openapi-ts"; import path from "path"; -const API_URL = - process.env.NEXT_PUBLIC_BACKEND_API_URL || "http://localhost:8000"; +const API_URL = "https://api.eventspace.pragmazest.com"; +// process.env.NEXT_PUBLIC_BACKEND_API_URL || "http://localhost:8000"; const OPENAPI_URL = `${API_URL}/api/v1/openapi.json`; const OUTPUT_DIR = path.resolve(__dirname, "./src/client"); // const OPENAPI_FILE = path.resolve(__dirname, './openapi.json'); diff --git a/frontend/src/client/client.gen.ts b/frontend/src/client/client.gen.ts index ada3c32..a4c45df 100644 --- a/frontend/src/client/client.gen.ts +++ b/frontend/src/client/client.gen.ts @@ -23,6 +23,6 @@ export type CreateClientConfig = export const client = createClient( createConfig({ - baseURL: "http://localhost:8000", + baseURL: "https://api.eventspace.pragmazest.com", }), ); diff --git a/frontend/src/client/sdk.gen.ts b/frontend/src/client/sdk.gen.ts index 27e2cc2..c64b075 100644 --- a/frontend/src/client/sdk.gen.ts +++ b/frontend/src/client/sdk.gen.ts @@ -739,12 +739,6 @@ export const readGiftCategories = ( ReadGiftCategoriesError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/categories/event/{event_id}", ...options, }); @@ -786,12 +780,6 @@ export const readGiftCategory = ( ReadGiftCategoryError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/categories/{category_id}", ...options, }); @@ -963,12 +951,6 @@ export const readGiftItems = ( ReadGiftItemsError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/items/event/{event_id}", ...options, }); @@ -1009,12 +991,6 @@ export const readGiftItem = ( ReadGiftItemError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/items/{item_id}", ...options, }); @@ -1083,12 +1059,6 @@ export const reserveGiftItem = ( ReserveGiftItemError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/items/{item_id}/reserve", ...options, }); @@ -1106,12 +1076,6 @@ export const cancelGiftReservation = ( CancelGiftReservationError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/items/{item_id}/cancel-reservation", ...options, }); @@ -1129,12 +1093,6 @@ export const createGiftPurchase = ( CreateGiftPurchaseError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/purchases/", ...options, headers: { @@ -1156,12 +1114,6 @@ export const readGiftPurchase = ( ReadGiftPurchaseError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/purchases/{purchase_id}", ...options, }); @@ -1179,12 +1131,6 @@ export const readGiftPurchasesByGift = ( ReadGiftPurchasesByGiftError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/purchases/gift/{gift_id}", ...options, }); @@ -1202,12 +1148,6 @@ export const readGiftPurchasesByGuest = ( ReadGiftPurchasesByGuestError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/gifts/purchases/guest/{guest_id}", ...options, }); @@ -1388,12 +1328,6 @@ export const getEventBySlug = ( GetEventBySlugError, ThrowOnError >({ - security: [ - { - scheme: "bearer", - type: "http", - }, - ], url: "/api/v1/events/by-slug/{slug}", ...options, }); diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index 8cc35d2..e6cdaf3 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -1237,6 +1237,9 @@ export type CreateGiftCategoryResponse = export type ReadGiftCategoriesData = { body?: never; + headers?: { + authorization?: string; + }; path: { event_id: string; }; @@ -1303,6 +1306,9 @@ export type DeleteGiftCategoryResponse = export type ReadGiftCategoryData = { body?: never; + headers?: { + authorization?: string; + }; path: { category_id: string; }; @@ -1521,6 +1527,9 @@ export type CreateGiftItemResponse = export type ReadGiftItemsData = { body?: never; + headers?: { + authorization?: string; + }; path: { event_id: string; }; @@ -1583,6 +1592,9 @@ export type DeleteGiftItemResponse = export type ReadGiftItemData = { body?: never; + headers?: { + authorization?: string; + }; path: { item_id: string; }; @@ -1671,6 +1683,9 @@ export type UpdateGiftItemStatusResponse = export type ReserveGiftItemData = { body?: never; + headers?: { + authorization?: string; + }; path: { item_id: string; }; @@ -1704,6 +1719,9 @@ export type ReserveGiftItemResponse = export type CancelGiftReservationData = { body?: never; + headers?: { + authorization?: string; + }; path: { item_id: string; }; @@ -1735,6 +1753,9 @@ export type CancelGiftReservationResponse = export type CreateGiftPurchaseData = { body: GiftPurchaseCreate; + headers?: { + authorization?: string; + }; path?: never; query?: never; url: "/api/v1/events/gifts/purchases/"; @@ -1762,6 +1783,9 @@ export type CreateGiftPurchaseResponse = export type ReadGiftPurchaseData = { body?: never; + headers?: { + authorization?: string; + }; path: { purchase_id: string; }; @@ -1791,6 +1815,9 @@ export type ReadGiftPurchaseResponse = export type ReadGiftPurchasesByGiftData = { body?: never; + headers?: { + authorization?: string; + }; path: { gift_id: string; }; @@ -2055,6 +2082,9 @@ export type UpdateEventResponse = export type GetEventBySlugData = { body?: never; + headers?: { + authorization?: string; + }; path: { slug: string; }; @@ -2137,5 +2167,5 @@ export type UploadFileResponses = { }; export type ClientOptions = { - baseURL: "http://localhost:8000" | (string & {}); + baseURL: "https://api.eventspace.pragmazest.com" | (string & {}); }; diff --git a/frontend/src/lib/constants/common.ts b/frontend/src/lib/constants/common.ts index f222fc4..eb82763 100644 --- a/frontend/src/lib/constants/common.ts +++ b/frontend/src/lib/constants/common.ts @@ -1,5 +1,4 @@ export const RESERVED_SLUGS = ["new", "edit", "delete", "settings"]; -export const BACKEND_API_URL = - process.env.NEXT_PUBLIC_API_URL || "https://api.eventspace.pragmazest.com"; +export const BACKEND_API_URL = "https://api.eventspace.pragmazest.com"; export const APP_URL = process.env.NEXT_PUBLIC_APP_URL || "https://eventspace.pragmazest.com";