sk-front-lib 0.18.2 → 0.18.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.
Files changed (176) hide show
  1. package/article/sk-article-editor-server.component.d.ts +1 -1
  2. package/article/sk-article-editor.component.d.ts +1 -1
  3. package/article/sk-froala-editor.directive.d.ts +1 -1
  4. package/crud/sk-auth-admin.guard.d.ts +2 -2
  5. package/crud/sk-auth.guard.d.ts +2 -2
  6. package/{esm2020 → esm2022}/api/sk-api.module.mjs +9 -9
  7. package/{esm2020 → esm2022}/api/sk-api.service.mjs +4 -4
  8. package/{esm2020 → esm2022}/article/sk-article-editor-server.component.mjs +4 -4
  9. package/{esm2020 → esm2022}/article/sk-article-editor.component.mjs +4 -4
  10. package/{esm2020 → esm2022}/article/sk-article-server.module.mjs +5 -5
  11. package/{esm2020 → esm2022}/article/sk-article.module.mjs +7 -7
  12. package/{esm2020 → esm2022}/article/sk-article.service.mjs +4 -4
  13. package/{esm2020 → esm2022}/article/sk-froala-editor.directive.mjs +7 -7
  14. package/{esm2020 → esm2022}/crud/sk-account.service.mjs +4 -4
  15. package/{esm2020 → esm2022}/crud/sk-affiliate.service.mjs +4 -4
  16. package/{esm2020 → esm2022}/crud/sk-auth-admin.guard.mjs +4 -4
  17. package/{esm2020 → esm2022}/crud/sk-auth.guard.mjs +4 -4
  18. package/{esm2020 → esm2022}/crud/sk-auth.service.mjs +7 -7
  19. package/{esm2020 → esm2022}/crud/sk-board.service.mjs +4 -4
  20. package/{esm2020 → esm2022}/crud/sk-brand.service.mjs +4 -4
  21. package/esm2022/crud/sk-cart.service.mjs +256 -0
  22. package/{esm2020 → esm2022}/crud/sk-category.service.mjs +4 -4
  23. package/{esm2020 → esm2022}/crud/sk-comment.service.mjs +4 -4
  24. package/{esm2020 → esm2022}/crud/sk-config.service.mjs +4 -4
  25. package/{esm2020 → esm2022}/crud/sk-contact.service.mjs +4 -4
  26. package/{esm2020 → esm2022}/crud/sk-coupon.service.mjs +4 -4
  27. package/{esm2020 → esm2022}/crud/sk-document.service.mjs +4 -4
  28. package/{esm2020 → esm2022}/crud/sk-etc.service.mjs +4 -4
  29. package/{esm2020 → esm2022}/crud/sk-file.service.mjs +4 -4
  30. package/{esm2020 → esm2022}/crud/sk-keyword.service.mjs +4 -4
  31. package/{esm2020 → esm2022}/crud/sk-order.service.mjs +4 -4
  32. package/{esm2020 → esm2022}/crud/sk-point.service.mjs +4 -4
  33. package/{esm2020 → esm2022}/crud/sk-product.service.mjs +4 -4
  34. package/{esm2020 → esm2022}/crud/sk-promotion.service.mjs +4 -4
  35. package/{esm2020 → esm2022}/crud/sk-search.service.mjs +4 -4
  36. package/{esm2020 → esm2022}/crud/sk-store.service.mjs +4 -4
  37. package/{esm2020 → esm2022}/crud/sk-user.service.mjs +4 -4
  38. package/{esm2020 → esm2022}/google-analytics/google-analytics-router.module.mjs +9 -9
  39. package/{esm2020 → esm2022}/google-analytics/google-analytics.module.mjs +5 -5
  40. package/esm2022/google-analytics/services/google-analytics.service.mjs +223 -0
  41. package/{esm2020 → esm2022}/image/sk-image.component.mjs +6 -6
  42. package/esm2022/image/sk-image.module.mjs +40 -0
  43. package/{esm2020 → esm2022}/lib/sk-byte.pipe.mjs +4 -4
  44. package/{esm2020 → esm2022}/lib/sk-date-time.pipe.mjs +4 -4
  45. package/{esm2020 → esm2022}/lib/sk-date.pipe.mjs +4 -4
  46. package/{esm2020 → esm2022}/lib/sk-front-lib.module.mjs +13 -13
  47. package/{esm2020 → esm2022}/lib/sk-keys.pipe.mjs +4 -4
  48. package/{esm2020 → esm2022}/lib/sk-time.pipe.mjs +4 -4
  49. package/esm2022/model/lib/filetype.mjs +179 -0
  50. package/esm2022/search-address/dialog/dialog.component.mjs +27 -0
  51. package/{esm2020 → esm2022}/search-address/sk-search-address.directive.mjs +6 -6
  52. package/esm2022/search-address/sk-search-address.module.mjs +47 -0
  53. package/{esm2020 → esm2022}/search-address/sk-search-address.service.mjs +4 -4
  54. package/esm2022/uploader/sk-uploader.component.mjs +119 -0
  55. package/esm2022/uploader/sk-uploader.directive.mjs +44 -0
  56. package/esm2022/uploader/sk-uploader.module.mjs +57 -0
  57. package/{fesm2020 → fesm2022}/sk-front-lib-api.mjs +11 -11
  58. package/{fesm2020 → fesm2022}/sk-front-lib-api.mjs.map +1 -1
  59. package/{fesm2020 → fesm2022}/sk-front-lib-article.mjs +25 -25
  60. package/{fesm2020 → fesm2022}/sk-front-lib-article.mjs.map +1 -1
  61. package/{fesm2020 → fesm2022}/sk-front-lib-crud.mjs +93 -93
  62. package/fesm2022/sk-front-lib-crud.mjs.map +1 -0
  63. package/{fesm2020 → fesm2022}/sk-front-lib-google-analytics.mjs +38 -16
  64. package/fesm2022/sk-front-lib-google-analytics.mjs.map +1 -0
  65. package/{fesm2020 → fesm2022}/sk-front-lib-image.mjs +21 -21
  66. package/fesm2022/sk-front-lib-image.mjs.map +1 -0
  67. package/{fesm2015 → fesm2022}/sk-front-lib-model.mjs +56 -56
  68. package/{fesm2020 → fesm2022}/sk-front-lib-model.mjs.map +1 -1
  69. package/{fesm2020 → fesm2022}/sk-front-lib-search-address.mjs +32 -32
  70. package/fesm2022/sk-front-lib-search-address.mjs.map +1 -0
  71. package/{fesm2020 → fesm2022}/sk-front-lib-uploader.mjs +48 -49
  72. package/fesm2022/sk-front-lib-uploader.mjs.map +1 -0
  73. package/{fesm2020 → fesm2022}/sk-front-lib.mjs +27 -27
  74. package/{fesm2015 → fesm2022}/sk-front-lib.mjs.map +1 -1
  75. package/google-analytics/services/google-analytics.service.d.ts +2 -1
  76. package/google-analytics/types/ga-action.type.d.ts +1 -1
  77. package/google-analytics/types/ga-bind.type.d.ts +1 -1
  78. package/image/sk-image.component.d.ts +2 -2
  79. package/image/sk-image.module.d.ts +3 -3
  80. package/model/lib/payment.d.ts +1 -1
  81. package/package.json +46 -68
  82. package/search-address/dialog/dialog.component.d.ts +1 -1
  83. package/search-address/sk-search-address.directive.d.ts +2 -2
  84. package/search-address/sk-search-address.module.d.ts +3 -3
  85. package/uploader/sk-uploader.component.d.ts +1 -1
  86. package/uploader/sk-uploader.directive.d.ts +2 -2
  87. package/uploader/sk-uploader.module.d.ts +5 -5
  88. package/esm2020/crud/sk-cart.service.mjs +0 -256
  89. package/esm2020/google-analytics/services/google-analytics.service.mjs +0 -200
  90. package/esm2020/image/sk-image.module.mjs +0 -40
  91. package/esm2020/model/lib/filetype.mjs +0 -179
  92. package/esm2020/search-address/dialog/dialog.component.mjs +0 -27
  93. package/esm2020/search-address/sk-search-address.module.mjs +0 -47
  94. package/esm2020/uploader/sk-uploader.component.mjs +0 -120
  95. package/esm2020/uploader/sk-uploader.directive.mjs +0 -44
  96. package/esm2020/uploader/sk-uploader.module.mjs +0 -57
  97. package/fesm2015/sk-front-lib-api.mjs +0 -216
  98. package/fesm2015/sk-front-lib-api.mjs.map +0 -1
  99. package/fesm2015/sk-front-lib-article.mjs +0 -758
  100. package/fesm2015/sk-front-lib-article.mjs.map +0 -1
  101. package/fesm2015/sk-front-lib-crud.mjs +0 -1529
  102. package/fesm2015/sk-front-lib-crud.mjs.map +0 -1
  103. package/fesm2015/sk-front-lib-google-analytics.mjs +0 -334
  104. package/fesm2015/sk-front-lib-google-analytics.mjs.map +0 -1
  105. package/fesm2015/sk-front-lib-image.mjs +0 -303
  106. package/fesm2015/sk-front-lib-image.mjs.map +0 -1
  107. package/fesm2015/sk-front-lib-model.mjs.map +0 -1
  108. package/fesm2015/sk-front-lib-search-address.mjs +0 -183
  109. package/fesm2015/sk-front-lib-search-address.mjs.map +0 -1
  110. package/fesm2015/sk-front-lib-uploader.mjs +0 -546
  111. package/fesm2015/sk-front-lib-uploader.mjs.map +0 -1
  112. package/fesm2015/sk-front-lib.mjs +0 -538
  113. package/fesm2020/sk-front-lib-crud.mjs.map +0 -1
  114. package/fesm2020/sk-front-lib-google-analytics.mjs.map +0 -1
  115. package/fesm2020/sk-front-lib-image.mjs.map +0 -1
  116. package/fesm2020/sk-front-lib-model.mjs +0 -1105
  117. package/fesm2020/sk-front-lib-search-address.mjs.map +0 -1
  118. package/fesm2020/sk-front-lib-uploader.mjs.map +0 -1
  119. package/fesm2020/sk-front-lib.mjs.map +0 -1
  120. /package/{esm2020 → esm2022}/api/model/api-config.mjs +0 -0
  121. /package/{esm2020 → esm2022}/api/model/api-pageable-param.mjs +0 -0
  122. /package/{esm2020 → esm2022}/api/model/api-pageable.mjs +0 -0
  123. /package/{esm2020 → esm2022}/api/model/api-response.mjs +0 -0
  124. /package/{esm2020 → esm2022}/api/model/index.mjs +0 -0
  125. /package/{esm2020 → esm2022}/api/public_api.mjs +0 -0
  126. /package/{esm2020 → esm2022}/api/sk-front-lib-api.mjs +0 -0
  127. /package/{esm2020 → esm2022}/article/public_api.mjs +0 -0
  128. /package/{esm2020 → esm2022}/article/sk-front-lib-article.mjs +0 -0
  129. /package/{esm2020 → esm2022}/crud/public_api.mjs +0 -0
  130. /package/{esm2020 → esm2022}/crud/sk-front-lib-crud.mjs +0 -0
  131. /package/{esm2020 → esm2022}/google-analytics/initializers/google-analytics-router.initializer.mjs +0 -0
  132. /package/{esm2020 → esm2022}/google-analytics/initializers/google-analytics.initializer.mjs +0 -0
  133. /package/{esm2020 → esm2022}/google-analytics/interfaces/google-analytics-command.mjs +0 -0
  134. /package/{esm2020 → esm2022}/google-analytics/interfaces/google-analytics-settings.mjs +0 -0
  135. /package/{esm2020 → esm2022}/google-analytics/public_api.mjs +0 -0
  136. /package/{esm2020 → esm2022}/google-analytics/sk-front-lib-google-analytics.mjs +0 -0
  137. /package/{esm2020 → esm2022}/google-analytics/tokens/google-analytics-settings-token.mjs +0 -0
  138. /package/{esm2020 → esm2022}/google-analytics/types/ga-action.type.mjs +0 -0
  139. /package/{esm2020 → esm2022}/google-analytics/types/ga-bind.type.mjs +0 -0
  140. /package/{esm2020 → esm2022}/image/public_api.mjs +0 -0
  141. /package/{esm2020 → esm2022}/image/sk-front-lib-image.mjs +0 -0
  142. /package/{esm2020 → esm2022}/lib/sk-animations.mjs +0 -0
  143. /package/{esm2020 → esm2022}/lib/sk-utils.mjs +0 -0
  144. /package/{esm2020 → esm2022}/model/lib/article.mjs +0 -0
  145. /package/{esm2020 → esm2022}/model/lib/audit.mjs +0 -0
  146. /package/{esm2020 → esm2022}/model/lib/auth.mjs +0 -0
  147. /package/{esm2020 → esm2022}/model/lib/board.mjs +0 -0
  148. /package/{esm2020 → esm2022}/model/lib/cart.mjs +0 -0
  149. /package/{esm2020 → esm2022}/model/lib/comment.mjs +0 -0
  150. /package/{esm2020 → esm2022}/model/lib/contact.mjs +0 -0
  151. /package/{esm2020 → esm2022}/model/lib/coupon.mjs +0 -0
  152. /package/{esm2020 → esm2022}/model/lib/document.mjs +0 -0
  153. /package/{esm2020 → esm2022}/model/lib/etc.mjs +0 -0
  154. /package/{esm2020 → esm2022}/model/lib/file.mjs +0 -0
  155. /package/{esm2020 → esm2022}/model/lib/grid.mjs +0 -0
  156. /package/{esm2020 → esm2022}/model/lib/nicepay.mjs +0 -0
  157. /package/{esm2020 → esm2022}/model/lib/order.mjs +0 -0
  158. /package/{esm2020 → esm2022}/model/lib/payment.mjs +0 -0
  159. /package/{esm2020 → esm2022}/model/lib/point.mjs +0 -0
  160. /package/{esm2020 → esm2022}/model/lib/product-series.mjs +0 -0
  161. /package/{esm2020 → esm2022}/model/lib/product.mjs +0 -0
  162. /package/{esm2020 → esm2022}/model/lib/promotion.mjs +0 -0
  163. /package/{esm2020 → esm2022}/model/lib/shipping.mjs +0 -0
  164. /package/{esm2020 → esm2022}/model/lib/user.mjs +0 -0
  165. /package/{esm2020 → esm2022}/model/public_api.mjs +0 -0
  166. /package/{esm2020 → esm2022}/model/sk-front-lib-model.mjs +0 -0
  167. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  168. /package/{esm2020 → esm2022}/search-address/public_api.mjs +0 -0
  169. /package/{esm2020 → esm2022}/search-address/sk-front-lib-search-address.mjs +0 -0
  170. /package/{esm2020 → esm2022}/search-address/sk-search-address.model.mjs +0 -0
  171. /package/{esm2020 → esm2022}/sk-front-lib.mjs +0 -0
  172. /package/{esm2020 → esm2022}/uploader/public_api.mjs +0 -0
  173. /package/{esm2020 → esm2022}/uploader/sk-front-lib-uploader.mjs +0 -0
  174. /package/{esm2020 → esm2022}/uploader/sk-uploader-file-item.model.mjs +0 -0
  175. /package/{esm2020 → esm2022}/uploader/sk-uploader.animation.mjs +0 -0
  176. /package/{esm2020 → esm2022}/uploader/sk-uploader.class.mjs +0 -0
