@rolatech/angular-services 20.2.9-beta.7 → 20.3.0-beta.2
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.
|
@@ -3,10 +3,10 @@ import { inject, viewChild, ViewContainerRef, OutputEmitterRef, EventEmitter, Ho
|
|
|
3
3
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogActions, MatDialogTitle, MatDialogContent, MatDialog } from '@angular/material/dialog';
|
|
4
4
|
import * as i1 from '@angular/material/button';
|
|
5
5
|
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
-
import { switchMap, map, take, BehaviorSubject, Observable, Subject, firstValueFrom, shareReplay as shareReplay$1 } from 'rxjs';
|
|
6
|
+
import { switchMap, map, take, BehaviorSubject, Observable, Subject, firstValueFrom, shareReplay as shareReplay$1, catchError, of } from 'rxjs';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { HttpClient, HttpParams, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
9
|
-
import { APP_CONFIG } from '@rolatech/angular-common';
|
|
9
|
+
import { APP_CONFIG, toApiRequestParams } from '@rolatech/angular-common';
|
|
10
10
|
import { Location, isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
11
11
|
import { Router, NavigationEnd, ActivatedRoute } from '@angular/router';
|
|
12
12
|
import { BreakpointObserver, Breakpoints, MediaMatcher } from '@angular/cdk/layout';
|
|
@@ -72,10 +72,10 @@ class DialogComponent {
|
|
|
72
72
|
confirm() {
|
|
73
73
|
this.close(this.result || true);
|
|
74
74
|
}
|
|
75
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
76
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
76
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: DialogComponent, isStandalone: true, selector: "rolatech-dialog", host: { listeners: { "keydown.esc": "onEsc()" } }, viewQueries: [{ propertyName: "componentRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div class=\"min-w-[320px]\">\n <h1 class=\"text-xl\" mat-dialog-title i18n>{{ data.title }}</h1>\n <mat-dialog-content>\n <div>\n <p i18n>{{ data.message }}</p>\n <ng-template #container></ng-template>\n <!-- <ng-container #container></ng-container> -->\n </div>\n </mat-dialog-content>\n <div class=\"flex-1\"></div>\n <mat-dialog-actions>\n <button mat-button (click)=\"close()\" i18n>{{ data.cancelText ? data.cancelText : 'Cancel' }}</button>\n <button mat-flat-button class=\"w-20\" (click)=\"confirm()\" i18n>{{ data.confirmText ? data.confirmText : 'Ok' }}</button>\n </mat-dialog-actions>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'rolatech-dialog', imports: [MatButtonModule, MatDialogActions, MatDialogTitle, MatDialogContent], template: "<div class=\"min-w-[320px]\">\n <h1 class=\"text-xl\" mat-dialog-title i18n>{{ data.title }}</h1>\n <mat-dialog-content>\n <div>\n <p i18n>{{ data.message }}</p>\n <ng-template #container></ng-template>\n <!-- <ng-container #container></ng-container> -->\n </div>\n </mat-dialog-content>\n <div class=\"flex-1\"></div>\n <mat-dialog-actions>\n <button mat-button (click)=\"close()\" i18n>{{ data.cancelText ? data.cancelText : 'Cancel' }}</button>\n <button mat-flat-button class=\"w-20\" (click)=\"confirm()\" i18n>{{ data.confirmText ? data.confirmText : 'Ok' }}</button>\n </mat-dialog-actions>\n</div>\n" }]
|
|
81
81
|
}], propDecorators: { onEsc: [{
|
|
@@ -94,6 +94,17 @@ class BaseService {
|
|
|
94
94
|
init() {
|
|
95
95
|
this.actionUrl = `${this.environment.baseUrl}/${this.endpoint}`;
|
|
96
96
|
}
|
|
97
|
+
params(options) {
|
|
98
|
+
if (!options) {
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
101
|
+
return Object.entries(options).reduce((acc, [key, value]) => {
|
|
102
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
103
|
+
acc[key] = value;
|
|
104
|
+
}
|
|
105
|
+
return acc;
|
|
106
|
+
}, {});
|
|
107
|
+
}
|
|
97
108
|
find(options, withCredentials = true) {
|
|
98
109
|
return this.http.get(this.actionUrl, {
|
|
99
110
|
params: options,
|
|
@@ -126,10 +137,10 @@ class BaseService {
|
|
|
126
137
|
withCredentials: true,
|
|
127
138
|
});
|
|
128
139
|
}
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
130
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
141
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
131
142
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BaseService, decorators: [{
|
|
133
144
|
type: Injectable,
|
|
134
145
|
args: [{
|
|
135
146
|
providedIn: 'root',
|
|
@@ -301,10 +312,10 @@ class ProductService extends BaseService {
|
|
|
301
312
|
withCredentials: true,
|
|
302
313
|
});
|
|
303
314
|
}
|
|
304
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
305
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
316
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductService, providedIn: 'root' });
|
|
306
317
|
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductService, decorators: [{
|
|
308
319
|
type: Injectable,
|
|
309
320
|
args: [{
|
|
310
321
|
providedIn: 'root',
|
|
@@ -377,10 +388,10 @@ class CartService extends BaseService {
|
|
|
377
388
|
withCredentials: true,
|
|
378
389
|
});
|
|
379
390
|
}
|
|
380
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
381
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CartService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
392
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CartService, providedIn: 'root' });
|
|
382
393
|
}
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CartService, decorators: [{
|
|
384
395
|
type: Injectable,
|
|
385
396
|
args: [{
|
|
386
397
|
providedIn: 'root',
|
|
@@ -423,10 +434,10 @@ class NavigationService {
|
|
|
423
434
|
}
|
|
424
435
|
return '';
|
|
425
436
|
}
|
|
426
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
427
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
438
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, providedIn: 'root' });
|
|
428
439
|
}
|
|
429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, decorators: [{
|
|
430
441
|
type: Injectable,
|
|
431
442
|
args: [{
|
|
432
443
|
providedIn: 'root',
|
|
@@ -449,10 +460,10 @@ class DialogService {
|
|
|
449
460
|
confirmed() {
|
|
450
461
|
return this.dialogRef.afterClosed().pipe(take(1), map((res) => res));
|
|
451
462
|
}
|
|
452
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
453
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
464
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogService });
|
|
454
465
|
}
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogService, decorators: [{
|
|
456
467
|
type: Injectable
|
|
457
468
|
}] });
|
|
458
469
|
|
|
@@ -473,10 +484,10 @@ class LoadingService {
|
|
|
473
484
|
async dismiss() {
|
|
474
485
|
this.isLoading = false;
|
|
475
486
|
}
|
|
476
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
477
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
487
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
488
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingService, providedIn: 'root' });
|
|
478
489
|
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingService, decorators: [{
|
|
480
491
|
type: Injectable,
|
|
481
492
|
args: [{
|
|
482
493
|
providedIn: 'root',
|
|
@@ -524,10 +535,10 @@ class MediaService extends BaseService {
|
|
|
524
535
|
getImageInfo(url) {
|
|
525
536
|
return this.http.get(`${url}?imageInfo`);
|
|
526
537
|
}
|
|
527
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
528
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MediaService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
539
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MediaService, providedIn: 'root' });
|
|
529
540
|
}
|
|
530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MediaService, decorators: [{
|
|
531
542
|
type: Injectable,
|
|
532
543
|
args: [{
|
|
533
544
|
providedIn: 'root',
|
|
@@ -558,10 +569,10 @@ class LayoutService {
|
|
|
558
569
|
setHideFooter(v) {
|
|
559
570
|
this._hideFooter.set(v);
|
|
560
571
|
}
|
|
561
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
562
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
572
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
573
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService });
|
|
563
574
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, decorators: [{
|
|
565
576
|
type: Injectable
|
|
566
577
|
}], ctorParameters: () => [] });
|
|
567
578
|
|
|
@@ -573,10 +584,10 @@ class SnackBarService {
|
|
|
573
584
|
dismiss() {
|
|
574
585
|
this.snackBar.dismiss();
|
|
575
586
|
}
|
|
576
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
577
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
587
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
588
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackBarService });
|
|
578
589
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackBarService, decorators: [{
|
|
580
591
|
type: Injectable
|
|
581
592
|
}] });
|
|
582
593
|
|
|
@@ -641,10 +652,10 @@ class SupportService {
|
|
|
641
652
|
withCredentials: true,
|
|
642
653
|
});
|
|
643
654
|
}
|
|
644
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
645
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
656
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SupportService, providedIn: 'root' });
|
|
646
657
|
}
|
|
647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SupportService, decorators: [{
|
|
648
659
|
type: Injectable,
|
|
649
660
|
args: [{
|
|
650
661
|
providedIn: 'root',
|
|
@@ -672,10 +683,10 @@ class BreadcrumbService {
|
|
|
672
683
|
relativeTo: route,
|
|
673
684
|
});
|
|
674
685
|
}
|
|
675
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
676
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
687
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BreadcrumbService, providedIn: 'root' });
|
|
677
688
|
}
|
|
678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BreadcrumbService, decorators: [{
|
|
679
690
|
type: Injectable,
|
|
680
691
|
args: [{
|
|
681
692
|
providedIn: 'root',
|
|
@@ -707,10 +718,10 @@ class SidenavService {
|
|
|
707
718
|
this.isCollaped = !this.isMobile && !this.sidenav?.opened;
|
|
708
719
|
}
|
|
709
720
|
lists() { }
|
|
710
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
711
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SidenavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
722
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SidenavService });
|
|
712
723
|
}
|
|
713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SidenavService, decorators: [{
|
|
714
725
|
type: Injectable
|
|
715
726
|
}], ctorParameters: () => [] });
|
|
716
727
|
|
|
@@ -748,10 +759,10 @@ class ThemeService {
|
|
|
748
759
|
setDarkTheme(isDarkTheme) {
|
|
749
760
|
this.darkTheme.next(isDarkTheme);
|
|
750
761
|
}
|
|
751
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
752
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
762
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
763
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, providedIn: 'root' });
|
|
753
764
|
}
|
|
754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, decorators: [{
|
|
755
766
|
type: Injectable,
|
|
756
767
|
args: [{
|
|
757
768
|
providedIn: 'root',
|
|
@@ -849,10 +860,10 @@ class OrderService extends BaseService {
|
|
|
849
860
|
withCredentials: true,
|
|
850
861
|
});
|
|
851
862
|
}
|
|
852
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
853
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
863
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
864
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderService, providedIn: 'root' });
|
|
854
865
|
}
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
866
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderService, decorators: [{
|
|
856
867
|
type: Injectable,
|
|
857
868
|
args: [{
|
|
858
869
|
providedIn: 'root',
|
|
@@ -934,10 +945,10 @@ class InventoryService extends BaseService {
|
|
|
934
945
|
adjustStocksByLocationId(data) {
|
|
935
946
|
return this.http.put(`${this.actionUrl}/levels/adjust`, data, { withCredentials: true });
|
|
936
947
|
}
|
|
937
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
938
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InventoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
949
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InventoryService, providedIn: 'root' });
|
|
939
950
|
}
|
|
940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InventoryService, decorators: [{
|
|
941
952
|
type: Injectable,
|
|
942
953
|
args: [{
|
|
943
954
|
providedIn: 'root',
|
|
@@ -949,10 +960,10 @@ class NotificationStore {
|
|
|
949
960
|
getCount() {
|
|
950
961
|
return this.$count.asObservable();
|
|
951
962
|
}
|
|
952
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
953
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
963
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
964
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationStore, providedIn: 'root' });
|
|
954
965
|
}
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationStore, decorators: [{
|
|
956
967
|
type: Injectable,
|
|
957
968
|
args: [{
|
|
958
969
|
providedIn: 'root',
|
|
@@ -1024,10 +1035,10 @@ class NotificationService {
|
|
|
1024
1035
|
return data;
|
|
1025
1036
|
}));
|
|
1026
1037
|
}
|
|
1027
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1028
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1038
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1039
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
1029
1040
|
}
|
|
1030
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1041
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, decorators: [{
|
|
1031
1042
|
type: Injectable,
|
|
1032
1043
|
args: [{
|
|
1033
1044
|
providedIn: 'root',
|
|
@@ -1059,10 +1070,10 @@ class ProductCategoryService extends BaseService {
|
|
|
1059
1070
|
withCredentials: true,
|
|
1060
1071
|
});
|
|
1061
1072
|
}
|
|
1062
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1063
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1073
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductCategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1074
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductCategoryService, providedIn: 'root' });
|
|
1064
1075
|
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductCategoryService, decorators: [{
|
|
1066
1077
|
type: Injectable,
|
|
1067
1078
|
args: [{
|
|
1068
1079
|
providedIn: 'root',
|
|
@@ -1104,10 +1115,10 @@ class NotificationTemplateService {
|
|
|
1104
1115
|
withCredentials: true,
|
|
1105
1116
|
});
|
|
1106
1117
|
}
|
|
1107
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1108
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationTemplateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1119
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationTemplateService, providedIn: 'root' });
|
|
1109
1120
|
}
|
|
1110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationTemplateService, decorators: [{
|
|
1111
1122
|
type: Injectable,
|
|
1112
1123
|
args: [{
|
|
1113
1124
|
providedIn: 'root',
|
|
@@ -1129,10 +1140,10 @@ class FulfillmentService extends BaseService {
|
|
|
1129
1140
|
withCredentials: true,
|
|
1130
1141
|
});
|
|
1131
1142
|
}
|
|
1132
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1133
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FulfillmentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1144
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FulfillmentService, providedIn: 'root' });
|
|
1134
1145
|
}
|
|
1135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FulfillmentService, decorators: [{
|
|
1136
1147
|
type: Injectable,
|
|
1137
1148
|
args: [{
|
|
1138
1149
|
providedIn: 'root',
|
|
@@ -1148,10 +1159,10 @@ class TitleService {
|
|
|
1148
1159
|
setTitle(newTitle) {
|
|
1149
1160
|
this.titleService.setTitle(`${newTitle} - ${this.environment.name}`);
|
|
1150
1161
|
}
|
|
1151
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1152
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1163
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TitleService, providedIn: 'root' });
|
|
1153
1164
|
}
|
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TitleService, decorators: [{
|
|
1155
1166
|
type: Injectable,
|
|
1156
1167
|
args: [{
|
|
1157
1168
|
providedIn: 'root',
|
|
@@ -1163,28 +1174,61 @@ class PostService extends BaseService {
|
|
|
1163
1174
|
this.endpoint = 'posts';
|
|
1164
1175
|
super.init();
|
|
1165
1176
|
}
|
|
1166
|
-
|
|
1167
|
-
return this.http.get(
|
|
1168
|
-
params: options,
|
|
1169
|
-
withCredentials
|
|
1177
|
+
list(options, withCredentials = false) {
|
|
1178
|
+
return this.http.get(this.actionUrl, {
|
|
1179
|
+
params: this.params(options),
|
|
1180
|
+
withCredentials,
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
listPublished(options) {
|
|
1184
|
+
return this.list({ ...options, status: options?.status ?? 'PUBLISHED' }, false);
|
|
1185
|
+
}
|
|
1186
|
+
getByIdOrSlug(idOrSlug, withCredentials = false) {
|
|
1187
|
+
return this.http.get(`${this.actionUrl}/${idOrSlug}`, {
|
|
1188
|
+
withCredentials,
|
|
1170
1189
|
});
|
|
1171
1190
|
}
|
|
1172
1191
|
me(options) {
|
|
1173
1192
|
return this.http.get(`${this.actionUrl}/me`, {
|
|
1174
|
-
params: options,
|
|
1193
|
+
params: this.params(options),
|
|
1175
1194
|
withCredentials: true,
|
|
1176
1195
|
});
|
|
1177
1196
|
}
|
|
1178
1197
|
merchant(options) {
|
|
1179
1198
|
return this.http.get(`${this.actionUrl}/merchant`, {
|
|
1180
|
-
params: options,
|
|
1199
|
+
params: this.params(options),
|
|
1200
|
+
withCredentials: true,
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
createPost(payload) {
|
|
1204
|
+
return this.http.post(this.actionUrl, payload, {
|
|
1205
|
+
withCredentials: true,
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
updatePost(id, payload) {
|
|
1209
|
+
return this.http.put(`${this.actionUrl}/${id}`, payload, {
|
|
1210
|
+
withCredentials: true,
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
saveDraft(id, payload = {}) {
|
|
1214
|
+
return this.http.post(`${this.actionUrl}/${id}/draft`, payload, {
|
|
1181
1215
|
withCredentials: true,
|
|
1182
1216
|
});
|
|
1183
1217
|
}
|
|
1184
|
-
|
|
1185
|
-
|
|
1218
|
+
publish(id, payload = {}) {
|
|
1219
|
+
return this.http.post(`${this.actionUrl}/${id}/publish`, payload, {
|
|
1220
|
+
withCredentials: true,
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
preview(payload) {
|
|
1224
|
+
return this.http.post(`${this.actionUrl}/preview`, payload, {
|
|
1225
|
+
withCredentials: true,
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PostService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1229
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PostService, providedIn: 'root' });
|
|
1186
1230
|
}
|
|
1187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PostService, decorators: [{
|
|
1188
1232
|
type: Injectable,
|
|
1189
1233
|
args: [{
|
|
1190
1234
|
providedIn: 'root',
|
|
@@ -1207,10 +1251,10 @@ class OrderPayoutService extends BaseService {
|
|
|
1207
1251
|
withCredentials: true,
|
|
1208
1252
|
});
|
|
1209
1253
|
}
|
|
1210
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1211
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderPayoutService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1255
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderPayoutService, providedIn: 'root' });
|
|
1212
1256
|
}
|
|
1213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderPayoutService, decorators: [{
|
|
1214
1258
|
type: Injectable,
|
|
1215
1259
|
args: [{
|
|
1216
1260
|
providedIn: 'root',
|
|
@@ -1379,10 +1423,10 @@ class ResourceService extends BaseService {
|
|
|
1379
1423
|
withCredentials: true,
|
|
1380
1424
|
});
|
|
1381
1425
|
}
|
|
1382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1383
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1426
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1427
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceService, providedIn: 'root' });
|
|
1384
1428
|
}
|
|
1385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceService, decorators: [{
|
|
1386
1430
|
type: Injectable,
|
|
1387
1431
|
args: [{
|
|
1388
1432
|
providedIn: 'root',
|
|
@@ -1404,10 +1448,10 @@ class ResourceCategoryService extends BaseService {
|
|
|
1404
1448
|
withCredentials: true,
|
|
1405
1449
|
});
|
|
1406
1450
|
}
|
|
1407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1408
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1451
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceCategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1452
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceCategoryService, providedIn: 'root' });
|
|
1409
1453
|
}
|
|
1410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceCategoryService, decorators: [{
|
|
1411
1455
|
type: Injectable,
|
|
1412
1456
|
args: [{
|
|
1413
1457
|
providedIn: 'root',
|
|
@@ -1478,10 +1522,10 @@ class BookingService extends BaseService {
|
|
|
1478
1522
|
withCredentials: true,
|
|
1479
1523
|
});
|
|
1480
1524
|
}
|
|
1481
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1482
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1525
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BookingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1526
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BookingService, providedIn: 'root' });
|
|
1483
1527
|
}
|
|
1484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BookingService, decorators: [{
|
|
1485
1529
|
type: Injectable,
|
|
1486
1530
|
args: [{
|
|
1487
1531
|
providedIn: 'root',
|
|
@@ -1493,10 +1537,10 @@ class FacilityService extends BaseService {
|
|
|
1493
1537
|
this.endpoint = 'facilities';
|
|
1494
1538
|
super.init();
|
|
1495
1539
|
}
|
|
1496
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1497
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1540
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FacilityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1541
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FacilityService, providedIn: 'root' });
|
|
1498
1542
|
}
|
|
1499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FacilityService, decorators: [{
|
|
1500
1544
|
type: Injectable,
|
|
1501
1545
|
args: [{
|
|
1502
1546
|
providedIn: 'root',
|
|
@@ -1508,10 +1552,10 @@ class AmenityService extends BaseService {
|
|
|
1508
1552
|
this.endpoint = 'resources/amenities';
|
|
1509
1553
|
super.init();
|
|
1510
1554
|
}
|
|
1511
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1512
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AmenityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1556
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AmenityService, providedIn: 'root' });
|
|
1513
1557
|
}
|
|
1514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AmenityService, decorators: [{
|
|
1515
1559
|
type: Injectable,
|
|
1516
1560
|
args: [{
|
|
1517
1561
|
providedIn: 'root',
|
|
@@ -1864,10 +1908,10 @@ class PropertyService extends BaseService {
|
|
|
1864
1908
|
deleteEpc(id) {
|
|
1865
1909
|
return this.http.delete(`${this.actionUrl}/${id}/epc`, { withCredentials: true });
|
|
1866
1910
|
}
|
|
1867
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1868
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1912
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, providedIn: 'root' });
|
|
1869
1913
|
}
|
|
1870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, decorators: [{
|
|
1871
1915
|
type: Injectable,
|
|
1872
1916
|
args: [{
|
|
1873
1917
|
providedIn: 'root',
|
|
@@ -1894,10 +1938,10 @@ class FeatureService extends BaseService {
|
|
|
1894
1938
|
withCredentials: true,
|
|
1895
1939
|
});
|
|
1896
1940
|
}
|
|
1897
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1898
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1941
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1942
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, providedIn: 'root' });
|
|
1899
1943
|
}
|
|
1900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, decorators: [{
|
|
1901
1945
|
type: Injectable,
|
|
1902
1946
|
args: [{
|
|
1903
1947
|
providedIn: 'root',
|
|
@@ -1925,10 +1969,10 @@ class PaymentService extends BaseService {
|
|
|
1925
1969
|
withCredentials: true,
|
|
1926
1970
|
});
|
|
1927
1971
|
}
|
|
1928
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1929
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1972
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1973
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, providedIn: 'root' });
|
|
1930
1974
|
}
|
|
1931
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, decorators: [{
|
|
1932
1976
|
type: Injectable,
|
|
1933
1977
|
args: [{
|
|
1934
1978
|
providedIn: 'root',
|
|
@@ -2290,10 +2334,10 @@ class OfferingService extends BaseService {
|
|
|
2290
2334
|
deleteVideo(id, videoId, y) {
|
|
2291
2335
|
return this.http.delete(`${this.actionUrl}/${id}/videos/${videoId}`, { withCredentials: true });
|
|
2292
2336
|
}
|
|
2293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2294
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2337
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2338
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, providedIn: 'root' });
|
|
2295
2339
|
}
|
|
2296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, decorators: [{
|
|
2297
2341
|
type: Injectable,
|
|
2298
2342
|
args: [{
|
|
2299
2343
|
providedIn: 'root',
|
|
@@ -2352,10 +2396,10 @@ class MembershipService extends BaseService {
|
|
|
2352
2396
|
withCredentials: true,
|
|
2353
2397
|
});
|
|
2354
2398
|
}
|
|
2355
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2356
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2400
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, providedIn: 'root' });
|
|
2357
2401
|
}
|
|
2358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, decorators: [{
|
|
2359
2403
|
type: Injectable,
|
|
2360
2404
|
args: [{
|
|
2361
2405
|
providedIn: 'root',
|
|
@@ -2413,10 +2457,10 @@ class CategoryService extends BaseService {
|
|
|
2413
2457
|
withCredentials: true,
|
|
2414
2458
|
});
|
|
2415
2459
|
}
|
|
2416
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2417
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2460
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2461
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, providedIn: 'root' });
|
|
2418
2462
|
}
|
|
2419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, decorators: [{
|
|
2420
2464
|
type: Injectable,
|
|
2421
2465
|
args: [{
|
|
2422
2466
|
providedIn: 'root',
|
|
@@ -2627,10 +2671,10 @@ class AssistantStreamService {
|
|
|
2627
2671
|
// Fallback: unknown event name -> json wrapper
|
|
2628
2672
|
return { type: 'json', data: parsed };
|
|
2629
2673
|
}
|
|
2630
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2631
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2675
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, providedIn: 'root' });
|
|
2632
2676
|
}
|
|
2633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, decorators: [{
|
|
2634
2678
|
type: Injectable,
|
|
2635
2679
|
args: [{ providedIn: 'root' }]
|
|
2636
2680
|
}] });
|
|
@@ -2896,10 +2940,10 @@ class ConversationService {
|
|
|
2896
2940
|
nextId() {
|
|
2897
2941
|
return Math.random().toString(36).slice(2) + Date.now().toString(36);
|
|
2898
2942
|
}
|
|
2899
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2900
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2944
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, providedIn: 'root' });
|
|
2901
2945
|
}
|
|
2902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, decorators: [{
|
|
2903
2947
|
type: Injectable,
|
|
2904
2948
|
args: [{ providedIn: 'root' }]
|
|
2905
2949
|
}] });
|
|
@@ -2911,10 +2955,10 @@ class ConversationInitService {
|
|
|
2911
2955
|
init(message) {
|
|
2912
2956
|
return firstValueFrom(this.http.post(`${this.environment.baseUrl}/conversations/init`, { message }, { withCredentials: true }));
|
|
2913
2957
|
}
|
|
2914
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2915
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
2958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2959
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, providedIn: 'root' });
|
|
2916
2960
|
}
|
|
2917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, decorators: [{
|
|
2918
2962
|
type: Injectable,
|
|
2919
2963
|
args: [{ providedIn: 'root' }]
|
|
2920
2964
|
}] });
|
|
@@ -2962,10 +3006,10 @@ class PropertySearchService extends BaseService {
|
|
|
2962
3006
|
isEmptyFilter(params, ignoreKeys = ['page', 'limit', 'sort']) {
|
|
2963
3007
|
return Object.entries(params).every(([k, v]) => ignoreKeys.includes(k) || v === undefined || v === null || v === '' || (Array.isArray(v) && v.length === 0));
|
|
2964
3008
|
}
|
|
2965
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2966
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3010
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, providedIn: 'root' });
|
|
2967
3011
|
}
|
|
2968
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, decorators: [{
|
|
2969
3013
|
type: Injectable,
|
|
2970
3014
|
args: [{
|
|
2971
3015
|
providedIn: 'root',
|
|
@@ -2993,10 +3037,10 @@ class TimeZoneService {
|
|
|
2993
3037
|
// proxy /worldtime/api/ip
|
|
2994
3038
|
return this.http.get(`/worldtime/api/ip`).pipe(map((r) => r.timezone));
|
|
2995
3039
|
}
|
|
2996
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2997
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3040
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3041
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, providedIn: 'root' });
|
|
2998
3042
|
}
|
|
2999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, decorators: [{
|
|
3000
3044
|
type: Injectable,
|
|
3001
3045
|
args: [{
|
|
3002
3046
|
providedIn: 'root',
|
|
@@ -3008,10 +3052,10 @@ class BillingService extends BaseService {
|
|
|
3008
3052
|
this.endpoint = 'billing';
|
|
3009
3053
|
super.init();
|
|
3010
3054
|
}
|
|
3011
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3012
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3055
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3056
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, providedIn: 'root' });
|
|
3013
3057
|
}
|
|
3014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, decorators: [{
|
|
3015
3059
|
type: Injectable,
|
|
3016
3060
|
args: [{
|
|
3017
3061
|
providedIn: 'root',
|
|
@@ -3066,10 +3110,10 @@ class InvoiceService extends BaseService {
|
|
|
3066
3110
|
withCredentials: true,
|
|
3067
3111
|
});
|
|
3068
3112
|
}
|
|
3069
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3070
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3114
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, providedIn: 'root' });
|
|
3071
3115
|
}
|
|
3072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, decorators: [{
|
|
3073
3117
|
type: Injectable,
|
|
3074
3118
|
args: [{
|
|
3075
3119
|
providedIn: 'root',
|
|
@@ -3105,10 +3149,10 @@ class PropertyHighlightsService extends BaseService {
|
|
|
3105
3149
|
deleteHighlightAt(id, index) {
|
|
3106
3150
|
return this.http.delete(`${this.actionUrl}/${id}/highlights/${index}`, { withCredentials: true });
|
|
3107
3151
|
}
|
|
3108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3109
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3153
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, providedIn: 'root' });
|
|
3110
3154
|
}
|
|
3111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, decorators: [{
|
|
3112
3156
|
type: Injectable,
|
|
3113
3157
|
args: [{ providedIn: 'root' }]
|
|
3114
3158
|
}] });
|
|
@@ -3131,10 +3175,10 @@ class FloorplanService extends BaseService {
|
|
|
3131
3175
|
withCredentials: true,
|
|
3132
3176
|
});
|
|
3133
3177
|
}
|
|
3134
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3135
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3179
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, providedIn: 'root' });
|
|
3136
3180
|
}
|
|
3137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, decorators: [{
|
|
3138
3182
|
type: Injectable,
|
|
3139
3183
|
args: [{
|
|
3140
3184
|
providedIn: 'root',
|
|
@@ -3151,10 +3195,10 @@ class PropertyStatsService extends BaseService {
|
|
|
3151
3195
|
.get(`${this.actionUrl}/stats`, { withCredentials: true })
|
|
3152
3196
|
.pipe(map((res) => res.data));
|
|
3153
3197
|
}
|
|
3154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3155
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3199
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, providedIn: 'root' });
|
|
3156
3200
|
}
|
|
3157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, decorators: [{
|
|
3158
3202
|
type: Injectable,
|
|
3159
3203
|
args: [{
|
|
3160
3204
|
providedIn: 'root',
|
|
@@ -3171,10 +3215,10 @@ class InvoiceStatsService extends BaseService {
|
|
|
3171
3215
|
.get(`${this.actionUrl}/stats`, { withCredentials: true })
|
|
3172
3216
|
.pipe(map((res) => res.data));
|
|
3173
3217
|
}
|
|
3174
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3175
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3219
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, providedIn: 'root' });
|
|
3176
3220
|
}
|
|
3177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, decorators: [{
|
|
3178
3222
|
type: Injectable,
|
|
3179
3223
|
args: [{
|
|
3180
3224
|
providedIn: 'root',
|
|
@@ -3366,10 +3410,10 @@ class PropertyOfferService extends BaseService {
|
|
|
3366
3410
|
isEmptyFilter(params, ignoreKeys = ['page', 'limit', 'sort']) {
|
|
3367
3411
|
return Object.entries(params).every(([k, v]) => ignoreKeys.includes(k) || v === undefined || v === null || v === '' || (Array.isArray(v) && v.length === 0));
|
|
3368
3412
|
}
|
|
3369
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3370
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3414
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, providedIn: 'root' });
|
|
3371
3415
|
}
|
|
3372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, decorators: [{
|
|
3373
3417
|
type: Injectable,
|
|
3374
3418
|
args: [{
|
|
3375
3419
|
providedIn: 'root',
|
|
@@ -3382,10 +3426,10 @@ class PropertyViewingService extends BaseService {
|
|
|
3382
3426
|
this.endpoint = 'properties';
|
|
3383
3427
|
super.init();
|
|
3384
3428
|
}
|
|
3385
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3386
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3430
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, providedIn: 'root' });
|
|
3387
3431
|
}
|
|
3388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, decorators: [{
|
|
3389
3433
|
type: Injectable,
|
|
3390
3434
|
args: [{
|
|
3391
3435
|
providedIn: 'root',
|
|
@@ -3522,10 +3566,10 @@ class AutomationService extends BaseService {
|
|
|
3522
3566
|
scheduleId,
|
|
3523
3567
|
});
|
|
3524
3568
|
}
|
|
3525
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3526
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3570
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, providedIn: 'root' });
|
|
3527
3571
|
}
|
|
3528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, decorators: [{
|
|
3529
3573
|
type: Injectable,
|
|
3530
3574
|
args: [{
|
|
3531
3575
|
providedIn: 'root',
|
|
@@ -3537,10 +3581,10 @@ class I18nLocaleService {
|
|
|
3537
3581
|
// integrate with Transloco/ngx-translate if you use it:
|
|
3538
3582
|
// set from your i18n library whenever language changes
|
|
3539
3583
|
lang = signal(navigator.language || 'en-GB', ...(ngDevMode ? [{ debugName: "lang" }] : []));
|
|
3540
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3541
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3584
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3585
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, providedIn: 'root' });
|
|
3542
3586
|
}
|
|
3543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, decorators: [{
|
|
3544
3588
|
type: Injectable,
|
|
3545
3589
|
args: [{ providedIn: 'root' }]
|
|
3546
3590
|
}] });
|
|
@@ -3569,10 +3613,10 @@ class EnumApiClient {
|
|
|
3569
3613
|
});
|
|
3570
3614
|
return this.http.get(`${this.baseUrl}/${resource}/enums`, { headers }).pipe(map((res) => res.data));
|
|
3571
3615
|
}
|
|
3572
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3573
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3617
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, providedIn: 'root' });
|
|
3574
3618
|
}
|
|
3575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, decorators: [{
|
|
3576
3620
|
type: Injectable,
|
|
3577
3621
|
args: [{ providedIn: 'root' }]
|
|
3578
3622
|
}] });
|
|
@@ -3595,10 +3639,10 @@ class EnumCacheService {
|
|
|
3595
3639
|
clear() {
|
|
3596
3640
|
this.cache.clear();
|
|
3597
3641
|
}
|
|
3598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3599
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3642
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3643
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, providedIn: 'root' });
|
|
3600
3644
|
}
|
|
3601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, decorators: [{
|
|
3602
3646
|
type: Injectable,
|
|
3603
3647
|
args: [{ providedIn: 'root' }]
|
|
3604
3648
|
}] });
|
|
@@ -3641,10 +3685,10 @@ class InvoiceLineService extends BaseService {
|
|
|
3641
3685
|
withCredentials: true,
|
|
3642
3686
|
});
|
|
3643
3687
|
}
|
|
3644
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3645
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3688
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3689
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, providedIn: 'root' });
|
|
3646
3690
|
}
|
|
3647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, decorators: [{
|
|
3648
3692
|
type: Injectable,
|
|
3649
3693
|
args: [{
|
|
3650
3694
|
providedIn: 'root',
|
|
@@ -3792,174 +3836,1361 @@ class PropertyOfferCounterService extends BaseService {
|
|
|
3792
3836
|
release(id) {
|
|
3793
3837
|
return this.http.post(`${this.actionUrl}/offers/${id}/edit-lock/release`, { withCredentials: true });
|
|
3794
3838
|
}
|
|
3795
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3796
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3840
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, providedIn: 'root' });
|
|
3797
3841
|
}
|
|
3798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, decorators: [{
|
|
3799
3843
|
type: Injectable,
|
|
3800
3844
|
args: [{
|
|
3801
3845
|
providedIn: 'root',
|
|
3802
3846
|
}]
|
|
3803
3847
|
}] });
|
|
3804
3848
|
|
|
3805
|
-
class
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3849
|
+
class ApplicationService extends BaseService {
|
|
3850
|
+
init() {
|
|
3851
|
+
this.endpoint = 'platform/applications';
|
|
3852
|
+
super.init();
|
|
3853
|
+
}
|
|
3854
|
+
findApplications(options) {
|
|
3855
|
+
return this.http
|
|
3856
|
+
.get(this.actionUrl, {
|
|
3857
|
+
params: toApiRequestParams(options),
|
|
3858
|
+
withCredentials: true,
|
|
3859
|
+
})
|
|
3860
|
+
.pipe(map((response) => this.toApplicationPage(response.data)));
|
|
3861
|
+
}
|
|
3862
|
+
findApplicationById(id) {
|
|
3863
|
+
return this.http
|
|
3864
|
+
.get(`${this.actionUrl}/${id}`, {
|
|
3865
|
+
withCredentials: true,
|
|
3866
|
+
})
|
|
3867
|
+
.pipe(map((response) => response.data));
|
|
3868
|
+
}
|
|
3869
|
+
createApplication(request) {
|
|
3870
|
+
return this.http
|
|
3871
|
+
.post(this.actionUrl, request, {
|
|
3872
|
+
withCredentials: true,
|
|
3873
|
+
})
|
|
3874
|
+
.pipe(map((response) => response.data));
|
|
3875
|
+
}
|
|
3876
|
+
updateApplication(id, request) {
|
|
3877
|
+
return this.http
|
|
3878
|
+
.put(`${this.actionUrl}/${id}`, request, {
|
|
3879
|
+
withCredentials: true,
|
|
3880
|
+
})
|
|
3881
|
+
.pipe(map((response) => response.data));
|
|
3882
|
+
}
|
|
3883
|
+
findApplicationOrganizations(id, options) {
|
|
3884
|
+
return this.http
|
|
3885
|
+
.get(`${this.actionUrl}/${id}/organizations`, {
|
|
3886
|
+
params: toApiRequestParams(options),
|
|
3887
|
+
withCredentials: true,
|
|
3888
|
+
})
|
|
3889
|
+
.pipe(map((response) => this.toOrganizationPage(response.data)));
|
|
3890
|
+
}
|
|
3891
|
+
resetOrganizationOwnerPassword(id, organizationId) {
|
|
3892
|
+
return this.http
|
|
3893
|
+
.post(`${this.actionUrl}/${id}/organizations/${organizationId}/owner/password/reset-request`, {}, {
|
|
3894
|
+
withCredentials: true,
|
|
3895
|
+
})
|
|
3896
|
+
.pipe(map(() => undefined));
|
|
3897
|
+
}
|
|
3898
|
+
toApplicationPage(payload) {
|
|
3899
|
+
if (Array.isArray(payload)) {
|
|
3900
|
+
return {
|
|
3901
|
+
items: payload,
|
|
3902
|
+
total: payload.length,
|
|
3903
|
+
};
|
|
3811
3904
|
}
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3905
|
+
return {
|
|
3906
|
+
items: payload.items ?? [],
|
|
3907
|
+
total: payload.total ?? payload.items?.length ?? 0,
|
|
3908
|
+
};
|
|
3909
|
+
}
|
|
3910
|
+
toOrganizationPage(payload) {
|
|
3911
|
+
if (Array.isArray(payload)) {
|
|
3912
|
+
return {
|
|
3913
|
+
items: payload,
|
|
3914
|
+
total: payload.length,
|
|
3915
|
+
};
|
|
3916
|
+
}
|
|
3917
|
+
return {
|
|
3918
|
+
items: payload.items ?? [],
|
|
3919
|
+
total: payload.total ?? payload.items?.length ?? 0,
|
|
3920
|
+
};
|
|
3819
3921
|
}
|
|
3820
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3821
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
3922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
3923
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, providedIn: 'root' });
|
|
3822
3924
|
}
|
|
3823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, decorators: [{
|
|
3824
3926
|
type: Injectable,
|
|
3825
3927
|
args: [{
|
|
3826
3928
|
providedIn: 'root',
|
|
3827
3929
|
}]
|
|
3828
3930
|
}] });
|
|
3829
3931
|
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3932
|
+
class PlatformEndpointService extends BaseService {
|
|
3933
|
+
init() {
|
|
3934
|
+
this.endpoint = 'platform/endpoints';
|
|
3935
|
+
super.init();
|
|
3936
|
+
}
|
|
3937
|
+
findEndpoints(options) {
|
|
3938
|
+
return this.http
|
|
3939
|
+
.get(this.actionUrl, {
|
|
3940
|
+
params: toApiRequestParams(options),
|
|
3941
|
+
withCredentials: true,
|
|
3942
|
+
})
|
|
3943
|
+
.pipe(map((response) => this.toPage(response)));
|
|
3944
|
+
}
|
|
3945
|
+
findEndpointById(id) {
|
|
3946
|
+
return this.http
|
|
3947
|
+
.get(`${this.actionUrl}/${id}`, {
|
|
3948
|
+
withCredentials: true,
|
|
3949
|
+
})
|
|
3950
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
3951
|
+
}
|
|
3952
|
+
toPage(payload) {
|
|
3953
|
+
if (Array.isArray(payload)) {
|
|
3954
|
+
return {
|
|
3955
|
+
items: payload.map((item) => this.toSummary(item)),
|
|
3956
|
+
total: payload.length,
|
|
3957
|
+
};
|
|
3842
3958
|
}
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3959
|
+
const data = payload?.data;
|
|
3960
|
+
if (Array.isArray(data)) {
|
|
3961
|
+
return {
|
|
3962
|
+
items: data.map((item) => this.toSummary(item)),
|
|
3963
|
+
total: payload?.meta?.pagination?.count ?? data.length,
|
|
3964
|
+
};
|
|
3965
|
+
}
|
|
3966
|
+
const value = this.asRecord(data);
|
|
3967
|
+
const items = Array.isArray(value['items']) ? value['items'] : [];
|
|
3968
|
+
return {
|
|
3969
|
+
items: items.map((item) => this.toSummary(item)),
|
|
3970
|
+
total: this.readNumber(value['total']) ?? payload?.meta?.pagination?.count ?? items.length,
|
|
3971
|
+
};
|
|
3849
3972
|
}
|
|
3850
|
-
|
|
3851
|
-
this.
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3973
|
+
toSummary(payload) {
|
|
3974
|
+
const value = this.asRecord(payload);
|
|
3975
|
+
const permissions = this.readStringArray(value['permissions']) ?? this.readStringArray(value['permissionIds']) ?? [];
|
|
3976
|
+
const fallbackName = [this.readOptionalString(value['method']), this.readOptionalString(value['path'])].filter(Boolean).join(' ') ||
|
|
3977
|
+
this.readString(value['id']) ||
|
|
3978
|
+
'Unnamed endpoint';
|
|
3979
|
+
return {
|
|
3980
|
+
id: this.readString(value['id']) || this.readString(value['endpointId']),
|
|
3981
|
+
code: this.readOptionalString(value['code']),
|
|
3982
|
+
name: this.readOptionalString(value['name']) ?? this.readOptionalString(value['displayName']) ?? fallbackName,
|
|
3983
|
+
resource: this.readOptionalString(value['resource']),
|
|
3984
|
+
path: this.readOptionalString(value['path']) ?? this.readOptionalString(value['url']),
|
|
3985
|
+
method: this.readOptionalString(value['method']),
|
|
3986
|
+
serviceName: this.readOptionalString(value['serviceName']) ??
|
|
3987
|
+
this.readOptionalString(value['service']) ??
|
|
3988
|
+
this.readOptionalString(value['module']),
|
|
3989
|
+
authType: this.readOptionalString(value['authType']) ??
|
|
3990
|
+
this.readOptionalString(value['authenticationType']) ??
|
|
3991
|
+
this.readOptionalString(value['security']),
|
|
3992
|
+
status: this.readOptionalString(value['status']) ?? (this.readBoolean(value['enabled']) ? 'ENABLED' : 'DISABLED'),
|
|
3993
|
+
enabled: this.readBoolean(value['enabled']),
|
|
3994
|
+
publicAccess: this.readBoolean(value['publicAccess']) || this.readBoolean(value['public']) || this.readBoolean(value['anonymousAccess']),
|
|
3995
|
+
permissionCount: this.readNumber(value['permissionCount']) ?? permissions.length,
|
|
3996
|
+
updatedAt: this.readOptionalString(value['updatedAt']),
|
|
3997
|
+
};
|
|
3998
|
+
}
|
|
3999
|
+
toDetail(payload) {
|
|
4000
|
+
const value = this.asRecord(payload);
|
|
4001
|
+
return {
|
|
4002
|
+
...this.toSummary(payload),
|
|
4003
|
+
description: this.readOptionalString(value['description']),
|
|
4004
|
+
uri: this.readOptionalString(value['uri']) ?? this.readOptionalString(value['url']),
|
|
4005
|
+
scopes: this.readStringArray(value['scopes']) ?? this.readStringArray(value['scope']) ?? [],
|
|
4006
|
+
roles: this.readStringArray(value['roles']) ?? this.readStringArray(value['roleCodes']) ?? [],
|
|
4007
|
+
attributes: this.extractAttributes(value, [
|
|
4008
|
+
'id',
|
|
4009
|
+
'endpointId',
|
|
4010
|
+
'code',
|
|
4011
|
+
'name',
|
|
4012
|
+
'displayName',
|
|
4013
|
+
'resource',
|
|
4014
|
+
'path',
|
|
4015
|
+
'url',
|
|
4016
|
+
'uri',
|
|
4017
|
+
'method',
|
|
4018
|
+
'serviceName',
|
|
4019
|
+
'service',
|
|
4020
|
+
'module',
|
|
4021
|
+
'authType',
|
|
4022
|
+
'authenticationType',
|
|
4023
|
+
'security',
|
|
4024
|
+
'status',
|
|
4025
|
+
'enabled',
|
|
4026
|
+
'publicAccess',
|
|
4027
|
+
'public',
|
|
4028
|
+
'anonymousAccess',
|
|
4029
|
+
'permissionCount',
|
|
4030
|
+
'permissions',
|
|
4031
|
+
'permissionIds',
|
|
4032
|
+
'updatedAt',
|
|
4033
|
+
'description',
|
|
4034
|
+
'scopes',
|
|
4035
|
+
'scope',
|
|
4036
|
+
'roles',
|
|
4037
|
+
'roleCodes',
|
|
4038
|
+
]),
|
|
4039
|
+
};
|
|
4040
|
+
}
|
|
4041
|
+
readStringArray(value) {
|
|
4042
|
+
if (Array.isArray(value)) {
|
|
4043
|
+
return value.filter((item) => typeof item === 'string' && item.length > 0);
|
|
4044
|
+
}
|
|
4045
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
4046
|
+
return value
|
|
4047
|
+
.split(',')
|
|
4048
|
+
.map((item) => item.trim())
|
|
4049
|
+
.filter(Boolean);
|
|
4050
|
+
}
|
|
4051
|
+
return null;
|
|
4052
|
+
}
|
|
4053
|
+
readNumber(value) {
|
|
4054
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
4055
|
+
}
|
|
4056
|
+
readBoolean(value) {
|
|
4057
|
+
return value === true || value === 'true' || value === 'TRUE' || value === 1;
|
|
4058
|
+
}
|
|
4059
|
+
readString(value) {
|
|
4060
|
+
return typeof value === 'string' ? value : '';
|
|
4061
|
+
}
|
|
4062
|
+
readOptionalString(value) {
|
|
4063
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
4064
|
+
}
|
|
4065
|
+
asRecord(value) {
|
|
4066
|
+
return value && typeof value === 'object' ? value : {};
|
|
4067
|
+
}
|
|
4068
|
+
unwrapData(payload) {
|
|
4069
|
+
if (payload && typeof payload === 'object' && 'data' in payload) {
|
|
4070
|
+
return payload.data;
|
|
3856
4071
|
}
|
|
4072
|
+
return payload;
|
|
4073
|
+
}
|
|
4074
|
+
extractAttributes(value, knownKeys) {
|
|
4075
|
+
const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
|
|
4076
|
+
return entries.length ? Object.fromEntries(entries) : null;
|
|
3857
4077
|
}
|
|
3858
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3859
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
4078
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4079
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, providedIn: 'root' });
|
|
3860
4080
|
}
|
|
3861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
4081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, decorators: [{
|
|
3862
4082
|
type: Injectable,
|
|
3863
|
-
args: [{
|
|
4083
|
+
args: [{
|
|
4084
|
+
providedIn: 'root',
|
|
4085
|
+
}]
|
|
3864
4086
|
}] });
|
|
3865
4087
|
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
'api.primecasa.co.uk', // prod backend
|
|
3871
|
-
]);
|
|
3872
|
-
const acceptLanguageInterceptor = (req, next) => {
|
|
3873
|
-
const lang = (inject(LanguageService).acceptLanguage() ?? 'en');
|
|
3874
|
-
const url = req.url;
|
|
3875
|
-
const isAbsolute = /^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(url);
|
|
3876
|
-
// Ignore static assets and obvious 3rd-party calls early
|
|
3877
|
-
if (!isAbsolute && url.startsWith('/assets')) {
|
|
3878
|
-
return next(req);
|
|
4088
|
+
class PlatformServiceRegistryService extends BaseService {
|
|
4089
|
+
init() {
|
|
4090
|
+
this.endpoint = 'platform/service-registry';
|
|
4091
|
+
super.init();
|
|
3879
4092
|
}
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
4093
|
+
findServices(options) {
|
|
4094
|
+
return this.http
|
|
4095
|
+
.get(this.actionUrl, {
|
|
4096
|
+
params: toApiRequestParams(options),
|
|
4097
|
+
withCredentials: true,
|
|
4098
|
+
})
|
|
4099
|
+
.pipe(map((response) => this.toPage(response)));
|
|
3885
4100
|
}
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
4101
|
+
findServiceById(id) {
|
|
4102
|
+
return this.http
|
|
4103
|
+
.get(`${this.actionUrl}/${id}`, {
|
|
4104
|
+
withCredentials: true,
|
|
4105
|
+
})
|
|
4106
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4107
|
+
}
|
|
4108
|
+
createService(request) {
|
|
4109
|
+
return this.http
|
|
4110
|
+
.post(this.actionUrl, request, {
|
|
4111
|
+
withCredentials: true,
|
|
4112
|
+
})
|
|
4113
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4114
|
+
}
|
|
4115
|
+
updateService(id, request) {
|
|
4116
|
+
return this.http
|
|
4117
|
+
.put(`${this.actionUrl}/${id}`, request, {
|
|
4118
|
+
withCredentials: true,
|
|
4119
|
+
})
|
|
4120
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4121
|
+
}
|
|
4122
|
+
deleteService(id) {
|
|
4123
|
+
return this.http.delete(`${this.actionUrl}/${id}`, {
|
|
4124
|
+
withCredentials: true,
|
|
4125
|
+
});
|
|
4126
|
+
}
|
|
4127
|
+
toPage(payload) {
|
|
4128
|
+
if (Array.isArray(payload)) {
|
|
4129
|
+
return {
|
|
4130
|
+
items: payload.map((item) => this.toSummary(item)),
|
|
4131
|
+
total: payload.length,
|
|
4132
|
+
};
|
|
3891
4133
|
}
|
|
3892
|
-
|
|
3893
|
-
|
|
4134
|
+
const data = payload?.data;
|
|
4135
|
+
if (Array.isArray(data)) {
|
|
4136
|
+
return {
|
|
4137
|
+
items: data.map((item) => this.toSummary(item)),
|
|
4138
|
+
total: payload?.meta?.pagination?.count ?? data.length,
|
|
4139
|
+
};
|
|
3894
4140
|
}
|
|
4141
|
+
const value = this.asRecord(data);
|
|
4142
|
+
const items = Array.isArray(value['items']) ? value['items'] : [];
|
|
4143
|
+
return {
|
|
4144
|
+
items: items.map((item) => this.toSummary(item)),
|
|
4145
|
+
total: this.readNumber(value['total']) ?? payload?.meta?.pagination?.count ?? items.length,
|
|
4146
|
+
};
|
|
3895
4147
|
}
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
4148
|
+
toSummary(payload) {
|
|
4149
|
+
const value = this.asRecord(payload);
|
|
4150
|
+
const fallbackName = this.readString(value['id']) || 'Unnamed service';
|
|
4151
|
+
return {
|
|
4152
|
+
id: this.readString(value['id']) || this.readString(value['serviceId']),
|
|
4153
|
+
code: this.readOptionalString(value['code']) ?? this.readOptionalString(value['serviceCode']),
|
|
4154
|
+
name: this.readOptionalString(value['name']) ?? this.readOptionalString(value['serviceName']) ?? fallbackName,
|
|
4155
|
+
namespace: this.readOptionalString(value['namespace']),
|
|
4156
|
+
serviceType: this.readOptionalString(value['serviceType']) ?? this.readOptionalString(value['type']),
|
|
4157
|
+
version: this.readOptionalString(value['version']),
|
|
4158
|
+
baseUrl: this.readOptionalString(value['baseUrl']) ?? this.readOptionalString(value['url']),
|
|
4159
|
+
healthStatus: this.readOptionalString(value['healthStatus']) ?? this.readOptionalString(value['health']),
|
|
4160
|
+
status: this.readOptionalString(value['status']) ?? (this.readBoolean(value['enabled']) ? 'ENABLED' : 'DISABLED'),
|
|
4161
|
+
enabled: this.readBoolean(value['enabled']),
|
|
4162
|
+
instanceCount: this.readNumber(value['instanceCount']) ?? this.readNumber(value['instances']) ?? 0,
|
|
4163
|
+
endpointCount: this.readNumber(value['endpointCount']) ?? this.readNumber(value['routes']) ?? 0,
|
|
4164
|
+
updatedAt: this.readOptionalString(value['updatedAt']),
|
|
4165
|
+
};
|
|
3899
4166
|
}
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
4167
|
+
toDetail(payload) {
|
|
4168
|
+
const value = this.asRecord(payload);
|
|
4169
|
+
return {
|
|
4170
|
+
...this.toSummary(payload),
|
|
4171
|
+
description: this.readOptionalString(value['description']),
|
|
4172
|
+
tags: this.readStringArray(value['tags']) ?? [],
|
|
4173
|
+
attributes: this.extractAttributes(value, [
|
|
4174
|
+
'id',
|
|
4175
|
+
'serviceId',
|
|
4176
|
+
'code',
|
|
4177
|
+
'serviceCode',
|
|
4178
|
+
'name',
|
|
4179
|
+
'serviceName',
|
|
4180
|
+
'namespace',
|
|
4181
|
+
'serviceType',
|
|
4182
|
+
'type',
|
|
4183
|
+
'version',
|
|
4184
|
+
'baseUrl',
|
|
4185
|
+
'url',
|
|
4186
|
+
'healthStatus',
|
|
4187
|
+
'health',
|
|
4188
|
+
'status',
|
|
4189
|
+
'enabled',
|
|
4190
|
+
'instanceCount',
|
|
4191
|
+
'instances',
|
|
4192
|
+
'endpointCount',
|
|
4193
|
+
'routes',
|
|
4194
|
+
'updatedAt',
|
|
4195
|
+
'description',
|
|
4196
|
+
'tags',
|
|
4197
|
+
]),
|
|
4198
|
+
};
|
|
3908
4199
|
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
4200
|
+
readStringArray(value) {
|
|
4201
|
+
if (!Array.isArray(value)) {
|
|
4202
|
+
return null;
|
|
4203
|
+
}
|
|
4204
|
+
return value.filter((item) => typeof item === 'string' && item.length > 0);
|
|
4205
|
+
}
|
|
4206
|
+
readNumber(value) {
|
|
4207
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
4208
|
+
}
|
|
4209
|
+
readBoolean(value) {
|
|
4210
|
+
return value === true || value === 'true' || value === 'TRUE' || value === 1;
|
|
4211
|
+
}
|
|
4212
|
+
readString(value) {
|
|
4213
|
+
return typeof value === 'string' ? value : '';
|
|
4214
|
+
}
|
|
4215
|
+
readOptionalString(value) {
|
|
4216
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
4217
|
+
}
|
|
4218
|
+
asRecord(value) {
|
|
4219
|
+
return value && typeof value === 'object' ? value : {};
|
|
4220
|
+
}
|
|
4221
|
+
unwrapData(payload) {
|
|
4222
|
+
if (payload && typeof payload === 'object' && 'data' in payload) {
|
|
4223
|
+
return payload.data;
|
|
4224
|
+
}
|
|
4225
|
+
return payload;
|
|
4226
|
+
}
|
|
4227
|
+
extractAttributes(value, knownKeys) {
|
|
4228
|
+
const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
|
|
4229
|
+
return entries.length ? Object.fromEntries(entries) : null;
|
|
4230
|
+
}
|
|
4231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4232
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, providedIn: 'root' });
|
|
3928
4233
|
}
|
|
3929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3930
|
-
type:
|
|
4234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, decorators: [{
|
|
4235
|
+
type: Injectable,
|
|
3931
4236
|
args: [{
|
|
3932
|
-
|
|
4237
|
+
providedIn: 'root',
|
|
3933
4238
|
}]
|
|
3934
4239
|
}] });
|
|
3935
4240
|
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
(
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
4241
|
+
class PlatformAuthClientService extends BaseService {
|
|
4242
|
+
init() {
|
|
4243
|
+
this.endpoint = 'platform/clients';
|
|
4244
|
+
super.init();
|
|
4245
|
+
}
|
|
4246
|
+
findClients(options) {
|
|
4247
|
+
return this.http
|
|
4248
|
+
.get(this.actionUrl, {
|
|
4249
|
+
params: toApiRequestParams(options),
|
|
4250
|
+
withCredentials: true,
|
|
4251
|
+
})
|
|
4252
|
+
.pipe(map((response) => this.toPage(response)));
|
|
4253
|
+
}
|
|
4254
|
+
findClientById(id) {
|
|
4255
|
+
return this.http
|
|
4256
|
+
.get(`${this.actionUrl}/${id}`, {
|
|
4257
|
+
withCredentials: true,
|
|
4258
|
+
})
|
|
4259
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4260
|
+
}
|
|
4261
|
+
createClient(request) {
|
|
4262
|
+
return this.http
|
|
4263
|
+
.post(this.actionUrl, request, {
|
|
4264
|
+
withCredentials: true,
|
|
4265
|
+
})
|
|
4266
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4267
|
+
}
|
|
4268
|
+
updateClient(id, request) {
|
|
4269
|
+
return this.http
|
|
4270
|
+
.put(`${this.actionUrl}/${id}`, request, {
|
|
4271
|
+
withCredentials: true,
|
|
4272
|
+
})
|
|
4273
|
+
.pipe(map((response) => this.toDetail(this.unwrapData(response))));
|
|
4274
|
+
}
|
|
4275
|
+
deleteClient(id) {
|
|
4276
|
+
return this.http.delete(`${this.actionUrl}/${id}`, {
|
|
4277
|
+
withCredentials: true,
|
|
4278
|
+
});
|
|
4279
|
+
}
|
|
4280
|
+
resetClientSecret(id) {
|
|
4281
|
+
return this.http
|
|
4282
|
+
.post(`${this.actionUrl}/${id}/reset`, {}, { withCredentials: true })
|
|
4283
|
+
.pipe(map((response) => this.toSecretReset(this.unwrapData(response))));
|
|
4284
|
+
}
|
|
4285
|
+
toPage(payload) {
|
|
4286
|
+
if (Array.isArray(payload)) {
|
|
4287
|
+
return {
|
|
4288
|
+
items: payload.map((item) => this.toSummary(item)),
|
|
4289
|
+
total: payload.length,
|
|
4290
|
+
};
|
|
4291
|
+
}
|
|
4292
|
+
const data = payload?.data;
|
|
4293
|
+
if (Array.isArray(data)) {
|
|
4294
|
+
return {
|
|
4295
|
+
items: data.map((item) => this.toSummary(item)),
|
|
4296
|
+
total: payload?.meta?.pagination?.count ?? data.length,
|
|
4297
|
+
};
|
|
4298
|
+
}
|
|
4299
|
+
const value = this.asRecord(data);
|
|
4300
|
+
const items = Array.isArray(value['items']) ? value['items'] : [];
|
|
4301
|
+
return {
|
|
4302
|
+
items: items.map((item) => this.toSummary(item)),
|
|
4303
|
+
total: this.readNumber(value['total']) ?? payload?.meta?.pagination?.count ?? items.length,
|
|
4304
|
+
};
|
|
4305
|
+
}
|
|
4306
|
+
toSummary(payload) {
|
|
4307
|
+
const value = this.asRecord(payload);
|
|
4308
|
+
const fallbackName = this.readString(value['clientId']) || 'Unnamed client';
|
|
4309
|
+
return {
|
|
4310
|
+
id: this.readString(value['id']),
|
|
4311
|
+
clientId: this.readString(value['clientId']) || this.readString(value['id']),
|
|
4312
|
+
name: this.readOptionalString(value['name']) ?? this.readOptionalString(value['clientName']) ?? fallbackName,
|
|
4313
|
+
description: this.readOptionalString(value['description']),
|
|
4314
|
+
status: this.readOptionalString(value['status']) ?? (this.readBoolean(value['enabled']) ? 'ENABLED' : 'DISABLED'),
|
|
4315
|
+
enabled: this.readBoolean(value['enabled']),
|
|
4316
|
+
confidential: this.readBoolean(value['confidential']) || this.readBoolean(value['secretRequired']),
|
|
4317
|
+
grantTypes: this.readStringArray(value['grantTypes']) ?? [],
|
|
4318
|
+
redirectUris: this.readStringArray(value['redirectUris']) ?? [],
|
|
4319
|
+
scopes: this.readStringArray(value['scopes']) ?? this.readStringArray(value['scope']) ?? [],
|
|
4320
|
+
updatedAt: this.readOptionalString(value['updatedAt']),
|
|
4321
|
+
createdAt: this.readOptionalString(value['createdAt']),
|
|
4322
|
+
};
|
|
4323
|
+
}
|
|
4324
|
+
toDetail(payload) {
|
|
4325
|
+
const value = this.asRecord(payload);
|
|
4326
|
+
return {
|
|
4327
|
+
...this.toSummary(payload),
|
|
4328
|
+
appId: this.readOptionalString(value['appId']),
|
|
4329
|
+
appSecret: this.readOptionalString(value['appSecret']),
|
|
4330
|
+
clientSecret: this.readOptionalString(value['clientSecret']),
|
|
4331
|
+
permissions: this.readStringArray(value['permissions']) ?? this.readStringArray(value['permissionIds']) ?? [],
|
|
4332
|
+
attributes: this.extractAttributes(value, [
|
|
4333
|
+
'id',
|
|
4334
|
+
'clientId',
|
|
4335
|
+
'name',
|
|
4336
|
+
'clientName',
|
|
4337
|
+
'description',
|
|
4338
|
+
'status',
|
|
4339
|
+
'enabled',
|
|
4340
|
+
'confidential',
|
|
4341
|
+
'secretRequired',
|
|
4342
|
+
'grantTypes',
|
|
4343
|
+
'redirectUris',
|
|
4344
|
+
'scopes',
|
|
4345
|
+
'scope',
|
|
4346
|
+
'updatedAt',
|
|
4347
|
+
'createdAt',
|
|
4348
|
+
'appId',
|
|
4349
|
+
'appSecret',
|
|
4350
|
+
'clientSecret',
|
|
4351
|
+
'permissions',
|
|
4352
|
+
'permissionIds',
|
|
4353
|
+
]),
|
|
4354
|
+
};
|
|
4355
|
+
}
|
|
4356
|
+
toSecretReset(payload) {
|
|
4357
|
+
const value = this.asRecord(payload);
|
|
4358
|
+
return {
|
|
4359
|
+
clientSecret: this.readString(value['clientSecret']),
|
|
4360
|
+
updatedAt: this.readOptionalString(value['updatedAt']),
|
|
4361
|
+
};
|
|
4362
|
+
}
|
|
4363
|
+
readStringArray(value) {
|
|
4364
|
+
if (Array.isArray(value)) {
|
|
4365
|
+
return value.filter((item) => typeof item === 'string' && item.length > 0);
|
|
4366
|
+
}
|
|
4367
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
4368
|
+
return value
|
|
4369
|
+
.split(',')
|
|
4370
|
+
.map((item) => item.trim())
|
|
4371
|
+
.filter(Boolean);
|
|
4372
|
+
}
|
|
4373
|
+
return null;
|
|
4374
|
+
}
|
|
4375
|
+
readNumber(value) {
|
|
4376
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
4377
|
+
}
|
|
4378
|
+
readBoolean(value) {
|
|
4379
|
+
return value === true || value === 'true' || value === 'TRUE' || value === 1;
|
|
4380
|
+
}
|
|
4381
|
+
readString(value) {
|
|
4382
|
+
return typeof value === 'string' ? value : '';
|
|
4383
|
+
}
|
|
4384
|
+
readOptionalString(value) {
|
|
4385
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
4386
|
+
}
|
|
4387
|
+
asRecord(value) {
|
|
4388
|
+
return value && typeof value === 'object' ? value : {};
|
|
4389
|
+
}
|
|
4390
|
+
unwrapData(payload) {
|
|
4391
|
+
if (payload && typeof payload === 'object' && 'data' in payload) {
|
|
4392
|
+
return payload.data;
|
|
4393
|
+
}
|
|
4394
|
+
return payload;
|
|
4395
|
+
}
|
|
4396
|
+
extractAttributes(value, knownKeys) {
|
|
4397
|
+
const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
|
|
4398
|
+
return entries.length ? Object.fromEntries(entries) : null;
|
|
4399
|
+
}
|
|
4400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4401
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, providedIn: 'root' });
|
|
4402
|
+
}
|
|
4403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, decorators: [{
|
|
4404
|
+
type: Injectable,
|
|
4405
|
+
args: [{
|
|
4406
|
+
providedIn: 'root',
|
|
4407
|
+
}]
|
|
4408
|
+
}] });
|
|
4409
|
+
|
|
4410
|
+
class PlatformUserService extends BaseService {
|
|
4411
|
+
init() {
|
|
4412
|
+
this.endpoint = 'platform/users';
|
|
4413
|
+
super.init();
|
|
4414
|
+
}
|
|
4415
|
+
findUsers(options) {
|
|
4416
|
+
return this.http
|
|
4417
|
+
.get(this.actionUrl, {
|
|
4418
|
+
params: toApiRequestParams(options),
|
|
4419
|
+
withCredentials: true,
|
|
4420
|
+
})
|
|
4421
|
+
.pipe(map((response) => this.toUserPage(response)));
|
|
4422
|
+
}
|
|
4423
|
+
findUserById(id) {
|
|
4424
|
+
return this.http
|
|
4425
|
+
.get(`${this.actionUrl}/${id}`, {
|
|
4426
|
+
withCredentials: true,
|
|
4427
|
+
})
|
|
4428
|
+
.pipe(map((response) => this.toUserDetail(this.unwrapData(response))));
|
|
4429
|
+
}
|
|
4430
|
+
findUserContext(id) {
|
|
4431
|
+
return this.http
|
|
4432
|
+
.get(`${this.actionUrl}/${id}/context`, {
|
|
4433
|
+
withCredentials: true,
|
|
4434
|
+
})
|
|
4435
|
+
.pipe(map((response) => this.toUserContext(this.unwrapData(response))), catchError(() => of(null)));
|
|
4436
|
+
}
|
|
4437
|
+
toUserPage(payload) {
|
|
4438
|
+
if (Array.isArray(payload)) {
|
|
4439
|
+
return {
|
|
4440
|
+
items: payload.map((item) => this.toUserSummary(item)),
|
|
4441
|
+
total: payload.length,
|
|
4442
|
+
};
|
|
4443
|
+
}
|
|
4444
|
+
const items = Array.isArray(payload?.data) ? payload.data : [];
|
|
4445
|
+
const total = payload?.meta?.pagination?.count ?? items.length;
|
|
4446
|
+
return {
|
|
4447
|
+
items: items.map((item) => this.toUserSummary(item)),
|
|
4448
|
+
total,
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
toUserSummary(payload) {
|
|
4452
|
+
const value = this.asRecord(payload);
|
|
4453
|
+
return {
|
|
4454
|
+
id: this.readString(value['id']),
|
|
4455
|
+
name: this.readOptionalString(value['name']),
|
|
4456
|
+
username: this.readOptionalString(value['username']),
|
|
4457
|
+
email: this.readOptionalString(value['email']),
|
|
4458
|
+
phone: this.readOptionalString(value['phone']),
|
|
4459
|
+
avatar: this.readOptionalString(value['avatar']),
|
|
4460
|
+
firstName: this.readOptionalString(value['firstName']),
|
|
4461
|
+
lastName: this.readOptionalString(value['lastName']),
|
|
4462
|
+
status: this.readOptionalString(value['status']),
|
|
4463
|
+
createdAt: this.readOptionalString(value['createdAt']),
|
|
4464
|
+
roles: this.readRoles(value['roles']),
|
|
4465
|
+
};
|
|
4466
|
+
}
|
|
4467
|
+
toUserDetail(payload) {
|
|
4468
|
+
const value = this.asRecord(payload);
|
|
4469
|
+
const summary = this.toUserSummary(payload);
|
|
4470
|
+
return {
|
|
4471
|
+
...summary,
|
|
4472
|
+
bio: this.readOptionalString(value['bio']),
|
|
4473
|
+
permissions: this.readStringArray(value['permissions']),
|
|
4474
|
+
platformRoles: this.readStringArray(value['platformRoles']),
|
|
4475
|
+
applications: this.readApplicationMemberships(value['applications']),
|
|
4476
|
+
organizations: this.readOrganizationMemberships(value['organizations']),
|
|
4477
|
+
};
|
|
4478
|
+
}
|
|
4479
|
+
toUserContext(payload) {
|
|
4480
|
+
const value = this.asRecord(payload);
|
|
4481
|
+
return {
|
|
4482
|
+
userId: this.readString(value['userId']),
|
|
4483
|
+
username: this.readOptionalString(value['username']),
|
|
4484
|
+
platformRoles: this.readStringArray(value['platformRoles']) ?? [],
|
|
4485
|
+
applications: this.readApplicationMemberships(value['applications']) ?? [],
|
|
4486
|
+
organizations: this.readOrganizationMemberships(value['organizations']) ?? [],
|
|
4487
|
+
permissions: this.readStringArray(value['permissions']),
|
|
4488
|
+
};
|
|
4489
|
+
}
|
|
4490
|
+
readRoles(payload) {
|
|
4491
|
+
if (!Array.isArray(payload)) {
|
|
4492
|
+
return [];
|
|
4493
|
+
}
|
|
4494
|
+
return payload
|
|
4495
|
+
.map((item) => {
|
|
4496
|
+
if (typeof item === 'string') {
|
|
4497
|
+
return item;
|
|
4498
|
+
}
|
|
4499
|
+
const value = this.asRecord(item);
|
|
4500
|
+
return this.readOptionalString(value['authority']) ?? this.readOptionalString(value['name']) ?? null;
|
|
4501
|
+
})
|
|
4502
|
+
.filter((item) => !!item);
|
|
4503
|
+
}
|
|
4504
|
+
readApplicationMemberships(payload) {
|
|
4505
|
+
if (!Array.isArray(payload)) {
|
|
4506
|
+
return null;
|
|
4507
|
+
}
|
|
4508
|
+
return payload.map((item) => {
|
|
4509
|
+
const value = this.asRecord(item);
|
|
4510
|
+
return {
|
|
4511
|
+
appId: this.readString(value['appId']),
|
|
4512
|
+
appCode: this.readOptionalString(value['appCode']),
|
|
4513
|
+
appName: this.readOptionalString(value['appName']),
|
|
4514
|
+
roles: this.readStringArray(value['roles']) ?? [],
|
|
4515
|
+
};
|
|
4516
|
+
});
|
|
4517
|
+
}
|
|
4518
|
+
readOrganizationMemberships(payload) {
|
|
4519
|
+
if (!Array.isArray(payload)) {
|
|
4520
|
+
return null;
|
|
4521
|
+
}
|
|
4522
|
+
return payload.map((item) => {
|
|
4523
|
+
const value = this.asRecord(item);
|
|
4524
|
+
return {
|
|
4525
|
+
appId: this.readString(value['appId']),
|
|
4526
|
+
orgId: this.readString(value['orgId']),
|
|
4527
|
+
orgCode: this.readOptionalString(value['orgCode']),
|
|
4528
|
+
orgName: this.readOptionalString(value['orgName']),
|
|
4529
|
+
roles: this.readStringArray(value['roles']) ?? [],
|
|
4530
|
+
};
|
|
4531
|
+
});
|
|
4532
|
+
}
|
|
4533
|
+
readStringArray(payload) {
|
|
4534
|
+
if (!Array.isArray(payload)) {
|
|
4535
|
+
return null;
|
|
4536
|
+
}
|
|
4537
|
+
return payload.filter((item) => typeof item === 'string' && item.length > 0);
|
|
4538
|
+
}
|
|
4539
|
+
readString(value) {
|
|
4540
|
+
return typeof value === 'string' ? value : '';
|
|
4541
|
+
}
|
|
4542
|
+
readOptionalString(value) {
|
|
4543
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
4544
|
+
}
|
|
4545
|
+
asRecord(value) {
|
|
4546
|
+
return value && typeof value === 'object' ? value : {};
|
|
4547
|
+
}
|
|
4548
|
+
unwrapData(payload) {
|
|
4549
|
+
if (payload && typeof payload === 'object' && 'data' in payload) {
|
|
4550
|
+
return payload.data;
|
|
4551
|
+
}
|
|
4552
|
+
return payload;
|
|
4553
|
+
}
|
|
4554
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4555
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, providedIn: 'root' });
|
|
4556
|
+
}
|
|
4557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, decorators: [{
|
|
4558
|
+
type: Injectable,
|
|
4559
|
+
args: [{
|
|
4560
|
+
providedIn: 'root',
|
|
4561
|
+
}]
|
|
4562
|
+
}] });
|
|
4563
|
+
|
|
4564
|
+
class PermissionService extends BaseService {
|
|
4565
|
+
init() {
|
|
4566
|
+
this.endpoint = 'platform/role-permissions';
|
|
4567
|
+
super.init();
|
|
4568
|
+
}
|
|
4569
|
+
findRoles(options) {
|
|
4570
|
+
return this.http.get(`${this.actionUrl}/roles`, {
|
|
4571
|
+
params: this.params(options),
|
|
4572
|
+
withCredentials: true,
|
|
4573
|
+
});
|
|
4574
|
+
}
|
|
4575
|
+
getRoleSummary(roleId, options) {
|
|
4576
|
+
return this.http.get(`${this.actionUrl}/roles/${roleId}`, {
|
|
4577
|
+
params: this.params(options),
|
|
4578
|
+
withCredentials: true,
|
|
4579
|
+
});
|
|
4580
|
+
}
|
|
4581
|
+
findAssignablePermissions(roleId, options) {
|
|
4582
|
+
return this.http.get(`${this.actionUrl}/roles/${roleId}/permissions`, {
|
|
4583
|
+
params: this.params(options),
|
|
4584
|
+
withCredentials: true,
|
|
4585
|
+
});
|
|
4586
|
+
}
|
|
4587
|
+
saveRolePermissions(roleId, request) {
|
|
4588
|
+
return this.http.put(`${this.actionUrl}/roles/${roleId}/permissions`, request, {
|
|
4589
|
+
withCredentials: true,
|
|
4590
|
+
});
|
|
4591
|
+
}
|
|
4592
|
+
buildGroups(items) {
|
|
4593
|
+
const map = new Map();
|
|
4594
|
+
for (const item of items) {
|
|
4595
|
+
const key = item.module?.trim() || 'Other';
|
|
4596
|
+
const list = map.get(key) ?? [];
|
|
4597
|
+
list.push(item);
|
|
4598
|
+
map.set(key, list);
|
|
4599
|
+
}
|
|
4600
|
+
return [...map.entries()].map(([key, values]) => ({
|
|
4601
|
+
key,
|
|
4602
|
+
label: key,
|
|
4603
|
+
count: values.length,
|
|
4604
|
+
assignedCount: values.filter((x) => x.assigned).length,
|
|
4605
|
+
items: values,
|
|
4606
|
+
}));
|
|
4607
|
+
}
|
|
4608
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4609
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, providedIn: 'root' });
|
|
4610
|
+
}
|
|
4611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, decorators: [{
|
|
4612
|
+
type: Injectable,
|
|
4613
|
+
args: [{
|
|
4614
|
+
providedIn: 'root',
|
|
4615
|
+
}]
|
|
4616
|
+
}] });
|
|
4617
|
+
|
|
4618
|
+
class RoleService extends BaseService {
|
|
4619
|
+
init() {
|
|
4620
|
+
this.endpoint = 'platform/roles';
|
|
4621
|
+
super.init();
|
|
4622
|
+
}
|
|
4623
|
+
// ---------------------------------------------------------------------------
|
|
4624
|
+
// Platform roles
|
|
4625
|
+
// ---------------------------------------------------------------------------
|
|
4626
|
+
findPlatformRoles(options) {
|
|
4627
|
+
return this.http
|
|
4628
|
+
.get(`${this.actionUrl}/platform`, {
|
|
4629
|
+
params: toApiRequestParams(options),
|
|
4630
|
+
})
|
|
4631
|
+
.pipe(map((response) => response.data));
|
|
4632
|
+
}
|
|
4633
|
+
findPlatformRoleById(id) {
|
|
4634
|
+
return this.http.get(`${this.actionUrl}/platform/${id}`).pipe(map((response) => response.data));
|
|
4635
|
+
}
|
|
4636
|
+
createPlatformRole(request) {
|
|
4637
|
+
return this.http
|
|
4638
|
+
.post(`${this.actionUrl}/platform`, request)
|
|
4639
|
+
.pipe(map((response) => response.data));
|
|
4640
|
+
}
|
|
4641
|
+
updatePlatformRole(id, request) {
|
|
4642
|
+
return this.http
|
|
4643
|
+
.put(`${this.actionUrl}/platform/${id}`, request)
|
|
4644
|
+
.pipe(map((response) => response.data));
|
|
4645
|
+
}
|
|
4646
|
+
findPlatformRolePermissionPage(id) {
|
|
4647
|
+
return this.http
|
|
4648
|
+
.get(`${this.actionUrl}/platform/${id}/permissions`)
|
|
4649
|
+
.pipe(map((response) => response.data));
|
|
4650
|
+
}
|
|
4651
|
+
updatePlatformRolePermissions(id, request) {
|
|
4652
|
+
return this.http
|
|
4653
|
+
.put(`${this.actionUrl}/platform/${id}/permissions`, request)
|
|
4654
|
+
.pipe(map((response) => response.data));
|
|
4655
|
+
}
|
|
4656
|
+
deletePlatformRoleById(id) {
|
|
4657
|
+
return this.http.delete(`${this.actionUrl}/platform/${id}`).pipe(map((response) => response.data));
|
|
4658
|
+
}
|
|
4659
|
+
// ---------------------------------------------------------------------------
|
|
4660
|
+
// Application roles
|
|
4661
|
+
// ---------------------------------------------------------------------------
|
|
4662
|
+
findApplicationRoles(appId, options) {
|
|
4663
|
+
return this.http
|
|
4664
|
+
.get(`${this.actionUrl}/applications`, {
|
|
4665
|
+
params: toApiRequestParams(options, {
|
|
4666
|
+
appId,
|
|
4667
|
+
}),
|
|
4668
|
+
})
|
|
4669
|
+
.pipe(map((response) => response.data));
|
|
4670
|
+
}
|
|
4671
|
+
findApplicationRoleById(id, appId) {
|
|
4672
|
+
return this.http
|
|
4673
|
+
.get(`${this.actionUrl}/applications/${id}`, {
|
|
4674
|
+
params: this.toParams({
|
|
4675
|
+
appId,
|
|
4676
|
+
}),
|
|
4677
|
+
})
|
|
4678
|
+
.pipe(map((response) => response.data));
|
|
4679
|
+
}
|
|
4680
|
+
createApplicationRole(request, appId) {
|
|
4681
|
+
return this.http
|
|
4682
|
+
.post(`${this.actionUrl}/applications`, request, {
|
|
4683
|
+
params: this.toParams({
|
|
4684
|
+
appId,
|
|
4685
|
+
}),
|
|
4686
|
+
})
|
|
4687
|
+
.pipe(map((response) => response.data));
|
|
4688
|
+
}
|
|
4689
|
+
updateApplicationRole(id, request, appId) {
|
|
4690
|
+
return this.http
|
|
4691
|
+
.put(`${this.actionUrl}/applications/${id}`, request, {
|
|
4692
|
+
params: this.toParams({
|
|
4693
|
+
appId,
|
|
4694
|
+
}),
|
|
4695
|
+
})
|
|
4696
|
+
.pipe(map((response) => response.data));
|
|
4697
|
+
}
|
|
4698
|
+
findApplicationRolePermissionPage(id, appId) {
|
|
4699
|
+
return this.http
|
|
4700
|
+
.get(`${this.actionUrl}/applications/${id}/permissions`, {
|
|
4701
|
+
params: this.toParams({
|
|
4702
|
+
appId,
|
|
4703
|
+
}),
|
|
4704
|
+
})
|
|
4705
|
+
.pipe(map((response) => response.data));
|
|
4706
|
+
}
|
|
4707
|
+
updateApplicationRolePermissions(id, request, appId) {
|
|
4708
|
+
return this.http
|
|
4709
|
+
.put(`${this.actionUrl}/applications/${id}/permissions`, request, {
|
|
4710
|
+
params: this.toParams({
|
|
4711
|
+
appId,
|
|
4712
|
+
}),
|
|
4713
|
+
})
|
|
4714
|
+
.pipe(map((response) => response.data));
|
|
4715
|
+
}
|
|
4716
|
+
deleteApplicationRoleById(id, appId) {
|
|
4717
|
+
return this.http
|
|
4718
|
+
.delete(`${this.actionUrl}/applications/${id}`, {
|
|
4719
|
+
params: this.toParams({
|
|
4720
|
+
appId,
|
|
4721
|
+
}),
|
|
4722
|
+
})
|
|
4723
|
+
.pipe(map((response) => response.data));
|
|
4724
|
+
}
|
|
4725
|
+
// ---------------------------------------------------------------------------
|
|
4726
|
+
// Organization roles
|
|
4727
|
+
// ---------------------------------------------------------------------------
|
|
4728
|
+
findOrganizationRoles(orgId) {
|
|
4729
|
+
return this.http
|
|
4730
|
+
.get(`${this.actionUrl}/organizations/${orgId}`)
|
|
4731
|
+
.pipe(map((response) => response.data));
|
|
4732
|
+
}
|
|
4733
|
+
findOrganizationRoleById(orgId, id) {
|
|
4734
|
+
return this.http
|
|
4735
|
+
.get(`${this.actionUrl}/organizations/${orgId}/${id}`)
|
|
4736
|
+
.pipe(map((response) => response.data));
|
|
4737
|
+
}
|
|
4738
|
+
createOrganizationRole(orgId, request) {
|
|
4739
|
+
return this.http
|
|
4740
|
+
.post(`${this.actionUrl}/organizations/${orgId}`, request)
|
|
4741
|
+
.pipe(map((response) => response.data));
|
|
4742
|
+
}
|
|
4743
|
+
updateOrganizationRole(orgId, id, request) {
|
|
4744
|
+
return this.http
|
|
4745
|
+
.put(`${this.actionUrl}/organizations/${orgId}/${id}`, request)
|
|
4746
|
+
.pipe(map((response) => response.data));
|
|
4747
|
+
}
|
|
4748
|
+
findOrganizationRolePermissionPage(orgId, id) {
|
|
4749
|
+
return this.http
|
|
4750
|
+
.get(`${this.actionUrl}/organizations/${orgId}/${id}/permissions`)
|
|
4751
|
+
.pipe(map((response) => response.data));
|
|
4752
|
+
}
|
|
4753
|
+
updateOrganizationRolePermissions(orgId, id, request) {
|
|
4754
|
+
return this.http
|
|
4755
|
+
.put(`${this.actionUrl}/organizations/${orgId}/${id}/permissions`, request)
|
|
4756
|
+
.pipe(map((response) => response.data));
|
|
4757
|
+
}
|
|
4758
|
+
deleteOrganizationRoleById(orgId, id) {
|
|
4759
|
+
return this.http
|
|
4760
|
+
.delete(`${this.actionUrl}/organizations/${orgId}/${id}`)
|
|
4761
|
+
.pipe(map((response) => response.data));
|
|
4762
|
+
}
|
|
4763
|
+
// ---------------------------------------------------------------------------
|
|
4764
|
+
// Helpers
|
|
4765
|
+
// ---------------------------------------------------------------------------
|
|
4766
|
+
toParams(values) {
|
|
4767
|
+
let params = new HttpParams();
|
|
4768
|
+
if (!values) {
|
|
4769
|
+
return params;
|
|
4770
|
+
}
|
|
4771
|
+
for (const [key, value] of Object.entries(values)) {
|
|
4772
|
+
if (value === null || value === undefined || value === '') {
|
|
4773
|
+
continue;
|
|
4774
|
+
}
|
|
4775
|
+
params = params.set(key, String(value));
|
|
4776
|
+
}
|
|
4777
|
+
return params;
|
|
4778
|
+
}
|
|
4779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4780
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, providedIn: 'root' });
|
|
4781
|
+
}
|
|
4782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, decorators: [{
|
|
4783
|
+
type: Injectable,
|
|
4784
|
+
args: [{
|
|
4785
|
+
providedIn: 'root',
|
|
4786
|
+
}]
|
|
4787
|
+
}] });
|
|
4788
|
+
|
|
4789
|
+
class OrganizationInvitationService extends BaseService {
|
|
4790
|
+
init() {
|
|
4791
|
+
this.endpoint = 'organizations';
|
|
4792
|
+
super.init();
|
|
4793
|
+
}
|
|
4794
|
+
findInvitations(orgId) {
|
|
4795
|
+
return this.http
|
|
4796
|
+
.get(`${this.actionUrl}/${orgId}/invitations`, {
|
|
4797
|
+
withCredentials: true,
|
|
4798
|
+
})
|
|
4799
|
+
.pipe(map((response) => this.toInvitationPage(response.data)));
|
|
4800
|
+
}
|
|
4801
|
+
createInvitation(orgId, request) {
|
|
4802
|
+
return this.http
|
|
4803
|
+
.post(`${this.actionUrl}/${orgId}/invitations`, request, {
|
|
4804
|
+
withCredentials: true,
|
|
4805
|
+
})
|
|
4806
|
+
.pipe(map((response) => response.data));
|
|
4807
|
+
}
|
|
4808
|
+
resendInvitation(orgId, invitationId) {
|
|
4809
|
+
return this.http
|
|
4810
|
+
.post(`${this.actionUrl}/${orgId}/invitations/${invitationId}/resend`, {}, {
|
|
4811
|
+
withCredentials: true,
|
|
4812
|
+
})
|
|
4813
|
+
.pipe(map(() => undefined));
|
|
4814
|
+
}
|
|
4815
|
+
revokeInvitation(orgId, invitationId) {
|
|
4816
|
+
return this.http
|
|
4817
|
+
.delete(`${this.actionUrl}/${orgId}/invitations/${invitationId}`, {
|
|
4818
|
+
withCredentials: true,
|
|
4819
|
+
})
|
|
4820
|
+
.pipe(map(() => undefined));
|
|
4821
|
+
}
|
|
4822
|
+
toInvitationPage(payload) {
|
|
4823
|
+
if (Array.isArray(payload)) {
|
|
4824
|
+
return {
|
|
4825
|
+
items: payload,
|
|
4826
|
+
total: payload.length,
|
|
4827
|
+
};
|
|
4828
|
+
}
|
|
4829
|
+
return {
|
|
4830
|
+
items: payload.items ?? [],
|
|
4831
|
+
total: payload.total ?? payload.items?.length ?? 0,
|
|
4832
|
+
};
|
|
4833
|
+
}
|
|
4834
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4835
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, providedIn: 'root' });
|
|
4836
|
+
}
|
|
4837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, decorators: [{
|
|
4838
|
+
type: Injectable,
|
|
4839
|
+
args: [{
|
|
4840
|
+
providedIn: 'root',
|
|
4841
|
+
}]
|
|
4842
|
+
}] });
|
|
4843
|
+
|
|
4844
|
+
class OrganizationMemberService extends BaseService {
|
|
4845
|
+
init() {
|
|
4846
|
+
this.endpoint = 'organizations';
|
|
4847
|
+
super.init();
|
|
4848
|
+
}
|
|
4849
|
+
findMembers(orgId) {
|
|
4850
|
+
return this.http
|
|
4851
|
+
.get(`${this.actionUrl}/${orgId}/members`, {
|
|
4852
|
+
withCredentials: true,
|
|
4853
|
+
})
|
|
4854
|
+
.pipe(map((response) => this.toMemberPage(response.data)));
|
|
4855
|
+
}
|
|
4856
|
+
findMemberById(orgId, memberId) {
|
|
4857
|
+
return this.http
|
|
4858
|
+
.get(`${this.actionUrl}/${orgId}/members/${memberId}`, {
|
|
4859
|
+
withCredentials: true,
|
|
4860
|
+
})
|
|
4861
|
+
.pipe(map((response) => response.data));
|
|
4862
|
+
}
|
|
4863
|
+
updateMemberRoles(orgId, memberId, request) {
|
|
4864
|
+
return this.http
|
|
4865
|
+
.put(`${this.actionUrl}/${orgId}/members/${memberId}/roles`, request, {
|
|
4866
|
+
withCredentials: true,
|
|
4867
|
+
})
|
|
4868
|
+
.pipe(map((response) => response.data));
|
|
4869
|
+
}
|
|
4870
|
+
resetMemberPassword(orgId, memberId) {
|
|
4871
|
+
return this.http
|
|
4872
|
+
.post(`${this.actionUrl}/${orgId}/members/${memberId}/password/reset-request`, {}, {
|
|
4873
|
+
withCredentials: true,
|
|
4874
|
+
})
|
|
4875
|
+
.pipe(map(() => undefined));
|
|
4876
|
+
}
|
|
4877
|
+
toMemberPage(payload) {
|
|
4878
|
+
if (Array.isArray(payload)) {
|
|
4879
|
+
return {
|
|
4880
|
+
items: payload,
|
|
4881
|
+
total: payload.length,
|
|
4882
|
+
};
|
|
4883
|
+
}
|
|
4884
|
+
return {
|
|
4885
|
+
items: payload.items ?? [],
|
|
4886
|
+
total: payload.total ?? payload.items?.length ?? 0,
|
|
4887
|
+
};
|
|
4888
|
+
}
|
|
4889
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4890
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, providedIn: 'root' });
|
|
4891
|
+
}
|
|
4892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, decorators: [{
|
|
4893
|
+
type: Injectable,
|
|
4894
|
+
args: [{
|
|
4895
|
+
providedIn: 'root',
|
|
4896
|
+
}]
|
|
4897
|
+
}] });
|
|
4898
|
+
|
|
4899
|
+
class OnboardingApplicantService extends BaseService {
|
|
4900
|
+
init() {
|
|
4901
|
+
this.endpoint = 'onboarding/applications';
|
|
4902
|
+
super.init();
|
|
4903
|
+
}
|
|
4904
|
+
createApplication(payload) {
|
|
4905
|
+
return this.http
|
|
4906
|
+
.post(this.actionUrl, payload, {
|
|
4907
|
+
withCredentials: true,
|
|
4908
|
+
})
|
|
4909
|
+
.pipe(map((response) => response.data));
|
|
4910
|
+
}
|
|
4911
|
+
listMine(applicationId) {
|
|
4912
|
+
return this.http
|
|
4913
|
+
.get(`${this.actionUrl}/mine`, {
|
|
4914
|
+
params: this.params({ applicationId }),
|
|
4915
|
+
withCredentials: true,
|
|
4916
|
+
})
|
|
4917
|
+
.pipe(map((response) => response.data));
|
|
4918
|
+
}
|
|
4919
|
+
getApplication(applicationId) {
|
|
4920
|
+
return this.http
|
|
4921
|
+
.get(`${this.actionUrl}/${applicationId}`, {
|
|
4922
|
+
withCredentials: true,
|
|
4923
|
+
})
|
|
4924
|
+
.pipe(map((response) => response.data));
|
|
4925
|
+
}
|
|
4926
|
+
saveProfile(applicationId, payload) {
|
|
4927
|
+
return this.http
|
|
4928
|
+
.put(`${this.actionUrl}/${applicationId}/profile`, payload, {
|
|
4929
|
+
withCredentials: true,
|
|
4930
|
+
})
|
|
4931
|
+
.pipe(map((response) => response.data));
|
|
4932
|
+
}
|
|
4933
|
+
saveFinancial(applicationId, payload) {
|
|
4934
|
+
return this.http
|
|
4935
|
+
.put(`${this.actionUrl}/${applicationId}/financial`, payload, {
|
|
4936
|
+
withCredentials: true,
|
|
4937
|
+
})
|
|
4938
|
+
.pipe(map((response) => response.data));
|
|
4939
|
+
}
|
|
4940
|
+
saveBanking(applicationId, payload) {
|
|
4941
|
+
return this.http
|
|
4942
|
+
.put(`${this.actionUrl}/${applicationId}/banking`, payload, {
|
|
4943
|
+
withCredentials: true,
|
|
4944
|
+
})
|
|
4945
|
+
.pipe(map((response) => response.data));
|
|
4946
|
+
}
|
|
4947
|
+
requestUploadUrl(applicationId, payload) {
|
|
4948
|
+
return this.http
|
|
4949
|
+
.post(`${this.actionUrl}/${applicationId}/documents/upload-url`, payload, {
|
|
4950
|
+
withCredentials: true,
|
|
4951
|
+
})
|
|
4952
|
+
.pipe(map((response) => response.data));
|
|
4953
|
+
}
|
|
4954
|
+
confirmDocumentUpload(applicationId, payload) {
|
|
4955
|
+
return this.http
|
|
4956
|
+
.post(`${this.actionUrl}/${applicationId}/documents/confirm`, payload, {
|
|
4957
|
+
withCredentials: true,
|
|
4958
|
+
})
|
|
4959
|
+
.pipe(map((response) => response.data));
|
|
4960
|
+
}
|
|
4961
|
+
submit(applicationId) {
|
|
4962
|
+
return this.http
|
|
4963
|
+
.post(`${this.actionUrl}/${applicationId}/submit`, {}, {
|
|
4964
|
+
withCredentials: true,
|
|
4965
|
+
})
|
|
4966
|
+
.pipe(map((response) => response.data));
|
|
4967
|
+
}
|
|
4968
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4969
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, providedIn: 'root' });
|
|
4970
|
+
}
|
|
4971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, decorators: [{
|
|
4972
|
+
type: Injectable,
|
|
4973
|
+
args: [{
|
|
4974
|
+
providedIn: 'root',
|
|
4975
|
+
}]
|
|
4976
|
+
}] });
|
|
4977
|
+
|
|
4978
|
+
class OnboardingAdminService extends BaseService {
|
|
4979
|
+
init() {
|
|
4980
|
+
this.endpoint = 'onboarding/admin/applications';
|
|
4981
|
+
super.init();
|
|
4982
|
+
}
|
|
4983
|
+
list(query) {
|
|
4984
|
+
return this.http
|
|
4985
|
+
.get(this.actionUrl, {
|
|
4986
|
+
params: this.params(query),
|
|
4987
|
+
withCredentials: true,
|
|
4988
|
+
})
|
|
4989
|
+
.pipe(map((response) => response.data));
|
|
4990
|
+
}
|
|
4991
|
+
getApplication(applicationId) {
|
|
4992
|
+
return this.http
|
|
4993
|
+
.get(`${this.actionUrl}/${applicationId}`, {
|
|
4994
|
+
withCredentials: true,
|
|
4995
|
+
})
|
|
4996
|
+
.pipe(map((response) => response.data));
|
|
4997
|
+
}
|
|
4998
|
+
startReview(applicationId) {
|
|
4999
|
+
return this.http
|
|
5000
|
+
.post(`${this.actionUrl}/${applicationId}/review/start`, {}, {
|
|
5001
|
+
withCredentials: true,
|
|
5002
|
+
})
|
|
5003
|
+
.pipe(map((response) => response.data));
|
|
5004
|
+
}
|
|
5005
|
+
needMoreInfo(applicationId, payload) {
|
|
5006
|
+
return this.http
|
|
5007
|
+
.post(`${this.actionUrl}/${applicationId}/need-more-info`, payload, {
|
|
5008
|
+
withCredentials: true,
|
|
5009
|
+
})
|
|
5010
|
+
.pipe(map((response) => response.data));
|
|
5011
|
+
}
|
|
5012
|
+
approve(applicationId, payload) {
|
|
5013
|
+
return this.http
|
|
5014
|
+
.post(`${this.actionUrl}/${applicationId}/approve`, payload, {
|
|
5015
|
+
withCredentials: true,
|
|
5016
|
+
})
|
|
5017
|
+
.pipe(map((response) => response.data));
|
|
5018
|
+
}
|
|
5019
|
+
fail(applicationId, payload) {
|
|
5020
|
+
return this.http
|
|
5021
|
+
.post(`${this.actionUrl}/${applicationId}/fail`, payload, {
|
|
5022
|
+
withCredentials: true,
|
|
5023
|
+
})
|
|
5024
|
+
.pipe(map((response) => response.data));
|
|
5025
|
+
}
|
|
5026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5027
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, providedIn: 'root' });
|
|
5028
|
+
}
|
|
5029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, decorators: [{
|
|
5030
|
+
type: Injectable,
|
|
5031
|
+
args: [{
|
|
5032
|
+
providedIn: 'root',
|
|
5033
|
+
}]
|
|
5034
|
+
}] });
|
|
5035
|
+
|
|
5036
|
+
class LoadingInterceptor {
|
|
5037
|
+
loadingService = inject(LoadingService);
|
|
5038
|
+
activeRequests = 0;
|
|
5039
|
+
intercept(request, next) {
|
|
5040
|
+
if (this.activeRequests === 0) {
|
|
5041
|
+
this.loadingService.start();
|
|
5042
|
+
}
|
|
5043
|
+
this.activeRequests++;
|
|
5044
|
+
return next.handle(request).pipe(finalize(() => {
|
|
5045
|
+
this.activeRequests--;
|
|
5046
|
+
if (this.activeRequests === 0) {
|
|
5047
|
+
this.loadingService.stop();
|
|
5048
|
+
}
|
|
5049
|
+
}));
|
|
5050
|
+
}
|
|
5051
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5052
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, providedIn: 'root' });
|
|
5053
|
+
}
|
|
5054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, decorators: [{
|
|
5055
|
+
type: Injectable,
|
|
5056
|
+
args: [{
|
|
5057
|
+
providedIn: 'root',
|
|
5058
|
+
}]
|
|
5059
|
+
}] });
|
|
5060
|
+
|
|
5061
|
+
// language.service.ts
|
|
5062
|
+
class LanguageService {
|
|
5063
|
+
platformId = inject(PLATFORM_ID);
|
|
5064
|
+
req = inject(REQUEST);
|
|
5065
|
+
storageKey = 'hl';
|
|
5066
|
+
lang = signal(this.detectInitial(), ...(ngDevMode ? [{ debugName: "lang" }] : []));
|
|
5067
|
+
acceptLanguage = computed(() => this.lang(), ...(ngDevMode ? [{ debugName: "acceptLanguage" }] : [])); // 'en' | 'zh-Hans'
|
|
5068
|
+
detectInitial() {
|
|
5069
|
+
// Default to English when header is null/blank/unknown
|
|
5070
|
+
if (isPlatformServer(this.platformId)) {
|
|
5071
|
+
const hdr = this.req?.headers?.['accept-language'] ?? '';
|
|
5072
|
+
return hdr.toLowerCase().startsWith('zh') ? 'zh-Hans' : 'en';
|
|
5073
|
+
}
|
|
5074
|
+
// Browser
|
|
5075
|
+
const saved = typeof localStorage !== 'undefined' ? localStorage.getItem(this.storageKey) : null;
|
|
5076
|
+
if (saved === 'en' || saved === 'zh-Hans')
|
|
5077
|
+
return saved;
|
|
5078
|
+
const nav = (navigator.language || (navigator.languages?.[0] ?? '')).toLowerCase();
|
|
5079
|
+
return nav.startsWith('zh') ? 'zh-Hans' : 'en';
|
|
5080
|
+
}
|
|
5081
|
+
set(lang) {
|
|
5082
|
+
this.lang.set(lang);
|
|
5083
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
5084
|
+
localStorage.setItem(this.storageKey, lang);
|
|
5085
|
+
// Optional: keep <html lang="..."> in sync
|
|
5086
|
+
document.documentElement.lang = lang.startsWith('zh') ? 'zh' : 'en';
|
|
5087
|
+
}
|
|
5088
|
+
}
|
|
5089
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5090
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, providedIn: 'root' });
|
|
5091
|
+
}
|
|
5092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, decorators: [{
|
|
5093
|
+
type: Injectable,
|
|
5094
|
+
args: [{ providedIn: 'root' }]
|
|
5095
|
+
}] });
|
|
5096
|
+
|
|
5097
|
+
// Adjust to your app:
|
|
5098
|
+
const API_PREFIXES = ['/api', '/auth', '/properties']; // relative paths you own
|
|
5099
|
+
const API_HOSTS = new Set([
|
|
5100
|
+
'localhost:9001', // dev backend
|
|
5101
|
+
'api.primecasa.co.uk', // prod backend
|
|
5102
|
+
]);
|
|
5103
|
+
const acceptLanguageInterceptor = (req, next) => {
|
|
5104
|
+
const lang = (inject(LanguageService).acceptLanguage() ?? 'en');
|
|
5105
|
+
const url = req.url;
|
|
5106
|
+
const isAbsolute = /^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(url);
|
|
5107
|
+
// Ignore static assets and obvious 3rd-party calls early
|
|
5108
|
+
if (!isAbsolute && url.startsWith('/assets')) {
|
|
5109
|
+
return next(req);
|
|
5110
|
+
}
|
|
5111
|
+
// Decide if we should attach the header
|
|
5112
|
+
let shouldAttach = false;
|
|
5113
|
+
if (!isAbsolute) {
|
|
5114
|
+
// Same-origin (dev proxy or app backend behind the UI origin)
|
|
5115
|
+
shouldAttach = API_PREFIXES.some(p => url.startsWith(p) || url.startsWith('/' + p.replace(/^\//, ''))) || url.startsWith('/'); // fallback: any relative app call
|
|
5116
|
+
}
|
|
5117
|
+
else {
|
|
5118
|
+
// Absolute URL: only attach for whitelisted API hosts
|
|
5119
|
+
try {
|
|
5120
|
+
const u = new URL(url);
|
|
5121
|
+
shouldAttach = API_HOSTS.has(u.host);
|
|
5122
|
+
}
|
|
5123
|
+
catch {
|
|
5124
|
+
shouldAttach = false;
|
|
5125
|
+
}
|
|
5126
|
+
}
|
|
5127
|
+
// Don’t duplicate if header is already present
|
|
5128
|
+
if (!shouldAttach || req.headers.has('Accept-Language')) {
|
|
5129
|
+
return next(req);
|
|
5130
|
+
}
|
|
5131
|
+
return next(req.clone({ setHeaders: { 'Accept-Language': lang || 'en' } }));
|
|
5132
|
+
};
|
|
5133
|
+
|
|
5134
|
+
class BackButtonDirective {
|
|
5135
|
+
navigation = inject(NavigationService);
|
|
5136
|
+
constructor() { }
|
|
5137
|
+
onClick() {
|
|
5138
|
+
this.navigation.back();
|
|
5139
|
+
}
|
|
5140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BackButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5141
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: BackButtonDirective, isStandalone: true, selector: "[rolatechBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
5142
|
+
}
|
|
5143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BackButtonDirective, decorators: [{
|
|
5144
|
+
type: Directive,
|
|
5145
|
+
args: [{
|
|
5146
|
+
selector: '[rolatechBackButton]',
|
|
5147
|
+
}]
|
|
5148
|
+
}], ctorParameters: () => [], propDecorators: { onClick: [{
|
|
5149
|
+
type: HostListener,
|
|
5150
|
+
args: ['click']
|
|
5151
|
+
}] } });
|
|
5152
|
+
|
|
5153
|
+
class HideFooterDirective {
|
|
5154
|
+
layout = inject(LayoutService);
|
|
5155
|
+
ngOnInit() { this.layout.setHideFooter(true); }
|
|
5156
|
+
ngOnDestroy() { this.layout.setHideFooter(false); }
|
|
5157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: HideFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5158
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: HideFooterDirective, isStandalone: true, selector: "[rolatechHideFooter]", ngImport: i0 });
|
|
5159
|
+
}
|
|
5160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: HideFooterDirective, decorators: [{
|
|
5161
|
+
type: Directive,
|
|
5162
|
+
args: [{
|
|
5163
|
+
selector: '[rolatechHideFooter]',
|
|
5164
|
+
}]
|
|
5165
|
+
}] });
|
|
5166
|
+
|
|
5167
|
+
const SERVICE_DIRECTIVES = [BackButtonDirective];
|
|
5168
|
+
|
|
5169
|
+
var PropertyOfferStatus;
|
|
5170
|
+
(function (PropertyOfferStatus) {
|
|
5171
|
+
// ── Draft / submission ────────────────────
|
|
5172
|
+
PropertyOfferStatus["DRAFT"] = "DRAFT";
|
|
5173
|
+
PropertyOfferStatus["SUBMITTED"] = "SUBMITTED";
|
|
5174
|
+
// ── Negotiation turn states ───────────────
|
|
5175
|
+
PropertyOfferStatus["VIEWED_BY_AGENT"] = "VIEWED_BY_AGENT";
|
|
5176
|
+
PropertyOfferStatus["VIEWED_BY_TENANT"] = "VIEWED_BY_TENANT";
|
|
5177
|
+
PropertyOfferStatus["COUNTERED_BY_AGENT"] = "COUNTERED_BY_AGENT";
|
|
5178
|
+
PropertyOfferStatus["COUNTERED_BY_TENANT"] = "COUNTERED_BY_TENANT";
|
|
5179
|
+
PropertyOfferStatus["WITHDRAWN_BY_AGENT"] = "WITHDRAWN_BY_AGENT";
|
|
5180
|
+
PropertyOfferStatus["WITHDRAWN_BY_TENANT"] = "WITHDRAWN_BY_TENANT";
|
|
5181
|
+
// ── Decision ──────────────────────────────
|
|
5182
|
+
PropertyOfferStatus["ACCEPTED"] = "ACCEPTED";
|
|
5183
|
+
PropertyOfferStatus["REJECTED"] = "REJECTED";
|
|
5184
|
+
// ── Market / listing ──────────────────────
|
|
5185
|
+
PropertyOfferStatus["UNDER_OFFER"] = "UNDER_OFFER";
|
|
5186
|
+
// ── Holding deposit ───────────────────────
|
|
5187
|
+
PropertyOfferStatus["HOLDING_DEPOSIT_PENDING"] = "HOLDING_DEPOSIT_PENDING";
|
|
5188
|
+
PropertyOfferStatus["HOLDING_DEPOSIT_PAID"] = "HOLDING_DEPOSIT_PAID";
|
|
5189
|
+
// ── Referencing ───────────────────────────
|
|
5190
|
+
PropertyOfferStatus["REFERENCING"] = "REFERENCING";
|
|
5191
|
+
PropertyOfferStatus["REFERENCES_PASSED"] = "REFERENCES_PASSED";
|
|
5192
|
+
PropertyOfferStatus["REFERENCES_FAILED"] = "REFERENCES_FAILED";
|
|
5193
|
+
// ── Contract ──────────────────────────────
|
|
3963
5194
|
PropertyOfferStatus["CONTRACT_PENDING"] = "CONTRACT_PENDING";
|
|
3964
5195
|
PropertyOfferStatus["CONTRACT_SIGNED"] = "CONTRACT_SIGNED";
|
|
3965
5196
|
PropertyOfferStatus["CONTRACT_FAILED"] = "CONTRACT_FAILED";
|
|
@@ -4044,9 +5275,66 @@ function offerStatusLabel(status) {
|
|
|
4044
5275
|
return PROPERTY_OFFER_STATUS_LABEL[status] ?? String(status);
|
|
4045
5276
|
}
|
|
4046
5277
|
|
|
5278
|
+
const ONBOARDING_STATUS_LABEL = {
|
|
5279
|
+
DRAFT: 'Draft',
|
|
5280
|
+
IN_PROGRESS: 'In progress',
|
|
5281
|
+
SUBMITTED: 'Submitted',
|
|
5282
|
+
IN_REVIEW: 'In review',
|
|
5283
|
+
NEED_MORE_INFO: 'Need more info',
|
|
5284
|
+
APPROVED: 'Approved',
|
|
5285
|
+
FAILED: 'Failed',
|
|
5286
|
+
};
|
|
5287
|
+
const ONBOARDING_APPLICANT_TYPE_LABEL = {
|
|
5288
|
+
INDIVIDUAL: 'Individual',
|
|
5289
|
+
COMPANY: 'Company',
|
|
5290
|
+
};
|
|
5291
|
+
const ONBOARDING_DOCUMENT_TYPE_LABEL = {
|
|
5292
|
+
PASSPORT: 'Passport',
|
|
5293
|
+
CERTIFICATE_OF_INCORPORATION: 'Certificate of incorporation',
|
|
5294
|
+
INDUSTRY_CERTIFICATE: 'Industry certificate',
|
|
5295
|
+
PROOF_OF_ADDRESS: 'Proof of address',
|
|
5296
|
+
BANK_STATEMENT: 'Bank statement',
|
|
5297
|
+
OTHER: 'Other',
|
|
5298
|
+
};
|
|
5299
|
+
const ONBOARDING_ISSUE_TYPE_LABEL = {
|
|
5300
|
+
FIELD: 'Field issue',
|
|
5301
|
+
DOCUMENT: 'Document issue',
|
|
5302
|
+
GENERAL: 'General issue',
|
|
5303
|
+
};
|
|
5304
|
+
const ONBOARDING_VAT_MODE_LABEL = {
|
|
5305
|
+
NON_VAT_REGISTERED: 'Non-VAT registered',
|
|
5306
|
+
VAT_REGISTERED: 'VAT registered',
|
|
5307
|
+
MANUAL_REVIEW_REQUIRED: 'Manual review required',
|
|
5308
|
+
};
|
|
5309
|
+
function onboardingStatusLabel(status) {
|
|
5310
|
+
if (!status)
|
|
5311
|
+
return '—';
|
|
5312
|
+
return ONBOARDING_STATUS_LABEL[status] ?? String(status);
|
|
5313
|
+
}
|
|
5314
|
+
function onboardingApplicantTypeLabel(type) {
|
|
5315
|
+
if (!type)
|
|
5316
|
+
return '—';
|
|
5317
|
+
return ONBOARDING_APPLICANT_TYPE_LABEL[type] ?? String(type);
|
|
5318
|
+
}
|
|
5319
|
+
function onboardingDocumentTypeLabel(type) {
|
|
5320
|
+
if (!type)
|
|
5321
|
+
return '—';
|
|
5322
|
+
return ONBOARDING_DOCUMENT_TYPE_LABEL[type] ?? String(type);
|
|
5323
|
+
}
|
|
5324
|
+
function onboardingIssueTypeLabel(type) {
|
|
5325
|
+
if (!type)
|
|
5326
|
+
return '—';
|
|
5327
|
+
return ONBOARDING_ISSUE_TYPE_LABEL[type] ?? String(type);
|
|
5328
|
+
}
|
|
5329
|
+
function onboardingVatModeLabel(mode) {
|
|
5330
|
+
if (!mode)
|
|
5331
|
+
return '—';
|
|
5332
|
+
return ONBOARDING_VAT_MODE_LABEL[mode] ?? String(mode);
|
|
5333
|
+
}
|
|
5334
|
+
|
|
4047
5335
|
/**
|
|
4048
5336
|
* Generated bundle index. Do not edit.
|
|
4049
5337
|
*/
|
|
4050
5338
|
|
|
4051
|
-
export { AmenityService, AutomationService, BackButtonDirective, BaseService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, EnumApiClient, EnumCacheService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, InventoryService, InvoiceLineService, InvoiceService, InvoiceStatsService, LayoutService, LoadingInterceptor, LoadingService, MediaService, MembershipService, NavigationService, NotificationService, NotificationStore, NotificationTemplateService, OfferingService, OrderPayoutService, OrderService, PROPERTY_OFFER_STATUS_LABEL, PaymentService, PostService, ProductCategoryService, ProductService, PropertyHighlightsService, PropertyOfferCounterService, PropertyOfferService, PropertyOfferStatus, PropertySearchService, PropertyService, PropertyStatsService, PropertyViewingService, ResourceCategoryService, ResourceService, SCHEDULE_CRON_META, SERVICE_DIRECTIVES, SidenavService, SnackBarService, SupportService, ThemeService, TimeZoneService, TitleService, acceptLanguageInterceptor, offerStatusLabel, provideAngularServices };
|
|
5339
|
+
export { AmenityService, ApplicationService, AutomationService, BackButtonDirective, BaseService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, EnumApiClient, EnumCacheService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, InventoryService, InvoiceLineService, InvoiceService, InvoiceStatsService, LayoutService, LoadingInterceptor, LoadingService, MediaService, MembershipService, NavigationService, NotificationService, NotificationStore, NotificationTemplateService, ONBOARDING_APPLICANT_TYPE_LABEL, ONBOARDING_DOCUMENT_TYPE_LABEL, ONBOARDING_ISSUE_TYPE_LABEL, ONBOARDING_STATUS_LABEL, ONBOARDING_VAT_MODE_LABEL, OfferingService, OnboardingAdminService, OnboardingApplicantService, OrderPayoutService, OrderService, OrganizationInvitationService, OrganizationMemberService, PROPERTY_OFFER_STATUS_LABEL, PaymentService, PermissionService, PlatformAuthClientService, PlatformEndpointService, PlatformServiceRegistryService, PlatformUserService, PostService, ProductCategoryService, ProductService, PropertyHighlightsService, PropertyOfferCounterService, PropertyOfferService, PropertyOfferStatus, PropertySearchService, PropertyService, PropertyStatsService, PropertyViewingService, ResourceCategoryService, ResourceService, RoleService, SCHEDULE_CRON_META, SERVICE_DIRECTIVES, SidenavService, SnackBarService, SupportService, ThemeService, TimeZoneService, TitleService, acceptLanguageInterceptor, offerStatusLabel, onboardingApplicantTypeLabel, onboardingDocumentTypeLabel, onboardingIssueTypeLabel, onboardingStatusLabel, onboardingVatModeLabel, provideAngularServices };
|
|
4052
5340
|
//# sourceMappingURL=rolatech-angular-services.mjs.map
|