nextemos 2.3.0 → 2.3.1

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,4 +1,7 @@
1
1
  import { IResponse, IResponsePaging } from './response';
2
+ /**
3
+ * Blog gönderisini temsil eden arayüz
4
+ */
2
5
  interface IBlogPost {
3
6
  id: number;
4
7
  templateId: number;
@@ -19,6 +22,9 @@ interface IBlogPost {
19
22
  blogPostBlogCategoryMappings: BlogPostBlogCategoryMapping[];
20
23
  blogPostBlogTagMappings: BlogPostBlogTagMapping[];
21
24
  }
25
+ /**
26
+ * Blog kategorisini temsil eden arayüz
27
+ */
22
28
  interface IBlogCategory {
23
29
  id: number;
24
30
  templateId: number;
@@ -36,6 +42,9 @@ interface IBlogCategory {
36
42
  blogPostBlogCategoryMappings: BlogPostBlogCategoryMapping[];
37
43
  extensionData: Object;
38
44
  }
45
+ /**
46
+ * Blog etiketini temsil eden arayüz
47
+ */
39
48
  interface IBlogTag {
40
49
  id: number;
41
50
  name: string;
@@ -48,24 +57,36 @@ interface IBlogTag {
48
57
  createdBy: number;
49
58
  blogPostBlogTagMappings: BlogPostBlogTagMapping[];
50
59
  }
60
+ /**
61
+ * Facet (yüzey) verisini temsil eden arayüz
62
+ */
51
63
  interface IFacet {
52
64
  name: string;
53
65
  count: number;
54
66
  externalData: Object;
55
67
  constraints: IConstraint[];
56
68
  }
69
+ /**
70
+ * Constraint (kısıtlama) verisini temsil eden arayüz
71
+ */
57
72
  interface IConstraint {
58
73
  key: string;
59
74
  count: number;
60
75
  keyAsString: string;
61
76
  externalData: Object;
62
77
  }
78
+ /**
79
+ * Blog gönderisi ve etiket eşleşmesini temsil eden arayüz
80
+ */
63
81
  interface BlogPostBlogTagMapping {
64
82
  id: number;
65
83
  blogTagId: number;
66
84
  blogPostId: number;
67
85
  isApproved: boolean;
68
86
  }
87
+ /**
88
+ * Blog gönderisi ve kategori eşleşmesini temsil eden arayüz
89
+ */
69
90
  interface BlogPostBlogCategoryMapping {
70
91
  id: number;
71
92
  blogPostId: number;
@@ -75,19 +96,93 @@ interface BlogPostBlogCategoryMapping {
75
96
  isDefault: boolean;
76
97
  isApproved: boolean;
77
98
  }
99
+ /**
100
+ * Kategori ağacındaki öğeyi temsil eden arayüz
101
+ */
102
+ interface ICategoryTreeItem {
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
+ className: string;
112
+ keys: string;
113
+ hierarchyField: string;
114
+ path: string;
115
+ hierarchy: number[];
116
+ blogPostBlogCategoryMappings: BlogPostBlogCategoryMapping[];
117
+ extensionData: object;
118
+ childCategories: string[];
119
+ }
120
+ /**
121
+ * Blog etiketini temsil eden arayüz (duplikasyon kaldırıldı)
122
+ */
123
+ interface IBlogTag {
124
+ id: number;
125
+ name: string;
126
+ culture: string;
127
+ isApproved: boolean;
128
+ tenantId: string;
129
+ updatedAtUtc: string;
130
+ updatedBy: number;
131
+ createdAtUtc: string;
132
+ createdBy: number;
133
+ blogPostBlogTagMappings: BlogPostBlogTagMapping[];
134
+ }
135
+ /**
136
+ * Blog gönderileri yanıtını temsil eden arayüz
137
+ */
78
138
  export interface IBlogPostsResponse extends IResponsePaging {
79
139
  blogPosts: IBlogPost[];
80
140
  categories: IBlogCategory[];
81
141
  blogTags: IBlogTag[];
82
142
  facets: IFacet[];
83
143
  }
144
+ /**
145
+ * Tek bir blog gönderisi yanıtını temsil eden arayüz
146
+ */
84
147
  export interface IBlogPostResponse extends IResponse {
85
148
  blogPost: IBlogPost;
86
149
  }
150
+ /**
151
+ * Tek bir blog kategorisi yanıtını temsil eden arayüz
152
+ */
87
153
  export interface IGetBlogCategoryResponse extends IResponse {
88
154
  blogCategory: IBlogCategory;
89
155
  }
156
+ /**
157
+ * Blog kategorileri yanıtını temsil eden arayüz
158
+ */
90
159
  export interface IGetBlogCategoriesResponse extends IResponsePaging {
91
160
  blogCategories: IBlogCategory[];
92
161
  }
162
+ /**
163
+ * Blog kategori hiyerarşisi yanıtını temsil eden arayüz
164
+ */
165
+ export interface IGetBlogCategoryHierarchyResponse extends IResponsePaging {
166
+ blogCategories: IBlogCategory[];
167
+ facets: IFacet[];
168
+ }
169
+ /**
170
+ * Blog kategori ağacı yanıtını temsil eden arayüz
171
+ */
172
+ export interface IGetBlogCategoryTreeResponse extends IResponse {
173
+ categoryTreeItem: ICategoryTreeItem;
174
+ }
175
+ /**
176
+ * Tek bir blog etiketi yanıtını temsil eden arayüz
177
+ */
178
+ export interface IGetBlogTagResponse extends IResponse {
179
+ blogTag: IBlogTag;
180
+ }
181
+ /**
182
+ * Blog etiketleri yanıtını temsil eden arayüz
183
+ */
184
+ export interface IGetBlogTagsResponse extends IResponsePaging {
185
+ blogTags: IBlogTag[];
186
+ facets: IFacet[];
187
+ }
93
188
  export {};
@@ -1,8 +1,14 @@
1
- import { IApiResponse, IBlogPostResponse, IBlogPostsResponse, IGetBlogCategoriesResponse, IGetBlogCategoryResponse } from '../..';
1
+ import { IApiResponse, IBlogPostResponse, IBlogPostsResponse, IGetBlogCategoriesResponse, IGetBlogCategoryHierarchyResponse, IGetBlogCategoryResponse, IGetBlogCategoryTreeResponse, IGetBlogTagResponse, IGetBlogTagsResponse } from '../..';
2
+ /**
3
+ * Aggregation filtreleme için arayüz
4
+ */
2
5
  interface AggregationFilter {
3
6
  field: string;
4
7
  keys: string[];
5
8
  }
9
+ /**
10
+ * Blog gönderileri istek arayüzü
11
+ */
6
12
  interface IGetBlogPostsRequest {
7
13
  blogPostIds?: number[];
8
14
  blogCategoryIds?: number[];
@@ -21,6 +27,9 @@ interface IGetBlogPostsRequest {
21
27
  tags?: string[];
22
28
  language?: string;
23
29
  }
30
+ /**
31
+ * Tek bir blog gönderisi istek arayüzü
32
+ */
24
33
  interface IGetBlogPostRequest {
25
34
  id: number;
26
35
  flags?: string;
@@ -28,6 +37,9 @@ interface IGetBlogPostRequest {
28
37
  tags?: string[];
29
38
  language?: string;
30
39
  }
40
+ /**
41
+ * Blog kategorileri istek arayüzü
42
+ */
31
43
  interface IGetBlogCategoriesRequest {
32
44
  blogCategoryIds?: number[];
33
45
  blogCategoryHierarchyIds?: number[];
@@ -39,16 +51,90 @@ interface IGetBlogCategoriesRequest {
39
51
  tags?: string[];
40
52
  language?: string;
41
53
  }
54
+ /**
55
+ * Tek bir blog kategorisi istek arayüzü
56
+ */
42
57
  interface IGetBlogCategoryRequest {
43
58
  id: number;
44
59
  includes?: string[];
45
60
  tags?: string[];
46
61
  language?: string;
47
62
  }
63
+ /**
64
+ * Blog kategori hiyerarşisi istek arayüzü
65
+ */
66
+ interface IGetBlogCategoryHierarchyRequest {
67
+ id: number;
68
+ includes?: string[];
69
+ tags?: string[];
70
+ language?: string;
71
+ }
72
+ /**
73
+ * Blog kategori ağacı istek arayüzü
74
+ */
75
+ interface IGetBlogCategoryTreeRequest {
76
+ categoryId: number;
77
+ levelCount?: number;
78
+ includes?: string[];
79
+ tags?: string[];
80
+ language?: string;
81
+ }
82
+ /**
83
+ * Blog etiketleri istek arayüzü
84
+ */
85
+ interface IGetBlogTagsRequest {
86
+ blogTagIds?: number[];
87
+ tags?: string[];
88
+ searchTerm?: string;
89
+ includes?: string[];
90
+ pageSize?: number;
91
+ currentPage?: number;
92
+ language?: string;
93
+ }
94
+ /**
95
+ * Tek bir blog etiketi istek arayüzü
96
+ */
97
+ interface IGetBlogTagRequest {
98
+ id: number;
99
+ includes?: string[];
100
+ tags?: string[];
101
+ language?: string;
102
+ }
103
+ /**
104
+ * Blog servis arayüzü
105
+ */
48
106
  export interface IBlogService {
107
+ /**
108
+ * Blog gönderilerini almak için istek fonksiyonu
109
+ */
49
110
  GetBlogPostsRequest: (data?: IGetBlogPostsRequest, options?: RequestInit) => Promise<IApiResponse<IBlogPostsResponse>>;
111
+ /**
112
+ * Tek bir blog gönderisini almak için istek fonksiyonu
113
+ */
50
114
  GetBlogPostRequest: (data: IGetBlogPostRequest, options?: RequestInit) => Promise<IApiResponse<IBlogPostResponse>>;
115
+ /**
116
+ * Blog kategorilerini almak için istek fonksiyonu
117
+ */
51
118
  GetBlogCategoriesRequest: (data?: IGetBlogCategoriesRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogCategoriesResponse>>;
52
- GetBlogCategoryRequest: (data?: IGetBlogCategoryRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogCategoryResponse>>;
119
+ /**
120
+ * Tek bir blog kategorisini almak için istek fonksiyonu
121
+ */
122
+ GetBlogCategoryRequest: (data: IGetBlogCategoryRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogCategoryResponse>>;
123
+ /**
124
+ * Blog kategorisi hiyerarşisini almak için istek fonksiyonu
125
+ */
126
+ GetBlogCategoryHierarchyRequest: (data: IGetBlogCategoryHierarchyRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogCategoryHierarchyResponse>>;
127
+ /**
128
+ * Blog kategori ağacını almak için istek fonksiyonu
129
+ */
130
+ GetBlogCategoryTreeRequest: (data: IGetBlogCategoryTreeRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogCategoryTreeResponse>>;
131
+ /**
132
+ * Tek bir blog etiketini almak için istek fonksiyonu
133
+ */
134
+ GetBlogTagRequest: (data: IGetBlogTagRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogTagResponse>>;
135
+ /**
136
+ * Blog etiketlerini almak için istek fonksiyonu
137
+ */
138
+ GetBlogTagsRequest: (data: IGetBlogTagsRequest, options?: RequestInit) => Promise<IApiResponse<IGetBlogTagsResponse>>;
53
139
  }
54
140
  export {};
@@ -15,18 +15,82 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.BlogService = void 0;
16
16
  // URL'lerin bulunduğu dosyayı içe aktarır
17
17
  const urls_1 = __importDefault(require("../urls"));
18
+ // Farklı blog cevap arayüzlerini ve fetchRequest fonksiyonunu içe aktarır
18
19
  const __1 = require("../..");
20
+ // BlogService adlı nesneyi oluşturur ve IBlogService arayüzünü uygular
19
21
  exports.BlogService = {
22
+ /**
23
+ * Blog gönderilerini almak için istek fonksiyonu
24
+ * @param data İstek verilerini içeren nesne (varsayılan boş nesne)
25
+ * @param options İstek seçeneklerini içeren nesne
26
+ * @returns Blog gönderilerini içeren cevap nesnesi
27
+ */
20
28
  GetBlogPostsRequest: (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (data = {}, options) {
21
- return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogPostsRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
29
+ return yield (0, __1.fetchRequest)().post(
30
+ // URL'deki {language} yer tutucusunu dil verisiyle değiştirir
31
+ urls_1.default.Blog.GetBlogPostsRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
22
32
  }),
33
+ /**
34
+ * Tek bir blog gönderisini almak için istek fonksiyonu
35
+ * @param data Gönderi verilerini içeren nesne
36
+ * @param options İstek seçeneklerini içeren nesne
37
+ * @returns Blog gönderisini içeren cevap nesnesi
38
+ */
23
39
  GetBlogPostRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
24
40
  return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogPostRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
25
41
  }),
42
+ /**
43
+ * Blog kategorilerini almak için istek fonksiyonu
44
+ * @param data İstek verilerini içeren nesne (varsayılan boş nesne)
45
+ * @param options İstek seçeneklerini içeren nesne
46
+ * @returns Blog kategorilerini içeren cevap nesnesi
47
+ */
26
48
  GetBlogCategoriesRequest: (...args_2) => __awaiter(void 0, [...args_2], void 0, function* (data = {}, options) {
27
49
  return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogCategoriesRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
28
50
  }),
51
+ /**
52
+ * Belirli bir blog kategorisini almak için istek fonksiyonu
53
+ * @param data Kategori verilerini içeren nesne
54
+ * @param options İstek seçeneklerini içeren nesne
55
+ * @returns Blog kategorisini içeren cevap nesnesi
56
+ */
29
57
  GetBlogCategoryRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
30
58
  return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogCategoryRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
31
59
  }),
60
+ /**
61
+ * Blog kategorisi hiyerarşisini almak için istek fonksiyonu
62
+ * @param data Hiyerarşi verilerini içeren nesne
63
+ * @param options İstek seçeneklerini içeren nesne
64
+ * @returns Blog kategorisi hiyerarşisini içeren cevap nesnesi
65
+ */
66
+ GetBlogCategoryHierarchyRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
67
+ return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogCategoryHierarchyRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
68
+ }),
69
+ /**
70
+ * Blog kategori ağacını almak için istek fonksiyonu
71
+ * @param data Kategori ağacı verilerini içeren nesne
72
+ * @param options İstek seçeneklerini içeren nesne
73
+ * @returns Blog kategori ağacını içeren cevap nesnesi
74
+ */
75
+ GetBlogCategoryTreeRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
76
+ return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogCategoryTreeRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
77
+ }),
78
+ /**
79
+ * Belirli bir blog etiketini almak için istek fonksiyonu
80
+ * @param data Etiket verilerini içeren nesne
81
+ * @param options İstek seçeneklerini içeren nesne
82
+ * @returns Blog etiketini içeren cevap nesnesi
83
+ */
84
+ GetBlogTagRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
85
+ return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogTagRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
86
+ }),
87
+ /**
88
+ * Blog etiketlerini almak için istek fonksiyonu
89
+ * @param data İstek verilerini içeren nesne
90
+ * @param options İstek seçeneklerini içeren nesne
91
+ * @returns Blog etiketlerini içeren cevap nesnesi
92
+ */
93
+ GetBlogTagsRequest: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
94
+ return yield (0, __1.fetchRequest)().post(urls_1.default.Blog.GetBlogTagsRequest.replace(/{language}/g, (data === null || data === void 0 ? void 0 : data.language) || process.env.DEFAULT_LANGUAGE || "tr"), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
95
+ }),
32
96
  };
package/dist/test.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const services_1 = require("./services");
4
4
  function test() {
5
- const res = services_1.Service.Banner.GetBannerById({ Id: 11 });
5
+ const res = services_1.Service.Blog.GetBlogCategoryTreeRequest({ categoryId: 11 });
6
6
  return;
7
7
  }
8
8
  exports.default = test;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",