nextemos 2.2.4 → 2.2.6

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.
@@ -40,13 +40,18 @@ const fetchRequest = () => {
40
40
  }
41
41
  try {
42
42
  const response = yield fetch(apiURL.toString(), Object.assign(Object.assign({}, options), { method }));
43
+ // Headers nesnesini Object'e dönüştürme
44
+ const headers = {};
45
+ response.headers.forEach((value, name) => {
46
+ headers[name] = value;
47
+ });
43
48
  const responseData = yield response.json().catch(() => ({}));
44
49
  if (!response.ok) {
45
50
  const errorMessage = (responseData === null || responseData === void 0 ? void 0 : responseData.message) || 'Bir şeyler yanlış gitti!';
46
51
  console.error(`Hata: ${response.status} - ${errorMessage}`);
47
52
  return { status: response.status, error: errorMessage };
48
53
  }
49
- return { status: response.status, data: responseData, headers: response.headers };
54
+ return { status: response.status, data: responseData, headers };
50
55
  }
51
56
  catch (error) {
52
57
  return { status: 500, error: `fetchRequest Excaption Error! ${error}` };
@@ -49,7 +49,9 @@ export interface IApiResponse<T = any> {
49
49
  * HTTP yanıt başlıkları.
50
50
  * Bu alan, API çağrısının yanıtında döndürülen HTTP başlıklarını içerir.
51
51
  */
52
- headers?: Headers;
52
+ headers?: {
53
+ [key: string]: string;
54
+ };
53
55
  }
54
56
  /**
55
57
  * IResponse arayüzü, bir API tarafından döndürülen standart yanıt nesnesinin yapısını temsil eder.
@@ -9,6 +9,12 @@ declare const _default: {
9
9
  Blog: {
10
10
  GetBlogPostsRequest: string;
11
11
  GetBlogPostRequest: string;
12
+ GetBlogTagsRequest: string;
13
+ GetBlogTagRequest: string;
14
+ GetBlogCategoriesRequest: string;
15
+ GetBlogCategoryRequest: string;
16
+ GetBlogCategoryHierarchyRequest: string;
17
+ GetBlogCategoryTreeRequest: string;
12
18
  };
13
19
  };
14
20
  export default _default;
@@ -10,7 +10,16 @@ exports.default = {
10
10
  GetBannerContainerList: API_URL + '/api/banner/{language}/Banner/v1/GetBannerContainerList',
11
11
  },
12
12
  Blog: {
13
- GetBlogPostsRequest: API_URL + '/api/blog/{language}/Blog/v1/GetBlogPostsRequest',
14
- GetBlogPostRequest: API_URL + '/api/blog/{language}/Blog/v1/GetBlogPostRequest',
13
+ // BlogPosts
14
+ GetBlogPostsRequest: API_URL + '/api/blog/{language}/BlogPosts/v1/GetBlogPostsRequest',
15
+ GetBlogPostRequest: API_URL + '/api/blog/{language}/BlogPosts/v1/GetBlogPostRequest',
16
+ // BlogTags
17
+ GetBlogTagsRequest: API_URL + '/api/blog/{language}/BlogTags/v1/GetBlogTagsRequest',
18
+ GetBlogTagRequest: API_URL + '/api/blog/{language}/BlogTags/v1/GetBlogTagRequest',
19
+ // BlogCategories
20
+ GetBlogCategoriesRequest: API_URL + '/api/blog/{language}/BlogCategories/v1/GetBlogCategoriesRequest',
21
+ GetBlogCategoryRequest: API_URL + '/api/blog/{language}/BlogCategories/v1/GetBlogCategoryRequest',
22
+ GetBlogCategoryHierarchyRequest: API_URL + '/api/blog/{language}/BlogCategories/v1/GetBlogCategoryHierarchyRequest',
23
+ GetBlogCategoryTreeRequest: API_URL + '/api/blog/{language}/BlogCategories/v1/GetBlogCategoryTreeRequest',
15
24
  }
16
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",