@@ -1,1529 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, PLATFORM_ID, Inject } from '@angular/core';
3
- import { map, tap, catchError, switchMap, take } from 'rxjs/operators';
4
- import * as i1 from 'sk-front-lib/api';
5
- import { ApiPageableParam } from 'sk-front-lib/api';
6
- import { SkFile, SkUser, SkDocument, SkBoard, SkProduct, SkPromotion, SkCart, SkOrderDetail, SkPoint, SkDocumentCommentParent, SkStore } from 'sk-front-lib/model';
7
- import { BehaviorSubject, of } from 'rxjs';
8
- import * as i2 from '@angular/router';
9
- import { HttpParams } from '@angular/common/http';
10
- import { SkUtils } from 'sk-front-lib';
11
- import { isPlatformBrowser } from '@angular/common';
12
-
13
- class SkAffiliateService {
14
- constructor(_apiService) {
15
- this._apiService = _apiService;
16
- }
17
- registerAffiliate(data) {
18
- return this._apiService.post(`/api/public/affiliate`, data).pipe(map(response => response.data));
19
- }
20
- getMyAffiliateData() {
21
- return this._apiService.get(`/api/public/affiliate/me`).pipe(map(response => response.data));
22
- }
23
- getMyAffiliateStats() {
24
- return this._apiService.get(`/api/public/affiliate/me/stats`).pipe(map(response => response.data));
25
- }
26
- getAdminAffiliateStats(id) {
27
- return this._apiService.get(`/api/admin/affiliate/user-id/${id}/stats`).pipe(map(response => response.data));
28
- }
29
- productViewEvent(productId, affiliateKey) {
30
- return this._apiService.get(`/api/public/affiliate/event/product-view?id=${productId}&affiliate=${affiliateKey}`).pipe(map(response => response.data));
31
- }
32
- getAdminList(params = new ApiPageableParam()) {
33
- return this._apiService.getPageable(`/api/admin/affiliate`, params.buildHttpParams()).pipe(map(response => response.data));
34
- }
35
- getAdminAffiliate(id) {
36
- return this._apiService.get(`/api/admin/affiliate/${id}`).pipe(map(response => response.data));
37
- }
38
- getAdminAffiliateByUserId(userId) {
39
- return this._apiService.get(`/api/admin/affiliate/user-id/${userId}`).pipe(map(response => response.data));
40
- }
41
- updateAdminStatus(id, data) {
42
- return this._apiService.put(`/api/admin/affiliate/${id}/update-status`, data).pipe(map(response => response.data));
43
- }
44
- activateAdminAffiliates(affiliates) {
45
- return this._apiService.put(`/api/admin/affiliate/activate/${affiliates.map(i => i.id).join(',')}`, null);
46
- }
47
- deactivateAdminAffiliates(affiliates) {
48
- return this._apiService.put(`/api/admin/affiliate/deactivate/${affiliates.map(i => i.id).join(',')}`, null);
49
- }
50
- deleteAffiliates(affiliates) {
51
- return this._apiService.delete(`/api/admin/affiliate/delete/${affiliates.map(i => i.id).join(',')}`);
52
- }
53
- getAdminAffiliateTargets(params = new ApiPageableParam()) {
54
- return this._apiService.getPageable(`/api/admin/affiliate/targets`, params.buildHttpParams()).pipe(map(response => response.data));
55
- }
56
- getAdminAffiliateTarget(id) {
57
- return this._apiService.get(`/api/admin/affiliate/targets/${id}`).pipe(map(response => response.data));
58
- }
59
- createAdminAffiliateTarget(data) {
60
- var _a, _b;
61
- return this._apiService.post(`/api/admin/affiliate/targets`, {
62
- type: data.type,
63
- apply: data.apply,
64
- orderIndex: data.orderIndex,
65
- startDate: data.startDate,
66
- endDate: data.endDate,
67
- brand: (_a = data.brand) === null || _a === void 0 ? void 0 : _a.id,
68
- category: (_b = data.category) === null || _b === void 0 ? void 0 : _b.id,
69
- products: (data.products || []).map(i => i.id),
70
- rebateAmount: data.rebateAmount,
71
- rebateType: data.rebateType,
72
- activated: data.activated
73
- }).pipe(map(response => response.data));
74
- }
75
- updateAdminAffiliateTarget(id, data) {
76
- var _a, _b;
77
- return this._apiService.put(`/api/admin/affiliate/targets/${id}`, {
78
- type: data.type,
79
- apply: data.apply,
80
- orderIndex: data.orderIndex,
81
- startDate: data.startDate,
82
- endDate: data.endDate,
83
- brand: (_a = data.brand) === null || _a === void 0 ? void 0 : _a.id,
84
- category: (_b = data.category) === null || _b === void 0 ? void 0 : _b.id,
85
- products: (data.products || []).map(i => i.id),
86
- rebateAmount: data.rebateAmount,
87
- rebateType: data.rebateType,
88
- activated: data.activated
89
- }).pipe(map(response => response.data));
90
- }
91
- deleteAdminAffiliateTargets(target = []) {
92
- return this._apiService.delete(`/api/admin/affiliate/targets/${target.map(i => i.id).join(',')}`);
93
- }
94
- }
95
- SkAffiliateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAffiliateService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
96
- SkAffiliateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAffiliateService, providedIn: 'root' });
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAffiliateService, decorators: [{
98
- type: Injectable,
99
- args: [{
100
- providedIn: 'root'
101
- }]
102
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
103
-
104
- class SkFileService {
105
- constructor(_apiService) {
106
- this._apiService = _apiService;
107
- this.apiServer = _apiService.apiServer;
108
- }
109
- getFile(id) {
110
- return this._apiService.get(`/api/admin/files/${id}`)
111
- .pipe(map(result => new SkFile(result.data)));
112
- }
113
- getAdminFiles(params = new ApiPageableParam()) {
114
- return this._apiService.getPageable(`/api/admin/files`, params.buildHttpParams()).pipe(map(response => {
115
- response.data.content = (response.data.content || []).map(item => new SkFile(item));
116
- return response.data;
117
- }));
118
- }
119
- deleteAdminFile(id) {
120
- return this._apiService.delete(`/api/admin/files/${id}`);
121
- }
122
- updateAdminFile(id, data) {
123
- return this._apiService.put(`/api/admin/files/${id}`, data).pipe(map(result => new SkFile(result.data)));
124
- }
125
- }
126
- SkFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkFileService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
127
- SkFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkFileService, providedIn: 'root' });
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkFileService, decorators: [{
129
- type: Injectable,
130
- args: [{
131
- providedIn: 'root'
132
- }]
133
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
134
-
135
- class SkAuthService {
136
- constructor(_router, apiService) {
137
- this._router = _router;
138
- this.apiService = apiService;
139
- this.baseUrl = '/api/auth';
140
- this._userinfo$ = new BehaviorSubject(new SkUser());
141
- }
142
- get userinfo$() {
143
- return this._userinfo$.asObservable();
144
- }
145
- moveLoginPage() {
146
- return this._router.navigate([this.apiService.loginUrl, { returnUrl: this._router.url }]);
147
- }
148
- login(data) {
149
- return this.apiService.post(this.baseUrl + '/signin', data).pipe(tap(response => {
150
- if (response.status === 200) {
151
- this.apiService.setToken(response.data.token);
152
- }
153
- }), map(response => response.data));
154
- }
155
- logout() {
156
- this._userinfo$.next(new SkUser());
157
- this.apiService.clearToken();
158
- }
159
- loadMyInfo(refresh = false) {
160
- if (this.apiService.getToken()) {
161
- if (this._userinfo$.getValue().isAnonymous() || refresh) {
162
- return this.apiService.get(this.baseUrl + '/me').pipe(map(result => !!result.data ? new SkUser(result.data) : new SkUser()), catchError(err => of(new SkUser())), tap(user => this._userinfo$.next(user)), switchMap(() => of(this._userinfo$.getValue())));
163
- }
164
- }
165
- return of(this._userinfo$.getValue());
166
- }
167
- checkAdminAccessable() {
168
- return this.loadMyInfo().pipe(map(result => result.isAdminAccessable()));
169
- }
170
- checkLogin() {
171
- return this.loadMyInfo().pipe(map(result => !result.isAnonymous()));
172
- }
173
- sendMailForActivateAccount(email) {
174
- return this.apiService.post(this.baseUrl + '/activate-account', { email }).pipe(map(response => response.data));
175
- }
176
- sendMailForResetPassword(email) {
177
- return this.apiService.post(this.baseUrl + '/reset-password', { email }).pipe(map(response => response.data));
178
- }
179
- requestActivateAccount(data) {
180
- return this.apiService.post(this.baseUrl + '/activate-account-complete', data).pipe(map(response => response.data));
181
- }
182
- updatePassword(data) {
183
- return this.apiService.post(this.baseUrl + '/update-password', data).pipe(map(response => response.data));
184
- }
185
- }
186
- SkAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthService, deps: [{ token: i2.Router }, { token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
187
- SkAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthService, providedIn: 'root' });
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthService, decorators: [{
189
- type: Injectable,
190
- args: [{
191
- providedIn: 'root'
192
- }]
193
- }], ctorParameters: function () { return [{ type: i2.Router }, { type: i1.SkApiService }]; } });
194
-
195
- class SkAuthGuard {
196
- constructor(authService, router) {
197
- this.authService = authService;
198
- this.router = router;
199
- }
200
- canActivate(route, state) {
201
- return this.authService.checkLogin()
202
- .pipe(tap(logged => {
203
- if (!logged) {
204
- this.router.navigate(['/login', { returnUrl: state.url }]);
205
- }
206
- }));
207
- }
208
- canActivateChild(route, state) {
209
- return this.canActivate(route, state);
210
- }
211
- }
212
- SkAuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthGuard, deps: [{ token: SkAuthService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
213
- SkAuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthGuard, providedIn: 'root' });
214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthGuard, decorators: [{
215
- type: Injectable,
216
- args: [{
217
- providedIn: 'root'
218
- }]
219
- }], ctorParameters: function () { return [{ type: SkAuthService }, { type: i2.Router }]; } });
220
-
221
- class SkAuthAdminGuard {
222
- constructor(authService, router) {
223
- this.authService = authService;
224
- this.router = router;
225
- }
226
- canActivate(route, state) {
227
- return this.authService.checkAdminAccessable()
228
- .pipe(tap(logged => {
229
- if (!logged) {
230
- this.router.navigate(['/login', { returnUrl: state.url }]);
231
- }
232
- }));
233
- }
234
- canActivateChild(route, state) {
235
- return this.canActivate(route, state);
236
- }
237
- }
238
- SkAuthAdminGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthAdminGuard, deps: [{ token: SkAuthService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
239
- SkAuthAdminGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthAdminGuard, providedIn: 'root' });
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAuthAdminGuard, decorators: [{
241
- type: Injectable,
242
- args: [{
243
- providedIn: 'root'
244
- }]
245
- }], ctorParameters: function () { return [{ type: SkAuthService }, { type: i2.Router }]; } });
246
-
247
- class SkUserService {
248
- constructor(_apiService) {
249
- this._apiService = _apiService;
250
- }
251
- getUser(id) {
252
- return this._apiService.get(`/api/public/users/${id}`).pipe(map(response => new SkUser(response.data)));
253
- }
254
- getAdminUser(id) {
255
- return this._apiService.get(`/api/admin/users/${id}`).pipe(map(response => new SkUser(response.data)));
256
- }
257
- getAdminUserByEmail(email) {
258
- return this._apiService.get(`/api/admin/users/email/${email}`).pipe(map(response => new SkUser(response.data)));
259
- }
260
- getUsers(params = new ApiPageableParam()) {
261
- return this._apiService.getPageable(`/api/public/users`, params.buildHttpParams()).pipe(map(response => response.data));
262
- }
263
- getAdminUsers(params = new ApiPageableParam()) {
264
- return this._apiService.getPageable(`/api/admin/users`, params.buildHttpParams()).pipe(map(response => response.data));
265
- }
266
- createAdminUser(data) {
267
- return this._apiService.post(`/api/admin/users`, data).pipe(map(response => new SkUser(response.data)));
268
- }
269
- updateUser(data) {
270
- return this._apiService.put(`/api/public/users/me`, data).pipe(map(response => new SkUser(response.data)));
271
- }
272
- updateAdminUser(id, data) {
273
- return this._apiService.put(`/api/admin/users/${id}`, data).pipe(map(response => new SkUser(response.data)));
274
- }
275
- activateAdminUsers(users) {
276
- return this._apiService.put(`/api/admin/users/activate/${users.map(user => user.id).join(',')}`, null);
277
- }
278
- deactivateAdminUsers(users) {
279
- return this._apiService.put(`/api/admin/users/deactivate/${users.map(user => user.id).join(',')}`, null);
280
- }
281
- deleteAdminUsers(users) {
282
- return this._apiService.delete(`/api/admin/users/delete/${users.map(user => user.id).join(',')}`);
283
- }
284
- getAdminUsersCount() {
285
- return this._apiService.get('/api/admin/users/count')
286
- .pipe(map(response => response.data));
287
- }
288
- signup(data) {
289
- return this._apiService.post('/api/auth/signup', data)
290
- .pipe(tap(response => {
291
- if (response.status === 200) {
292
- this._apiService.setToken(response.data.token);
293
- }
294
- }), map(response => response.data));
295
- }
296
- leave() {
297
- return this._apiService.put('/api/auth/leave', {})
298
- .pipe(map(response => response.data));
299
- }
300
- isEmailExists(email) {
301
- return this._apiService.get('/api/public/users/exists/email', new HttpParams().append('email', email)).pipe(map(response => response.data));
302
- }
303
- }
304
- SkUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkUserService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
305
- SkUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkUserService, providedIn: 'root' });
306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkUserService, decorators: [{
307
- type: Injectable,
308
- args: [{
309
- providedIn: 'root'
310
- }]
311
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
312
-
313
- class SkDocumentService {
314
- constructor(_apiService) {
315
- this._apiService = _apiService;
316
- }
317
- getDocument(id) {
318
- return this._apiService.get(`/api/public/documents/${id}`).pipe(map(response => new SkDocument(response.data)));
319
- }
320
- getDocumentByUrl(url) {
321
- return this._apiService.get(`/api/public/documents/url/${url}`).pipe(map(response => new SkDocument(response.data)));
322
- }
323
- getAdminDocument(id) {
324
- return this._apiService.get(`/api/admin/documents/${id}`).pipe(map(response => new SkDocument(response.data)));
325
- }
326
- getDocumentProduct(id) {
327
- return this._apiService.get(`/api/public/documents/${id}/product`).pipe(map(response => response.data));
328
- }
329
- getAdminDocumentProduct(id) {
330
- return this._apiService.get(`/api/admin/documents/${id}/product`).pipe(map(response => response.data));
331
- }
332
- getDocuments(params = new ApiPageableParam()) {
333
- return this._apiService.getPageable(`/api/public/documents`, params.buildHttpParams()).pipe(map(response => response.data));
334
- }
335
- getAdminDocuments(params = new ApiPageableParam()) {
336
- return this._apiService.getPageable(`/api/admin/documents`, params.buildHttpParams()).pipe(map(response => response.data));
337
- }
338
- getDocumentsArray(ids) {
339
- return this._apiService.get(`/api/public/documents/array/${ids.join(',')}`).pipe(map(response => response.data));
340
- }
341
- getAdminDocumentsArray(ids) {
342
- return this._apiService.get(`/api/admin/documents/array/${ids.join(',')}`).pipe(map(response => response.data));
343
- }
344
- createAdminDocument(data) {
345
- return this._apiService.post(`/api/admin/documents`, data).pipe(map(response => new SkDocument(response.data)));
346
- }
347
- copyAdminDocument(id) {
348
- return this._apiService.post(`/api/admin/documents/${id}/copy`, {}).pipe(map(response => new SkDocument(response.data)));
349
- }
350
- writePost(data) {
351
- return this._apiService.post(`/api/public/documents`, data).pipe(map(response => response.data));
352
- }
353
- deletePost(id) {
354
- return this._apiService.delete(`/api/public/documents/${id}`).pipe(map(response => response.data));
355
- }
356
- updateDocument(id, data) {
357
- return this._apiService.put(`/api/public/documents/${id}`, data).pipe(map(response => new SkDocument(response.data)));
358
- }
359
- updateAdminDocument(id, data) {
360
- return this._apiService.put(`/api/admin/documents/${id}`, data).pipe(map(response => new SkDocument(response.data)));
361
- }
362
- updateAdminDocumentArticle(id, data) {
363
- return this._apiService.put(`/api/admin/documents/${id}/article`, data).pipe(map(response => new SkDocument(response.data)));
364
- }
365
- updateAdminDocumentImage(id, data) {
366
- return this._apiService.put(`/api/admin/documents/${id}/image`, data).pipe(map(response => new SkDocument(response.data)));
367
- }
368
- updateAdminDocumentProduct(id, data) {
369
- return this._apiService.put(`/api/admin/documents/${id}/product`, data).pipe(map(response => response.data));
370
- }
371
- updateAdminDocumentOpengraph(id, data) {
372
- return this._apiService.put(`/api/admin/documents/${id}/opengraph`, data).pipe(map(response => new SkDocument(response.data)));
373
- }
374
- activateAdminDocuments(documents) {
375
- return this._apiService.put(`/api/admin/documents/activate/${documents.map(document => document.id).join(',')}`, null);
376
- }
377
- deactivateAdminDocuments(documents) {
378
- return this._apiService.put(`/api/admin/documents/deactivate/${documents.map(document => document.id).join(',')}`, null);
379
- }
380
- deleteAdminDocuments(documents) {
381
- return this._apiService.delete(`/api/admin/documents/delete/${documents.map(document => document.id).join(',')}`);
382
- }
383
- getAdminDocumentsCount() {
384
- return this._apiService.get('/api/admin/documents/count')
385
- .pipe(map(response => response.data));
386
- }
387
- getNextDocumentId(id) {
388
- return this._apiService.get(`/api/public/documents/${id}/next`)
389
- .pipe(map(response => response.data));
390
- }
391
- getPrevDocumentId(id) {
392
- return this._apiService.get(`/api/public/documents/${id}/prev`)
393
- .pipe(map(response => response.data));
394
- }
395
- getAdminPublish(documentId) {
396
- return this._apiService.get(`/api/admin/documents/${documentId}/publish`).pipe(map(response => response.data));
397
- }
398
- deleteAdminPublish(documentId, id) {
399
- return this._apiService.delete(`/api/admin/documents/${documentId}/publish/${id}`).pipe(map(response => response.data));
400
- }
401
- createAdminPublish(documentId, data) {
402
- return this._apiService.post(`/api/admin/documents/${documentId}/publish`, data).pipe(map(response => response.data));
403
- }
404
- updateAdminPublish(documentId, data) {
405
- return this._apiService.put(`/api/admin/documents/${documentId}/publish`, data).pipe(map(response => response.data));
406
- }
407
- }
408
- SkDocumentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkDocumentService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
409
- SkDocumentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkDocumentService, providedIn: 'root' });
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkDocumentService, decorators: [{
411
- type: Injectable,
412
- args: [{
413
- providedIn: 'root'
414
- }]
415
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
416
-
417
- class SkBoardService {
418
- constructor(_apiService) {
419
- this._apiService = _apiService;
420
- }
421
- getBoard(url, params = new ApiPageableParam()) {
422
- return this._apiService.get(`/api/public/boards/${url}`, params.buildHttpParams()).pipe(map(response => response.data));
423
- }
424
- getAdminBoard(id) {
425
- return this._apiService.get(`/api/admin/boards/${id}`).pipe(map(response => new SkBoard(response.data)));
426
- }
427
- getBoards(showSupport = false) {
428
- return this._apiService.get(`/api/public/boards`, new HttpParams().append('showSupport', String(showSupport))).pipe(map(response => response.data));
429
- }
430
- getAdminBoards(params = new ApiPageableParam()) {
431
- return this._apiService.getPageable(`/api/admin/boards`, params.buildHttpParams()).pipe(map(response => response.data));
432
- }
433
- createAdminBoard(data) {
434
- return this._apiService.post(`/api/admin/boards`, data).pipe(map(response => new SkBoard(response.data)));
435
- }
436
- updateBoard(id, data) {
437
- return this._apiService.put(`/api/public/boards/${id}`, data).pipe(map(response => new SkBoard(response.data)));
438
- }
439
- updateAdminBoard(id, data) {
440
- return this._apiService.put(`/api/admin/boards/${id}`, data).pipe(map(response => new SkBoard(response.data)));
441
- }
442
- getAllNoticeDocuments() {
443
- return this._apiService.get(`/api/public/boards/notices`).pipe(map(response => (response.data || [])));
444
- }
445
- activateAdminBoards(boards) {
446
- return this._apiService.put(`/api/admin/boards/activate/${boards.map(board => board.id).join(',')}`, null);
447
- }
448
- deactivateAdminBoards(boards) {
449
- return this._apiService.put(`/api/admin/boards/deactivate/${boards.map(board => board.id).join(',')}`, null);
450
- }
451
- deleteAdminBoards(boards) {
452
- return this._apiService.delete(`/api/admin/boards/delete/${boards.map(board => board.id).join(',')}`);
453
- }
454
- }
455
- SkBoardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBoardService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
456
- SkBoardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBoardService, providedIn: 'root' });
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBoardService, decorators: [{
458
- type: Injectable,
459
- args: [{
460
- providedIn: 'root'
461
- }]
462
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
463
-
464
- class SkBrandService {
465
- constructor(_apiService) {
466
- this._apiService = _apiService;
467
- }
468
- getBrand(id) {
469
- return this._apiService.get(`/api/public/brands/${id}`).pipe(map(response => response.data));
470
- }
471
- getAdminBrand(id) {
472
- return this._apiService.get(`/api/admin/brands/${id}`).pipe(map(response => response.data));
473
- }
474
- getBrands(params = new ApiPageableParam()) {
475
- return this._apiService.getPageable(`/api/public/brands`, params.buildHttpParams()).pipe(map(response => response.data));
476
- }
477
- getAllBrands(params = new ApiPageableParam()) {
478
- return this._apiService.get(`/api/public/brands/all`, params.buildHttpParams()).pipe(map(response => response.data));
479
- }
480
- getAdminBrands(params = new ApiPageableParam()) {
481
- return this._apiService.getPageable(`/api/admin/brands`, params.buildHttpParams()).pipe(map(response => response.data));
482
- }
483
- getAdminAllBrands() {
484
- return this._apiService.get(`/api/admin/brands/all`).pipe(map(response => response.data));
485
- }
486
- createAdminBrand(data) {
487
- return this._apiService.post(`/api/admin/brands`, data).pipe(map(response => response.data));
488
- }
489
- updateAdminBrand(id, data) {
490
- return this._apiService.put(`/api/admin/brands/${id}`, data).pipe(map(response => response.data));
491
- }
492
- deleteAdminBrands(brands) {
493
- return this._apiService.delete(`/api/admin/brands/delete/${brands.map(brand => brand.id).join(',')}`);
494
- }
495
- }
496
- SkBrandService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBrandService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
497
- SkBrandService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBrandService, providedIn: 'root' });
498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkBrandService, decorators: [{
499
- type: Injectable,
500
- args: [{
501
- providedIn: 'root'
502
- }]
503
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
504
-
505
- class SkCategoryService {
506
- constructor(_apiService) {
507
- this._apiService = _apiService;
508
- }
509
- getCategory(id) {
510
- return this._apiService.get(`/api/public/categories/${id}`).pipe(map(response => response.data));
511
- }
512
- getAdminCategory(id) {
513
- return this._apiService.get(`/api/admin/categories/${id}`).pipe(map(response => response.data));
514
- }
515
- getCategories(type) {
516
- return this._apiService.get(`/api/public/categories`).pipe(map(response => response.data.filter(item => item.type === type)));
517
- }
518
- getAdminAllCategories() {
519
- return this._apiService.get(`/api/admin/categories/all`).pipe(map(response => response.data));
520
- }
521
- getAdminCategories(params = new ApiPageableParam()) {
522
- return this._apiService.getPageable(`/api/admin/categories`, params.buildHttpParams()).pipe(map(response => response.data));
523
- }
524
- getAdminSsubCategoryItems(params = new ApiPageableParam()) {
525
- return this._apiService.getPageable(`/api/admin/categories/subitems`, params.buildHttpParams()).pipe(map(response => response.data));
526
- }
527
- getAdminCategoriesDetail(idArray) {
528
- return this._apiService.get(`/api/admin/categories/detail/${idArray.join(',')}`).pipe(map(response => (response.data || []).map(value => {
529
- return Object.assign({}, { subCategories: [] }, value);
530
- })));
531
- }
532
- createAdminCategory(data) {
533
- return this._apiService.post(`/api/admin/categories`, data).pipe(map(response => response.data));
534
- }
535
- updateAdminCategory(id, data) {
536
- return this._apiService.put(`/api/admin/categories/${id}`, data).pipe(map(response => response.data));
537
- }
538
- deleteAdminCategories(categories) {
539
- return this._apiService.delete(`/api/admin/categories/delete/${categories.map(category => category.id).join(',')}`);
540
- }
541
- createAdminSubCategory(categoryId, data) {
542
- return this._apiService.post(`/api/admin/categories/${categoryId}/sub`, data).pipe(map(response => response.data));
543
- }
544
- createAdminSubCategoryItem(categoryId, subCategoryId, data) {
545
- return this._apiService.post(`/api/admin/categories/${categoryId}/sub/${subCategoryId}`, data).pipe(map(response => response.data));
546
- }
547
- deleteAdminSubCategory(categoryId, subCategoryId) {
548
- return this._apiService.delete(`/api/admin/categories/${categoryId}/sub/${subCategoryId}`).pipe(map(response => response.data));
549
- }
550
- deleteAdminSubCategoryItem(categoryId, subCategoryId, subCategoryItemId) {
551
- return this._apiService.delete(`/api/admin/categories/${categoryId}/sub/${subCategoryId}/${subCategoryItemId}`).pipe(map(response => response.data));
552
- }
553
- }
554
- SkCategoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCategoryService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
555
- SkCategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCategoryService, providedIn: 'root' });
556
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCategoryService, decorators: [{
557
- type: Injectable,
558
- args: [{
559
- providedIn: 'root'
560
- }]
561
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
562
-
563
- class SkProductService {
564
- constructor(_apiService) {
565
- this._apiService = _apiService;
566
- }
567
- getProduct(url) {
568
- return this._apiService.get(`/api/public/products/${url}`).pipe(map(response => response.data));
569
- }
570
- getAdminProduct(id) {
571
- return this._apiService.get(`/api/admin/products/${id}`).pipe(map(response => new SkProduct(response.data)));
572
- }
573
- getProducts(params = new ApiPageableParam()) {
574
- return this._apiService.getPageable(`/api/public/products`, params.buildHttpParams()).pipe(map(response => response.data));
575
- }
576
- getAdminProducts(params = new ApiPageableParam()) {
577
- return this._apiService.getPageable(`/api/admin/products`, params.buildHttpParams()).pipe(map(response => response.data));
578
- }
579
- getProductsArray(ids) {
580
- return this._apiService.get(`/api/public/products/array/${ids.join(',')}`).pipe(map(response => response.data));
581
- }
582
- getAdminProductsArray(ids) {
583
- return this._apiService.get(`/api/admin/products/array/${ids.join(',')}`).pipe(map(response => response.data));
584
- }
585
- createAdminProduct(data) {
586
- return this._apiService.post(`/api/admin/products`, data).pipe(map(response => new SkProduct(response.data)));
587
- }
588
- copyAdminProduct(id) {
589
- return this._apiService.post(`/api/admin/products/${id}/copy`, {}).pipe(map(response => new SkProduct(response.data)));
590
- }
591
- updateProduct(id, data) {
592
- return this._apiService.put(`/api/public/products/${id}`, data).pipe(map(response => new SkProduct(response.data)));
593
- }
594
- updateAdminProduct(id, data) {
595
- return this._apiService.put(`/api/admin/products/${id}`, data).pipe(map(response => new SkProduct(response.data)));
596
- }
597
- updateAdminProductPrice(id, data) {
598
- return this._apiService.put(`/api/admin/products/${id}/price`, data).pipe(map(response => new SkProduct(response.data)));
599
- }
600
- updateAdminProductOpengraph(id, data) {
601
- return this._apiService.put(`/api/admin/products/${id}/opengraph`, data).pipe(map(response => new SkProduct(response.data)));
602
- }
603
- updateAdminProductNaverEP(id, data) {
604
- return this._apiService.put(`/api/admin/products/${id}/naverep`, data).pipe(map(response => new SkProduct(response.data)));
605
- }
606
- updateAdminProductCatalog(id, data) {
607
- return this._apiService.put(`/api/admin/products/${id}/catalog`, data).pipe(map(response => new SkProduct(response.data)));
608
- }
609
- updateAdminProductOption(id, data) {
610
- return this._apiService.put(`/api/admin/products/${id}/option`, data).pipe(map(response => new SkProduct(response.data)));
611
- }
612
- updateAdminProductPackage(id, data) {
613
- return this._apiService.put(`/api/admin/products/${id}/package`, data).pipe(map(response => new SkProduct(response.data)));
614
- }
615
- getAdminPackageChildrenOptions(id) {
616
- return this._apiService.get(`/api/admin/products/${id}/package/children-options`).pipe(map(response => response.data));
617
- }
618
- getAdminPackageChildrenImages(id) {
619
- return this._apiService.get(`/api/admin/products/${id}/package/children-images`).pipe(map(response => (response.data || []).map(item => new SkFile(item))));
620
- }
621
- updateAdminProductArticleDesc(id, data) {
622
- return this._apiService.put(`/api/admin/products/${id}/article-desc`, data).pipe(map(response => new SkProduct(response.data)));
623
- }
624
- updateAdminProductArticleSpec(id, data) {
625
- return this._apiService.put(`/api/admin/products/${id}/article-spec`, data).pipe(map(response => new SkProduct(response.data)));
626
- }
627
- updateAdminProductImage(id, data) {
628
- return this._apiService.put(`/api/admin/products/${id}/image`, data).pipe(map(response => new SkProduct(response.data)));
629
- }
630
- updateAdminProductEDelivery(id, data) {
631
- return this._apiService.put(`/api/admin/products/${id}/edelivery`, data).pipe(map(response => new SkProduct(response.data)));
632
- }
633
- updateAdminProductFurnitureDelivery(id, data) {
634
- return this._apiService.put(`/api/admin/products/${id}/furniture-delivery`, data).pipe(map(response => new SkProduct(response.data)));
635
- }
636
- activateAdminProducts(products) {
637
- return this._apiService.put(`/api/admin/products/activate/${products.map(product => product.id).join(',')}`, null);
638
- }
639
- deactivateAdminProducts(products) {
640
- return this._apiService.put(`/api/admin/products/deactivate/${products.map(product => product.id).join(',')}`, null);
641
- }
642
- deleteAdminProducts(products) {
643
- return this._apiService.delete(`/api/admin/products/delete/${products.map(product => product.id).join(',')}`);
644
- }
645
- getAdminProductsCount() {
646
- return this._apiService.get('/api/admin/products/count')
647
- .pipe(map(response => response.data));
648
- }
649
- updateWishlist(id) {
650
- return this._apiService.put(`/api/public/products/${id}/wishlist`, {}).pipe(map(response => response.data));
651
- }
652
- getWishlist(id) {
653
- return this._apiService.get(`/api/public/products/${id}/wishlist`).pipe(map(response => response.data));
654
- }
655
- getProductOptions(id) {
656
- return this._apiService.get(`/api/public/products/${id}/options`).pipe(map(response => response.data));
657
- }
658
- getAdminProductSubCategoryItem(id) {
659
- return this._apiService.get(`/api/admin/products/${id}/categories`).pipe(map(response => response.data || []));
660
- }
661
- updateAdminProductSubCategoryItems(id, idArr) {
662
- return this._apiService.put(`/api/admin/products/${id}/categories`, { subCategoryItems: idArr }).pipe(map(response => response.data || []));
663
- }
664
- getProductsFilterData(params = new ApiPageableParam()) {
665
- return this._apiService.get(`/api/public/products/filter-data`, params.buildHttpParams()).pipe(map(response => response.data));
666
- }
667
- getIncludedPackages(id) {
668
- return this._apiService.get(`/api/public/products/${id}/included-packages`).pipe(map(response => response.data || []));
669
- }
670
- updateAdminStockConfig(id, data) {
671
- return this._apiService.put(`/api/admin/products/${id}/stocks`, data).pipe(map(response => response.data));
672
- }
673
- getAdminStockCount(id) {
674
- return this._apiService.get(`/api/admin/products/${id}/stocks/count`).pipe(map(response => Object.assign({ totalIn: 0, totalOut: 0, current: 0 }, response.data)));
675
- }
676
- getAdminStocks(id, params = new ApiPageableParam()) {
677
- return this._apiService.getPageable(`/api/admin/products/${id}/stocks`, params.buildHttpParams()).pipe(map(response => response.data));
678
- }
679
- addAdminStock(id, data) {
680
- return this._apiService.post(`/api/admin/products/${id}/stocks`, data).pipe(map(response => Object.assign({ totalIn: 0, totalOut: 0, current: 0 }, response.data)));
681
- }
682
- updateAdminStock(productId, stockId, data) {
683
- return this._apiService.put(`/api/admin/products/${productId}/stocks/${stockId}`, data).pipe(map(response => response.data));
684
- }
685
- deleteAdminStock(productId, stockId) {
686
- return this._apiService.delete(`/api/admin/products/${productId}/stocks/${stockId}`).pipe(map(response => response.data));
687
- }
688
- getAdminSeriesList(params = new ApiPageableParam()) {
689
- return this._apiService.getPageable(`/api/admin/product-series`, params.buildHttpParams()).pipe(map(response => response.data));
690
- }
691
- getAdminSeries(id) {
692
- return this._apiService.get(`/api/admin/product-series/${id}`).pipe(map(response => response.data));
693
- }
694
- createAdminSeries(data) {
695
- return this._apiService.post(`/api/admin/product-series`, data).pipe(map(response => response.data));
696
- }
697
- updateAdminSeries(id, data) {
698
- return this._apiService.put(`/api/admin/product-series/${id}`, data).pipe(map(response => response.data));
699
- }
700
- deleteAdminSeries(id) {
701
- return this._apiService.delete(`/api/admin/product-series/${id}`).pipe(map(response => response.data));
702
- }
703
- getAdminPublish(productId) {
704
- return this._apiService.get(`/api/admin/products/${productId}/publish`).pipe(map(response => response.data));
705
- }
706
- deleteAdminPublish(productId, id) {
707
- return this._apiService.delete(`/api/admin/products/${productId}/publish/${id}`).pipe(map(response => response.data));
708
- }
709
- createAdminPublish(productId, data) {
710
- return this._apiService.post(`/api/admin/products/${productId}/publish`, data).pipe(map(response => response.data));
711
- }
712
- updateAdminPublish(productId, data) {
713
- return this._apiService.put(`/api/admin/products/${productId}/publish`, data).pipe(map(response => response.data));
714
- }
715
- }
716
- SkProductService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkProductService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
717
- SkProductService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkProductService, providedIn: 'root' });
718
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkProductService, decorators: [{
719
- type: Injectable,
720
- args: [{
721
- providedIn: 'root'
722
- }]
723
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
724
-
725
- class SkPromotionService {
726
- constructor(_apiService) {
727
- this._apiService = _apiService;
728
- }
729
- getPromotion(id) {
730
- return this._apiService.get(`/api/public/promotions/${id}`).pipe(map(response => response.data));
731
- }
732
- getPromotionPreview(id) {
733
- return this._apiService.get(`/api/admin/promotions/${id}/preview`).pipe(map(response => response.data));
734
- }
735
- getAdminPromotion(id) {
736
- return this._apiService.get(`/api/admin/promotions/${id}`).pipe(map(response => new SkPromotion(response.data)));
737
- }
738
- getAdminPromotionTarget(id) {
739
- return this._apiService.get(`/api/admin/promotions/${id}/target`).pipe(map(response => response.data));
740
- }
741
- getPromotions(params = new ApiPageableParam()) {
742
- return this._apiService.getPageable(`/api/public/promotions`, params.buildHttpParams()).pipe(map(response => response.data));
743
- }
744
- getAdminPromotions(params = new ApiPageableParam()) {
745
- return this._apiService.getPageable(`/api/admin/promotions`, params.buildHttpParams()).pipe(map(response => response.data));
746
- }
747
- getPromotionsArray(ids) {
748
- return this._apiService.get(`/api/public/promotions/array/${ids.join(',')}`).pipe(map(response => response.data));
749
- }
750
- getAdminPromotionsArray(ids) {
751
- return this._apiService.get(`/api/admin/promotions/array/${ids.join(',')}`).pipe(map(response => response.data));
752
- }
753
- createAdminPromotion(data) {
754
- return this._apiService.post(`/api/admin/promotions`, data).pipe(map(response => new SkPromotion(response.data)));
755
- }
756
- updatePromotion(id, data) {
757
- return this._apiService.put(`/api/public/promotions/${id}`, data).pipe(map(response => new SkPromotion(response.data)));
758
- }
759
- updateAdminPromotion(id, data) {
760
- return this._apiService.put(`/api/admin/promotions/${id}`, data).pipe(map(response => new SkPromotion(response.data)));
761
- }
762
- updateAdminPromotionTarget(id, data) {
763
- return this._apiService.put(`/api/admin/promotions/${id}/target`, data).pipe(map(response => response.data));
764
- }
765
- updateAdminPromotionGift(id, data) {
766
- return this._apiService.put(`/api/admin/promotions/${id}/gift`, data).pipe(map(response => new SkPromotion(response.data)));
767
- }
768
- updateAdminPromotionContent(id, data) {
769
- return this._apiService.put(`/api/admin/promotions/${id}/content`, data).pipe(map(response => new SkPromotion(response.data)));
770
- }
771
- updateAdminPromotionBenefit(id, data) {
772
- return this._apiService.put(`/api/admin/promotions/${id}/benefit`, data).pipe(map(response => new SkPromotion(response.data)));
773
- }
774
- updateAdminPromotionImage(id, data) {
775
- return this._apiService.put(`/api/admin/promotions/${id}/image`, data).pipe(map(response => new SkPromotion(response.data)));
776
- }
777
- updateAdminPromotionOpengraph(id, data) {
778
- return this._apiService.put(`/api/admin/promotions/${id}/opengraph`, data).pipe(map(response => new SkPromotion(response.data)));
779
- }
780
- activateAdminPromotions(promotions) {
781
- return this._apiService.put(`/api/admin/promotions/activate/${promotions.map(promotion => promotion.id).join(',')}`, null);
782
- }
783
- deactivateAdminPromotions(promotions) {
784
- return this._apiService.put(`/api/admin/promotions/deactivate/${promotions.map(promotion => promotion.id).join(',')}`, null);
785
- }
786
- deleteAdminPromotions(promotions) {
787
- return this._apiService.delete(`/api/admin/promotions/delete/${promotions.map(promotion => promotion.id).join(',')}`);
788
- }
789
- getAdminPromotionsCount() {
790
- return this._apiService.get('/api/admin/promotions/count')
791
- .pipe(map(response => response.data));
792
- }
793
- }
794
- SkPromotionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPromotionService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
795
- SkPromotionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPromotionService, providedIn: 'root' });
796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPromotionService, decorators: [{
797
- type: Injectable,
798
- args: [{
799
- providedIn: 'root'
800
- }]
801
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
802
-
803
- class SkConfigService {
804
- constructor(_apiService) {
805
- this._apiService = _apiService;
806
- }
807
- getConfig(key, nullValue = null) {
808
- return this._apiService.get(`/api/public/config/${key}`)
809
- .pipe(map(result => result.data ? SkUtils.decodeBase64(result.data.value, nullValue) : nullValue));
810
- }
811
- setConfig(key, data, nullValue = []) {
812
- return this._apiService.put(`/api/admin/config/${key}`, { value: SkUtils.encodeBase64(data) })
813
- .pipe(map(result => result.data ? SkUtils.decodeBase64(result.data.value, nullValue) : nullValue));
814
- }
815
- getBankList() {
816
- return this._apiService.get('/api/public/bank-list')
817
- .pipe(map(result => result.data || []));
818
- }
819
- }
820
- SkConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkConfigService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
821
- SkConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkConfigService, providedIn: 'root' });
822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkConfigService, decorators: [{
823
- type: Injectable,
824
- args: [{
825
- providedIn: 'root'
826
- }]
827
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
828
-
829
- class SkCartApiService {
830
- constructor(_apiService) {
831
- this._apiService = _apiService;
832
- }
833
- load() {
834
- return this._apiService.get(`/api/public/carts`).pipe(map(response => (response.data || []).map(item => new SkCart(item))));
835
- }
836
- add(cart) {
837
- const data = {
838
- product: cart.product.id,
839
- selectedOptions: cart.options.map(item => ({
840
- value: item.value.id,
841
- option: item.option.id,
842
- amount: item.amount
843
- })),
844
- amount: cart.amount,
845
- selectedGifts: (cart.gifts || []).map(item => ({ id: item.id }))
846
- };
847
- return this._apiService.post(`/api/public/carts`, data).pipe(map(response => (response.data || []).map(item => new SkCart(item))));
848
- }
849
- clear() {
850
- return undefined;
851
- }
852
- remove(carts) {
853
- return this.removeByIdArray(carts.map(cart => cart.id));
854
- }
855
- removeByIdArray(idArray) {
856
- const ids = idArray.filter(id => Number(id) >= 1);
857
- return this._apiService.delete(`/api/public/carts`, new HttpParams().append('target', ids.join(','))).pipe(map(response => (response.data || []).map(item => new SkCart(item))));
858
- }
859
- update(cart) {
860
- return this._apiService.put(`/api/public/carts/${cart.id}`, { amount: cart.amount }).pipe(map(response => (response.data || []).map(item => new SkCart(item))));
861
- }
862
- }
863
- SkCartApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartApiService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
864
- SkCartApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartApiService, providedIn: 'root' });
865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartApiService, decorators: [{
866
- type: Injectable,
867
- args: [{
868
- providedIn: 'root'
869
- }]
870
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
871
- class SkCartLocalService {
872
- constructor(platformId) {
873
- this.platformId = platformId;
874
- this.isPlatformBrowser = isPlatformBrowser(this.platformId);
875
- }
876
- loadRaw() {
877
- let data = [];
878
- try {
879
- if (this.isPlatformBrowser) {
880
- data = (SkUtils.decodeBase64(localStorage.getItem('cartData')) || []).map(item => new SkCart(item));
881
- }
882
- }
883
- catch (e) {
884
- data = [];
885
- }
886
- return data;
887
- }
888
- load() {
889
- return of(this.loadRaw());
890
- }
891
- add(cart) {
892
- cart.id = Math.random();
893
- const cartList = [cart, ...this.loadRaw()];
894
- localStorage.setItem('cartData', SkUtils.encodeBase64(cartList));
895
- return of(cartList);
896
- }
897
- clear() {
898
- const cartList = [];
899
- localStorage.setItem('cartData', SkUtils.encodeBase64(cartList));
900
- return of(cartList);
901
- }
902
- remove(carts) {
903
- return this.removeByIdArray(carts.map(cart => cart.id));
904
- }
905
- removeByIdArray(idArray) {
906
- const removedItems = this.loadRaw().filter(item => idArray.findIndex(id => id === item.id) < 0);
907
- localStorage.setItem('cartData', SkUtils.encodeBase64(removedItems));
908
- return of(removedItems);
909
- }
910
- update(cart) {
911
- const cartList = this.loadRaw();
912
- const index = this.loadRaw().findIndex(item => item.id === cart.id);
913
- if (index > -1) {
914
- cartList[index] = cart;
915
- localStorage.setItem('cartData', SkUtils.encodeBase64(cartList));
916
- }
917
- return of(cartList);
918
- }
919
- }
920
- SkCartLocalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartLocalService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
921
- SkCartLocalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartLocalService, providedIn: 'root' });
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartLocalService, decorators: [{
923
- type: Injectable,
924
- args: [{
925
- providedIn: 'root'
926
- }]
927
- }], ctorParameters: function () {
928
- return [{ type: Object, decorators: [{
929
- type: Inject,
930
- args: [PLATFORM_ID]
931
- }] }];
932
- } });
933
- class SkCartService {
934
- constructor(_authService, _apiService, _apiCartService, _apiLocalService) {
935
- this._authService = _authService;
936
- this._apiService = _apiService;
937
- this._apiCartService = _apiCartService;
938
- this._apiLocalService = _apiLocalService;
939
- this._cartItems$ = new BehaviorSubject([]);
940
- this.cartItems$ = this._cartItems$.asObservable();
941
- this._selectedItems$ = new BehaviorSubject([]);
942
- this.selectedItems$ = this._selectedItems$.asObservable();
943
- // this._myInfoSubscription = this._authService.userinfo$.subscribe(() => {
944
- // this.load();
945
- // });
946
- }
947
- get cartItems() {
948
- return this._cartItems$.getValue();
949
- }
950
- set cartItems(value) {
951
- this._cartItems$.next(value);
952
- }
953
- get selectedItems() {
954
- return this._selectedItems$.getValue();
955
- }
956
- set selectedItems(value) {
957
- this._selectedItems$.next(value);
958
- }
959
- load() {
960
- this._authService.checkLogin()
961
- .pipe(switchMap(result => result ? this._apiCartService.load() : this._apiLocalService.load()))
962
- .subscribe(result => this._cartItems$.next(result));
963
- }
964
- clear() {
965
- this._authService.checkLogin()
966
- .pipe(switchMap(result => result ? this._apiCartService.clear() : this._apiLocalService.clear()))
967
- .subscribe(result => this._cartItems$.next(result));
968
- }
969
- add(cart) {
970
- return this._authService.checkLogin()
971
- .pipe(switchMap(result => result ? this._apiCartService.add(cart) : this._apiLocalService.add(cart)), tap(result => this._cartItems$.next(result)));
972
- }
973
- remove(carts) {
974
- this._authService.checkLogin()
975
- .pipe(switchMap(result => result ? this._apiCartService.remove(carts) : this._apiLocalService.remove(carts)))
976
- .subscribe(result => {
977
- this._cartItems$.next(result);
978
- this.checkSelectedItems();
979
- });
980
- }
981
- removeByIdArray(idArray) {
982
- this._authService.checkLogin()
983
- .pipe(switchMap(result => result ? this._apiCartService.removeByIdArray(idArray) : this._apiLocalService.removeByIdArray(idArray)))
984
- .subscribe(result => {
985
- this._cartItems$.next(result);
986
- this.checkSelectedItems();
987
- });
988
- }
989
- update(cart) {
990
- this._authService.checkLogin()
991
- .pipe(switchMap(result => result ? this._apiCartService.update(cart) : this._apiLocalService.update(cart)))
992
- .subscribe(result => this._cartItems$.next(result));
993
- }
994
- getCart(id) {
995
- return this._cartItems$.getValue().find(value => value.id === id);
996
- }
997
- checkSelectedItems() {
998
- this.selectedItems = this.selectedItems.filter(value => !!this.getCart(value));
999
- }
1000
- selectAll() {
1001
- this.selectedItems = this._cartItems$.getValue().map(item => item.id);
1002
- }
1003
- deSelectAll() {
1004
- this.selectedItems = [];
1005
- }
1006
- toggleSelectAll() {
1007
- if (this.selectedItems.length === this._cartItems$.getValue().length) {
1008
- this.deSelectAll();
1009
- }
1010
- else {
1011
- this.selectAll();
1012
- }
1013
- }
1014
- toggleSelect(cart) {
1015
- const targetIndex = this.selectedItems.findIndex(item => item === cart.id);
1016
- if (targetIndex === -1) {
1017
- this.selectedItems = [...this.selectedItems, cart.id];
1018
- }
1019
- else {
1020
- const target = this.selectedItems;
1021
- target.splice(targetIndex, 1);
1022
- this.selectedItems = target;
1023
- }
1024
- }
1025
- isSelected(cart) {
1026
- return this.selectedItems.findIndex(item => item === cart.id) > -1;
1027
- }
1028
- isSelectedAll() {
1029
- return this.selectedItems.length > 0 && this.selectedItems.length === this._cartItems$.getValue().length;
1030
- }
1031
- isIntermediate() {
1032
- return this.selectedItems.length > 0 && this.selectedItems.length !== this._cartItems$.getValue().length;
1033
- }
1034
- createOrder(paymentType, affiliateKey) {
1035
- return this._authService.checkLogin()
1036
- .pipe(take(1), map(result => {
1037
- if (result) {
1038
- return {
1039
- apiUrl: `/api/public/orders/from-cart`,
1040
- items: this.selectedItems
1041
- };
1042
- }
1043
- else {
1044
- return {
1045
- apiUrl: `/api/public/orders/from-data`,
1046
- items: this.selectedItems
1047
- .map(id => this.getCart(id))
1048
- .map(cart => ({
1049
- id: cart.id,
1050
- productId: cart.product.id,
1051
- amount: cart.amount,
1052
- options: (cart.options || []).map(option => ({
1053
- optionId: option.option.id,
1054
- valueId: option.value.id,
1055
- amount: option.amount || 1
1056
- })),
1057
- gifts: (cart.gifts || []).map(item => ({ id: item.id }))
1058
- }))
1059
- };
1060
- }
1061
- }), switchMap(result => this._apiService.post(result.apiUrl, {
1062
- items: result.items,
1063
- affiliateKey,
1064
- paymentType
1065
- })), map(result => result.data));
1066
- }
1067
- }
1068
- SkCartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartService, deps: [{ token: SkAuthService }, { token: i1.SkApiService }, { token: SkCartApiService }, { token: SkCartLocalService }], target: i0.ɵɵFactoryTarget.Injectable });
1069
- SkCartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartService, providedIn: 'root' });
1070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCartService, decorators: [{
1071
- type: Injectable,
1072
- args: [{
1073
- providedIn: 'root'
1074
- }]
1075
- }], ctorParameters: function () { return [{ type: SkAuthService }, { type: i1.SkApiService }, { type: SkCartApiService }, { type: SkCartLocalService }]; } });
1076
-
1077
- class SkOrderService {
1078
- constructor(_apiService) {
1079
- this._apiService = _apiService;
1080
- }
1081
- getAdminOrders(params = new ApiPageableParam()) {
1082
- return this._apiService.getPageable(`/api/admin/orders`, params.buildHttpParams())
1083
- .pipe(map(result => result.data));
1084
- }
1085
- getAdminOrdersCount() {
1086
- return this._apiService.get(`/api/admin/orders/count`)
1087
- .pipe(map(result => result.data));
1088
- }
1089
- getAdminOrder(id) {
1090
- return this._apiService.get(`/api/admin/orders/${id}`)
1091
- .pipe(map(result => new SkOrderDetail(result.data)));
1092
- }
1093
- getMyOrders() {
1094
- return this._apiService.get(`/api/public/orders/me`)
1095
- .pipe(map(result => result.data));
1096
- }
1097
- getMyLatestOrders() {
1098
- return this._apiService.get(`/api/public/orders/me/latest`)
1099
- .pipe(map(result => result.data));
1100
- }
1101
- getOrderDetail(id) {
1102
- return this._apiService.get(`/api/public/orders/${id}`)
1103
- .pipe(map(result => new SkOrderDetail(result.data)));
1104
- }
1105
- getOrderStatus(id) {
1106
- return this._apiService.get(`/api/public/orders/${id}/status`)
1107
- .pipe(map(result => result.data));
1108
- }
1109
- getOrderLogs(id) {
1110
- return this._apiService.get(`/api/admin/orders/${id}/logs`)
1111
- .pipe(map(result => result.data || []));
1112
- }
1113
- createAdminOrder(data) {
1114
- return this._apiService.post(`/api/admin/orders`, data)
1115
- .pipe(map(result => new SkOrderDetail(result.data)));
1116
- }
1117
- addOrderLog(id, message) {
1118
- return this._apiService.post(`/api/admin/orders/${id}/logs`, { message })
1119
- .pipe(map(result => result.data || []));
1120
- }
1121
- updateAdminOrderBaseInfo(id, data) {
1122
- return this._apiService.put(`/api/admin/orders/${id}/info`, data)
1123
- .pipe(map(result => result.data));
1124
- }
1125
- updateAdminConfirmTransferPayment(id) {
1126
- return this._apiService.put(`/api/admin/orders/${id}/confirm-payment/transfer`, null)
1127
- .pipe(map(result => result.data));
1128
- }
1129
- updateAdminCancel(id) {
1130
- return this._apiService.put(`/api/admin/orders/${id}/cancel`, {})
1131
- .pipe(map(result => result.data));
1132
- }
1133
- updateAdminCancelForce(id) {
1134
- return this._apiService.put(`/api/admin/orders/${id}/cancel/force`, {})
1135
- .pipe(map(result => result.data));
1136
- }
1137
- updateAdminProcessStart(id) {
1138
- return this._apiService.put(`/api/admin/orders/${id}/process-start`, {})
1139
- .pipe(map(result => result.data));
1140
- }
1141
- updateAdminComplete(id) {
1142
- return this._apiService.put(`/api/admin/orders/${id}/complete`, {})
1143
- .pipe(map(result => result.data));
1144
- }
1145
- updateAdminPayment(id, data) {
1146
- return this._apiService.put(`/api/admin/orders/${id}/update-payment`, data)
1147
- .pipe(map(result => result.data));
1148
- }
1149
- updateAdminShippingStatus(id, data) {
1150
- return this._apiService.put(`/api/admin/orders/${id}/update-shipping-status`, data)
1151
- .pipe(map(result => result.data));
1152
- }
1153
- deleteAdminOrders(orders) {
1154
- return this._apiService.delete(`/api/admin/orders/${orders.map(order => order.id).join(',')}`);
1155
- }
1156
- cancelOrder(id, data) {
1157
- return this._apiService.put(`/api/public/orders/${id}/cancel`, data)
1158
- .pipe(map(result => result.data));
1159
- }
1160
- startProgress(id, data) {
1161
- return this._apiService.put(`/api/public/orders/${id}/progress`, data)
1162
- .pipe(map(result => result.data));
1163
- }
1164
- moveToMyOrder(id) {
1165
- return this._apiService.put(`/api/public/orders/${id}/move`, {})
1166
- .pipe(map(result => result.data));
1167
- }
1168
- getAdminShippingFeeList() {
1169
- return this._apiService.get(`/api/admin/orders/shipping-fees`)
1170
- .pipe(map(result => result.data));
1171
- }
1172
- createAdminShippingFee(data) {
1173
- return this._apiService.post(`/api/admin/orders/shipping-fees`, data)
1174
- .pipe(map(result => result.data));
1175
- }
1176
- updateAdminShippingFee(id, data) {
1177
- return this._apiService.put(`/api/admin/orders/shipping-fees/${id}`, data)
1178
- .pipe(map(result => result.data));
1179
- }
1180
- deleteAdminShippingFee(id) {
1181
- return this._apiService.delete(`/api/admin/orders/shipping-fees/${id}`)
1182
- .pipe(map(result => result.data));
1183
- }
1184
- calculateShippingFee(id, method, zipCode, serials = []) {
1185
- return this._apiService.get(`/api/public/orders/${id}/calculate-shipping-fee`, new HttpParams().append('method', method).append('zipCode', zipCode).append('serials', serials.join(',')))
1186
- .pipe(map(result => result.data || 0));
1187
- }
1188
- validateCoupon(id, serials) {
1189
- return this._apiService.post(`/api/public/orders/${id}/check-coupon`, {
1190
- couponSerials: serials
1191
- }).pipe(map(result => result.data || { discountAmount: 0, couponData: [] }));
1192
- }
1193
- }
1194
- SkOrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkOrderService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1195
- SkOrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkOrderService, providedIn: 'root' });
1196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkOrderService, decorators: [{
1197
- type: Injectable,
1198
- args: [{
1199
- providedIn: 'root'
1200
- }]
1201
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1202
-
1203
- class SkAccountService {
1204
- constructor(_apiService) {
1205
- this._apiService = _apiService;
1206
- }
1207
- getDefaultAddress() {
1208
- return this._apiService.get(`/api/public/users/me/address/default`).pipe(map(response => response.data));
1209
- }
1210
- getAddressList() {
1211
- return this._apiService.get(`/api/public/users/me/address`).pipe(map(response => response.data || []));
1212
- }
1213
- updateAddress(id, data) {
1214
- return this._apiService.put(`/api/public/users/me/address/${id}`, data).pipe(map(response => response.data));
1215
- }
1216
- deleteAddress(id) {
1217
- return this._apiService.delete(`/api/public/users/me/address/${id}`);
1218
- }
1219
- getWishList() {
1220
- return this._apiService.get(`/api/public/users/me/wishlist`).pipe(map(response => response.data || []));
1221
- }
1222
- getWishListShowBadge() {
1223
- return this._apiService.get(`/api/public/users/me/wishlist/badge`).pipe(map(response => response.data || false));
1224
- }
1225
- }
1226
- SkAccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAccountService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1227
- SkAccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAccountService, providedIn: 'root' });
1228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkAccountService, decorators: [{
1229
- type: Injectable,
1230
- args: [{
1231
- providedIn: 'root'
1232
- }]
1233
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1234
-
1235
- class SkSearchService {
1236
- constructor(_apiService) {
1237
- this._apiService = _apiService;
1238
- }
1239
- getSearchResults(params = new ApiPageableParam()) {
1240
- return this._apiService.get(`/api/public/search`, params.buildHttpParams()).pipe(map(response => response.data));
1241
- }
1242
- getSearchKeywords() {
1243
- return this._apiService.get(`/api/public/search/keywords`).pipe(map(response => response.data));
1244
- }
1245
- }
1246
- SkSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkSearchService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1247
- SkSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkSearchService, providedIn: 'root' });
1248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkSearchService, decorators: [{
1249
- type: Injectable,
1250
- args: [{
1251
- providedIn: 'root'
1252
- }]
1253
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1254
-
1255
- class SkPointService {
1256
- constructor(_apiService) {
1257
- this._apiService = _apiService;
1258
- this.apiServer = _apiService.apiServer;
1259
- }
1260
- getMyCurrentPoint() {
1261
- return this._apiService.get(`/api/public/points/me`).pipe(map(response => Number(response.data || 0)));
1262
- }
1263
- getMyPointHistory(params = new ApiPageableParam()) {
1264
- return this._apiService.getPageable(`/api/public/points/me/history`, params.buildHttpParams()).pipe(map(response => response.data), map(value => {
1265
- value.content = (value.content || []).map(item => new SkPoint(item));
1266
- return value;
1267
- }));
1268
- }
1269
- getUserCurrentPoint(userId) {
1270
- return this._apiService.get(`/api/admin/points/${userId}`).pipe(map(response => Number(response.data || 0)));
1271
- }
1272
- getUserPointHistory(userId, params = new ApiPageableParam()) {
1273
- return this._apiService.getPageable(`/api/admin/points/${userId}/history`, params.buildHttpParams()).pipe(map(response => response.data), map(value => {
1274
- value.content = (value.content || []).map(item => new SkPoint(item));
1275
- return value;
1276
- }));
1277
- }
1278
- addPointToUser(data) {
1279
- return this._apiService.put(`/api/admin/points/add`, data).pipe(map(response => Number(response.data || 0)));
1280
- }
1281
- usePointToUser(data) {
1282
- return this._apiService.put(`/api/admin/points/use`, data).pipe(map(response => Number(response.data || 0)));
1283
- }
1284
- }
1285
- SkPointService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPointService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1286
- SkPointService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPointService, providedIn: 'root' });
1287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkPointService, decorators: [{
1288
- type: Injectable,
1289
- args: [{
1290
- providedIn: 'root'
1291
- }]
1292
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1293
-
1294
- class SkCouponService {
1295
- constructor(_apiService) {
1296
- this._apiService = _apiService;
1297
- }
1298
- getCoupon(code) {
1299
- return this._apiService.get(`/api/public/coupons/${code}`).pipe(map(response => response.data));
1300
- }
1301
- getAdminCoupon(id) {
1302
- return this._apiService.get(`/api/admin/coupons/${id}`).pipe(map(response => response.data));
1303
- }
1304
- getCoupons(params = new ApiPageableParam()) {
1305
- return this._apiService.getPageable(`/api/public/coupons`, params.buildHttpParams()).pipe(map(response => response.data));
1306
- }
1307
- getCouponTickets(id) {
1308
- return this._apiService.get(`/api/admin/coupons/${id}/list`).pipe(map(response => response.data || []));
1309
- }
1310
- getAdminCoupons(params = new ApiPageableParam()) {
1311
- return this._apiService.getPageable(`/api/admin/coupons`, params.buildHttpParams()).pipe(map(response => response.data));
1312
- }
1313
- getCouponsArray(ids) {
1314
- return this._apiService.get(`/api/public/coupons/array/${ids.join(',')}`).pipe(map(response => response.data));
1315
- }
1316
- getAdminCouponsArray(ids) {
1317
- return this._apiService.get(`/api/admin/coupons/array/${ids.join(',')}`).pipe(map(response => response.data));
1318
- }
1319
- createAdminCoupon(data) {
1320
- return this._apiService.post(`/api/admin/coupons`, data).pipe(map(response => response.data));
1321
- }
1322
- updateAdminCoupon(id, data) {
1323
- return this._apiService.put(`/api/admin/coupons/${id}`, data).pipe(map(response => response.data));
1324
- }
1325
- updateAdminCouponTrigger(id, data) {
1326
- return this._apiService.put(`/api/admin/coupons/${id}/trigger`, data).pipe(map(response => response.data));
1327
- }
1328
- activateAdminCoupons(coupons) {
1329
- return this._apiService.put(`/api/admin/coupons/activate/${coupons.map(coupon => coupon.id).join(',')}`, null);
1330
- }
1331
- deactivateAdminCoupons(coupons) {
1332
- return this._apiService.put(`/api/admin/coupons/deactivate/${coupons.map(coupon => coupon.id).join(',')}`, null);
1333
- }
1334
- deleteAdminCoupons(coupons) {
1335
- return this._apiService.delete(`/api/admin/coupons/delete/${coupons.map(coupon => coupon.id).join(',')}`);
1336
- }
1337
- getAdminCouponsCount() {
1338
- return this._apiService.get('/api/admin/coupons/count')
1339
- .pipe(map(response => response.data));
1340
- }
1341
- }
1342
- SkCouponService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCouponService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1343
- SkCouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCouponService, providedIn: 'root' });
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCouponService, decorators: [{
1345
- type: Injectable,
1346
- args: [{
1347
- providedIn: 'root'
1348
- }]
1349
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1350
-
1351
- class SkCommentService {
1352
- constructor(_apiService) {
1353
- this._apiService = _apiService;
1354
- }
1355
- getDocumentComments(param = new ApiPageableParam()) {
1356
- return this._apiService.getPageable(`/api/public/document-comments`, param.buildHttpParams())
1357
- .pipe(map(response => {
1358
- response.data.content = response.data.content.map(item => new SkDocumentCommentParent(item));
1359
- return response.data;
1360
- }));
1361
- }
1362
- getDocumentComment(id) {
1363
- return this._apiService.get(`/api/public/document-comments/${id}`)
1364
- .pipe(map(response => new SkDocumentCommentParent(response.data)));
1365
- }
1366
- writeDocumentComment(data) {
1367
- return this._apiService.post(`/api/public/document-comments`, data)
1368
- .pipe(map(response => response.data));
1369
- }
1370
- updateDocumentComment(id, data) {
1371
- return this._apiService.put(`/api/public/document-comments/${id}`, data)
1372
- .pipe(map(response => response.data));
1373
- }
1374
- deleteDocumentComment(id) {
1375
- return this._apiService.delete(`/api/public/document-comments/${id}`)
1376
- .pipe(map(response => response.data));
1377
- }
1378
- }
1379
- SkCommentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCommentService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1380
- SkCommentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCommentService, providedIn: 'root' });
1381
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkCommentService, decorators: [{
1382
- type: Injectable,
1383
- args: [{
1384
- providedIn: 'root'
1385
- }]
1386
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1387
-
1388
- class SkContactService {
1389
- constructor(_apiService) {
1390
- this._apiService = _apiService;
1391
- }
1392
- writeContact(data) {
1393
- return this._apiService.post(`/api/public/contacts`, data)
1394
- .pipe(map(response => response.data));
1395
- }
1396
- getContacts(params = new ApiPageableParam()) {
1397
- return this._apiService.getPageable(`/api/admin/contacts`, params.buildHttpParams())
1398
- .pipe(map(response => response.data));
1399
- }
1400
- getContact(id) {
1401
- return this._apiService.get(`/api/admin/contacts/${id}`)
1402
- .pipe(map(response => response.data));
1403
- }
1404
- writeAnswerAdmin(id, data) {
1405
- return this._apiService.post(`/api/admin/contacts/${id}/answer`, data)
1406
- .pipe(map(response => response.data));
1407
- }
1408
- closeContact(id) {
1409
- return this._apiService.put(`/api/admin/contacts/${id}/close`, null)
1410
- .pipe(map(response => response.data));
1411
- }
1412
- }
1413
- SkContactService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkContactService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1414
- SkContactService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkContactService, providedIn: 'root' });
1415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkContactService, decorators: [{
1416
- type: Injectable,
1417
- args: [{
1418
- providedIn: 'root'
1419
- }]
1420
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1421
-
1422
- class SkEtcService {
1423
- constructor(_apiService) {
1424
- this._apiService = _apiService;
1425
- }
1426
- sendTestEmail(key, params) {
1427
- return this._apiService.get(`/api/admin/notifications/email/${key}`, params).pipe(map(response => response.data));
1428
- }
1429
- sendTestSms(key, to) {
1430
- return this._apiService.get(`/api/admin/notifications/sms/${key}`, new HttpParams().append('to', to)).pipe(map(response => response.data));
1431
- }
1432
- }
1433
- SkEtcService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkEtcService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1434
- SkEtcService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkEtcService, providedIn: 'root' });
1435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkEtcService, decorators: [{
1436
- type: Injectable,
1437
- args: [{
1438
- providedIn: 'root'
1439
- }]
1440
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1441
-
1442
- class SkStoreService {
1443
- constructor(_apiService) {
1444
- this._apiService = _apiService;
1445
- }
1446
- getStore(id) {
1447
- return this._apiService.get(`/api/public/stores/${id}`).pipe(map(response => new SkStore(response.data)));
1448
- }
1449
- getAdminStore(id) {
1450
- return this._apiService.get(`/api/admin/stores/${id}`).pipe(map(response => new SkStore(response.data)));
1451
- }
1452
- getStores(params = new ApiPageableParam()) {
1453
- return this._apiService.getPageable(`/api/public/stores`, params.buildHttpParams()).pipe(map(response => {
1454
- response.data.content = (response.data.content || []).map(item => new SkStore(item));
1455
- return response.data;
1456
- }));
1457
- }
1458
- getAdminStores(params = new ApiPageableParam()) {
1459
- return this._apiService.getPageable(`/api/admin/stores`, params.buildHttpParams()).pipe(map(response => {
1460
- response.data.content = (response.data.content || []).map(item => new SkStore(item));
1461
- return response.data;
1462
- }));
1463
- }
1464
- createAdminStore(data) {
1465
- return this._apiService.post(`/api/admin/stores`, data).pipe(map(response => response.data));
1466
- }
1467
- updateAdminStore(id, data) {
1468
- return this._apiService.put(`/api/admin/stores/${id}`, data).pipe(map(response => response.data));
1469
- }
1470
- deleteAdminStores(stores) {
1471
- return this._apiService.delete(`/api/admin/stores/delete/${stores.map(store => store.id).join(',')}`);
1472
- }
1473
- }
1474
- SkStoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkStoreService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1475
- SkStoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkStoreService, providedIn: 'root' });
1476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkStoreService, decorators: [{
1477
- type: Injectable,
1478
- args: [{
1479
- providedIn: 'root'
1480
- }]
1481
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1482
-
1483
- class SkKeywordService {
1484
- constructor(_apiService) {
1485
- this._apiService = _apiService;
1486
- }
1487
- getKeyword(id) {
1488
- return this._apiService.get(`/api/public/keywords/${id}`).pipe(map(response => response.data));
1489
- }
1490
- getAdminKeyword(id) {
1491
- return this._apiService.get(`/api/admin/keywords/${id}`).pipe(map(response => response.data));
1492
- }
1493
- getKeywords(params = new ApiPageableParam()) {
1494
- return this._apiService.getPageable(`/api/public/keywords`, params.buildHttpParams()).pipe(map(response => response.data));
1495
- }
1496
- getAllKeywords(params = new ApiPageableParam()) {
1497
- return this._apiService.get(`/api/public/keywords/all`, params.buildHttpParams()).pipe(map(response => response.data));
1498
- }
1499
- getAdminKeywords(params = new ApiPageableParam()) {
1500
- return this._apiService.getPageable(`/api/admin/keywords`, params.buildHttpParams()).pipe(map(response => response.data));
1501
- }
1502
- getAdminAllKeywords() {
1503
- return this._apiService.get(`/api/admin/keywords/all`).pipe(map(response => response.data));
1504
- }
1505
- createAdminKeyword(data) {
1506
- return this._apiService.post(`/api/admin/keywords`, data).pipe(map(response => response.data));
1507
- }
1508
- updateAdminKeyword(id, data) {
1509
- return this._apiService.put(`/api/admin/keywords/${id}`, data).pipe(map(response => response.data));
1510
- }
1511
- deleteAdminKeywords(keywords) {
1512
- return this._apiService.delete(`/api/admin/keywords/delete/${keywords.map(keyword => keyword.id).join(',')}`);
1513
- }
1514
- }
1515
- SkKeywordService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkKeywordService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1516
- SkKeywordService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkKeywordService, providedIn: 'root' });
1517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SkKeywordService, decorators: [{
1518
- type: Injectable,
1519
- args: [{
1520
- providedIn: 'root'
1521
- }]
1522
- }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
1523
-
1524
- /**
1525
- * Generated bundle index. Do not edit.
1526
- */
1527
-
1528
- export { SkAccountService, SkAffiliateService, SkAuthAdminGuard, SkAuthGuard, SkAuthService, SkBoardService, SkBrandService, SkCartService, SkCategoryService, SkCommentService, SkConfigService, SkContactService, SkCouponService, SkDocumentService, SkEtcService, SkFileService, SkKeywordService, SkOrderService, SkPointService, SkProductService, SkPromotionService, SkSearchService, SkStoreService, SkUserService };
1529
- //# sourceMappingURL=sk-front-lib-crud.mjs.map