Commit d04f19c2 authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

fix ui home

parent c03ea16b
import type { NextConfig } from "next";
import links from "./src/links/index";
const nextConfig: NextConfig = {
/* config options here */
images: {
remotePatterns: [
...(links.backendHost
? [
{
protocol: "https",
protocol: links.backendProtocol as "http" | "https",
hostname: links.backendHost,
port: "",
pathname: "/vcci/images/**",
pathname: `${links.backendPathname === "/" ? "" : links.backendPathname}/**`,
},
]
: []),
{
protocol: "https",
hostname: "vcci-hcm.org.vn", // WordPress / media host
......
import { defineConfig } from 'orval'
import axios from 'axios'
import fs from 'fs'
import path from 'path'
import { defineConfig } from "orval";
import axios from "axios";
import fs from "fs";
import path from "path";
function loadEnvFile(filePath: string) {
if (!fs.existsSync(filePath)) return;
const linksPath = path.resolve(process.cwd(), 'src/links/index.ts')
const linksContent = fs.readFileSync(linksPath, 'utf8')
const content = fs.readFileSync(filePath, "utf8");
content.split(/\r?\n/).forEach((line) => {
const trimmed = line.trim();
if (!trimmed || trimmed.startsWith("#")) return;
const equalsIndex = trimmed.indexOf("=");
if (equalsIndex < 0) return;
const backendHostMatch = linksContent.match(/const\s+backendHost\s*=\s*['"`]([^'"`]+)['"`]/)
const backendHost = backendHostMatch ? backendHostMatch[1] : ''
const key = trimmed.slice(0, equalsIndex).trim();
const value = trimmed.slice(equalsIndex + 1).trim().replace(/^['"]|['"]$/g, "");
const siteURLMatch = linksContent.match(/siteURL\s*:\s*['"`]([^'"`]+)['"`]/)
const siteURL = siteURLMatch ? siteURLMatch[1] : ''
if (key && process.env[key] === undefined) {
process.env[key] = value;
}
});
}
loadEnvFile(path.resolve(process.cwd(), ".env"));
const backendHost = process.env.NEXT_PUBLIC_BACKEND_HOST;
const siteURL = process.env.NEXT_PUBLIC_FRONTEND_HOST;
const swaggerCandidates = [
process.env.ORVAL_SWAGGER_URL,
path.resolve(process.cwd(), "..", "vietprodev-cms-backend", "storage", "swagger", "swagger-output.json"),
`${backendHost}/swagger-output.json`,
`${backendHost}/swagger/swagger-output.json`,
`${backendHost}/swagger.json`,
`${backendHost}/openapi.json`,
`${backendHost}/api/swagger/swagger-output.json`,
`${backendHost}/vcci/swagger/swagger-output.json`,
].filter(Boolean) as string[];
async function fetchSwagger() {
for (const url of swaggerCandidates) {
if (typeof url === "string" && fs.existsSync(url)) {
return JSON.parse(fs.readFileSync(url, "utf8"));
}
const imageEndpointMatch = linksContent.match(/imageEndpoint\s*:\s*`([^`]*)`/)
let imageEndpoint = ''
if (imageEndpointMatch) {
imageEndpoint = imageEndpointMatch[1].replace(/\${\s*backendHost\s*}/g, backendHost)
} else {
const simpleMatch = linksContent.match(/imageEndpoint\s*:\s*['"`]([^'"`]+)['"`]/)
imageEndpoint = simpleMatch ? simpleMatch[1] : ''
try {
const { data } = await axios.get(url, {
headers: { Origin: siteURL },
});
return data;
} catch {
continue;
}
}
const localSwagger = path.resolve(process.cwd(), "openapi/swagger-output.json");
if (fs.existsSync(localSwagger)) {
return JSON.parse(fs.readFileSync(localSwagger, "utf8"));
}
throw new Error(
`Unable to load Swagger/OpenAPI JSON. Tried: ${swaggerCandidates.join(", ")}`,
);
}
const orvalConfig = async () => {
const { data: swagger } = await axios.get(`${imageEndpoint}/swagger/swagger-output.json`, {
headers: { Origin: siteURL }
})
const swagger = await fetchSwagger();
return defineConfig({
'saigon-business': {
"saigon-business": {
output: {
mode: 'tags',
target: 'src/api/endpoints/index.ts',
schemas: 'src/api/models',
client: 'react-query',
mode: "tags",
target: "src/api/endpoints/index.ts",
schemas: "src/api/models",
client: "react-query",
prettier: true,
override: {
query: {
......@@ -48,10 +86,6 @@ const orvalConfig = async () => {
retryDelay: 1000,
}
},
mutator: {
path: './src/api/mutator/custom-client.ts',
name: 'useCustomClient'
}
}
},
input: {
......@@ -85,11 +119,11 @@ const orvalConfig = async () => {
'News',
'Category',
'NewsPageConfig',
]
}
}
}
})
],
},
},
},
});
}
export default orvalConfig
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponseResponseData } from './apiResponseResponseData';
import type { ApiResponseViolationItem } from './apiResponseViolationItem';
export interface ApiResponse {
message?: string;
message_en?: string;
responseData?: ApiResponseResponseData;
status?: string;
timeStamp?: string;
violation?: ApiResponseViolationItem[];
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type ApiResponseResponseData = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type ApiResponseViolationItem = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BadRequestResponseError } from './badRequestResponseError';
import type { BadRequestResponseResponseData } from './badRequestResponseResponseData';
import type { BadRequestResponseViolationItem } from './badRequestResponseViolationItem';
export type BadRequestResponse = {
success?: boolean;
error?: BadRequestResponseError;
/** @nullable */
message?: string | null;
/** @nullable */
message_en?: string | null;
/** @nullable */
responseData?: BadRequestResponseResponseData;
status?: string;
timeStamp?: string;
/** @nullable */
violation?: BadRequestResponseViolationItem[] | null;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BadRequestResponseErrorMessage } from './badRequestResponseErrorMessage';
export type BadRequestResponseError = {
code?: string;
message?: BadRequestResponseErrorMessage;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type BadRequestResponseErrorMessage = {
vi?: string;
en?: string;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* @nullable
*/
export type BadRequestResponseResponseData = { [key: string]: unknown } | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type BadRequestResponseViolationItem = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BusinessLogoSummary } from './businessLogoSummary';
export interface Business {
id: string;
name: string;
slug: string;
industry_ids: string[];
/** @nullable */
logo: BusinessLogoSummary;
/** @nullable */
rating: number | null;
/** @nullable */
address: string | null;
/** @nullable */
phone: string | null;
/** @nullable */
website: string | null;
created_at: string;
/** @nullable */
created_by?: string | null;
updated_at: string;
/** @nullable */
updated_by?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface BusinessCreate {
name: string;
/** @nullable */
slug?: string | null;
/** @nullable */
industry_ids?: string[] | null;
/** @nullable */
logo_id?: string | null;
/** @nullable */
rating?: number | null;
/** @nullable */
address?: string | null;
/** @nullable */
phone?: string | null;
/** @nullable */
website?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BusinessDeleteResponseResponseData } from './businessDeleteResponseResponseData';
import type { BusinessDeleteResponseViolations } from './businessDeleteResponseViolations';
export interface BusinessDeleteResponse {
/** @nullable */
message: string | null;
/** @nullable */
message_en: string | null;
responseData: BusinessDeleteResponseResponseData;
status: string;
timeStamp: string;
/** @nullable */
violations: BusinessDeleteResponseViolations;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type BusinessDeleteResponseResponseData = {
id: string;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* @nullable
*/
export type BusinessDeleteResponseViolations = { [key: string]: unknown } | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BusinessGetAllResponseResponseData } from './businessGetAllResponseResponseData';
import type { BusinessGetAllResponseViolations } from './businessGetAllResponseViolations';
export interface BusinessGetAllResponse {
/** @nullable */
message: string | null;
/** @nullable */
message_en: string | null;
responseData: BusinessGetAllResponseResponseData;
status: string;
timeStamp: string;
/** @nullable */
violations: BusinessGetAllResponseViolations;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Business } from './business';
export type BusinessGetAllResponseResponseData = {
rows: Business[];
count: number;
page: number;
pageSize: number;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* @nullable
*/
export type BusinessGetAllResponseViolations = { [key: string]: unknown } | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Business } from './business';
import type { BusinessGetOneResponseViolations } from './businessGetOneResponseViolations';
export interface BusinessGetOneResponse {
/** @nullable */
message: string | null;
/** @nullable */
message_en: string | null;
responseData: Business;
status: string;
timeStamp: string;
/** @nullable */
violations: BusinessGetOneResponseViolations;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* @nullable
*/
export type BusinessGetOneResponseViolations = { [key: string]: unknown } | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface BusinessLogoSummary {
id: string;
path: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { BusinessCreate } from './businessCreate';
import type { BusinessUpdate } from './businessUpdate';
export type BusinessMutate = BusinessCreate | BusinessUpdate;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface BusinessUpdate {
/** @nullable */
name?: string | null;
/** @nullable */
slug?: string | null;
/** @nullable */
industry_ids?: string[] | null;
/** @nullable */
logo_id?: string | null;
/** @nullable */
rating?: number | null;
/** @nullable */
address?: string | null;
/** @nullable */
phone?: string | null;
/** @nullable */
website?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { CategoryThumbnail } from './categoryThumbnail';
export interface Category {
id?: string;
name?: string;
description?: string;
slug?: string;
/** @nullable */
url?: string | null;
/**
* @minimum 0
* @nullable
*/
sort_order?: number | null;
/** @nullable */
thumbnail_id?: string | null;
/** @nullable */
thumbnail?: CategoryThumbnail;
created_at?: string;
/** @nullable */
created_by?: string | null;
updated_at?: string;
/** @nullable */
updated_by?: string | null;
/** @nullable */
type?: string | null;
/** @nullable */
parent_id?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface CategoryMutate {
name?: string;
slug?: string;
/** @nullable */
url?: string | null;
/**
* @minimum 0
* @nullable
*/
sort_order?: number | null;
/** @nullable */
thumbnail_id?: string | null;
/** @nullable */
type?: string | null;
/** @nullable */
parent_id?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface CategoryTag {
category_id?: string;
tag_id?: string;
created_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface CategoryTagMutate {
category_id?: string;
tag_id?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* @nullable
*/
export type CategoryThumbnail = {
id?: string;
path?: string;
original?: string;
mime?: string;
} | null;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface Contact {
id?: string;
fullname?: string;
email?: string;
phone?: string;
title?: string;
content?: string;
status?: string;
created_at?: string;
updated_at?: string;
created_by?: string;
updated_by?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface ContactMutate {
fullname?: string;
email?: string;
phone?: string;
title?: string;
content?: string;
status?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { DeleteApiV10CategoryId200AllOf } from './deleteApiV10CategoryId200AllOf';
export type DeleteApiV10CategoryId200 = ApiResponse & DeleteApiV10CategoryId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type DeleteApiV10CategoryId200AllOf = {
responseData?: boolean;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { DeleteApiV10ContactId200AllOf } from './deleteApiV10ContactId200AllOf';
export type DeleteApiV10ContactId200 = ApiResponse & DeleteApiV10ContactId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type DeleteApiV10ContactId200AllOf = {
responseData?: boolean;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { DeleteCategoryId200AllOf } from './deleteCategoryId200AllOf';
export type DeleteCategoryId200 = ApiResponse & DeleteCategoryId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type DeleteCategoryId200AllOf = {
responseData?: boolean;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { DeleteContactId200AllOf } from './deleteContactId200AllOf';
export type DeleteContactId200 = ApiResponse & DeleteContactId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type DeleteContactId200AllOf = {
responseData?: boolean;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FileCompressInfo } from './fileCompressInfo';
import type { FileImportInfo } from './fileImportInfo';
export interface File {
id?: string;
path?: string;
original?: string;
mime?: string;
compress_info?: FileCompressInfo;
compress_status?: string;
created_by?: string;
created_at?: string;
status?: string;
import_info?: FileImportInfo;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type FileCompressInfo = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type FileImportInfo = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FileMutateCompressInfo } from './fileMutateCompressInfo';
import type { FileMutateImportInfo } from './fileMutateImportInfo';
export interface FileMutate {
path?: string;
original?: string;
mime?: string;
compress_info?: FileMutateCompressInfo;
compress_status?: string;
status?: string;
import_info?: FileMutateImportInfo;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type FileMutateCompressInfo = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type FileMutateImportInfo = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
export type FiltersMutateParameter = string;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
export type FiltersParameter = string;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface ForgotPasswordResetRequest {
reset_token: string;
/** @minLength 6 */
new_password: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface ForgotPasswordSendOtpRequest {
email: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface ForgotPasswordVerifyOtpRequest {
email: string;
/** 6-digit OTP */
otp: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface ForgotPasswordVerifyOtpResponse {
reset_token?: string;
expires_in?: number;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetApiV10CategoryId200AllOf } from './getApiV10CategoryId200AllOf';
export type GetApiV10CategoryId200 = ApiResponse & GetApiV10CategoryId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Category } from './category';
export type GetApiV10CategoryId200AllOf = {
responseData?: Category;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetApiV10CategoryParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetApiV10ContactId200AllOf } from './getApiV10ContactId200AllOf';
export type GetApiV10ContactId200 = ApiResponse & GetApiV10ContactId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Contact } from './contact';
export type GetApiV10ContactId200AllOf = {
responseData?: Contact;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetApiV10ContactParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VietProDev CMS Backend API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type GetApiV10PageConfigParams = {
/**
* ID of the page config to retrieve
*/
id?: string;
/**
* Static link of the page config to retrieve
*/
static_link?: string;
/**
* Code of the page config to retrieve
*/
code?: string;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetCategoryId200AllOf } from './getCategoryId200AllOf';
export type GetCategoryId200 = ApiResponse & GetCategoryId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Category } from './category';
export type GetCategoryId200AllOf = {
responseData?: Category;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetCategoryParams = {
currentPage?: string;
pageSize?: string;
filters?: string;
sortField?: string;
sortOrder?: string;
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { ApiResponse } from './apiResponse';
import type { GetContactId200AllOf } from './getContactId200AllOf';
export type GetContactId200 = ApiResponse & GetContactId200AllOf;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { Contact } from './contact';
export type GetContactId200AllOf = {
responseData?: Contact;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { FiltersParameter } from './filtersParameter';
import type { SortFieldParameter } from './sortFieldParameter';
import type { SortOrderParameter } from './sortOrderParameter';
import type { PageParameter } from './pageParameter';
import type { PageSizeParameter } from './pageSizeParameter';
export type GetContactParams = {
/**
* filter, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
filters?: FiltersParameter;
/**
* sortField, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortField?: SortFieldParameter;
/**
* sort order, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
sortOrder?: SortOrderParameter;
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
page?: PageParameter;
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
* @minimum 1
*/
pageSize?: PageSizeParameter;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type GetPageConfigParams = {
/**
* ID of the page config to retrieve
*/
id?: string;
/**
* Static link of the page config to retrieve
*/
static_link?: string;
/**
* Code of the page config to retrieve
*/
code?: string;
};
This diff is collapsed.
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { LoginRequestDeviceInfo } from './loginRequestDeviceInfo';
export interface LoginRequest {
email: string;
password: string;
/** Device information for session tracking */
device_info?: LoginRequestDeviceInfo;
/** IP address for security logging */
ip_address?: string;
/** User agent string */
user_agent?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* Device information for session tracking
*/
export type LoginRequestDeviceInfo = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface LoginResponse {
/** JWT access token */
access_token: string;
/** JWT refresh token */
refresh_token: string;
/** Access token expiration time in seconds */
expires_in: number;
/** Refresh token expiration time in seconds */
refresh_expires_in: number;
token_type: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { LogoFile } from './logoFile';
export interface Logo {
id: string;
/** @maxLength 255 */
logo_name: string;
/** @nullable */
description?: string | null;
file_id: LogoFile;
created_at: string;
/** @nullable */
created_by?: string | null;
updated_at: string;
/** @nullable */
updated_by?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface LogoCreate {
/** @maxLength 255 */
logo_name: string;
/** @nullable */
description?: string | null;
file_id: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface LogoFile {
id: string;
path: string;
original: string;
mime: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { LogoCreate } from './logoCreate';
export type LogoMutate = LogoCreate;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface LogoUpdate {
/** @maxLength 255 */
logo_name?: string;
/** @nullable */
description?: string | null;
file_id?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MediaAssetVariants } from './mediaAssetVariants';
export interface MediaAsset {
id?: string;
file_hash?: string;
original_url?: string;
local_path?: string;
file_size?: number;
mime_type?: string;
width?: number;
height?: number;
variants?: MediaAssetVariants;
download_attempts?: number;
last_download_at?: string;
created_at?: string;
name?: string;
alt_text?: string;
source?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MediaAssetMutateVariants } from './mediaAssetMutateVariants';
export interface MediaAssetMutate {
file_hash?: string;
original_url?: string;
local_path?: string;
file_size?: number;
mime_type?: string;
width?: number;
height?: number;
variants?: MediaAssetMutateVariants;
download_attempts?: number;
last_download_at?: string;
name?: string;
alt_text?: string;
source?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MediaAssetMutateVariants = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MediaAssetVariants = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface MemberCreate {
full_name: string;
/** @nullable */
avatar_url?: string | null;
/** @nullable */
birth_date?: string | null;
/** @nullable */
business_id?: string | null;
/** @nullable */
position_id?: string | null;
/**
* Chức danh tại doanh nghiệp/công ty của hội viên. Đây là trường nhập tay, không liên kết với positions.
* @maxLength 255
* @nullable
*/
job_title?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MemberImportWarningItem } from './memberImportWarningItem';
export interface MemberImportResponse {
sheet_name?: string;
total_rows?: number;
created_member_count?: number;
updated_member_count?: number;
created_business_count?: number;
updated_business_count?: number;
created_position_count?: number;
warning_count?: number;
warnings?: MemberImportWarningItem[];
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface MemberImportWarningItem {
row_number?: number;
/** @nullable */
full_name?: string | null;
message?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface MemberUpdate {
full_name?: string;
/** @nullable */
avatar_url?: string | null;
/** @nullable */
birth_date?: string | null;
/** @nullable */
business_id?: string | null;
/** @nullable */
position_id?: string | null;
/**
* Chức danh tại doanh nghiệp/công ty của hội viên. Đây là trường nhập tay, không liên kết với positions.
* @maxLength 255
* @nullable
*/
job_title?: string | null;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MigrationCheckpointErrorSummary } from './migrationCheckpointErrorSummary';
export interface MigrationCheckpoint {
id?: string;
migration_name?: string;
batch_index?: number;
total_records?: number;
processed_count?: number;
failed_count?: number;
skipped_count?: number;
status?: string;
error_summary?: MigrationCheckpointErrorSummary;
started_at?: string;
completed_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MigrationCheckpointErrorSummary = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MigrationCheckpointMutateErrorSummary } from './migrationCheckpointMutateErrorSummary';
export interface MigrationCheckpointMutate {
migration_name?: string;
batch_index?: number;
total_records?: number;
processed_count?: number;
failed_count?: number;
skipped_count?: number;
status?: string;
error_summary?: MigrationCheckpointMutateErrorSummary;
started_at?: string;
completed_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MigrationCheckpointMutateErrorSummary = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MigrationMappingMetadata } from './migrationMappingMetadata';
export interface MigrationMapping {
id?: string;
source_id?: string;
source_type?: string;
target_id?: string;
status?: string;
hash?: string;
error_message?: string;
metadata?: MigrationMappingMetadata;
version?: number;
last_synced_at?: string;
created_at?: string;
updated_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MigrationMappingMetadata = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
import type { MigrationMappingMutateMetadata } from './migrationMappingMutateMetadata';
export interface MigrationMappingMutate {
source_id?: string;
source_type?: string;
target_id?: string;
status?: string;
hash?: string;
error_message?: string;
metadata?: MigrationMappingMutateMetadata;
version?: number;
last_synced_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export type MigrationMappingMutateMetadata = { [key: string]: unknown };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfig {
id?: string;
name?: string;
code?: string;
name?: string;
static_link?: string;
created_at?: string;
static_link_en?: string;
parent_id?: string;
level?: number;
sort_order?: number;
is_article?: boolean;
created_at?: string;
created_by?: string;
updated_at?: string;
updated_by?: string;
slug?: string;
description?: string;
type?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfigCategory {
page_config_id?: string;
category_id?: string;
created_at?: string;
created_by?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfigCategoryMutate {
page_config_id?: string;
category_id?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfigMutate {
code?: string;
name?: string;
static_link?: string;
static_link_en?: string;
parent_id?: string;
level?: number;
sort_order?: number;
is_article?: boolean;
slug?: string;
description?: string;
type?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfigTag {
page_config_id?: string;
tag_id?: string;
created_at?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
export interface PageConfigTagMutate {
page_config_id?: string;
tag_id?: string;
}
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* page, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
export type PageParameter = number;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* Backend Template API
* Generated API documentation
* OpenAPI spec version: 1.0.0
*/
/**
* pageSize, visit https://www.npmjs.com/package/sequelize-api-paginate for syntax
*/
export type PageSizeParameter = number;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment