@gamecore-api/sdk 0.3.1 → 0.4.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
@@ -51,12 +51,13 @@ export declare class GameCoreClient {
51
51
  unlinkProvider: (provider: string) => Promise<void>;
52
52
  };
53
53
  catalog: {
54
- /** Get all games with product counts. Use include:"meta" for categories/deliveryTypes/platforms/regions. */
54
+ /** Get all games. Use inStockOnly:true for only games with products. include:"meta" for categories/deliveryTypes. */
55
55
  getGames: (params?: {
56
56
  locale?: string;
57
57
  type?: string;
58
58
  deliveryType?: string;
59
59
  include?: string;
60
+ inStockOnly?: boolean;
60
61
  }) => Promise<Game[]>;
61
62
  /** Get homepage ranked games */
62
63
  getHomepageGames: () => Promise<Game[]>;
package/dist/index.js CHANGED
@@ -115,6 +115,8 @@ class GameCoreClient {
115
115
  qs.set("deliveryType", params.deliveryType);
116
116
  if (params?.include)
117
117
  qs.set("include", params.include);
118
+ if (params?.inStockOnly)
119
+ qs.set("inStockOnly", "true");
118
120
  const q = qs.toString();
119
121
  return this.request("GET", `/catalog/games${q ? `?${q}` : ""}`);
120
122
  },
package/dist/types.d.ts CHANGED
@@ -54,6 +54,7 @@ export interface Game {
54
54
  icon: string | null;
55
55
  localIcon?: string | null;
56
56
  productCount: number;
57
+ inStock: boolean;
57
58
  minPrice?: number | null;
58
59
  type?: string;
59
60
  deliveryTypes?: string[];
@@ -68,7 +69,43 @@ export interface GameDetail {
68
69
  icon: string | null;
69
70
  localIcon?: string | null;
70
71
  description: string | null;
72
+ inStock?: boolean;
73
+ productCount?: number;
71
74
  categories: Category[];
75
+ seo?: SeoContent | null;
76
+ }
77
+ /**
78
+ * Per-site SEO content for a game page.
79
+ * Stored in GameCore admin per site and returned with the game detail response.
80
+ * All fields are nullable — filled in by content managers via Claude Code workflow.
81
+ */
82
+ export interface SeoContent {
83
+ title: string | null;
84
+ h1: string | null;
85
+ metaDescription: string | null;
86
+ metaKeywords: string | null;
87
+ ogTitle: string | null;
88
+ ogDescription: string | null;
89
+ ogImage: string | null;
90
+ canonicalUrl: string | null;
91
+ intro: string | null;
92
+ content: string | null;
93
+ /** Structured content blocks for H2/H3 sections */
94
+ contentSections: Array<{
95
+ heading: string;
96
+ level: number;
97
+ body: string;
98
+ }>;
99
+ faq: Array<{
100
+ question: string;
101
+ answer: string;
102
+ }>;
103
+ keywords: string[];
104
+ /** JSON-LD schema.org object (Product, FAQPage, BreadcrumbList) */
105
+ schemaJsonLd: Record<string, unknown> | null;
106
+ footerText: string | null;
107
+ /** Key cluster identifying the store's SEO theme (e.g. "рублями", "kz-tenge") */
108
+ cluster: string | null;
72
109
  }
73
110
  export interface Category {
74
111
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamecore-api/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.4.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",