@gt6/sdk 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"gt6-sdk.esm.js","sources":["../src/core/types.ts","../src/core/client.ts","../src/modules/articles.ts","../src/modules/products.ts","../src/index.ts"],"sourcesContent":["// 基础配置类型\nexport interface GT6Config {\n baseUrl: string;\n apiKey?: string;\n platformId: string | number;\n rootCategoryId?: string | number;\n tagAlias?: string;\n // 产品专用配置字段\n productRootCategoryId?: string | number;\n productTagAlias?: string;\n version?: string;\n timeout?: number;\n cache?: {\n enabled: boolean;\n ttl: number; // 缓存时间(毫秒)\n };\n}\n\n// 分类相关类型\nexport interface Category {\n categoryId: number;\n categoryName: string;\n categoryDescription: string;\n metaKeywords: string;\n status: number;\n parentId: number;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n articleIds: number[];\n children: Category[];\n}\n\nexport interface CategoryResponse {\n platformId: number;\n categories: Category[];\n generatedAt: string;\n}\n\n// 产品分类相关类型\nexport interface ProductCategory {\n categoryId: number;\n categoryName: string;\n categoryDescription: string;\n metaKeywords: string;\n status: number;\n parentId: number;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n productIds: number[];\n children: ProductCategory[];\n}\n\nexport interface ProductCategoryResponse {\n platformId: number;\n categories: ProductCategory[];\n generatedAt: string;\n}\n\n// 标签相关类型\nexport interface Tag {\n tagId: number;\n tagName: string;\n type: number;\n platformId: number;\n aliases: string;\n createdAt: any;\n articleIds: number[];\n}\n\nexport interface TagResponse {\n platformId: number;\n tags: Tag[];\n generatedAt: string;\n}\n\n// 产品标签相关类型\nexport interface ProductTag {\n tagId: number;\n tagName: string;\n type: number;\n platformId: number;\n aliases: string;\n createdAt: any;\n productIds: number[];\n}\n\nexport interface ProductTagResponse {\n platformId: number;\n tags: ProductTag[];\n generatedAt: string;\n}\n\n// 文章元数据类型\nexport interface ArticleMetaData {\n metaId: number;\n articleId: number;\n metaKey: string;\n metaValue: string;\n type: number;\n templateId: number;\n groupId: number;\n sortOrder: number;\n aiId: number;\n fieldId: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 文章图片类型\nexport interface ArticleImage {\n imageId: number;\n articleId: number;\n metaId: number | null;\n imageUrl: string;\n imageType: 'cover' | 'content';\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 文章类型\nexport interface Article {\n articleId: number;\n title: string;\n content: string;\n status: 'published' | 'draft' | 'archived';\n publishedAt: string;\n templateId: number;\n aiId: number;\n platformId: number;\n isVisible: boolean;\n displayTemplate: string;\n createdAt: any;\n updatedAt: any;\n categories: Category[];\n tags: Tag[];\n metaData: ArticleMetaData[];\n images: ArticleImage[];\n generatedAt: string;\n}\n\n// 产品详情类型\nexport interface ProductDetail {\n detailId: number;\n productId: number;\n detailKey: string;\n detailValue: string;\n extraInfo: string;\n}\n\n// 产品选项值类型\nexport interface ProductOptionValue {\n valueId: number;\n optionId: number;\n value: string;\n description: string;\n priceAdjustment: string;\n createdAt: any;\n updatedAt: any;\n}\n\n// 产品选项类型\nexport interface ProductOption {\n optionId: number;\n productId: number;\n optionName: string;\n createdAt: any;\n updatedAt: any;\n values: ProductOptionValue[];\n}\n\n// 产品变体类型\nexport interface ProductVariant {\n variantId: number;\n productId: number;\n sku: string;\n price: string;\n stock: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 产品图片类型\nexport interface ProductImage {\n imageId: number;\n productId: number;\n productDetailId: number | null;\n optionValueId: number | null;\n imageUrl: string;\n imageType: 'gallery' | 'thumbnail' | 'detail';\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 地区类型\nexport interface Region {\n regionId: number;\n platformId: number;\n regionCode: string;\n regionName: string;\n regionLevel: string;\n parentId: number;\n children?: Region[];\n}\n\n// 运费规则类型\nexport interface ShippingRule {\n ruleId: number;\n templateId: number;\n regionId: number;\n firstUnit: string;\n firstFee: string;\n additionalUnit: string;\n additionalFee: string;\n conditionType: string;\n conditionValue: string | null;\n createTime: any;\n updateTime: any;\n}\n\n// 运费模板类型\nexport interface ShippingTemplate {\n templateId: number;\n platformId: number;\n templateName: string;\n defaultFee: string;\n freeShippingLimit: string;\n createTime: any;\n updateTime: any;\n rules: ShippingRule[];\n}\n\n// 运费响应类型\nexport interface ShippingResponse {\n platformId: number;\n templates: ShippingTemplate[];\n generatedAt: string;\n}\n\n// 税费规则类型\nexport interface TaxRule {\n ruleId: number;\n templateId: number;\n regionId: number;\n taxRate: string;\n createTime: any;\n updateTime: any;\n}\n\n// 税费模板类型\nexport interface TaxTemplate {\n templateId: number;\n platformId: number;\n templateName: string;\n defaultTaxRate: string;\n createTime: any;\n updateTime: any;\n rules: TaxRule[];\n}\n\n// 税费响应类型\nexport interface TaxResponse {\n platformId: number;\n templates: TaxTemplate[];\n generatedAt: string;\n}\n\n// 订阅类型\nexport interface Subscription {\n subscriptionId: number;\n productId: number;\n billingCycle: number;\n billingCycleUnit: string;\n billingCycleCount: number;\n setupFee: string;\n trialDays: number;\n trialPrice: string;\n renewalDiscount: string;\n autoRenew: boolean;\n allowCancel: boolean;\n cancelPolicy: string;\n refundPolicy: string;\n maxCycles: number;\n gracePeriod: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 批发类型\nexport interface Wholesale {\n wholesaleId: number;\n productId: number;\n minOrderQuantity: number;\n maxOrderQuantity: number;\n allowMixedVariants: boolean;\n showRetailPrice: boolean;\n wholesaleDescription: string;\n paymentTerms: string;\n shippingTerms: string;\n}\n\n// 价格层级类型\nexport interface PriceTier {\n tierId: number;\n wholesaleId: number;\n userLevel: number | null;\n minQuantity: number;\n maxQuantity: number;\n priceType: number;\n priceValue: string;\n sortOrder: number;\n}\n\n// 变体价格类型\nexport interface VariantPrice {\n id: number;\n wholesaleId: number;\n tierId: number;\n variantId: number;\n priceType: number;\n priceValue: string;\n}\n\n// 众筹类型\nexport interface Crowdfunding {\n crowdfundingId: number;\n productId: number;\n targetAmount: string;\n currentAmount: string;\n supporterCount: number;\n startTime: any;\n endTime: any;\n status: number;\n minSupportAmount: string;\n allowOverFunding: boolean;\n overFundingLimit: string;\n createdAt: any;\n updatedAt: any;\n}\n\n// 众筹奖励类型\nexport interface Reward {\n rewardId: number;\n crowdfundingId: number;\n variantId: number;\n rewardName: string;\n rewardDescription: string;\n rewardAmount: string;\n rewardLimit: number;\n rewardClaimed: number;\n shippingRequired: boolean;\n estimatedDeliveryTime: any;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 众筹更新类型\nexport interface CrowdfundingUpdate {\n updateId: number;\n crowdfundingId: number;\n updateTitle: string;\n updateContent: string;\n isPublic: boolean;\n updateTime: any;\n}\n\n// 众筹FAQ类型\nexport interface CrowdfundingFAQ {\n faqId: number;\n crowdfundingId: number;\n question: string;\n answer: string;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 简单理财类型\nexport interface SimpleFinance {\n simpleFinanceId: number;\n productId: number;\n calculationPeriod: number;\n calculationPeriodUnit: string;\n interestRate: string;\n minInvestment: string;\n maxInvestment: string;\n minInvestmentUnit: string;\n maxInvestmentUnit: string;\n investmentPeriod: number;\n investmentPeriodUnit: string;\n}\n\n// 产品类型\nexport interface Product {\n productId: number;\n productName: string;\n description: string;\n metaKeywords: string;\n price: string;\n priceChangePercent: string;\n status: number;\n productType: number;\n native: number;\n shared: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n oldProductId: number | null;\n details: ProductDetail[];\n options: ProductOption[];\n variants: ProductVariant[];\n images: ProductImage[];\n categories: ProductCategory[];\n tags: ProductTag[];\n regions: Region[];\n shippingTemplates: ShippingTemplate[];\n taxTemplates: TaxTemplate[];\n subscription?: Subscription; // 当productType为2时存在\n wholesale?: Wholesale; // 当productType为3时存在\n priceTiers?: PriceTier[]; // 当productType为3时存在\n variantPrices?: VariantPrice[]; // 当productType为3时存在\n crowdfunding?: Crowdfunding; // 当productType为4时存在\n rewards?: Reward[]; // 当productType为4时存在\n updates?: CrowdfundingUpdate[]; // 当productType为4时存在\n faqs?: CrowdfundingFAQ[]; // 当productType为4时存在\n simpleFinance?: SimpleFinance; // 当productType为5时存在\n generatedAt: string;\n}\n\n// 文章列表项类型(简化版)\nexport interface ArticleListItem {\n articleId: number;\n title: string;\n status: string;\n publishedAt: string;\n categories: Category[];\n tags: Tag[];\n coverImage?: string;\n}\n\n// 产品列表项类型(简化版)\nexport interface ProductListItem {\n productId: number;\n productName: string;\n price: string;\n status: number;\n categories: ProductCategory[];\n tags: ProductTag[];\n coverImage?: string;\n}\n\n// 错误类型\nexport class GT6Error extends Error {\n constructor(\n message: string,\n public statusCode?: number\n ) {\n super(message);\n this.name = 'GT6Error';\n }\n}\n\n// 查询参数类型\nexport interface ArticleQueryParams {\n categoryId?: number;\n tagId?: number;\n status?: string;\n limit?: number;\n offset?: number;\n sortBy?: 'publishedAt' | 'title' | 'sortOrder';\n sortOrder?: 'asc' | 'desc';\n}\n\n// 产品查询参数类型\nexport interface ProductQueryParams {\n categoryId?: number;\n tagId?: number;\n status?: number;\n limit?: number;\n offset?: number;\n sortBy?: 'price' | 'productName' | 'sortOrder';\n sortOrder?: 'asc' | 'desc';\n}\n\n// 根据标签获取文章的选项类型\nexport interface ArticlesByTagOptions {\n page?: number;\n limit?: number;\n status?: 'published' | 'draft' | 'archived';\n tagAlias?: string;\n}\n\n// 根据分类获取文章的选项类型\nexport interface ArticlesByCategoryOptions {\n page?: number;\n limit?: number;\n status?: 'published' | 'draft' | 'archived';\n}\n\n// 根据标签获取产品的选项类型\nexport interface ProductsByTagOptions {\n page?: number;\n limit?: number;\n status?: number;\n productTagAlias?: string;\n}\n\n// 根据分类获取产品的选项类型\nexport interface ProductsByCategoryOptions {\n page?: number;\n limit?: number;\n status?: number;\n}\n\n// 文章统计类型\nexport interface ArticleStats {\n total: number;\n published: number;\n draft: number;\n archived: number;\n byCategory: Record<number, number>;\n byTag: Record<number, number>;\n}\n\n// 产品统计类型\nexport interface ProductStats {\n total: number;\n active: number;\n inactive: number;\n byCategory: Record<number, number>;\n byTag: Record<number, number>;\n}\n\nexport interface GT6Response<T> {\n success: boolean;\n data: T;\n error?: string;\n}\n\nexport interface ArticleResponse {\n article: Article;\n}\n\nexport interface ProductResponse {\n product: Product;\n}\n\nexport interface CategoryResponse {\n categories: Category[];\n}\n\nexport interface ProductCategoryResponse {\n categories: ProductCategory[];\n}\n\nexport interface TagResponse {\n tags: Tag[];\n}\n\nexport interface ProductTagResponse {\n tags: ProductTag[];\n}\n\n// 区域响应类型\nexport interface RegionResponse {\n platformId: number;\n regions: Region[];\n generatedAt: string;\n} ","import { GT6Config, GT6Error } from './types';\r\n\r\nexport class GT6Client {\r\n private config: GT6Config;\r\n private cache: Map<string, { data: any; timestamp: number }>;\r\n\r\n constructor(config: GT6Config) {\r\n this.config = {\r\n timeout: 10000,\r\n cache: {\r\n enabled: true,\r\n ttl: 300000 // 5分钟默认缓存\r\n },\r\n ...config\r\n };\r\n this.cache = new Map();\r\n }\r\n\r\n /**\r\n * 发起HTTP请求\r\n */\r\n async request<T>(endpoint: string, options: RequestInit = {}): Promise<T> {\r\n const url = `${this.config.baseUrl}${endpoint}`;\r\n const cacheKey = `${options.method || 'GET'}:${url}`;\r\n\r\n // 检查缓存(只对GET请求缓存)\r\n if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {\r\n const cached = this.cache.get(cacheKey);\r\n if (cached && Date.now() - cached.timestamp < this.config.cache.ttl) {\r\n return cached.data;\r\n }\r\n }\r\n\r\n try {\r\n const controller = new AbortController();\r\n const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);\r\n\r\n const response = await fetch(url, {\r\n ...options,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n ...options.headers,\r\n },\r\n signal: controller.signal\r\n });\r\n\r\n clearTimeout(timeoutId);\r\n\r\n if (!response.ok) {\r\n throw new GT6Error(\r\n `HTTP ${response.status}: ${response.statusText}`,\r\n response.status\r\n );\r\n }\r\n\r\n const data = await response.json();\r\n\r\n // 更新缓存(只对GET请求缓存)\r\n if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {\r\n this.cache.set(cacheKey, { data, timestamp: Date.now() });\r\n }\r\n\r\n return data;\r\n } catch (error: any) {\r\n if (error instanceof GT6Error) {\r\n throw error;\r\n }\r\n \r\n if (error.name === 'AbortError') {\r\n throw new GT6Error('Request timeout', 408);\r\n }\r\n \r\n throw new GT6Error(`Network error: ${error.message}`);\r\n }\r\n }\r\n\r\n /**\r\n * 获取配置\r\n */\r\n getConfig(): GT6Config {\r\n return { ...this.config };\r\n }\r\n\r\n /**\r\n * 清除缓存\r\n */\r\n clearCache(): void {\r\n this.cache.clear();\r\n }\r\n\r\n /**\r\n * 获取缓存统计\r\n */\r\n getCacheStats(): { size: number; entries: Array<{ key: string; age: number }> } {\r\n const entries = Array.from(this.cache.entries()).map(([key, value]) => ({\r\n key,\r\n age: Date.now() - value.timestamp\r\n }));\r\n\r\n return {\r\n size: this.cache.size,\r\n entries\r\n };\r\n }\r\n} ","import { GT6Client } from '../core/client';\r\nimport {\r\n Article,\r\n Category,\r\n Tag,\r\n CategoryResponse,\r\n TagResponse,\r\n ArticlesByTagOptions,\r\n ArticlesByCategoryOptions\r\n} from '../core/types';\r\n\r\nexport class ArticlesAPI {\r\n constructor(private client: GT6Client) {}\r\n\r\n /**\r\n * 1. 根据文章ID获取文章详情\r\n */\r\n async getArticle(articleId: number | string): Promise<Article> {\r\n return this.client.request<Article>(`/articles/${articleId}.json`);\r\n }\r\n\r\n /**\r\n * 2. 获取文章分类列表\r\n */\r\n async getCategories(rootCategoryId?: number | string): Promise<Category[]> {\r\n const config = this.client.getConfig();\r\n const categoryId = rootCategoryId || config.rootCategoryId || '671920';\r\n \r\n const response = await this.client.request<CategoryResponse>(\r\n `/article-categories/platform-${config.platformId}-root-${categoryId}.json`\r\n );\r\n \r\n return response.categories;\r\n }\r\n\r\n /**\r\n * 3. 获取文章标签列表\r\n */\r\n async getTags(tagAlias?: string): Promise<Tag[]> {\r\n const config = this.client.getConfig();\r\n const alias = tagAlias || config.tagAlias || '001';\r\n \r\n const response = await this.client.request<TagResponse>(\r\n `/article-tags/platform-${config.platformId}-${alias}.json`\r\n );\r\n \r\n return response.tags;\r\n }\r\n\r\n /**\r\n * 4. 根据分类ID获取文章列表\r\n * 支持单个分类ID或分类ID数组\r\n */\r\n async getArticlesByCategory(categoryId: number | number[], options?: ArticlesByCategoryOptions): Promise<{\r\n articles: Article[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 将单个分类ID转换为数组\r\n const categoryIds = Array.isArray(categoryId) ? categoryId : [categoryId];\r\n \r\n // 收集所有指定分类下的文章ID\r\n const allArticleIds: number[] = [];\r\n \r\n categoryIds.forEach(id => {\r\n const targetCategory = categories.find(cat => cat.categoryId === id);\r\n if (targetCategory) {\r\n allArticleIds.push(...targetCategory.articleIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueArticleIds = [...new Set(allArticleIds)];\r\n \r\n if (uniqueArticleIds.length === 0) {\r\n return {\r\n articles: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedArticleIds = uniqueArticleIds.slice(offset, offset + limit);\r\n \r\n // 获取文章详情\r\n const articles = await Promise.all(\r\n paginatedArticleIds.map(articleId => this.getArticle(articleId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredArticles = articles;\r\n if (options?.status) {\r\n filteredArticles = articles.filter(article => article.status === options.status);\r\n }\r\n \r\n return {\r\n articles: filteredArticles,\r\n total: uniqueArticleIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 5. 根据标签ID获取文章列表\r\n * 支持单个标签ID或标签ID数组\r\n */\r\n async getArticlesByTag(tagId: number | number[], options?: ArticlesByTagOptions): Promise<{\r\n articles: Article[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取标签数据,传递tagAlias参数\r\n const tags = await this.getTags(options?.tagAlias);\r\n \r\n // 将单个标签ID转换为数组\r\n const tagIds = Array.isArray(tagId) ? tagId : [tagId];\r\n \r\n // 收集所有指定标签下的文章ID\r\n const allArticleIds: number[] = [];\r\n \r\n tagIds.forEach(id => {\r\n const targetTag = tags.find(tag => tag.tagId === id);\r\n if (targetTag) {\r\n allArticleIds.push(...targetTag.articleIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueArticleIds = [...new Set(allArticleIds)];\r\n \r\n if (uniqueArticleIds.length === 0) {\r\n return {\r\n articles: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedArticleIds = uniqueArticleIds.slice(offset, offset + limit);\r\n \r\n // 获取文章详情\r\n const articles = await Promise.all(\r\n paginatedArticleIds.map(articleId => this.getArticle(articleId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredArticles = articles;\r\n if (options?.status) {\r\n filteredArticles = articles.filter(article => article.status === options.status);\r\n }\r\n \r\n return {\r\n articles: filteredArticles,\r\n total: uniqueArticleIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 6. 根据分类ID获取该分类的层级路径\r\n * 用于前端面包屑导航\r\n */\r\n async getCategoryPath(categoryId: number): Promise<{\r\n path: Category[];\r\n currentCategory: Category | null;\r\n breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }>;\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 查找目标分类\r\n const targetCategory = categories.find(cat => cat.categoryId === categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n path: [],\r\n currentCategory: null,\r\n breadcrumbs: []\r\n };\r\n }\r\n \r\n // 构建分类路径\r\n const path: Category[] = [];\r\n const breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }> = [];\r\n \r\n // 递归查找父分类\r\n const buildPath = (currentCategory: Category, level: number = 0): void => {\r\n // 将当前分类添加到路径开头(因为我们要从根到叶子构建)\r\n path.unshift(currentCategory);\r\n breadcrumbs.unshift({\r\n categoryId: currentCategory.categoryId,\r\n categoryName: currentCategory.categoryName,\r\n level\r\n });\r\n \r\n // 如果有父分类,继续递归\r\n if (currentCategory.parentId && currentCategory.parentId !== 0) {\r\n const parentCategory = categories.find(cat => cat.categoryId === currentCategory.parentId);\r\n if (parentCategory) {\r\n buildPath(parentCategory, level + 1);\r\n }\r\n }\r\n };\r\n \r\n // 从目标分类开始构建路径\r\n buildPath(targetCategory);\r\n \r\n return {\r\n path,\r\n currentCategory: targetCategory,\r\n breadcrumbs\r\n };\r\n }\r\n\r\n /**\r\n * 7. 获取指定分类ID下的子分类\r\n * 支持递归获取所有层级的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean; // 是否递归获取所有层级的子分类\r\n includeCurrent?: boolean; // 是否包含当前分类\r\n maxDepth?: number; // 最大递归深度,默认不限制\r\n }): Promise<{\r\n subCategories: Category[];\r\n currentCategory: Category | null;\r\n total: number;\r\n depth: number; // 实际递归深度\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 查找目标分类\r\n const targetCategory = categories.find(cat => cat.categoryId === categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n subCategories: [],\r\n currentCategory: null,\r\n total: 0,\r\n depth: 0\r\n };\r\n }\r\n \r\n const subCategories: Category[] = [];\r\n let maxDepth = options?.maxDepth || Infinity;\r\n let actualDepth = 0;\r\n \r\n // 递归获取子分类的函数\r\n const collectSubCategories = (parentId: number, currentDepth: number = 0): void => {\r\n if (currentDepth >= maxDepth) {\r\n return;\r\n }\r\n \r\n // 查找直接子分类\r\n const children = categories.filter(cat => cat.parentId === parentId);\r\n \r\n children.forEach(child => {\r\n subCategories.push(child);\r\n \r\n // 如果需要递归且未达到最大深度,继续查找子分类\r\n if (options?.recursive && currentDepth < maxDepth - 1) {\r\n collectSubCategories(child.categoryId, currentDepth + 1);\r\n }\r\n });\r\n \r\n // 更新实际深度\r\n actualDepth = Math.max(actualDepth, currentDepth);\r\n };\r\n \r\n // 开始收集子分类\r\n collectSubCategories(categoryId);\r\n \r\n // 如果需要包含当前分类,添加到结果中\r\n if (options?.includeCurrent) {\r\n subCategories.unshift(targetCategory);\r\n }\r\n \r\n return {\r\n subCategories,\r\n currentCategory: targetCategory,\r\n total: subCategories.length,\r\n depth: actualDepth\r\n };\r\n }\r\n} ","import { GT6Client } from '../core/client';\r\nimport {\r\n Product,\r\n ProductCategory,\r\n ProductTag,\r\n ProductCategoryResponse,\r\n ProductTagResponse,\r\n ProductsByTagOptions,\r\n ProductsByCategoryOptions,\r\n TaxResponse,\r\n ShippingResponse,\r\n RegionResponse\r\n} from '../core/types';\r\n\r\nexport class ProductsAPI {\r\n constructor(private client: GT6Client) {}\r\n\r\n /**\r\n * 1. 根据产品ID获取产品详情\r\n */\r\n async getProduct(productId: number | string): Promise<Product> {\r\n const product = await this.client.request<Product>(`/products/${productId}.json`);\r\n \r\n // 检查产品是否有销售区域和税费模板\r\n if (product.regions && product.regions.length > 0 && \r\n product.taxTemplates && product.taxTemplates.length > 0) {\r\n try {\r\n // 获取税费信息\r\n const taxInfo = await this.getTaxInfo();\r\n \r\n // 为每个税费模板添加规则\r\n product.taxTemplates = product.taxTemplates.map(template => {\r\n const matchingTemplate = taxInfo.templates.find(t => t.templateId === template.templateId);\r\n if (matchingTemplate) {\r\n // 过滤出产品可销售区域的规则\r\n const productRegionIds = product.regions.map(r => r.regionId);\r\n const applicableRules = matchingTemplate.rules.filter(rule => \r\n productRegionIds.includes(rule.regionId)\r\n );\r\n \r\n return {\r\n ...template,\r\n rules: applicableRules\r\n };\r\n }\r\n return template;\r\n });\r\n } catch (error) {\r\n // 如果获取税费信息失败,不影响产品详情返回\r\n console.warn('Failed to fetch tax info:', error);\r\n }\r\n }\r\n \r\n // 检查产品是否有销售区域和运费模板\r\n if (product.regions && product.regions.length > 0 && \r\n product.shippingTemplates && product.shippingTemplates.length > 0) {\r\n try {\r\n // 获取运费信息\r\n const shippingInfo = await this.getShippingInfo();\r\n \r\n // 为每个运费模板添加规则\r\n product.shippingTemplates = product.shippingTemplates.map(template => {\r\n const matchingTemplate = shippingInfo.templates.find(t => t.templateId === template.templateId);\r\n if (matchingTemplate) {\r\n // 过滤出产品可销售区域的规则\r\n const productRegionIds = product.regions.map(r => r.regionId);\r\n const applicableRules = matchingTemplate.rules.filter(rule => \r\n productRegionIds.includes(rule.regionId)\r\n );\r\n \r\n return {\r\n ...template,\r\n rules: applicableRules\r\n };\r\n }\r\n return template;\r\n });\r\n } catch (error) {\r\n // 如果获取运费信息失败,不影响产品详情返回\r\n console.warn('Failed to fetch shipping info:', error);\r\n }\r\n }\r\n \r\n return product;\r\n }\r\n\r\n /**\r\n * 2. 获取产品分类列表\r\n */\r\n async getCategories(productRootCategoryId?: number | string): Promise<ProductCategory[]> {\r\n const config = this.client.getConfig();\r\n const categoryId = productRootCategoryId || config.productRootCategoryId || '277233';\r\n \r\n const response = await this.client.request<ProductCategoryResponse>(\r\n `/product-categories/platform-${config.platformId}-root-${categoryId}.json`\r\n );\r\n \r\n return response.categories;\r\n }\r\n\r\n /**\r\n * 3. 获取产品标签列表\r\n */\r\n async getTags(productTagAlias?: string): Promise<ProductTag[]> {\r\n const config = this.client.getConfig();\r\n const alias = productTagAlias || config.productTagAlias || '01';\r\n \r\n const response = await this.client.request<ProductTagResponse>(\r\n `/product-tags/platform-${config.platformId}-${alias}.json`\r\n );\r\n \r\n return response.tags;\r\n }\r\n\r\n /**\r\n * 4. 根据分类ID获取产品列表\r\n * 支持单个分类ID或分类ID数组\r\n */\r\n async getProductsByCategory(categoryId: number | number[], options?: ProductsByCategoryOptions): Promise<{\r\n products: Product[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 将单个分类ID转换为数组\r\n const categoryIds = Array.isArray(categoryId) ? categoryId : [categoryId];\r\n \r\n // 收集所有指定分类下的产品ID\r\n const allProductIds: number[] = [];\r\n \r\n categoryIds.forEach(id => {\r\n const targetCategory = findCategoryById(categories, id);\r\n if (targetCategory) {\r\n allProductIds.push(...targetCategory.productIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueProductIds = [...new Set(allProductIds)];\r\n \r\n if (uniqueProductIds.length === 0) {\r\n return {\r\n products: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedProductIds = uniqueProductIds.slice(offset, offset + limit);\r\n \r\n // 获取产品详情\r\n const products = await Promise.all(\r\n paginatedProductIds.map(productId => this.getProduct(productId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredProducts = products;\r\n if (options?.status !== undefined) {\r\n filteredProducts = products.filter(product => product.status === options.status);\r\n }\r\n \r\n return {\r\n products: filteredProducts,\r\n total: uniqueProductIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 5. 根据标签ID获取产品列表\r\n * 支持单个标签ID或标签ID数组\r\n */\r\n async getProductsByTag(tagId: number | number[], options?: ProductsByTagOptions): Promise<{\r\n products: Product[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取标签数据,传递productTagAlias参数\r\n const tags = await this.getTags(options?.productTagAlias);\r\n \r\n // 将单个标签ID转换为数组\r\n const tagIds = Array.isArray(tagId) ? tagId : [tagId];\r\n \r\n // 收集所有指定标签下的产品ID\r\n const allProductIds: number[] = [];\r\n \r\n tagIds.forEach(id => {\r\n const targetTag = tags.find(tag => tag.tagId === id);\r\n if (targetTag) {\r\n allProductIds.push(...targetTag.productIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueProductIds = [...new Set(allProductIds)];\r\n \r\n if (uniqueProductIds.length === 0) {\r\n return {\r\n products: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedProductIds = uniqueProductIds.slice(offset, offset + limit);\r\n \r\n // 获取产品详情\r\n const products = await Promise.all(\r\n paginatedProductIds.map(productId => this.getProduct(productId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredProducts = products;\r\n if (options?.status !== undefined) {\r\n filteredProducts = products.filter(product => product.status === options.status);\r\n }\r\n \r\n return {\r\n products: filteredProducts,\r\n total: uniqueProductIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 6. 根据分类ID获取该分类的层级路径\r\n * 用于前端面包屑导航\r\n */\r\n async getCategoryPath(categoryId: number): Promise<{\r\n path: ProductCategory[];\r\n currentCategory: ProductCategory | null;\r\n breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }>;\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找目标分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 查找目标分类(包括子分类)\r\n const targetCategory = findCategoryById(categories, categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n path: [],\r\n currentCategory: null,\r\n breadcrumbs: []\r\n };\r\n }\r\n \r\n // 构建分类路径\r\n const path: ProductCategory[] = [];\r\n const breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }> = [];\r\n \r\n // 递归查找父分类的函数\r\n const buildPath = (currentCategory: ProductCategory, level: number = 0): void => {\r\n // 将当前分类添加到路径开头(因为我们要从根到叶子构建)\r\n path.unshift(currentCategory);\r\n breadcrumbs.unshift({\r\n categoryId: currentCategory.categoryId,\r\n categoryName: currentCategory.categoryName,\r\n level\r\n });\r\n \r\n // 如果有父分类,继续递归\r\n if (currentCategory.parentId && currentCategory.parentId !== 0) {\r\n const parentCategory = findCategoryById(categories, currentCategory.parentId);\r\n if (parentCategory) {\r\n buildPath(parentCategory, level + 1);\r\n }\r\n }\r\n };\r\n \r\n // 从目标分类开始构建路径\r\n buildPath(targetCategory);\r\n \r\n return {\r\n path,\r\n currentCategory: targetCategory,\r\n breadcrumbs\r\n };\r\n }\r\n\r\n /**\r\n * 7. 获取指定分类ID下的子分类\r\n * 支持递归获取所有层级的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean; // 是否递归获取所有层级的子分类\r\n includeCurrent?: boolean; // 是否包含当前分类\r\n maxDepth?: number; // 最大递归深度,默认不限制\r\n }): Promise<{\r\n subCategories: ProductCategory[];\r\n currentCategory: ProductCategory | null;\r\n total: number;\r\n depth: number; // 实际递归深度\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 查找目标分类(包括子分类)\r\n const targetCategory = findCategoryById(categories, categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n subCategories: [],\r\n currentCategory: null,\r\n total: 0,\r\n depth: 0\r\n };\r\n }\r\n \r\n const subCategories: ProductCategory[] = [];\r\n let maxDepth = options?.maxDepth || Infinity;\r\n let actualDepth = 0;\r\n \r\n // 递归获取子分类的函数\r\n const collectSubCategories = (parentId: number, currentDepth: number = 0): void => {\r\n if (currentDepth >= maxDepth) {\r\n return;\r\n }\r\n \r\n // 递归查找直接子分类\r\n const findChildren = (cats: ProductCategory[], parentId: number): ProductCategory[] => {\r\n const children: ProductCategory[] = [];\r\n for (const cat of cats) {\r\n if (cat.parentId === parentId) {\r\n children.push(cat);\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n children.push(...findChildren(cat.children, parentId));\r\n }\r\n }\r\n return children;\r\n };\r\n \r\n const children = findChildren(categories, parentId);\r\n \r\n children.forEach(child => {\r\n subCategories.push(child);\r\n \r\n // 如果需要递归且未达到最大深度,继续查找子分类\r\n if (options?.recursive && currentDepth < maxDepth - 1) {\r\n collectSubCategories(child.categoryId, currentDepth + 1);\r\n }\r\n });\r\n \r\n // 更新实际深度\r\n actualDepth = Math.max(actualDepth, currentDepth);\r\n };\r\n \r\n // 开始收集子分类\r\n collectSubCategories(categoryId);\r\n \r\n // 如果需要包含当前分类,添加到结果中\r\n if (options?.includeCurrent) {\r\n subCategories.unshift(targetCategory);\r\n }\r\n \r\n return {\r\n subCategories,\r\n currentCategory: targetCategory,\r\n total: subCategories.length,\r\n depth: actualDepth\r\n };\r\n }\r\n\r\n /**\r\n * 8. 获取税费信息\r\n * 获取平台的所有税费模板和规则\r\n */\r\n async getTaxInfo(): Promise<TaxResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<TaxResponse>(`/tax/platform-${config.platformId}.json`);\r\n }\r\n\r\n /**\r\n * 9. 获取运费信息\r\n * 获取平台的所有运费模板和规则\r\n */\r\n async getShippingInfo(): Promise<ShippingResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<ShippingResponse>(`/shipping/platform-${config.platformId}.json`);\r\n }\r\n\r\n /**\r\n * 10. 获取区域信息\r\n * 获取平台的所有区域信息,包括层级结构\r\n */\r\n async getRegions(): Promise<RegionResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<RegionResponse>(`/regions/platform-${config.platformId}.json`);\r\n }\r\n} ","import { GT6Client } from './core/client';\r\nimport { ArticlesAPI } from './modules/articles';\r\nimport { ProductsAPI } from './modules/products';\r\nimport { \r\n GT6Config, \r\n ArticlesByCategoryOptions, \r\n ArticlesByTagOptions,\r\n ProductsByCategoryOptions,\r\n ProductsByTagOptions\r\n} from './core/types';\r\n\r\n/**\r\n * GT6 SDK 主类\r\n * 提供文章和产品管理相关的所有功能\r\n */\r\nexport class GT6SDK {\r\n public articles: ArticlesAPI;\r\n public products: ProductsAPI;\r\n\r\n constructor(config: GT6Config) {\r\n const client = new GT6Client(config);\r\n this.articles = new ArticlesAPI(client);\r\n this.products = new ProductsAPI(client);\r\n }\r\n\r\n /**\r\n * 获取客户端实例(用于高级用法)\r\n */\r\n getClient(): GT6Client {\r\n return (this.articles as any).client;\r\n }\r\n\r\n /**\r\n * 清除所有缓存\r\n */\r\n clearCache(): void {\r\n this.getClient().clearCache();\r\n }\r\n\r\n /**\r\n * 获取缓存统计信息\r\n */\r\n getCacheStats() {\r\n return this.getClient().getCacheStats();\r\n }\r\n\r\n /**\r\n * 1. 便捷方法:根据文章ID获取文章详情\r\n */\r\n async getArticle(articleId: number | string) {\r\n return this.articles.getArticle(articleId);\r\n }\r\n\r\n /**\r\n * 2. 便捷方法:获取文章分类列表\r\n */\r\n async getCategories(rootCategoryId?: number | string) {\r\n return this.articles.getCategories(rootCategoryId);\r\n }\r\n\r\n /**\r\n * 3. 便捷方法:获取文章标签列表\r\n */\r\n async getTags(tagAlias?: string) {\r\n return this.articles.getTags(tagAlias);\r\n }\r\n\r\n /**\r\n * 4. 便捷方法:根据分类ID获取文章列表\r\n */\r\n async getArticlesByCategory(categoryId: number | number[], options?: ArticlesByCategoryOptions) {\r\n return this.articles.getArticlesByCategory(categoryId, options);\r\n }\r\n\r\n /**\r\n * 5. 便捷方法:根据标签ID获取文章列表\r\n */\r\n async getArticlesByTag(tagId: number | number[], options?: ArticlesByTagOptions) {\r\n return this.articles.getArticlesByTag(tagId, options);\r\n }\r\n\r\n /**\r\n * 6. 便捷方法:根据分类ID获取该分类的层级路径\r\n */\r\n async getCategoryPath(categoryId: number) {\r\n return this.articles.getCategoryPath(categoryId);\r\n }\r\n\r\n /**\r\n * 7. 便捷方法:获取指定分类ID下的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean;\r\n includeCurrent?: boolean;\r\n maxDepth?: number;\r\n }) {\r\n return this.articles.getSubCategories(categoryId, options);\r\n }\r\n\r\n /**\r\n * 8. 便捷方法:根据产品ID获取产品详情\r\n */\r\n async getProduct(productId: number | string) {\r\n return this.products.getProduct(productId);\r\n }\r\n\r\n /**\r\n * 9. 便捷方法:获取产品分类列表\r\n */\r\n async getProductCategories(productRootCategoryId?: number | string) {\r\n return this.products.getCategories(productRootCategoryId);\r\n }\r\n\r\n /**\r\n * 10. 便捷方法:获取产品标签列表\r\n */\r\n async getProductTags(productTagAlias?: string) {\r\n return this.products.getTags(productTagAlias);\r\n }\r\n\r\n /**\r\n * 11. 便捷方法:根据分类ID获取产品列表\r\n */\r\n async getProductsByCategory(categoryId: number | number[], options?: ProductsByCategoryOptions) {\r\n return this.products.getProductsByCategory(categoryId, options);\r\n }\r\n\r\n /**\r\n * 12. 便捷方法:根据标签ID获取产品列表\r\n */\r\n async getProductsByTag(tagId: number | number[], options?: ProductsByTagOptions) {\r\n return this.products.getProductsByTag(tagId, options);\r\n }\r\n\r\n /**\r\n * 13. 便捷方法:根据分类ID获取该分类的层级路径\r\n */\r\n async getProductCategoryPath(categoryId: number) {\r\n return this.products.getCategoryPath(categoryId);\r\n }\r\n\r\n /**\r\n * 14. 便捷方法:获取指定分类ID下的子分类\r\n */\r\n async getProductSubCategories(categoryId: number, options?: {\r\n recursive?: boolean;\r\n includeCurrent?: boolean;\r\n maxDepth?: number;\r\n }) {\r\n return this.products.getSubCategories(categoryId, options);\r\n }\r\n\r\n /**\r\n * 15. 便捷方法:获取税费信息\r\n */\r\n async getTaxInfo() {\r\n return this.products.getTaxInfo();\r\n }\r\n\r\n /**\r\n * 16. 便捷方法:获取运费信息\r\n */\r\n async getShippingInfo() {\r\n return this.products.getShippingInfo();\r\n }\r\n\r\n /**\r\n * 17. 便捷方法:获取区域信息\r\n */\r\n async getRegions() {\r\n return this.products.getRegions();\r\n }\r\n}\r\n\r\n// 导出所有类型和模块\r\nexport * from './core/types';\r\nexport * from './core/client';\r\nexport * from './modules/articles';\r\nexport * from './modules/products';\r\n\r\n// 默认导出\r\nexport default GT6SDK; "],"names":[],"mappings":"AAycA;AACM,MAAO,QAAS,SAAQ,KAAK,CAAA;IACjC,WAAA,CACE,OAAe,EACR,UAAmB,EAAA;QAE1B,KAAK,CAAC,OAAO,CAAC;QAFP,IAAA,CAAA,UAAU,GAAV,UAAU;AAGjB,QAAA,IAAI,CAAC,IAAI,GAAG,UAAU;;AAEzB;;MChdY,SAAS,CAAA;AAIpB,IAAA,WAAA,CAAY,MAAiB,EAAA;QAC3B,IAAI,CAAC,MAAM,GAAG;AACZ,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,IAAI;gBACb,GAAG,EAAE,MAAM;AACZ,aAAA;AACD,YAAA,GAAG;SACJ;AACD,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE;;AA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AAEG;AACH,IAAA,MAAM,uBAAuB,CAAC,UAAkB,EAAE,OAIjD,EAAA;QACC,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC;;AAG5D;;AAEG;AACH,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;AAGnC;;AAEG;AACH,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE;;AAGxC;;AAEG;AACH,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;AAEpC;;;;"}
1
+ {"version":3,"file":"gt6-sdk.esm.js","sources":["../src/core/types.ts","../src/core/client.ts","../src/modules/articles.ts","../src/modules/products.ts","../src/modules/settings.ts","../src/index.ts"],"sourcesContent":["// 基础配置类型\nexport interface GT6Config {\n baseUrl: string;\n apiKey?: string;\n platformId: string | number;\n rootCategoryId?: string | number;\n tagAlias?: string;\n // 产品专用配置字段\n productRootCategoryId?: string | number;\n productTagAlias?: string;\n // 设置专用配置字段\n settingAlias?: string;\n version?: string;\n timeout?: number;\n cache?: {\n enabled: boolean;\n ttl: number; // 缓存时间(毫秒)\n };\n}\n\n// 分类相关类型\nexport interface Category {\n categoryId: number;\n categoryName: string;\n categoryDescription: string;\n metaKeywords: string;\n status: number;\n parentId: number;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n articleIds: number[];\n children: Category[];\n}\n\nexport interface CategoryResponse {\n platformId: number;\n categories: Category[];\n generatedAt: string;\n}\n\n// 产品分类相关类型\nexport interface ProductCategory {\n categoryId: number;\n categoryName: string;\n categoryDescription: string;\n metaKeywords: string;\n status: number;\n parentId: number;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n productIds: number[];\n children: ProductCategory[];\n}\n\nexport interface ProductCategoryResponse {\n platformId: number;\n categories: ProductCategory[];\n generatedAt: string;\n}\n\n// 标签相关类型\nexport interface Tag {\n tagId: number;\n tagName: string;\n type: number;\n platformId: number;\n aliases: string;\n createdAt: any;\n articleIds: number[];\n}\n\nexport interface TagResponse {\n platformId: number;\n tags: Tag[];\n generatedAt: string;\n}\n\n// 产品标签相关类型\nexport interface ProductTag {\n tagId: number;\n tagName: string;\n type: number;\n platformId: number;\n aliases: string;\n createdAt: any;\n productIds: number[];\n}\n\nexport interface ProductTagResponse {\n platformId: number;\n tags: ProductTag[];\n generatedAt: string;\n}\n\n// 文章元数据类型\nexport interface ArticleMetaData {\n metaId: number;\n articleId: number;\n metaKey: string;\n metaValue: string;\n type: number;\n templateId: number;\n groupId: number;\n sortOrder: number;\n aiId: number;\n fieldId: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 文章图片类型\nexport interface ArticleImage {\n imageId: number;\n articleId: number;\n metaId: number | null;\n imageUrl: string;\n imageType: 'cover' | 'content';\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 文章类型\nexport interface Article {\n articleId: number;\n title: string;\n content: string;\n status: 'published' | 'draft' | 'archived';\n publishedAt: string;\n templateId: number;\n aiId: number;\n platformId: number;\n isVisible: boolean;\n displayTemplate: string;\n createdAt: any;\n updatedAt: any;\n categories: Category[];\n tags: Tag[];\n metaData: ArticleMetaData[];\n images: ArticleImage[];\n generatedAt: string;\n}\n\n// 产品详情类型\nexport interface ProductDetail {\n detailId: number;\n productId: number;\n detailKey: string;\n detailValue: string;\n extraInfo: string;\n}\n\n// 产品选项值类型\nexport interface ProductOptionValue {\n valueId: number;\n optionId: number;\n value: string;\n description: string;\n priceAdjustment: string;\n createdAt: any;\n updatedAt: any;\n}\n\n// 产品选项类型\nexport interface ProductOption {\n optionId: number;\n productId: number;\n optionName: string;\n createdAt: any;\n updatedAt: any;\n values: ProductOptionValue[];\n}\n\n// 产品变体类型\nexport interface ProductVariant {\n variantId: number;\n productId: number;\n sku: string;\n price: string;\n stock: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 产品图片类型\nexport interface ProductImage {\n imageId: number;\n productId: number;\n productDetailId: number | null;\n optionValueId: number | null;\n imageUrl: string;\n imageType: 'gallery' | 'thumbnail' | 'detail';\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 地区类型\nexport interface Region {\n regionId: number;\n platformId: number;\n regionCode: string;\n regionName: string;\n regionLevel: string;\n parentId: number;\n children?: Region[];\n}\n\n// 运费规则类型\nexport interface ShippingRule {\n ruleId: number;\n templateId: number;\n regionId: number;\n firstUnit: string;\n firstFee: string;\n additionalUnit: string;\n additionalFee: string;\n conditionType: string;\n conditionValue: string | null;\n createTime: any;\n updateTime: any;\n}\n\n// 运费模板类型\nexport interface ShippingTemplate {\n templateId: number;\n platformId: number;\n templateName: string;\n defaultFee: string;\n freeShippingLimit: string;\n createTime: any;\n updateTime: any;\n rules: ShippingRule[];\n}\n\n// 运费响应类型\nexport interface ShippingResponse {\n platformId: number;\n templates: ShippingTemplate[];\n generatedAt: string;\n}\n\n// 税费规则类型\nexport interface TaxRule {\n ruleId: number;\n templateId: number;\n regionId: number;\n taxRate: string;\n createTime: any;\n updateTime: any;\n}\n\n// 税费模板类型\nexport interface TaxTemplate {\n templateId: number;\n platformId: number;\n templateName: string;\n defaultTaxRate: string;\n createTime: any;\n updateTime: any;\n rules: TaxRule[];\n}\n\n// 税费响应类型\nexport interface TaxResponse {\n platformId: number;\n templates: TaxTemplate[];\n generatedAt: string;\n}\n\n// 订阅类型\nexport interface Subscription {\n subscriptionId: number;\n productId: number;\n billingCycle: number;\n billingCycleUnit: string;\n billingCycleCount: number;\n setupFee: string;\n trialDays: number;\n trialPrice: string;\n renewalDiscount: string;\n autoRenew: boolean;\n allowCancel: boolean;\n cancelPolicy: string;\n refundPolicy: string;\n maxCycles: number;\n gracePeriod: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 批发类型\nexport interface Wholesale {\n wholesaleId: number;\n productId: number;\n minOrderQuantity: number;\n maxOrderQuantity: number;\n allowMixedVariants: boolean;\n showRetailPrice: boolean;\n wholesaleDescription: string;\n paymentTerms: string;\n shippingTerms: string;\n}\n\n// 价格层级类型\nexport interface PriceTier {\n tierId: number;\n wholesaleId: number;\n userLevel: number | null;\n minQuantity: number;\n maxQuantity: number;\n priceType: number;\n priceValue: string;\n sortOrder: number;\n}\n\n// 变体价格类型\nexport interface VariantPrice {\n id: number;\n wholesaleId: number;\n tierId: number;\n variantId: number;\n priceType: number;\n priceValue: string;\n}\n\n// 众筹类型\nexport interface Crowdfunding {\n crowdfundingId: number;\n productId: number;\n targetAmount: string;\n currentAmount: string;\n supporterCount: number;\n startTime: any;\n endTime: any;\n status: number;\n minSupportAmount: string;\n allowOverFunding: boolean;\n overFundingLimit: string;\n createdAt: any;\n updatedAt: any;\n}\n\n// 众筹奖励类型\nexport interface Reward {\n rewardId: number;\n crowdfundingId: number;\n variantId: number;\n rewardName: string;\n rewardDescription: string;\n rewardAmount: string;\n rewardLimit: number;\n rewardClaimed: number;\n shippingRequired: boolean;\n estimatedDeliveryTime: any;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 众筹更新类型\nexport interface CrowdfundingUpdate {\n updateId: number;\n crowdfundingId: number;\n updateTitle: string;\n updateContent: string;\n isPublic: boolean;\n updateTime: any;\n}\n\n// 众筹FAQ类型\nexport interface CrowdfundingFAQ {\n faqId: number;\n crowdfundingId: number;\n question: string;\n answer: string;\n sortOrder: number;\n createdAt: any;\n updatedAt: any;\n}\n\n// 简单理财类型\nexport interface SimpleFinance {\n simpleFinanceId: number;\n productId: number;\n calculationPeriod: number;\n calculationPeriodUnit: string;\n interestRate: string;\n minInvestment: string;\n maxInvestment: string;\n minInvestmentUnit: string;\n maxInvestmentUnit: string;\n investmentPeriod: number;\n investmentPeriodUnit: string;\n}\n\n// 产品类型\nexport interface Product {\n productId: number;\n productName: string;\n description: string;\n metaKeywords: string;\n price: string;\n priceChangePercent: string;\n status: number;\n productType: number;\n native: number;\n shared: number;\n createdAt: any;\n updatedAt: any;\n platformId: number;\n oldProductId: number | null;\n details: ProductDetail[];\n options: ProductOption[];\n variants: ProductVariant[];\n images: ProductImage[];\n categories: ProductCategory[];\n tags: ProductTag[];\n regions: Region[];\n shippingTemplates: ShippingTemplate[];\n taxTemplates: TaxTemplate[];\n subscription?: Subscription; // 当productType为2时存在\n wholesale?: Wholesale; // 当productType为3时存在\n priceTiers?: PriceTier[]; // 当productType为3时存在\n variantPrices?: VariantPrice[]; // 当productType为3时存在\n crowdfunding?: Crowdfunding; // 当productType为4时存在\n rewards?: Reward[]; // 当productType为4时存在\n updates?: CrowdfundingUpdate[]; // 当productType为4时存在\n faqs?: CrowdfundingFAQ[]; // 当productType为4时存在\n simpleFinance?: SimpleFinance; // 当productType为5时存在\n generatedAt: string;\n}\n\n// 文章列表项类型(简化版)\nexport interface ArticleListItem {\n articleId: number;\n title: string;\n status: string;\n publishedAt: string;\n categories: Category[];\n tags: Tag[];\n coverImage?: string;\n}\n\n// 产品列表项类型(简化版)\nexport interface ProductListItem {\n productId: number;\n productName: string;\n price: string;\n status: number;\n categories: ProductCategory[];\n tags: ProductTag[];\n coverImage?: string;\n}\n\n// 错误类型\nexport class GT6Error extends Error {\n constructor(\n message: string,\n public statusCode?: number\n ) {\n super(message);\n this.name = 'GT6Error';\n }\n}\n\n// 查询参数类型\nexport interface ArticleQueryParams {\n categoryId?: number;\n tagId?: number;\n status?: string;\n limit?: number;\n offset?: number;\n sortBy?: 'publishedAt' | 'title' | 'sortOrder';\n sortOrder?: 'asc' | 'desc';\n}\n\n// 产品查询参数类型\nexport interface ProductQueryParams {\n categoryId?: number;\n tagId?: number;\n status?: number;\n limit?: number;\n offset?: number;\n sortBy?: 'price' | 'productName' | 'sortOrder';\n sortOrder?: 'asc' | 'desc';\n}\n\n// 根据标签获取文章的选项类型\nexport interface ArticlesByTagOptions {\n page?: number;\n limit?: number;\n status?: 'published' | 'draft' | 'archived';\n tagAlias?: string;\n}\n\n// 根据分类获取文章的选项类型\nexport interface ArticlesByCategoryOptions {\n page?: number;\n limit?: number;\n status?: 'published' | 'draft' | 'archived';\n}\n\n// 根据标签获取产品的选项类型\nexport interface ProductsByTagOptions {\n page?: number;\n limit?: number;\n status?: number;\n productTagAlias?: string;\n}\n\n// 根据分类获取产品的选项类型\nexport interface ProductsByCategoryOptions {\n page?: number;\n limit?: number;\n status?: number;\n}\n\n// 文章统计类型\nexport interface ArticleStats {\n total: number;\n published: number;\n draft: number;\n archived: number;\n byCategory: Record<number, number>;\n byTag: Record<number, number>;\n}\n\n// 产品统计类型\nexport interface ProductStats {\n total: number;\n active: number;\n inactive: number;\n byCategory: Record<number, number>;\n byTag: Record<number, number>;\n}\n\nexport interface GT6Response<T> {\n success: boolean;\n data: T;\n error?: string;\n}\n\nexport interface ArticleResponse {\n article: Article;\n}\n\nexport interface ProductResponse {\n product: Product;\n}\n\nexport interface CategoryResponse {\n categories: Category[];\n}\n\nexport interface ProductCategoryResponse {\n categories: ProductCategory[];\n}\n\nexport interface TagResponse {\n tags: Tag[];\n}\n\nexport interface ProductTagResponse {\n tags: ProductTag[];\n}\n\n// 区域响应类型\nexport interface RegionResponse {\n platformId: number;\n regions: Region[];\n generatedAt: string;\n}\n\n// 全局设置相关类型\nexport interface Setting {\n key: string;\n value: string | number | object;\n type: 'text' | 'number' | 'json' | 'html' | 'image';\n label: string;\n description: string;\n isSystem: boolean;\n sortOrder: number;\n aliases: string;\n}\n\nexport interface SettingsResponse {\n platformId: number;\n aliases: string;\n settings: Setting[];\n generatedAt: string;\n}\n\nexport interface SettingResponse {\n platformId: number;\n setting: Setting;\n generatedAt: string;\n}\n\nexport interface SettingsOptions {\n settingAlias?: string;\n}\n\n// 支付方式相关类型\nexport interface PaymentMethodAttribute {\n id: number;\n methodId: number;\n attrName: string;\n attrValue: string;\n attrType: 'text' | 'number' | 'image' | 'url' | 'email' | 'phone';\n}\n\nexport interface PaymentMethod {\n id: number;\n platformId: number;\n name: string;\n description: string;\n type: 'Api' | 'Manual' | 'Gateway' | 'Crypto';\n aliases: string;\n attrs: PaymentMethodAttribute[];\n}\n\nexport interface PaymentMethodsResponse {\n platformId: number;\n methods: PaymentMethod[];\n generatedAt: string;\n}\n\nexport interface PaymentMethodsOptions {\n paymentAlias?: string;\n} ","import { GT6Config, GT6Error } from './types';\r\n\r\nexport class GT6Client {\r\n private config: GT6Config;\r\n private cache: Map<string, { data: any; timestamp: number }>;\r\n\r\n constructor(config: GT6Config) {\r\n this.config = {\r\n timeout: 10000,\r\n cache: {\r\n enabled: true,\r\n ttl: 300000 // 5分钟默认缓存\r\n },\r\n ...config\r\n };\r\n this.cache = new Map();\r\n }\r\n\r\n /**\r\n * 发起HTTP请求\r\n */\r\n async request<T>(endpoint: string, options: RequestInit = {}): Promise<T> {\r\n const url = `${this.config.baseUrl}${endpoint}`;\r\n const cacheKey = `${options.method || 'GET'}:${url}`;\r\n\r\n // 检查缓存(只对GET请求缓存)\r\n if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {\r\n const cached = this.cache.get(cacheKey);\r\n if (cached && Date.now() - cached.timestamp < this.config.cache.ttl) {\r\n return cached.data;\r\n }\r\n }\r\n\r\n try {\r\n const controller = new AbortController();\r\n const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);\r\n\r\n const response = await fetch(url, {\r\n ...options,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n ...options.headers,\r\n },\r\n signal: controller.signal\r\n });\r\n\r\n clearTimeout(timeoutId);\r\n\r\n if (!response.ok) {\r\n throw new GT6Error(\r\n `HTTP ${response.status}: ${response.statusText}`,\r\n response.status\r\n );\r\n }\r\n\r\n const data = await response.json();\r\n\r\n // 更新缓存(只对GET请求缓存)\r\n if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {\r\n this.cache.set(cacheKey, { data, timestamp: Date.now() });\r\n }\r\n\r\n return data;\r\n } catch (error: any) {\r\n if (error instanceof GT6Error) {\r\n throw error;\r\n }\r\n \r\n if (error.name === 'AbortError') {\r\n throw new GT6Error('Request timeout', 408);\r\n }\r\n \r\n throw new GT6Error(`Network error: ${error.message}`);\r\n }\r\n }\r\n\r\n /**\r\n * 获取配置\r\n */\r\n getConfig(): GT6Config {\r\n return { ...this.config };\r\n }\r\n\r\n /**\r\n * 清除缓存\r\n */\r\n clearCache(): void {\r\n this.cache.clear();\r\n }\r\n\r\n /**\r\n * 获取缓存统计\r\n */\r\n getCacheStats(): { size: number; entries: Array<{ key: string; age: number }> } {\r\n const entries = Array.from(this.cache.entries()).map(([key, value]) => ({\r\n key,\r\n age: Date.now() - value.timestamp\r\n }));\r\n\r\n return {\r\n size: this.cache.size,\r\n entries\r\n };\r\n }\r\n} ","import { GT6Client } from '../core/client';\r\nimport {\r\n Article,\r\n Category,\r\n Tag,\r\n CategoryResponse,\r\n TagResponse,\r\n ArticlesByTagOptions,\r\n ArticlesByCategoryOptions\r\n} from '../core/types';\r\n\r\nexport class ArticlesAPI {\r\n constructor(private client: GT6Client) {}\r\n\r\n /**\r\n * 1. 根据文章ID获取文章详情\r\n */\r\n async getArticle(articleId: number | string): Promise<Article> {\r\n return this.client.request<Article>(`/articles/${articleId}.json`);\r\n }\r\n\r\n /**\r\n * 2. 获取文章分类列表\r\n */\r\n async getCategories(rootCategoryId?: number | string): Promise<Category[]> {\r\n const config = this.client.getConfig();\r\n const categoryId = rootCategoryId || config.rootCategoryId || '671920';\r\n \r\n const response = await this.client.request<CategoryResponse>(\r\n `/article-categories/platform-${config.platformId}-root-${categoryId}.json`\r\n );\r\n \r\n return response.categories;\r\n }\r\n\r\n /**\r\n * 3. 获取文章标签列表\r\n */\r\n async getTags(tagAlias?: string): Promise<Tag[]> {\r\n const config = this.client.getConfig();\r\n const alias = tagAlias || config.tagAlias || '001';\r\n \r\n const response = await this.client.request<TagResponse>(\r\n `/article-tags/platform-${config.platformId}-${alias}.json`\r\n );\r\n \r\n return response.tags;\r\n }\r\n\r\n /**\r\n * 4. 根据分类ID获取文章列表\r\n * 支持单个分类ID或分类ID数组\r\n */\r\n async getArticlesByCategory(categoryId: number | number[], options?: ArticlesByCategoryOptions): Promise<{\r\n articles: Article[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 将单个分类ID转换为数组\r\n const categoryIds = Array.isArray(categoryId) ? categoryId : [categoryId];\r\n \r\n // 收集所有指定分类下的文章ID\r\n const allArticleIds: number[] = [];\r\n \r\n categoryIds.forEach(id => {\r\n const targetCategory = categories.find(cat => cat.categoryId === id);\r\n if (targetCategory) {\r\n allArticleIds.push(...targetCategory.articleIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueArticleIds = [...new Set(allArticleIds)];\r\n \r\n if (uniqueArticleIds.length === 0) {\r\n return {\r\n articles: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedArticleIds = uniqueArticleIds.slice(offset, offset + limit);\r\n \r\n // 获取文章详情\r\n const articles = await Promise.all(\r\n paginatedArticleIds.map(articleId => this.getArticle(articleId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredArticles = articles;\r\n if (options?.status) {\r\n filteredArticles = articles.filter(article => article.status === options.status);\r\n }\r\n \r\n return {\r\n articles: filteredArticles,\r\n total: uniqueArticleIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 5. 根据标签ID获取文章列表\r\n * 支持单个标签ID或标签ID数组\r\n */\r\n async getArticlesByTag(tagId: number | number[], options?: ArticlesByTagOptions): Promise<{\r\n articles: Article[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取标签数据,传递tagAlias参数\r\n const tags = await this.getTags(options?.tagAlias);\r\n \r\n // 将单个标签ID转换为数组\r\n const tagIds = Array.isArray(tagId) ? tagId : [tagId];\r\n \r\n // 收集所有指定标签下的文章ID\r\n const allArticleIds: number[] = [];\r\n \r\n tagIds.forEach(id => {\r\n const targetTag = tags.find(tag => tag.tagId === id);\r\n if (targetTag) {\r\n allArticleIds.push(...targetTag.articleIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueArticleIds = [...new Set(allArticleIds)];\r\n \r\n if (uniqueArticleIds.length === 0) {\r\n return {\r\n articles: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedArticleIds = uniqueArticleIds.slice(offset, offset + limit);\r\n \r\n // 获取文章详情\r\n const articles = await Promise.all(\r\n paginatedArticleIds.map(articleId => this.getArticle(articleId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredArticles = articles;\r\n if (options?.status) {\r\n filteredArticles = articles.filter(article => article.status === options.status);\r\n }\r\n \r\n return {\r\n articles: filteredArticles,\r\n total: uniqueArticleIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 6. 根据分类ID获取该分类的层级路径\r\n * 用于前端面包屑导航\r\n */\r\n async getCategoryPath(categoryId: number): Promise<{\r\n path: Category[];\r\n currentCategory: Category | null;\r\n breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }>;\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 查找目标分类\r\n const targetCategory = categories.find(cat => cat.categoryId === categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n path: [],\r\n currentCategory: null,\r\n breadcrumbs: []\r\n };\r\n }\r\n \r\n // 构建分类路径\r\n const path: Category[] = [];\r\n const breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }> = [];\r\n \r\n // 递归查找父分类\r\n const buildPath = (currentCategory: Category, level: number = 0): void => {\r\n // 将当前分类添加到路径开头(因为我们要从根到叶子构建)\r\n path.unshift(currentCategory);\r\n breadcrumbs.unshift({\r\n categoryId: currentCategory.categoryId,\r\n categoryName: currentCategory.categoryName,\r\n level\r\n });\r\n \r\n // 如果有父分类,继续递归\r\n if (currentCategory.parentId && currentCategory.parentId !== 0) {\r\n const parentCategory = categories.find(cat => cat.categoryId === currentCategory.parentId);\r\n if (parentCategory) {\r\n buildPath(parentCategory, level + 1);\r\n }\r\n }\r\n };\r\n \r\n // 从目标分类开始构建路径\r\n buildPath(targetCategory);\r\n \r\n return {\r\n path,\r\n currentCategory: targetCategory,\r\n breadcrumbs\r\n };\r\n }\r\n\r\n /**\r\n * 7. 获取指定分类ID下的子分类\r\n * 支持递归获取所有层级的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean; // 是否递归获取所有层级的子分类\r\n includeCurrent?: boolean; // 是否包含当前分类\r\n maxDepth?: number; // 最大递归深度,默认不限制\r\n }): Promise<{\r\n subCategories: Category[];\r\n currentCategory: Category | null;\r\n total: number;\r\n depth: number; // 实际递归深度\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 查找目标分类\r\n const targetCategory = categories.find(cat => cat.categoryId === categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n subCategories: [],\r\n currentCategory: null,\r\n total: 0,\r\n depth: 0\r\n };\r\n }\r\n \r\n const subCategories: Category[] = [];\r\n let maxDepth = options?.maxDepth || Infinity;\r\n let actualDepth = 0;\r\n \r\n // 递归获取子分类的函数\r\n const collectSubCategories = (parentId: number, currentDepth: number = 0): void => {\r\n if (currentDepth >= maxDepth) {\r\n return;\r\n }\r\n \r\n // 查找直接子分类\r\n const children = categories.filter(cat => cat.parentId === parentId);\r\n \r\n children.forEach(child => {\r\n subCategories.push(child);\r\n \r\n // 如果需要递归且未达到最大深度,继续查找子分类\r\n if (options?.recursive && currentDepth < maxDepth - 1) {\r\n collectSubCategories(child.categoryId, currentDepth + 1);\r\n }\r\n });\r\n \r\n // 更新实际深度\r\n actualDepth = Math.max(actualDepth, currentDepth);\r\n };\r\n \r\n // 开始收集子分类\r\n collectSubCategories(categoryId);\r\n \r\n // 如果需要包含当前分类,添加到结果中\r\n if (options?.includeCurrent) {\r\n subCategories.unshift(targetCategory);\r\n }\r\n \r\n return {\r\n subCategories,\r\n currentCategory: targetCategory,\r\n total: subCategories.length,\r\n depth: actualDepth\r\n };\r\n }\r\n} ","import { GT6Client } from '../core/client';\r\nimport {\r\n Product,\r\n ProductCategory,\r\n ProductTag,\r\n ProductCategoryResponse,\r\n ProductTagResponse,\r\n ProductsByTagOptions,\r\n ProductsByCategoryOptions,\r\n TaxResponse,\r\n ShippingResponse,\r\n RegionResponse,\r\n PaymentMethodsResponse,\r\n PaymentMethodsOptions,\r\n PaymentMethod\r\n} from '../core/types';\r\n\r\nexport class ProductsAPI {\r\n constructor(private client: GT6Client) {}\r\n\r\n /**\r\n * 1. 根据产品ID获取产品详情\r\n */\r\n async getProduct(productId: number | string): Promise<Product> {\r\n const product = await this.client.request<Product>(`/products/${productId}.json`);\r\n \r\n // 检查产品是否有销售区域和税费模板\r\n if (product.regions && product.regions.length > 0 && \r\n product.taxTemplates && product.taxTemplates.length > 0) {\r\n try {\r\n // 获取税费信息\r\n const taxInfo = await this.getTaxInfo();\r\n \r\n // 为每个税费模板添加规则\r\n product.taxTemplates = product.taxTemplates.map(template => {\r\n const matchingTemplate = taxInfo.templates.find(t => t.templateId === template.templateId);\r\n if (matchingTemplate) {\r\n // 过滤出产品可销售区域的规则\r\n const productRegionIds = product.regions.map(r => r.regionId);\r\n const applicableRules = matchingTemplate.rules.filter(rule => \r\n productRegionIds.includes(rule.regionId)\r\n );\r\n \r\n return {\r\n ...template,\r\n rules: applicableRules\r\n };\r\n }\r\n return template;\r\n });\r\n } catch (error) {\r\n // 如果获取税费信息失败,不影响产品详情返回\r\n console.warn('Failed to fetch tax info:', error);\r\n }\r\n }\r\n \r\n // 检查产品是否有销售区域和运费模板\r\n if (product.regions && product.regions.length > 0 && \r\n product.shippingTemplates && product.shippingTemplates.length > 0) {\r\n try {\r\n // 获取运费信息\r\n const shippingInfo = await this.getShippingInfo();\r\n \r\n // 为每个运费模板添加规则\r\n product.shippingTemplates = product.shippingTemplates.map(template => {\r\n const matchingTemplate = shippingInfo.templates.find(t => t.templateId === template.templateId);\r\n if (matchingTemplate) {\r\n // 过滤出产品可销售区域的规则\r\n const productRegionIds = product.regions.map(r => r.regionId);\r\n const applicableRules = matchingTemplate.rules.filter(rule => \r\n productRegionIds.includes(rule.regionId)\r\n );\r\n \r\n return {\r\n ...template,\r\n rules: applicableRules\r\n };\r\n }\r\n return template;\r\n });\r\n } catch (error) {\r\n // 如果获取运费信息失败,不影响产品详情返回\r\n console.warn('Failed to fetch shipping info:', error);\r\n }\r\n }\r\n \r\n return product;\r\n }\r\n\r\n /**\r\n * 2. 获取产品分类列表\r\n */\r\n async getCategories(productRootCategoryId?: number | string): Promise<ProductCategory[]> {\r\n const config = this.client.getConfig();\r\n const categoryId = productRootCategoryId || config.productRootCategoryId || '277233';\r\n \r\n const response = await this.client.request<ProductCategoryResponse>(\r\n `/product-categories/platform-${config.platformId}-root-${categoryId}.json`\r\n );\r\n \r\n return response.categories;\r\n }\r\n\r\n /**\r\n * 3. 获取产品标签列表\r\n */\r\n async getTags(productTagAlias?: string): Promise<ProductTag[]> {\r\n const config = this.client.getConfig();\r\n const alias = productTagAlias || config.productTagAlias || '01';\r\n \r\n const response = await this.client.request<ProductTagResponse>(\r\n `/product-tags/platform-${config.platformId}-${alias}.json`\r\n );\r\n \r\n return response.tags;\r\n }\r\n\r\n /**\r\n * 4. 根据分类ID获取产品列表\r\n * 支持单个分类ID或分类ID数组\r\n */\r\n async getProductsByCategory(categoryId: number | number[], options?: ProductsByCategoryOptions): Promise<{\r\n products: Product[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 将单个分类ID转换为数组\r\n const categoryIds = Array.isArray(categoryId) ? categoryId : [categoryId];\r\n \r\n // 收集所有指定分类下的产品ID\r\n const allProductIds: number[] = [];\r\n \r\n categoryIds.forEach(id => {\r\n const targetCategory = findCategoryById(categories, id);\r\n if (targetCategory) {\r\n allProductIds.push(...targetCategory.productIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueProductIds = [...new Set(allProductIds)];\r\n \r\n if (uniqueProductIds.length === 0) {\r\n return {\r\n products: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedProductIds = uniqueProductIds.slice(offset, offset + limit);\r\n \r\n // 获取产品详情\r\n const products = await Promise.all(\r\n paginatedProductIds.map(productId => this.getProduct(productId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredProducts = products;\r\n if (options?.status !== undefined) {\r\n filteredProducts = products.filter(product => product.status === options.status);\r\n }\r\n \r\n return {\r\n products: filteredProducts,\r\n total: uniqueProductIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 5. 根据标签ID获取产品列表\r\n * 支持单个标签ID或标签ID数组\r\n */\r\n async getProductsByTag(tagId: number | number[], options?: ProductsByTagOptions): Promise<{\r\n products: Product[];\r\n total: number;\r\n page: number;\r\n limit: number;\r\n }> {\r\n // 获取标签数据,传递productTagAlias参数\r\n const tags = await this.getTags(options?.productTagAlias);\r\n \r\n // 将单个标签ID转换为数组\r\n const tagIds = Array.isArray(tagId) ? tagId : [tagId];\r\n \r\n // 收集所有指定标签下的产品ID\r\n const allProductIds: number[] = [];\r\n \r\n tagIds.forEach(id => {\r\n const targetTag = tags.find(tag => tag.tagId === id);\r\n if (targetTag) {\r\n allProductIds.push(...targetTag.productIds);\r\n }\r\n });\r\n \r\n // 去重\r\n const uniqueProductIds = [...new Set(allProductIds)];\r\n \r\n if (uniqueProductIds.length === 0) {\r\n return {\r\n products: [],\r\n total: 0,\r\n page: options?.page || 1,\r\n limit: options?.limit || 10\r\n };\r\n }\r\n \r\n // 应用分页\r\n const page = options?.page || 1;\r\n const limit = options?.limit || 10;\r\n const offset = (page - 1) * limit;\r\n const paginatedProductIds = uniqueProductIds.slice(offset, offset + limit);\r\n \r\n // 获取产品详情\r\n const products = await Promise.all(\r\n paginatedProductIds.map(productId => this.getProduct(productId))\r\n );\r\n \r\n // 应用状态过滤\r\n let filteredProducts = products;\r\n if (options?.status !== undefined) {\r\n filteredProducts = products.filter(product => product.status === options.status);\r\n }\r\n \r\n return {\r\n products: filteredProducts,\r\n total: uniqueProductIds.length,\r\n page,\r\n limit\r\n };\r\n }\r\n\r\n /**\r\n * 6. 根据分类ID获取该分类的层级路径\r\n * 用于前端面包屑导航\r\n */\r\n async getCategoryPath(categoryId: number): Promise<{\r\n path: ProductCategory[];\r\n currentCategory: ProductCategory | null;\r\n breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }>;\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找目标分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 查找目标分类(包括子分类)\r\n const targetCategory = findCategoryById(categories, categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n path: [],\r\n currentCategory: null,\r\n breadcrumbs: []\r\n };\r\n }\r\n \r\n // 构建分类路径\r\n const path: ProductCategory[] = [];\r\n const breadcrumbs: Array<{\r\n categoryId: number;\r\n categoryName: string;\r\n level: number;\r\n }> = [];\r\n \r\n // 递归查找父分类的函数\r\n const buildPath = (currentCategory: ProductCategory, level: number = 0): void => {\r\n // 将当前分类添加到路径开头(因为我们要从根到叶子构建)\r\n path.unshift(currentCategory);\r\n breadcrumbs.unshift({\r\n categoryId: currentCategory.categoryId,\r\n categoryName: currentCategory.categoryName,\r\n level\r\n });\r\n \r\n // 如果有父分类,继续递归\r\n if (currentCategory.parentId && currentCategory.parentId !== 0) {\r\n const parentCategory = findCategoryById(categories, currentCategory.parentId);\r\n if (parentCategory) {\r\n buildPath(parentCategory, level + 1);\r\n }\r\n }\r\n };\r\n \r\n // 从目标分类开始构建路径\r\n buildPath(targetCategory);\r\n \r\n return {\r\n path,\r\n currentCategory: targetCategory,\r\n breadcrumbs\r\n };\r\n }\r\n\r\n /**\r\n * 7. 获取指定分类ID下的子分类\r\n * 支持递归获取所有层级的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean; // 是否递归获取所有层级的子分类\r\n includeCurrent?: boolean; // 是否包含当前分类\r\n maxDepth?: number; // 最大递归深度,默认不限制\r\n }): Promise<{\r\n subCategories: ProductCategory[];\r\n currentCategory: ProductCategory | null;\r\n total: number;\r\n depth: number; // 实际递归深度\r\n }> {\r\n // 获取所有分类数据\r\n const categories = await this.getCategories();\r\n \r\n // 递归查找分类的函数\r\n const findCategoryById = (cats: ProductCategory[], targetId: number): ProductCategory | null => {\r\n for (const cat of cats) {\r\n if (cat.categoryId === targetId) {\r\n return cat;\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n const found = findCategoryById(cat.children, targetId);\r\n if (found) return found;\r\n }\r\n }\r\n return null;\r\n };\r\n \r\n // 查找目标分类(包括子分类)\r\n const targetCategory = findCategoryById(categories, categoryId);\r\n \r\n if (!targetCategory) {\r\n return {\r\n subCategories: [],\r\n currentCategory: null,\r\n total: 0,\r\n depth: 0\r\n };\r\n }\r\n \r\n const subCategories: ProductCategory[] = [];\r\n let maxDepth = options?.maxDepth || Infinity;\r\n let actualDepth = 0;\r\n \r\n // 递归获取子分类的函数\r\n const collectSubCategories = (parentId: number, currentDepth: number = 0): void => {\r\n if (currentDepth >= maxDepth) {\r\n return;\r\n }\r\n \r\n // 递归查找直接子分类\r\n const findChildren = (cats: ProductCategory[], parentId: number): ProductCategory[] => {\r\n const children: ProductCategory[] = [];\r\n for (const cat of cats) {\r\n if (cat.parentId === parentId) {\r\n children.push(cat);\r\n }\r\n if (cat.children && cat.children.length > 0) {\r\n children.push(...findChildren(cat.children, parentId));\r\n }\r\n }\r\n return children;\r\n };\r\n \r\n const children = findChildren(categories, parentId);\r\n \r\n children.forEach(child => {\r\n subCategories.push(child);\r\n \r\n // 如果需要递归且未达到最大深度,继续查找子分类\r\n if (options?.recursive && currentDepth < maxDepth - 1) {\r\n collectSubCategories(child.categoryId, currentDepth + 1);\r\n }\r\n });\r\n \r\n // 更新实际深度\r\n actualDepth = Math.max(actualDepth, currentDepth);\r\n };\r\n \r\n // 开始收集子分类\r\n collectSubCategories(categoryId);\r\n \r\n // 如果需要包含当前分类,添加到结果中\r\n if (options?.includeCurrent) {\r\n subCategories.unshift(targetCategory);\r\n }\r\n \r\n return {\r\n subCategories,\r\n currentCategory: targetCategory,\r\n total: subCategories.length,\r\n depth: actualDepth\r\n };\r\n }\r\n\r\n /**\r\n * 8. 获取税费信息\r\n * 获取平台的所有税费模板和规则\r\n */\r\n async getTaxInfo(): Promise<TaxResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<TaxResponse>(`/tax/platform-${config.platformId}.json`);\r\n }\r\n\r\n /**\r\n * 9. 获取运费信息\r\n * 获取平台的所有运费模板和规则\r\n */\r\n async getShippingInfo(): Promise<ShippingResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<ShippingResponse>(`/shipping/platform-${config.platformId}.json`);\r\n }\r\n\r\n /**\r\n * 10. 获取区域信息\r\n * 获取平台的所有区域信息,包括层级结构\r\n */\r\n async getRegions(): Promise<RegionResponse> {\r\n const config = this.client.getConfig();\r\n return this.client.request<RegionResponse>(`/regions/platform-${config.platformId}.json`);\r\n }\r\n\r\n /**\r\n * 11. 获取支付方式信息\r\n * 获取平台的所有支付方式,包括API支付和手动支付\r\n * @param paymentAlias 支付方式别名,默认为'01'\r\n */\r\n async getPaymentMethods(paymentAlias?: string): Promise<PaymentMethodsResponse> {\r\n const config = this.client.getConfig();\r\n const alias = paymentAlias || '01';\r\n return this.client.request<PaymentMethodsResponse>(`/payment/platform-${config.platformId}-${alias}.json`);\r\n }\r\n\r\n /**\r\n * 12. 根据支付方式类型获取支付方式列表\r\n * @param type 支付方式类型:'Api' | 'Manual' | 'Gateway' | 'Crypto'\r\n * @param paymentAlias 支付方式别名,默认为'01'\r\n */\r\n async getPaymentMethodsByType(type: 'Api' | 'Manual' | 'Gateway' | 'Crypto', paymentAlias?: string): Promise<PaymentMethod[]> {\r\n const response = await this.getPaymentMethods(paymentAlias);\r\n return response.methods.filter(method => method.type === type);\r\n }\r\n\r\n /**\r\n * 13. 根据支付方式ID获取特定支付方式详情\r\n * @param methodId 支付方式ID\r\n * @param paymentAlias 支付方式别名,默认为'01'\r\n */\r\n async getPaymentMethodById(methodId: number, paymentAlias?: string): Promise<PaymentMethod | null> {\r\n const response = await this.getPaymentMethods(paymentAlias);\r\n return response.methods.find(method => method.id === methodId) || null;\r\n }\r\n\r\n /**\r\n * 14. 获取支付方式属性值\r\n * @param methodId 支付方式ID\r\n * @param attrName 属性名称\r\n * @param paymentAlias 支付方式别名,默认为'01'\r\n */\r\n async getPaymentMethodAttribute(methodId: number, attrName: string, paymentAlias?: string): Promise<string | null> {\r\n const method = await this.getPaymentMethodById(methodId, paymentAlias);\r\n if (!method) return null;\r\n \r\n const attribute = method.attrs.find(attr => attr.attrName === attrName);\r\n return attribute ? attribute.attrValue : null;\r\n }\r\n} ","import { GT6Client } from '../core/client';\r\nimport {\r\n Setting,\r\n SettingsResponse,\r\n SettingResponse\r\n} from '../core/types';\r\n\r\nexport class SettingsAPI {\r\n constructor(private client: GT6Client) {}\r\n\r\n /**\r\n * 获取全局设置列表\r\n * 根据平台ID和别名获取所有全局设置\r\n */\r\n async getSettings(settingAlias?: string): Promise<Setting[]> {\r\n const config = this.client.getConfig();\r\n const alias = settingAlias || config.settingAlias || '01';\r\n \r\n const response = await this.client.request<SettingsResponse>(\r\n `/settings/platform-${config.platformId}-${alias}.json`\r\n );\r\n \r\n return response.settings;\r\n }\r\n\r\n /**\r\n * 获取指定设置\r\n * 根据设置key直接获取单个设置\r\n */\r\n async getSetting(key: string): Promise<Setting | null> {\r\n const config = this.client.getConfig();\r\n \r\n try {\r\n const response = await this.client.request<SettingResponse>(\r\n `/settings/platform-${config.platformId}-${key}.json`\r\n );\r\n \r\n return response.setting;\r\n } catch (error) {\r\n console.warn(`Failed to fetch setting ${key}:`, error);\r\n return null;\r\n }\r\n }\r\n} ","import { GT6Client } from './core/client';\r\nimport { ArticlesAPI } from './modules/articles';\r\nimport { ProductsAPI } from './modules/products';\r\nimport { SettingsAPI } from './modules/settings';\r\nimport { \r\n GT6Config, \r\n ArticlesByCategoryOptions, \r\n ArticlesByTagOptions,\r\n ProductsByCategoryOptions,\r\n ProductsByTagOptions\r\n} from './core/types';\r\n\r\n/**\r\n * GT6 SDK 主类\r\n * 提供文章、产品和设置管理相关的所有功能\r\n */\r\nexport class GT6SDK {\r\n public articles: ArticlesAPI;\r\n public products: ProductsAPI;\r\n public settings: SettingsAPI;\r\n\r\n constructor(config: GT6Config) {\r\n const client = new GT6Client(config);\r\n this.articles = new ArticlesAPI(client);\r\n this.products = new ProductsAPI(client);\r\n this.settings = new SettingsAPI(client);\r\n }\r\n\r\n /**\r\n * 获取客户端实例(用于高级用法)\r\n */\r\n getClient(): GT6Client {\r\n return (this.articles as any).client;\r\n }\r\n\r\n /**\r\n * 清除所有缓存\r\n */\r\n clearCache(): void {\r\n this.getClient().clearCache();\r\n }\r\n\r\n /**\r\n * 获取缓存统计信息\r\n */\r\n getCacheStats() {\r\n return this.getClient().getCacheStats();\r\n }\r\n\r\n /**\r\n * 1. 便捷方法:根据文章ID获取文章详情\r\n */\r\n async getArticle(articleId: number | string) {\r\n return this.articles.getArticle(articleId);\r\n }\r\n\r\n /**\r\n * 2. 便捷方法:获取文章分类列表\r\n */\r\n async getCategories(rootCategoryId?: number | string) {\r\n return this.articles.getCategories(rootCategoryId);\r\n }\r\n\r\n /**\r\n * 3. 便捷方法:获取文章标签列表\r\n */\r\n async getTags(tagAlias?: string) {\r\n return this.articles.getTags(tagAlias);\r\n }\r\n\r\n /**\r\n * 4. 便捷方法:根据分类ID获取文章列表\r\n */\r\n async getArticlesByCategory(categoryId: number | number[], options?: ArticlesByCategoryOptions) {\r\n return this.articles.getArticlesByCategory(categoryId, options);\r\n }\r\n\r\n /**\r\n * 5. 便捷方法:根据标签ID获取文章列表\r\n */\r\n async getArticlesByTag(tagId: number | number[], options?: ArticlesByTagOptions) {\r\n return this.articles.getArticlesByTag(tagId, options);\r\n }\r\n\r\n /**\r\n * 6. 便捷方法:根据分类ID获取该分类的层级路径\r\n */\r\n async getCategoryPath(categoryId: number) {\r\n return this.articles.getCategoryPath(categoryId);\r\n }\r\n\r\n /**\r\n * 7. 便捷方法:获取指定分类ID下的子分类\r\n */\r\n async getSubCategories(categoryId: number, options?: {\r\n recursive?: boolean;\r\n includeCurrent?: boolean;\r\n maxDepth?: number;\r\n }) {\r\n return this.articles.getSubCategories(categoryId, options);\r\n }\r\n\r\n /**\r\n * 8. 便捷方法:根据产品ID获取产品详情\r\n */\r\n async getProduct(productId: number | string) {\r\n return this.products.getProduct(productId);\r\n }\r\n\r\n /**\r\n * 9. 便捷方法:获取产品分类列表\r\n */\r\n async getProductCategories(productRootCategoryId?: number | string) {\r\n return this.products.getCategories(productRootCategoryId);\r\n }\r\n\r\n /**\r\n * 10. 便捷方法:获取产品标签列表\r\n */\r\n async getProductTags(productTagAlias?: string) {\r\n return this.products.getTags(productTagAlias);\r\n }\r\n\r\n /**\r\n * 11. 便捷方法:根据分类ID获取产品列表\r\n */\r\n async getProductsByCategory(categoryId: number | number[], options?: ProductsByCategoryOptions) {\r\n return this.products.getProductsByCategory(categoryId, options);\r\n }\r\n\r\n /**\r\n * 12. 便捷方法:根据标签ID获取产品列表\r\n */\r\n async getProductsByTag(tagId: number | number[], options?: ProductsByTagOptions) {\r\n return this.products.getProductsByTag(tagId, options);\r\n }\r\n\r\n /**\r\n * 13. 便捷方法:根据分类ID获取该分类的层级路径\r\n */\r\n async getProductCategoryPath(categoryId: number) {\r\n return this.products.getCategoryPath(categoryId);\r\n }\r\n\r\n /**\r\n * 14. 便捷方法:获取指定分类ID下的子分类\r\n */\r\n async getProductSubCategories(categoryId: number, options?: {\r\n recursive?: boolean;\r\n includeCurrent?: boolean;\r\n maxDepth?: number;\r\n }) {\r\n return this.products.getSubCategories(categoryId, options);\r\n }\r\n\r\n /**\r\n * 15. 便捷方法:获取税费信息\r\n */\r\n async getTaxInfo() {\r\n return this.products.getTaxInfo();\r\n }\r\n\r\n /**\r\n * 16. 便捷方法:获取运费信息\r\n */\r\n async getShippingInfo() {\r\n return this.products.getShippingInfo();\r\n }\r\n\r\n /**\r\n * 17. 便捷方法:获取区域信息\r\n */\r\n async getRegions() {\r\n return this.products.getRegions();\r\n }\r\n\r\n /**\r\n * 18. 便捷方法:获取全局设置列表\r\n */\r\n async getSettings(settingAlias?: string) {\r\n return this.settings.getSettings(settingAlias);\r\n }\r\n\r\n /**\r\n * 19. 便捷方法:获取指定设置\r\n */\r\n async getSetting(key: string) {\r\n return this.settings.getSetting(key);\r\n }\r\n\r\n /**\r\n * 20. 便捷方法:获取支付方式列表\r\n */\r\n async getPaymentMethods(paymentAlias?: string) {\r\n return this.products.getPaymentMethods(paymentAlias);\r\n }\r\n\r\n /**\r\n * 21. 便捷方法:根据类型获取支付方式\r\n */\r\n async getPaymentMethodsByType(type: 'Api' | 'Manual' | 'Gateway' | 'Crypto', paymentAlias?: string) {\r\n return this.products.getPaymentMethodsByType(type, paymentAlias);\r\n }\r\n\r\n /**\r\n * 22. 便捷方法:根据ID获取支付方式详情\r\n */\r\n async getPaymentMethodById(methodId: number, paymentAlias?: string) {\r\n return this.products.getPaymentMethodById(methodId, paymentAlias);\r\n }\r\n\r\n /**\r\n * 23. 便捷方法:获取支付方式属性值\r\n */\r\n async getPaymentMethodAttribute(methodId: number, attrName: string, paymentAlias?: string) {\r\n return this.products.getPaymentMethodAttribute(methodId, attrName, paymentAlias);\r\n }\r\n}\r\n\r\n// 导出所有类型和模块\r\nexport * from './core/types';\r\nexport * from './core/client';\r\nexport * from './modules/articles';\r\nexport * from './modules/products';\r\nexport * from './modules/settings';\r\n\r\n// 默认导出\r\nexport default GT6SDK; "],"names":[],"mappings":"AA2cA;AACM,MAAO,QAAS,SAAQ,KAAK,CAAA;IACjC,WAAA,CACE,OAAe,EACR,UAAmB,EAAA;QAE1B,KAAK,CAAC,OAAO,CAAC;QAFP,IAAA,CAAA,UAAU,GAAV,UAAU;AAGjB,QAAA,IAAI,CAAC,IAAI,GAAG,UAAU;;AAEzB;;MCldY,SAAS,CAAA;AAIpB,IAAA,WAAA,CAAY,MAAiB,EAAA;QAC3B,IAAI,CAAC,MAAM,GAAG;AACZ,YAAA,OAAO,EAAE,KAAK;AACd,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,IAAI;gBACb,GAAG,EAAE,MAAM;AACZ,aAAA;AACD,YAAA,GAAG;SACJ;AACD,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE;;AAGxB;;AAEG;AACH,IAAA,MAAM,OAAO,CAAI,QAAgB,EAAE,UAAuB,EAAE,EAAA;QAC1D,MAAM,GAAG,GA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MAAM,UAAU,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;AAGnC;;AAEG;IACH,MAAM,WAAW,CAAC,YAAqB,EAAA;QACrC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC;;AAGhD;;AAEG;IACH,MAAM,UAAU,CAAC,GAAW,EAAA;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;;AAGtC;;AAEG;IACH,MAAM,iBAAiB,CAAC,YAAqB,EAAA;QAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC;;AAGtD;;AAEG;AACH,IAAA,MAAM,uBAAuB,CAAC,IAA6C,EAAE,YAAqB,EAAA;QAChG,OAAO,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,EAAE,YAAY,CAAC;;AAGlE;;AAEG;AACH,IAAA,MAAM,oBAAoB,CAAC,QAAgB,EAAE,YAAqB,EAAA;QAChE,OAAO,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,EAAE,YAAY,CAAC;;AAGnE;;AAEG;AACH,IAAA,MAAM,yBAAyB,CAAC,QAAgB,EAAE,QAAgB,EAAE,YAAqB,EAAA;AACvF,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC;;AAEnF;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  import { GT6Client } from './core/client';
2
2
  import { ArticlesAPI } from './modules/articles';
3
3
  import { ProductsAPI } from './modules/products';
4
+ import { SettingsAPI } from './modules/settings';
4
5
  import { GT6Config, ArticlesByCategoryOptions, ArticlesByTagOptions, ProductsByCategoryOptions, ProductsByTagOptions } from './core/types';
5
6
  /**
6
7
  * GT6 SDK 主类
7
- * 提供文章和产品管理相关的所有功能
8
+ * 提供文章、产品和设置管理相关的所有功能
8
9
  */
9
10
  export declare class GT6SDK {
10
11
  articles: ArticlesAPI;
11
12
  products: ProductsAPI;
13
+ settings: SettingsAPI;
12
14
  constructor(config: GT6Config);
13
15
  /**
14
16
  * 获取客户端实例(用于高级用法)
@@ -150,10 +152,35 @@ export declare class GT6SDK {
150
152
  * 17. 便捷方法:获取区域信息
151
153
  */
152
154
  getRegions(): Promise<import("./core/types").RegionResponse>;
155
+ /**
156
+ * 18. 便捷方法:获取全局设置列表
157
+ */
158
+ getSettings(settingAlias?: string): Promise<import("./core/types").Setting[]>;
159
+ /**
160
+ * 19. 便捷方法:获取指定设置
161
+ */
162
+ getSetting(key: string): Promise<import("./core/types").Setting | null>;
163
+ /**
164
+ * 20. 便捷方法:获取支付方式列表
165
+ */
166
+ getPaymentMethods(paymentAlias?: string): Promise<import("./core/types").PaymentMethodsResponse>;
167
+ /**
168
+ * 21. 便捷方法:根据类型获取支付方式
169
+ */
170
+ getPaymentMethodsByType(type: 'Api' | 'Manual' | 'Gateway' | 'Crypto', paymentAlias?: string): Promise<import("./core/types").PaymentMethod[]>;
171
+ /**
172
+ * 22. 便捷方法:根据ID获取支付方式详情
173
+ */
174
+ getPaymentMethodById(methodId: number, paymentAlias?: string): Promise<import("./core/types").PaymentMethod | null>;
175
+ /**
176
+ * 23. 便捷方法:获取支付方式属性值
177
+ */
178
+ getPaymentMethodAttribute(methodId: number, attrName: string, paymentAlias?: string): Promise<string | null>;
153
179
  }
154
180
  export * from './core/types';
155
181
  export * from './core/client';
156
182
  export * from './modules/articles';
157
183
  export * from './modules/products';
184
+ export * from './modules/settings';
158
185
  export default GT6SDK;
159
186
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE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,EAAE,OAAO,CAAC,EAAE;QAC1D,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;;;;;;IAID;;OAEG;IACG,UAAU;IAIhB;;OAEG;IACG,eAAe;IAIrB;;OAEG;IACG,UAAU;IAIhB;;OAEG;IACG,WAAW,CAAC,YAAY,CAAC,EAAE,MAAM;IAIvC;;OAEG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM;IAI5B;;OAEG;IACG,iBAAiB,CAAC,YAAY,CAAC,EAAE,MAAM;IAI7C;;OAEG;IACG,uBAAuB,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM;IAIlG;;OAEG;IACG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAIlE;;OAEG;IACG,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAG1F;AAGD,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAGnC,eAAe,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { GT6Client } from '../core/client';
2
- import { Product, ProductCategory, ProductTag, ProductsByTagOptions, ProductsByCategoryOptions, TaxResponse, ShippingResponse, RegionResponse } from '../core/types';
2
+ import { Product, ProductCategory, ProductTag, ProductsByTagOptions, ProductsByCategoryOptions, TaxResponse, ShippingResponse, RegionResponse, PaymentMethodsResponse, PaymentMethod } from '../core/types';
3
3
  export declare class ProductsAPI {
4
4
  private client;
5
5
  constructor(client: GT6Client);
@@ -77,5 +77,30 @@ export declare class ProductsAPI {
77
77
  * 获取平台的所有区域信息,包括层级结构
78
78
  */
79
79
  getRegions(): Promise<RegionResponse>;
80
+ /**
81
+ * 11. 获取支付方式信息
82
+ * 获取平台的所有支付方式,包括API支付和手动支付
83
+ * @param paymentAlias 支付方式别名,默认为'01'
84
+ */
85
+ getPaymentMethods(paymentAlias?: string): Promise<PaymentMethodsResponse>;
86
+ /**
87
+ * 12. 根据支付方式类型获取支付方式列表
88
+ * @param type 支付方式类型:'Api' | 'Manual' | 'Gateway' | 'Crypto'
89
+ * @param paymentAlias 支付方式别名,默认为'01'
90
+ */
91
+ getPaymentMethodsByType(type: 'Api' | 'Manual' | 'Gateway' | 'Crypto', paymentAlias?: string): Promise<PaymentMethod[]>;
92
+ /**
93
+ * 13. 根据支付方式ID获取特定支付方式详情
94
+ * @param methodId 支付方式ID
95
+ * @param paymentAlias 支付方式别名,默认为'01'
96
+ */
97
+ getPaymentMethodById(methodId: number, paymentAlias?: string): Promise<PaymentMethod | null>;
98
+ /**
99
+ * 14. 获取支付方式属性值
100
+ * @param methodId 支付方式ID
101
+ * @param attrName 属性名称
102
+ * @param paymentAlias 支付方式别名,默认为'01'
103
+ */
104
+ getPaymentMethodAttribute(methodId: number, attrName: string, paymentAlias?: string): Promise<string | null>;
80
105
  }
81
106
  //# sourceMappingURL=products.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/modules/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,eAAe,EACf,UAAU,EAGV,oBAAoB,EACpB,yBAAyB,EACzB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,qBAAa,WAAW;IACV,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,SAAS;IAErC;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkE9D;;OAEG;IACG,aA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YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAK7H;;;;OAIG;IACG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAKlG;;;;;OAKG;IACG,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAOnH"}
@@ -0,0 +1,17 @@
1
+ import { GT6Client } from '../core/client';
2
+ import { Setting } from '../core/types';
3
+ export declare class SettingsAPI {
4
+ private client;
5
+ constructor(client: GT6Client);
6
+ /**
7
+ * 获取全局设置列表
8
+ * 根据平台ID和别名获取所有全局设置
9
+ */
10
+ getSettings(settingAlias?: string): Promise<Setting[]>;
11
+ /**
12
+ * 获取指定设置
13
+ * 根据设置key直接获取单个设置
14
+ */
15
+ getSetting(key: string): Promise<Setting | null>;
16
+ }
17
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/modules/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,OAAO,EAGR,MAAM,eAAe,CAAC;AAEvB,qBAAa,WAAW;IACV,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,SAAS;IAErC;;;OAGG;IACG,WAAW,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAW5D;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CAcvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gt6/sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "GT6 SDK for articles management - A comprehensive JavaScript/TypeScript library for managing articles, categories, and tags in GT6 platform",
5
5
  "type": "module",
6
6
  "main": "dist/gt6-sdk.cjs.js",