feat. 환경 세팅

This commit is contained in:
김채린
2025-09-09 03:34:09 +00:00
parent 52b2b6719b
commit 9581e5d356
119 changed files with 13160 additions and 86 deletions

View File

@@ -0,0 +1,230 @@
// API 요청 파라미터 타입
export interface GameDataRequest {
game_alias: string;
lang_code: string;
q?: string;
qc?: string;
}
// API 응답 데이터 타입
export interface GameDataResponse {
code: number;
message: string;
value: GameDataValue;
}
// API 응답의 value 객체 타입
export interface GameDataValue {
game_id: string;
game_code: number;
s3_folder_name: string;
default_lang_code: string;
ga_code: string;
favicon_path: string;
design_theme: number;
key_color_codes: string[];
lang_codes: string[];
use_game_font: boolean;
footer_dev_ci_img_yn: boolean;
game_font: GameDataFont;
global: GameDataGlobal;
gnb: GameDataGnb;
quick_menus: GameDataQuickMenu[];
stove_gnb: GameDataStoveGnb;
comm_img: GameDataCommImg;
meta_tag: GameDataMetaTag;
youtube: GameDataYoutube;
sns: GameDataSns;
market: GameDataMarket;
footer: GameDataFooter;
}
// Global 설정 타입
export interface GameDataGlobal {
system_font: GameDataFont;
lang: GameDataLang;
}
// 폰트 타입
export interface GameDataFont {
"font-family": string;
}
// 언어 설정 타입
export interface GameDataLang {
dir: string;
iso: string;
code: string;
name: string;
}
// GNB 설정 타입
export interface GameDataGnb {
game_gnb_ver: string;
display_start_dt: number;
theme_type: string;
bi_path: string;
lang_codes: string[];
buttons: any[];
menus: GameDataMenu[];
}
// 메뉴 타입
export interface GameDataMenu {
path_code: string;
depth: number;
sort_order: number;
menu_name: string;
click_action_type: number;
url_path: string;
link_target: string;
tracking: GameDataTracking;
}
// 트래킹 타입
export interface GameDataTracking {
viewType: string;
actionType: string;
clickSarea: string;
}
// 퀵 메뉴 타입
export interface GameDataQuickMenu {
banner_seq: number;
promotion_name: string;
thumbnail: string;
page_url_type: number;
page_url: string;
link_type: number;
display_start_dt: string;
display_end_dt: string;
sort_order: number;
banner_title: string;
}
// Stove GNB 타입
export interface GameDataStoveGnb {
skin_type: string;
stove_install_button_visible: string;
}
// 공통 이미지 타입
export interface GameDataCommImg {
groups: GameDataCommImgGroup[];
}
// 공통 이미지 그룹 타입
export interface GameDataCommImgGroup {
img_path: GameDataImgPath;
required: boolean;
img_scope: string;
group_code: string;
group_label: string;
}
// 이미지 경로 타입
export interface GameDataImgPath {
comm: string;
}
// 메타 태그 타입
export interface GameDataMetaTag {
x_desc: string;
og_desc: string;
x_image: string;
x_title: string;
og_image: string;
og_title: string;
page_desc: string;
page_title: string;
}
// YouTube 설정 타입
export interface GameDataYoutube {
use_yn: number;
api_key: string;
}
// SNS 설정 타입
export interface GameDataSns {
kakao: GameDataSnsItem;
tiktok: GameDataSnsItem;
discord: GameDataSnsItem;
twitter: GameDataSnsItem;
youtube: GameDataSnsItem;
facebook: GameDataSnsItem;
instagram: GameDataSnsItem;
}
// SNS 아이템 타입
export interface GameDataSnsItem {
url: string | null;
use_yn: number;
}
// 마켓 설정 타입
export interface GameDataMarket {
pc: GameDataMarketItem;
app_store: GameDataMarketItem;
google_play: GameDataMarketItem;
}
// 마켓 아이템 타입
export interface GameDataMarketItem {
url: string | null;
use_yn: number;
}
// 푸터 설정 타입
export interface GameDataFooter {
dev_ci_url: string;
use_dev_ci_url: boolean;
fund_display_yn: boolean;
use_game_rating: boolean;
fund_display_url: string;
game_rating_info: GameDataGameRatingInfo;
}
// 게임 등급 정보 타입
export interface GameDataGameRatingInfo {
title: string;
reg_no: string;
prod_date: string;
rating_type: string;
company_name: string;
content_info: string;
rating_grade: string;
rating_class_no: string;
}
// API 에러 응답 타입
export interface GameDataErrorResponse {
code: number;
message: string;
error?: string;
}
// API 응답 래퍼 타입 (성공/실패 통합)
export type GameDataApiResponse = GameDataResponse | GameDataErrorResponse;
// API 호출 옵션 타입
export interface GameDataApiOptions {
gameAlias: string;
langCode: string;
q: string;
qc: string;
baseUrl?: string;
}
// API 상태 타입
export type GameDataApiStatus = "idle" | "loading" | "success" | "error";
// API 결과 타입 (상태와 데이터를 함께 관리)
export interface GameDataApiResult {
status: GameDataApiStatus;
data: GameDataResponse | null;
error: string | null;
}
// 기존 gameData 타입과의 호환성을 위한 별칭
export type gameData = GameDataValue;

