@gamecore-api/sdk 0.6.0 → 0.7.0

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.
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { TelegramInitResponse, User, SiteConfig, ExchangeRates, LegalDocument, Game, GameDetail, Product, SearchResult, Category, CartItem, CheckoutRequest, CheckoutResponse, Order, UserBalance, LevelStatus, Transaction, Notification, Favorite, Review, ReviewStats, CouponResult, ReferralStats, ReferralLink, ReferralCommission, TopupMethod, TopupResponse, TopupStatus, GiftCard, Announcement, AnnouncementBar, CatalogSection, SiteStats, ProductFilters, PaginatedResponse } from "./types";
1
+ import type { TelegramInitResponse, User, SiteConfig, ExchangeRates, LegalDocument, Game, GameDetail, Product, SearchResult, Category, CartItem, CheckoutRequest, CheckoutResponse, Order, UserBalance, LevelStatus, Transaction, Notification, Favorite, Review, ReviewStats, CouponResult, ReferralStats, ReferralLink, ReferralCommission, TopupMethod, TopupResponse, TopupStatus, GiftCard, Announcement, AnnouncementBar, SiteUIConfig, CatalogSection, SiteStats, ProductFilters, PaginatedResponse } from "./types";
2
2
  export interface GameCoreOptions {
3
3
  /** Site API key (gc_live_xxx or gc_test_xxx) */
4
4
  apiKey: string;
@@ -22,6 +22,10 @@ export declare class GameCoreClient {
22
22
  getLegal: (type: string, locale?: string) => Promise<LegalDocument>;
23
23
  /** Get site statistics for trust signals (cached 5 min on server) */
24
24
  getStats: () => Promise<SiteStats>;
25
+ /** Get site translations for a locale (Record<key, value>) */
26
+ getTranslations: (locale?: string) => Promise<Record<string, string>>;
27
+ /** Get site UI config (header, footer, nav, trust pills) */
28
+ getUIConfig: () => Promise<SiteUIConfig>;
25
29
  /** Get cookie consent config */
26
30
  getCookieConsent: () => Promise<{
27
31
  enabled: boolean;
package/dist/index.js CHANGED
@@ -77,6 +77,8 @@ class GameCoreClient {
77
77
  getRates: () => this.request("GET", "/rates"),
78
78
  getLegal: (type, locale) => this.request("GET", `/legal/${type}${locale ? `?locale=${locale}` : ""}`),
79
79
  getStats: () => this.request("GET", "/site/stats"),
80
+ getTranslations: (locale = "ru") => this.request("GET", `/site/translations?locale=${locale}`),
81
+ getUIConfig: () => this.request("GET", "/site/ui-config"),
80
82
  getCookieConsent: () => this.request("GET", "/site/cookie-consent"),
81
83
  getCatalogSections: () => this.request("GET", "/site/catalog-sections"),
82
84
  getBanners: () => this.request("GET", "/site/banners"),
package/dist/types.d.ts CHANGED
@@ -82,6 +82,8 @@ export interface GameDetail {
82
82
  name: string;
83
83
  icon: string | null;
84
84
  localIcon?: string | null;
85
+ coverImage?: string | null;
86
+ images?: string[];
85
87
  description: string | null;
86
88
  inStock?: boolean;
87
89
  productCount?: number;
@@ -397,6 +399,41 @@ export interface Announcement {
397
399
  imageUrl?: string | null;
398
400
  createdAt: string;
399
401
  }
402
+ export interface SiteUIConfig {
403
+ header: {
404
+ logoText?: string | null;
405
+ logoUrl?: string | null;
406
+ navLinks: Array<{
407
+ label: string;
408
+ href: string;
409
+ order: number;
410
+ enabled: boolean;
411
+ }>;
412
+ showSearch: boolean;
413
+ showThemeToggle: boolean;
414
+ };
415
+ footer: {
416
+ paymentMethods: Array<{
417
+ name: string;
418
+ icon?: string;
419
+ }>;
420
+ legalLinks: Array<{
421
+ label: string;
422
+ href: string;
423
+ }>;
424
+ socialLinks: Array<{
425
+ platform: string;
426
+ url: string;
427
+ icon?: string;
428
+ }>;
429
+ copyrightText?: string | null;
430
+ };
431
+ trustPills: Array<{
432
+ text: string;
433
+ icon?: string;
434
+ enabled: boolean;
435
+ }>;
436
+ }
400
437
  export interface CatalogSection {
401
438
  id: number;
402
439
  slug: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamecore-api/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript SDK for GameCore API — browser-safe, zero dependencies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",