nextemos 2.3.2 → 2.3.4

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.
@@ -43,9 +43,12 @@ const fetchRequest = () => {
43
43
  const response = yield fetch(apiURL.toString(), Object.assign(Object.assign({}, options), { method }));
44
44
  // Headers nesnesini Object'e dönüştürme
45
45
  const headers = {};
46
- response.headers.forEach((value, name) => {
47
- headers[name] = value;
48
- });
46
+ if (response.headers) {
47
+ response.headers.forEach((value, name) => {
48
+ headers[name] = value;
49
+ });
50
+ }
51
+ // response data nesnesini JSON'a dönüştürme.
49
52
  const responseData = yield response.json().catch(() => ({}));
50
53
  if (!response.ok) {
51
54
  const errorMessage = (responseData === null || responseData === void 0 ? void 0 : responseData.message) || 'Bir şeyler yanlış gitti!';
@@ -96,6 +96,22 @@ interface BlogPostBlogCategoryMapping {
96
96
  isDefault: boolean;
97
97
  isApproved: boolean;
98
98
  }
99
+ /**
100
+ * Kategori ağacındaki her bir alt öğeyi temsil eden arayüz
101
+ */
102
+ interface IChildCategory {
103
+ id: number;
104
+ templateId: number;
105
+ parentId: number;
106
+ order: number;
107
+ culture: string;
108
+ name: string;
109
+ key: string;
110
+ description: string;
111
+ hierarchyField: string;
112
+ path: string;
113
+ childCategories: IChildCategory[];
114
+ }
99
115
  /**
100
116
  * Kategori ağacındaki öğeyi temsil eden arayüz
101
117
  */
@@ -115,7 +131,7 @@ interface ICategoryTreeItem {
115
131
  hierarchy: number[];
116
132
  blogPostBlogCategoryMappings: BlogPostBlogCategoryMapping[];
117
133
  extensionData: object;
118
- childCategories: string[];
134
+ childCategories: IChildCategory[];
119
135
  }
120
136
  /**
121
137
  * Blog etiketini temsil eden arayüz (duplikasyon kaldırıldı)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",