View File

@@ -0,0 +1,147 @@
// API 요청 파라미터 타입
export interface PageDataRequest {
game_alias: string;
lang_code: string;
page_url: string;
q?: string;
qc?: string;
}
// API 요청 헤더 타입
export interface PageDataRequestHeaders {
"caller-Detail"?: string;
"caller-ID"?: string;
Authorization?: string;
}
// API 응답 데이터 타입
export interface PageDataResponse {
code: number;
message: string;
value: PageDataValue;
}
// API 응답의 value 객체 타입
export interface PageDataValue {
page_seq: number;
page_type: number;
page_name: string;
page_name_en: string;
page_ver: number;
display_start_dt: string;
lang_codes: string; // JSON string
is_login_required: boolean;
meta_tag_type: number;
fit_page_height: boolean;
use_top_btn: boolean;
use_sns_btn: boolean;
use_lnb: boolean;
lnb_menus: PageDataLnbMenu[];
templates: PageDataTemplate[];
meta_tag: PageDataMetaTag;
}
// 메타 태그 타입
export interface PageDataMetaTag {
x_desc: string;
og_desc: string;
x_image: string;
x_title: string;
og_image: string;
og_title: string;
page_desc: string;
page_title: string;
}
// LNB 메뉴 타입
export interface PageDataLnbMenu {
text_color_code_active: string;
text_color_code_deactive: string;
path_code: string;
depth: number;
sort_order: number;
menu_name: string;
target_type: number;
page_ver_tmpl_name_en: string;
tracking: string; // JSON string
}
// 템플릿 타입
export interface PageDataTemplate {
tmpl_sort_order: number;
page_ver_tmpl_name: string;
page_ver_tmpl_name_en: string;
template_code: string;
template_type_code: string;
template_category: string;
template_name: string;
template_sample_img_path: string;
template_sample_zip_path: string;
template_type_name: string;
is_selectable_on_create: boolean;
components: Record<string, PageDataComponent>;
}
// 컴포넌트 타입
export interface PageDataComponent {
component_sort_order: number;
component_type: string;
set_count: number;
component_name: string;
is_required: boolean;
has_operational_resource: boolean;
min_count: number;
max_count: number;
component_id: string;
operate_resources: PageDataOperateResource[];
[key: string]: any; // Additional Properties
}
// 운영 리소스 타입
export interface PageDataOperateResource {
seq: number;
col: string;
col2: string;
col3: string;
col4: string;
col5: string;
col6: string;
col7: string;
resource_control_type: number;
resource_type: string;
[key: string]: any; // Additional Properties
}
// API 에러 응답 타입
export interface PageDataErrorResponse {
code: number;
message: string;
error?: string;
}
// API 응답 래퍼 타입 (성공/실패 통합)
export type PageDataApiResponse = PageDataResponse | PageDataErrorResponse;
// API 호출 옵션 타입
export interface PageDataApiOptions {
gameAlias: string;
langCode: string;
pageUrl: string;
q?: string;
qc?: string;
headers?: PageDataRequestHeaders;
baseUrl?: string;
}
// API 상태 타입
export type PageDataApiStatus = "idle" | "loading" | "success" | "error";
// API 결과 타입 (상태와 데이터를 함께 관리)
export interface PageDataApiResult {
status: PageDataApiStatus;
data: PageDataResponse | null;
error: string | null;
}
// 페이지 데이터 별칭 (기존 호환성)
export type pageData = PageDataValue;

View File

@@ -0,0 +1,17 @@
export type ImageType = "img" | "bg";
export interface ResponsiveImagePath {
path_mo?: string;
path_pc?: string;
}
export type ResponsiveImageResult =
| {
mobileSrc: string;
pcSrc: string;
}
| {
"--pc-bg": string;
"--mobile-bg": string;
}
| null;