sk-front-lib 0.17.11 → 0.17.13

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,3 +1,4 @@
1
+ import { HttpParams } from '@angular/common/http';
1
2
  import * as i0 from '@angular/core';
2
3
  import { Injectable, PLATFORM_ID, Inject } from '@angular/core';
3
4
  import { map, tap, catchError, switchMap, take } from 'rxjs/operators';
@@ -6,10 +7,35 @@ import { ApiPageableParam } from 'sk-front-lib/api';
6
7
  import { SkFile, SkUser, SkDocument, SkBoard, SkProduct, SkPromotion, SkCart, SkOrderDetail, SkPoint, SkDocumentCommentParent, SkStore } from 'sk-front-lib/model';
7
8
  import { BehaviorSubject, of } from 'rxjs';
8
9
  import * as i2 from '@angular/router';
9
- import { HttpParams } from '@angular/common/http';
10
10
  import { SkUtils } from 'sk-front-lib';
11
11
  import { isPlatformBrowser } from '@angular/common';
12
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
+ getAdminList(params = new ApiPageableParam()) {
21
+ return this._apiService.getPageable(`/api/admin/affiliate`, params.buildHttpParams()).pipe(map(response => response.data));
22
+ }
23
+ getAdminAffiliate(id) {
24
+ return this._apiService.get(`/api/admin/affiliate/${id}`).pipe(map(response => response.data));
25
+ }
26
+ updateAdminStatus(id, status) {
27
+ return this._apiService.put(`/api/admin/affiliate/update-status/${id}`, null, new HttpParams().append('status', status)).pipe(map(response => response.data));
28
+ }
29
+ }
30
+ SkAffiliateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkAffiliateService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
31
+ SkAffiliateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkAffiliateService, providedIn: 'root' });
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkAffiliateService, decorators: [{
33
+ type: Injectable,
34
+ args: [{
35
+ providedIn: 'root'
36
+ }]
37
+ }], ctorParameters: function () { return [{ type: i1.SkApiService }]; } });
38
+
13
39
  class SkFileService {
14
40
  constructor(_apiService) {
15
41
  this._apiService = _apiService;
@@ -1335,9 +1361,6 @@ class SkEtcService {
1335
1361
  sendTestSms(key, to) {
1336
1362
  return this._apiService.get(`/api/admin/notifications/sms/${key}`, new HttpParams().append('to', to)).pipe(map(response => response.data));
1337
1363
  }
1338
- registerAffiliate(data) {
1339
- return this._apiService.post(`/api/public/affiliate`, data).pipe(map(response => response.data));
1340
- }
1341
1364
  }
1342
1365
  SkEtcService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkEtcService, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1343
1366
  SkEtcService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkEtcService, providedIn: 'root' });
@@ -1434,5 +1457,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImpor
1434
1457
  * Generated bundle index. Do not edit.
1435
1458
  */
1436
1459
 
1437
- export { SkAccountService, SkAuthAdminGuard, SkAuthGuard, SkAuthService, SkBoardService, SkBrandService, SkCartService, SkCategoryService, SkCommentService, SkConfigService, SkContactService, SkCouponService, SkDocumentService, SkEtcService, SkFileService, SkKeywordService, SkOrderService, SkPointService, SkProductService, SkPromotionService, SkSearchService, SkStoreService, SkUserService };
1460
+ 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 };
1438
1461
  //# sourceMappingURL=sk-front-lib-crud.mjs.map