all changes
This commit is contained in:
@@ -111,7 +111,7 @@ export const aboutUsApi = createApi({
|
||||
// ✅ GET About Us
|
||||
getAboutUs: builder.query<AboutUsData, void>({
|
||||
query: () => ({
|
||||
url: "/admin/about-us",
|
||||
url: "/guest/about-us",
|
||||
method: "GET",
|
||||
}),
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ export const blogApi = createApi({
|
||||
if (tag_id && tag_id !== "all") params.tag_id = tag_id;
|
||||
|
||||
return {
|
||||
url: "/admin/blogs/list",
|
||||
url: "/guest/blogs/list",
|
||||
method: "GET",
|
||||
params,
|
||||
};
|
||||
@@ -114,7 +114,7 @@ export const blogApi = createApi({
|
||||
|
||||
getBlogByID: builder.query<BlogItem, string>({
|
||||
query: (id) => ({
|
||||
url: `/admin/blogs/list/${id}`,
|
||||
url: `/guest/blogs/list/${id}`,
|
||||
method: "GET",
|
||||
}),
|
||||
transformResponse: (response: BlogByIdResponse) => response.data,
|
||||
|
||||
@@ -10,7 +10,7 @@ export const contactUsApi = createApi({
|
||||
// GET Lead Categories
|
||||
getLeadCategories: builder.query({
|
||||
query: ({ limit = 10, offset = 0, status = "active" }) => ({
|
||||
url: "admin/prepopulate/lead-categories/list",
|
||||
url: "guest/prepopulate/lead-categories/list",
|
||||
params: {
|
||||
limit,
|
||||
offset,
|
||||
@@ -23,7 +23,7 @@ export const contactUsApi = createApi({
|
||||
// CREATE Lead
|
||||
createLead: builder.mutation({
|
||||
query: (body) => ({
|
||||
url: "admin/leads/create",
|
||||
url: "guest/leads/create",
|
||||
method: "POST",
|
||||
body,
|
||||
}),
|
||||
|
||||
@@ -321,8 +321,8 @@ export const courseApi = createApi({
|
||||
const queryString = searchParams.toString();
|
||||
|
||||
return queryString
|
||||
? `admin/course/public/list?${queryString}`
|
||||
: `admin/course/public/list`;
|
||||
? `guest/course/public/list?${queryString}`
|
||||
: `guest/course/public/list`;
|
||||
},
|
||||
|
||||
providesTags: (result) =>
|
||||
@@ -348,15 +348,15 @@ export const courseApi = createApi({
|
||||
}
|
||||
const queryString = searchParams.toString();
|
||||
return queryString
|
||||
? `admin/prepopulate/course-categories/list?${queryString}`
|
||||
: `admin/prepopulate/course-categories/list`;
|
||||
? `guest/prepopulate/course-categories/list?${queryString}`
|
||||
: `guest/prepopulate/course-categories/list`;
|
||||
},
|
||||
providesTags: ["CourseCategories"],
|
||||
}),
|
||||
|
||||
// GET Course By Id
|
||||
getcoursebyid: builder.query<CourseDetailResponse, string>({
|
||||
query: (course_id) => `admin/course/${course_id}`,
|
||||
query: (course_id) => `guest/course/${course_id}`,
|
||||
providesTags: (_result, _error, course_id) => [{ type: "Course", id: course_id }],
|
||||
}),
|
||||
|
||||
@@ -368,4 +368,5 @@ export const {
|
||||
useGetCoursesQuery,
|
||||
useGetCourseCategoriesQuery,
|
||||
useGetcoursebyidQuery,
|
||||
|
||||
} = courseApi;
|
||||
|
||||
@@ -10,7 +10,7 @@ export const faqApi = createApi({
|
||||
// GET FAQs LIST
|
||||
getFaqs: builder.query({
|
||||
query: ({ limit = 10, offset = 0, search_term, content_status, content_category_xid }) => ({
|
||||
url: "admin/faq/list",
|
||||
url: "guest/faq/list",
|
||||
params: {
|
||||
limit,
|
||||
offset,
|
||||
@@ -25,7 +25,7 @@ export const faqApi = createApi({
|
||||
// GET category TAGS LIST
|
||||
getFaqCategories: builder.query({
|
||||
query: ({ limit = 10, offset = 0, search_query }) => ({
|
||||
url: "admin/prepopulate/content-categories/list",
|
||||
url: "guest/prepopulate/content-categories/list",
|
||||
params: {
|
||||
limit,
|
||||
offset,
|
||||
|
||||
@@ -103,7 +103,7 @@ export const homepageApi = createApi({
|
||||
{ landing_page_type: "home" | "services" | "about_us" }
|
||||
>({
|
||||
query: ({ landing_page_type }) => ({
|
||||
url: "/admin/home-page/list",
|
||||
url: "/guest/home-page/list",
|
||||
params: { landing_page_type },
|
||||
}),
|
||||
|
||||
@@ -114,7 +114,7 @@ export const homepageApi = createApi({
|
||||
|
||||
getFeaturedBlogs: builder.query({
|
||||
query: ({ limit = 3 }) => ({
|
||||
url: `/admin/blogs/featured?limit=${limit}`,
|
||||
url: `/guest/blogs/featured?limit=${limit}`,
|
||||
method: 'GET',
|
||||
}),
|
||||
transformResponse: (response: any) => {
|
||||
|
||||
@@ -14,7 +14,15 @@ export interface KautilyaPageResponse {
|
||||
subtext: string;
|
||||
cta_text: string;
|
||||
cta_destination: string;
|
||||
images: Array<{ // ✅ FIX ADDED
|
||||
id: string;
|
||||
hero_section_xid: string;
|
||||
image_url: string;
|
||||
alt_text: string;
|
||||
display_order: number;
|
||||
}>;
|
||||
};
|
||||
|
||||
our_story: {
|
||||
id: string;
|
||||
tag: string;
|
||||
@@ -22,6 +30,7 @@ export interface KautilyaPageResponse {
|
||||
content: string;
|
||||
image_url: string;
|
||||
};
|
||||
|
||||
why_choose_us: {
|
||||
id: string;
|
||||
tag: string;
|
||||
@@ -40,6 +49,7 @@ export interface KautilyaPageResponse {
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
|
||||
facility_features: {
|
||||
id: string;
|
||||
title: string;
|
||||
@@ -58,6 +68,7 @@ export interface KautilyaPageResponse {
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
|
||||
visual_tour: {
|
||||
id: string;
|
||||
title: string;
|
||||
@@ -75,6 +86,7 @@ export interface KautilyaPageResponse {
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
|
||||
daily_experience: {
|
||||
id: string;
|
||||
title: string;
|
||||
@@ -88,6 +100,7 @@ export interface KautilyaPageResponse {
|
||||
display_order: number;
|
||||
}>;
|
||||
};
|
||||
|
||||
cta_section: {
|
||||
id: string;
|
||||
background_image_url: string;
|
||||
@@ -97,6 +110,7 @@ export interface KautilyaPageResponse {
|
||||
description: string;
|
||||
};
|
||||
};
|
||||
|
||||
errors: any;
|
||||
correlation_id: string;
|
||||
}
|
||||
@@ -111,7 +125,7 @@ export const learningFacilityApi = createApi({
|
||||
{ }
|
||||
>({
|
||||
query: ({ }) => ({
|
||||
url: "/admin/kautilya-page/get",
|
||||
url: "/guest/kautilya-page/get",
|
||||
}),
|
||||
transformResponse: (response: KautilyaPageResponse) => response.data,
|
||||
providesTags: [{ type: "KautilyaPage", id: "LIST" }],
|
||||
|
||||
@@ -10,7 +10,7 @@ export const sercicesApi = createApi({
|
||||
|
||||
getServiceList: builder.query<any, { service_type: string }>({
|
||||
query: ({ service_type }) => ({
|
||||
url: `/admin/service-page/list`,
|
||||
url: `/guest/service-page/list`,
|
||||
params: { service_type },
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -50,6 +50,92 @@ export interface WebinarListParams {
|
||||
sortBy?: "most_popular" | "newest" | "oldest" | "title" | "duration";
|
||||
}
|
||||
|
||||
export interface WebinarDetailResponse {
|
||||
success: boolean;
|
||||
status: number;
|
||||
message: string;
|
||||
data: {
|
||||
id: string;
|
||||
session_title: string;
|
||||
description: string | null;
|
||||
session_datetime: string;
|
||||
duration_minutes: number;
|
||||
timezone_xid: string;
|
||||
webinar_category_id: string;
|
||||
max_attendee: number;
|
||||
passcode: string;
|
||||
require_registration: boolean;
|
||||
recurring_webinar: boolean;
|
||||
webinar_status: "scheduled" | "live" | "ended" | "cancelled";
|
||||
type: string;
|
||||
media: {
|
||||
id: string;
|
||||
file_name: string;
|
||||
file_type: string;
|
||||
file_extension: string;
|
||||
} | null;
|
||||
about_this_session: {
|
||||
description: string;
|
||||
points: Array<{
|
||||
id: string;
|
||||
about_id: string;
|
||||
point: string;
|
||||
sort_order: number;
|
||||
}>;
|
||||
} | null;
|
||||
agenda_items: Array<{
|
||||
id: string;
|
||||
webinar_xid: string;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
title: string;
|
||||
description: string;
|
||||
}>;
|
||||
speakers: Array<{
|
||||
id: string;
|
||||
webinar_xid: string;
|
||||
name: string;
|
||||
designation: string;
|
||||
company: string;
|
||||
bio: string;
|
||||
image_url: string;
|
||||
is_host: boolean;
|
||||
}>;
|
||||
faqs: any;
|
||||
course_links: Array<{
|
||||
id: string;
|
||||
webinar_xid: string;
|
||||
course_xid: string;
|
||||
display_order: number;
|
||||
course: {
|
||||
id: string;
|
||||
course_name: string;
|
||||
course_desc: string;
|
||||
thumbnail_img: string;
|
||||
course_category_xid: string;
|
||||
course_category_name: string;
|
||||
best_value: number;
|
||||
avg_rating: number;
|
||||
total_reviews: number;
|
||||
retail_type: string;
|
||||
price: number;
|
||||
is_certificate_available: boolean;
|
||||
course_status: string;
|
||||
updated_at: string;
|
||||
total_duration: number | null;
|
||||
no_of_modules: number;
|
||||
media_id: string | null;
|
||||
media_file_type: string | null;
|
||||
media_file_extension: string | null;
|
||||
media_file_name: string | null;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
errors: any;
|
||||
correlation_id: string;
|
||||
}
|
||||
|
||||
|
||||
/* ================= API ================= */
|
||||
|
||||
export const webinarApi = createApi({
|
||||
@@ -115,14 +201,18 @@ export const webinarApi = createApi({
|
||||
params.append("sort_by", sortBy);
|
||||
}
|
||||
|
||||
return `/admin/webinars/list?${params.toString()}`;
|
||||
return `/guest/webinars/list?${params.toString()}`;
|
||||
},
|
||||
|
||||
providesTags: ["Webinar"],
|
||||
}),
|
||||
getWebinarById: builder.query<WebinarDetailResponse, string>({
|
||||
query: (webinarId) => `/guest/webinars/${webinarId}`,
|
||||
providesTags: (result, error, id) => [{ type: "Webinar", id }],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
/* ================= EXPORT HOOK ================= */
|
||||
|
||||
export const { useWebinarListQuery } = webinarApi;
|
||||
export const { useWebinarListQuery, useGetWebinarByIdQuery } = webinarApi;
|
||||
Reference in New Issue
Block a user