@rolatech/angular-services 20.3.2-beta.3 → 20.3.3-beta.0

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,8 +3,7 @@ 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, catchError, of } from 'rxjs';
7
- import _ from 'lodash';
6
+ import { pipe, tap, map, switchMap, forkJoin, of, take, BehaviorSubject, Observable, Subject, firstValueFrom, shareReplay as shareReplay$1, catchError } from 'rxjs';
8
7
  import { HttpClient, HttpParams, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
9
8
  import { APP_CONFIG, toApiRequestParams } from '@rolatech/angular-common';
10
9
  import { Location, isPlatformBrowser, DOCUMENT } from '@angular/common';
@@ -13,6 +12,7 @@ import { BreakpointObserver, Breakpoints, MediaMatcher } from '@angular/cdk/layo
13
12
  import { map as map$1, shareReplay, finalize } from 'rxjs/operators';
14
13
  import { MatSnackBar } from '@angular/material/snack-bar';
15
14
  import { Title } from '@angular/platform-browser';
15
+ import _ from 'lodash';
16
16
 
17
17
  class DialogComponent {
18
18
  onEsc() {
@@ -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.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]" }] });
75
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
76
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.5", 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.2.1", ngImport: i0, type: DialogComponent, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", 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: [{
@@ -86,72 +86,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
86
86
  class BaseService {
87
87
  http = inject(HttpClient);
88
88
  environment = inject(APP_CONFIG);
89
- actionUrl;
90
- endpoint;
91
- constructor() {
92
- this.init();
89
+ get withCredentials() {
90
+ return true;
91
+ }
92
+ get actionUrl() {
93
+ return this.joinUrl(this.environment.baseUrl, this.endpoint);
93
94
  }
94
- init() {
95
- this.actionUrl = `${this.environment.baseUrl}/${this.endpoint}`;
95
+ // 👇 1. Refactored to use the HttpOptions pattern
96
+ get(path, options) {
97
+ return this.http.get(this.buildUrl(path), {
98
+ params: this.buildParams(options?.params),
99
+ headers: this.buildHeaders(options?.headers),
100
+ withCredentials: options?.withCredentials ?? this.withCredentials,
101
+ });
102
+ }
103
+ post(path, body, options) {
104
+ return this.http.post(this.buildUrl(path), body ?? {}, {
105
+ params: this.buildParams(options?.params),
106
+ headers: this.buildHeaders(options?.headers),
107
+ withCredentials: options?.withCredentials ?? this.withCredentials,
108
+ });
96
109
  }
97
- params(options) {
98
- if (!options) {
99
- return {};
110
+ put(path, body, options) {
111
+ return this.http.put(this.buildUrl(path), body, {
112
+ params: this.buildParams(options?.params),
113
+ headers: this.buildHeaders(options?.headers),
114
+ withCredentials: options?.withCredentials ?? this.withCredentials,
115
+ });
116
+ }
117
+ patch(path, body, options) {
118
+ return this.http.patch(this.buildUrl(path), body, {
119
+ params: this.buildParams(options?.params),
120
+ headers: this.buildHeaders(options?.headers),
121
+ withCredentials: options?.withCredentials ?? this.withCredentials,
122
+ });
123
+ }
124
+ delete(path, options) {
125
+ return this.http.delete(this.buildUrl(path), {
126
+ body: options?.body,
127
+ params: this.buildParams(options?.params),
128
+ headers: this.buildHeaders(options?.headers),
129
+ withCredentials: options?.withCredentials ?? this.withCredentials,
130
+ });
131
+ }
132
+ buildUrl(path) {
133
+ return path ? this.joinUrl(this.actionUrl, path) : this.actionUrl;
134
+ }
135
+ // 👇 4. Updated to accept the specific ApiRequestOptions
136
+ buildParams(params) {
137
+ let httpParams = new HttpParams();
138
+ if (!params)
139
+ return httpParams;
140
+ if (params instanceof HttpParams)
141
+ return params;
142
+ for (const [key, value] of Object.entries(params)) {
143
+ httpParams = this.appendParam(httpParams, key, value);
144
+ }
145
+ return httpParams;
146
+ }
147
+ buildHeaders(headers) {
148
+ if (!headers) {
149
+ return undefined;
150
+ }
151
+ if (headers instanceof HttpHeaders) {
152
+ return headers;
153
+ }
154
+ let result = new HttpHeaders();
155
+ for (const [key, value] of Object.entries(headers)) {
156
+ if (Array.isArray(value)) {
157
+ value.forEach((item) => {
158
+ result = result.append(key, item);
159
+ });
160
+ }
161
+ else {
162
+ result = result.set(key, value);
163
+ }
100
164
  }
101
- return Object.entries(options).reduce((acc, [key, value]) => {
102
- if (value !== undefined && value !== null && value !== '') {
103
- acc[key] = value;
165
+ return result;
166
+ }
167
+ unwrapData() {
168
+ return pipe(tap((response) => {
169
+ // Assuming '0' or '200' is your backend's success code.
170
+ // Adjust this condition based on your actual API design.
171
+ if (response.code !== 0 && response.code !== 200) {
172
+ // This throws the error to the component's error() block,
173
+ // completely bypassing the next() block.
174
+ throw new Error(response.message || 'An unknown API error occurred');
104
175
  }
105
- return acc;
106
- }, {});
176
+ }), map((response) => response.data));
177
+ }
178
+ unwrapPayload(payload) {
179
+ if (payload && typeof payload === 'object' && 'data' in payload) {
180
+ return payload.data;
181
+ }
182
+ return payload;
107
183
  }
184
+ stringifyParamValue(value) {
185
+ return value instanceof Date ? value.toISOString() : String(value);
186
+ }
187
+ appendParam(params, key, value) {
188
+ // 1. Check the top-level value
189
+ if (this.isNullOrEmpty(value))
190
+ return params;
191
+ if (Array.isArray(value)) {
192
+ let nextParams = params;
193
+ for (const item of value) {
194
+ // 2. Capture the item in a constant after the null check
195
+ if (!this.isNullOrEmpty(item)) {
196
+ // TypeScript now knows 'item' is not null or undefined here
197
+ nextParams = nextParams.append(key, this.stringifyParamValue(item));
198
+ }
199
+ }
200
+ return nextParams;
201
+ }
202
+ // 3. Since we checked isNullOrEmpty at the start, 'value' is safe here
203
+ return params.set(key, this.stringifyParamValue(value));
204
+ }
205
+ isNullOrEmpty(val) {
206
+ return val === null || val === undefined || val === '';
207
+ }
208
+ joinUrl(...parts) {
209
+ return parts
210
+ .filter(Boolean)
211
+ .map((part) => part.trim())
212
+ .join('/')
213
+ .replace(/(?<!:)\/{2,}/g, '/');
214
+ }
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
216
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BaseService });
217
+ }
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BaseService, decorators: [{
219
+ type: Injectable
220
+ }] });
221
+
222
+ class ProductService extends BaseService {
223
+ endpoint = 'products';
108
224
  find(options, withCredentials = true) {
109
- return this.http.get(this.actionUrl, {
225
+ return this.get(undefined, {
110
226
  params: options,
111
227
  withCredentials,
112
228
  });
113
229
  }
114
- get(id, options, withCredentials = true) {
115
- return this.http.get(`${this.actionUrl}/${id}`, {
116
- params: options,
117
- withCredentials,
230
+ getProduct(productId, options) {
231
+ return this.get(productId, {
232
+ ...(options ?? {}),
233
+ withCredentials: options?.withCredentials ?? true,
118
234
  });
119
235
  }
120
- create(item) {
121
- return this.http.post(`${this.actionUrl}`, item, {
236
+ create(data) {
237
+ return this.post(undefined, data, {
122
238
  withCredentials: true,
123
239
  });
124
240
  }
125
241
  update(id, data) {
126
- return this.http.put(`${this.actionUrl}/${id}`, data, {
127
- withCredentials: true,
128
- });
129
- }
130
- delete(id) {
131
- return this.http.delete(`${this.actionUrl}/${id}`, {
242
+ return this.put(id, data, {
132
243
  withCredentials: true,
133
244
  });
134
245
  }
135
- updateStatus(id, data) {
136
- return this.http.put(`${this.actionUrl}/${id}/status`, data, {
137
- withCredentials: true,
246
+ deleteProduct(productId, options) {
247
+ return this.delete(productId, {
248
+ ...(options ?? {}),
249
+ withCredentials: options?.withCredentials ?? true,
138
250
  });
139
251
  }
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' });
142
- }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BaseService, decorators: [{
144
- type: Injectable,
145
- args: [{
146
- providedIn: 'root',
147
- }]
148
- }], ctorParameters: () => [] });
149
-
150
- class ProductService extends BaseService {
151
- init() {
152
- this.endpoint = 'products';
153
- super.init();
154
- }
155
252
  me(options) {
156
253
  return this.http.get(`${this.actionUrl}/me`, {
157
254
  params: options,
@@ -312,10 +409,10 @@ class ProductService extends BaseService {
312
409
  withCredentials: true,
313
410
  });
314
411
  }
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' });
412
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
413
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductService, providedIn: 'root' });
317
414
  }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductService, decorators: [{
415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductService, decorators: [{
319
416
  type: Injectable,
320
417
  args: [{
321
418
  providedIn: 'root',
@@ -328,70 +425,87 @@ var CartEventType;
328
425
  CartEventType[CartEventType["CartRemove"] = 1] = "CartRemove";
329
426
  })(CartEventType || (CartEventType = {}));
330
427
  class CartService extends BaseService {
428
+ endpoint = 'carts';
331
429
  productService = inject(ProductService);
332
430
  cartEvent = new EventEmitter();
333
- init() {
334
- this.endpoint = 'carts';
335
- super.init();
431
+ cartEvent$ = this.cartEvent.asObservable();
432
+ find(options) {
433
+ return this.get(undefined, {
434
+ params: options,
435
+ });
436
+ }
437
+ create(data) {
438
+ return this.post(undefined, data);
439
+ }
440
+ update(id, data) {
441
+ return this.put(id, data);
336
442
  }
337
443
  findDetails(options) {
338
- return this.http
339
- .get(`${this.actionUrl}`, {
444
+ return this.get(undefined, {
340
445
  params: options,
341
- withCredentials: true,
342
- })
343
- .pipe(switchMap((res) => {
344
- const productIds = _.uniq(_.map(res.data, 'productId')); // [12, 14, 16, 18]
345
- return this.findProductsByIds(productIds).pipe(map((products) => {
346
- res.data?.forEach((item) => {
347
- const matchingProduct = _.find(products.data, { id: item.productId });
348
- item.product = matchingProduct;
349
- });
350
- return res;
351
- }));
352
- }), switchMap((res) => {
353
- const variantIds = _.uniq(_.map(res.data, 'variantId')); // [12, 14, 16, 18]
354
- return this.findVariantsByIds(variantIds).pipe(map((variants) => {
355
- res.data?.forEach((item) => {
356
- const matchingVariant = _.find(variants.data, { id: item.variantId });
357
- item.variant = matchingVariant;
358
- });
359
- return res;
446
+ }).pipe(this.unwrapData(), map((items) => items ?? []), map((items) => this.normalizeItems(items)),
447
+ // load related data only once
448
+ // then enrich items immutably
449
+ // and return clean typed result
450
+ // no in-place mutation
451
+ switchMap((items) => {
452
+ const productIds = this.uniqueIds(items.map((item) => item.productId));
453
+ const variantIds = this.uniqueIds(items.map((item) => item.variantId));
454
+ return forkJoin({
455
+ products: productIds.length ? this.productService.findByIds(productIds) : of([]),
456
+ variants: variantIds.length ? this.productService.findVariantsByIds(variantIds) : of([]),
457
+ }).pipe(map(({ products, variants }) => {
458
+ const productList = this.unwrapFlexible(products);
459
+ const variantList = this.unwrapFlexible(variants);
460
+ return items.map((item) => ({
461
+ ...item,
462
+ product: productList.find((product) => product?.id === item.productId),
463
+ variant: variantList.find((variant) => variant?.id === item.variantId),
464
+ }));
360
465
  }));
361
466
  }));
362
467
  }
363
- findProductsByIds(ids) {
364
- return this.productService.findByIds(ids);
365
- }
366
- findVariantsByIds(ids) {
367
- return this.productService.findVariantsByIds(ids);
368
- }
369
468
  by(options) {
370
- return this.http.get(`${this.actionUrl}/items/by`, {
469
+ return this.get('items/by', {
371
470
  params: options,
372
- withCredentials: true,
373
- });
471
+ }).pipe(this.unwrapData());
374
472
  }
375
473
  me(options) {
376
- return this.http.get(`${this.actionUrl}/me`, {
474
+ return this.get('me', {
377
475
  params: options,
378
- withCredentials: true,
379
- });
476
+ }).pipe(this.unwrapData());
477
+ }
478
+ remove(cartId) {
479
+ return this.delete(cartId).pipe(tap(() => {
480
+ this.cartEvent.emit(CartEventType.CartRemove);
481
+ }), this.unwrapData());
380
482
  }
381
483
  deleteByIds(ids) {
382
- return this.http.delete(`${this.actionUrl}/me`, {
383
- withCredentials: true,
384
- });
484
+ return this.delete('me', { body: ids }).pipe(tap(() => {
485
+ this.cartEvent.emit(CartEventType.CartRemove);
486
+ }), this.unwrapData());
385
487
  }
386
488
  deleteAll() {
387
- return this.http.delete(`${this.actionUrl}/me`, {
388
- withCredentials: true,
389
- });
489
+ return this.delete('me').pipe(tap(() => {
490
+ this.cartEvent.emit(CartEventType.CartRemove);
491
+ }), this.unwrapData());
492
+ }
493
+ normalizeItems(items) {
494
+ return Array.isArray(items) ? items : [];
495
+ }
496
+ uniqueIds(values) {
497
+ return [...new Set(values.filter((value) => !!value))];
390
498
  }
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' });
499
+ unwrapFlexible(payload) {
500
+ if (payload && typeof payload === 'object' && 'data' in payload) {
501
+ return payload.data;
502
+ }
503
+ return payload;
504
+ }
505
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CartService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
506
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CartService, providedIn: 'root' });
393
507
  }
394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CartService, decorators: [{
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CartService, decorators: [{
395
509
  type: Injectable,
396
510
  args: [{
397
511
  providedIn: 'root',
@@ -434,10 +548,10 @@ class NavigationService {
434
548
  }
435
549
  return '';
436
550
  }
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' });
551
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
552
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, providedIn: 'root' });
439
553
  }
440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NavigationService, decorators: [{
554
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NavigationService, decorators: [{
441
555
  type: Injectable,
442
556
  args: [{
443
557
  providedIn: 'root',
@@ -460,11 +574,14 @@ class DialogService {
460
574
  confirmed() {
461
575
  return this.dialogRef.afterClosed().pipe(take(1), map((res) => res));
462
576
  }
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 });
577
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
578
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DialogService, providedIn: 'root' });
465
579
  }
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DialogService, decorators: [{
467
- type: Injectable
580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DialogService, decorators: [{
581
+ type: Injectable,
582
+ args: [{
583
+ providedIn: 'root',
584
+ }]
468
585
  }] });
469
586
 
470
587
  class LoadingService {
@@ -484,10 +601,10 @@ class LoadingService {
484
601
  async dismiss() {
485
602
  this.isLoading = false;
486
603
  }
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' });
604
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
605
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingService, providedIn: 'root' });
489
606
  }
490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingService, decorators: [{
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingService, decorators: [{
491
608
  type: Injectable,
492
609
  args: [{
493
610
  providedIn: 'root',
@@ -495,17 +612,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
495
612
  }], ctorParameters: () => [] });
496
613
 
497
614
  class MediaService extends BaseService {
498
- init() {
499
- this.endpoint = 'media';
500
- super.init();
501
- }
615
+ endpoint = 'media';
502
616
  upload(data) {
503
617
  return this.http.post(`${this.actionUrl}/upload`, data, {
504
618
  reportProgress: false,
505
619
  withCredentials: true,
506
- // headers: new HttpHeaders({
507
- // 'Content-Type': 'multipart/form-data',
508
- // }),
509
620
  });
510
621
  }
511
622
  uploadAndSave(data) {
@@ -535,10 +646,10 @@ class MediaService extends BaseService {
535
646
  getImageInfo(url) {
536
647
  return this.http.get(`${url}?imageInfo`);
537
648
  }
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' });
649
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MediaService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
650
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MediaService, providedIn: 'root' });
540
651
  }
541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MediaService, decorators: [{
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MediaService, decorators: [{
542
653
  type: Injectable,
543
654
  args: [{
544
655
  providedIn: 'root',
@@ -550,12 +661,10 @@ class LayoutService {
550
661
  route = inject(ActivatedRoute);
551
662
  router = inject(Router);
552
663
  isHandset$;
553
- _hideFooter = signal(false, ...(ngDevMode ? [{ debugName: "_hideFooter" }] : []));
554
- hideFooter = computed(() => this._hideFooter(), ...(ngDevMode ? [{ debugName: "hideFooter" }] : []));
664
+ _hideFooter = signal(false, ...(ngDevMode ? [{ debugName: "_hideFooter" }] : /* istanbul ignore next */ []));
665
+ hideFooter = computed(() => this._hideFooter(), ...(ngDevMode ? [{ debugName: "hideFooter" }] : /* istanbul ignore next */ []));
555
666
  constructor() {
556
- this.isHandset$ = this.breakpointObserver
557
- .observe([Breakpoints.Small, Breakpoints.HandsetPortrait])
558
- .pipe(map$1((result) => result.matches), shareReplay());
667
+ this.isHandset$ = this.breakpointObserver.observe([Breakpoints.Small, Breakpoints.HandsetPortrait]).pipe(map$1((result) => result.matches), shareReplay());
559
668
  this.router.events
560
669
  // .pipe(filter((e): e is NavigationEnd => e instanceof NavigationEnd))
561
670
  .subscribe(() => {
@@ -569,11 +678,14 @@ class LayoutService {
569
678
  setHideFooter(v) {
570
679
  this._hideFooter.set(v);
571
680
  }
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 });
681
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
682
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, providedIn: 'root' });
574
683
  }
575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LayoutService, decorators: [{
576
- type: Injectable
684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutService, decorators: [{
685
+ type: Injectable,
686
+ args: [{
687
+ providedIn: 'root',
688
+ }]
577
689
  }], ctorParameters: () => [] });
578
690
 
579
691
  class SnackBarService {
@@ -584,11 +696,14 @@ class SnackBarService {
584
696
  dismiss() {
585
697
  this.snackBar.dismiss();
586
698
  }
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 });
699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
700
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SnackBarService, providedIn: 'root' });
589
701
  }
590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackBarService, decorators: [{
591
- type: Injectable
702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SnackBarService, decorators: [{
703
+ type: Injectable,
704
+ args: [{
705
+ providedIn: 'root',
706
+ }]
592
707
  }] });
593
708
 
594
709
  class SupportService {
@@ -652,10 +767,10 @@ class SupportService {
652
767
  withCredentials: true,
653
768
  });
654
769
  }
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' });
770
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
771
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SupportService, providedIn: 'root' });
657
772
  }
658
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SupportService, decorators: [{
773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SupportService, decorators: [{
659
774
  type: Injectable,
660
775
  args: [{
661
776
  providedIn: 'root',
@@ -683,10 +798,10 @@ class BreadcrumbService {
683
798
  relativeTo: route,
684
799
  });
685
800
  }
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' });
801
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
802
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BreadcrumbService, providedIn: 'root' });
688
803
  }
689
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BreadcrumbService, decorators: [{
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BreadcrumbService, decorators: [{
690
805
  type: Injectable,
691
806
  args: [{
692
807
  providedIn: 'root',
@@ -718,11 +833,14 @@ class SidenavService {
718
833
  this.isCollaped = !this.isMobile && !this.sidenav?.opened;
719
834
  }
720
835
  lists() { }
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 });
836
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SidenavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
837
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SidenavService, providedIn: 'root' });
723
838
  }
724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SidenavService, decorators: [{
725
- type: Injectable
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SidenavService, decorators: [{
840
+ type: Injectable,
841
+ args: [{
842
+ providedIn: 'root',
843
+ }]
726
844
  }], ctorParameters: () => [] });
727
845
 
728
846
  class ThemeService {
@@ -759,10 +877,10 @@ class ThemeService {
759
877
  setDarkTheme(isDarkTheme) {
760
878
  this.darkTheme.next(isDarkTheme);
761
879
  }
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' });
880
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
881
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemeService, providedIn: 'root' });
764
882
  }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeService, decorators: [{
883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemeService, decorators: [{
766
884
  type: Injectable,
767
885
  args: [{
768
886
  providedIn: 'root',
@@ -770,100 +888,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
770
888
  }], ctorParameters: () => [] });
771
889
 
772
890
  class OrderService extends BaseService {
773
- init() {
774
- this.endpoint = 'orders';
775
- super.init();
891
+ endpoint = 'orders';
892
+ create(data) {
893
+ return this.post(undefined, data, {
894
+ withCredentials: true,
895
+ });
896
+ }
897
+ getOrder(orderId, options) {
898
+ return this.get(orderId, {
899
+ ...(options ?? {}),
900
+ withCredentials: options?.withCredentials ?? true,
901
+ });
776
902
  }
777
903
  createPaymentIntent(id) {
778
- return this.http.post(`${this.actionUrl}/${id}/create-payment-intent`, {}, {
904
+ return this.post(`${id}/create-payment-intent`, {}, {
779
905
  withCredentials: true,
780
906
  });
781
907
  }
782
908
  by(options) {
783
- return this.http.get(`${this.actionUrl}/items/by`, {
909
+ return this.get('items/by', {
784
910
  params: options,
785
911
  withCredentials: true,
786
912
  });
787
913
  }
788
914
  me(options) {
789
- return this.http.get(`${this.actionUrl}/me`, {
915
+ return this.get('me', {
790
916
  params: options,
791
917
  withCredentials: true,
792
918
  });
793
919
  }
794
920
  merchant(options) {
795
- return this.http.get(`${this.actionUrl}/merchant`, {
921
+ return this.get('merchant', {
796
922
  params: options,
797
923
  withCredentials: true,
798
924
  });
799
925
  }
800
926
  timeline(id) {
801
- return this.http.get(`${this.actionUrl}/${id}/timeline`, {
927
+ return this.get(`${id}/timeline`, {
802
928
  withCredentials: true,
803
929
  });
804
930
  }
805
931
  pay(id) {
806
- return this.http.post(`${this.actionUrl}/${id}/pay`, {}, {
932
+ return this.post(`${id}/pay`, {}, {
807
933
  withCredentials: true,
808
934
  });
809
935
  }
810
936
  refund(id, data) {
811
- return this.http.post(`${this.actionUrl}/${id}/refund`, data, {
937
+ return this.post(`${id}/refund`, data, {
812
938
  withCredentials: true,
813
939
  });
814
940
  }
815
941
  findAllReturns(options) {
816
- return this.http.get(`${this.actionUrl}/returns`, {
942
+ return this.get('returns', {
817
943
  params: options,
818
944
  withCredentials: true,
819
945
  });
820
946
  }
821
947
  findAllReturnsByInstructor(options) {
822
- return this.http.get(`${this.actionUrl}/returns/instructor`, {
948
+ return this.get('returns/instructor', {
823
949
  params: options,
824
950
  withCredentials: true,
825
951
  });
826
952
  }
827
953
  getReturn(id) {
828
- return this.http.get(`${this.actionUrl}/returns/${id}`, {
954
+ return this.get(`returns/${id}`, {
829
955
  withCredentials: true,
830
956
  });
831
957
  }
832
958
  returnApprove(id) {
833
- return this.http.post(`${this.actionUrl}/returns/${id}/approve`, {}, {
959
+ return this.post(`returns/${id}/approve`, {}, {
834
960
  withCredentials: true,
835
961
  });
836
962
  }
837
963
  returnReject(id, data) {
838
- return this.http.post(`${this.actionUrl}/returns/${id}/reject`, data, {
964
+ return this.post(`returns/${id}/reject`, data, {
839
965
  withCredentials: true,
840
966
  });
841
967
  }
842
968
  cancel(id) {
843
- return this.http.post(`${this.actionUrl}/${id}/cancel`, {}, {
969
+ return this.post(`${id}/cancel`, {}, {
844
970
  withCredentials: true,
845
971
  });
846
972
  }
847
973
  countMeByStatus(options) {
848
- return this.http.get(`${this.actionUrl}/count/me/by`, {
974
+ return this.get('count/me/by', {
849
975
  params: options,
850
976
  withCredentials: true,
851
977
  });
852
978
  }
853
979
  fulfill(orderId, data) {
854
- return this.http.post(`${this.actionUrl}/${orderId}/fulfillment`, data, {
980
+ return this.post(`${orderId}/fulfillment`, data, {
855
981
  withCredentials: true,
856
982
  });
857
983
  }
858
984
  getMerchantOrder(orderId) {
859
- return this.http.get(`${this.actionUrl}/${orderId}/by/merchant`, {
985
+ return this.get(`${orderId}/by/merchant`, {
860
986
  withCredentials: true,
861
987
  });
862
988
  }
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' });
989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
990
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderService, providedIn: 'root' });
865
991
  }
866
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderService, decorators: [{
992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderService, decorators: [{
867
993
  type: Injectable,
868
994
  args: [{
869
995
  providedIn: 'root',
@@ -871,10 +997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
871
997
  }] });
872
998
 
873
999
  class InventoryService extends BaseService {
874
- init() {
875
- this.endpoint = 'inventories';
876
- super.init();
877
- }
1000
+ endpoint = 'inventories';
878
1001
  getLocation(locationId) {
879
1002
  return this.http.get(`${this.actionUrl}/locations/${locationId}`, { withCredentials: true });
880
1003
  }
@@ -945,10 +1068,10 @@ class InventoryService extends BaseService {
945
1068
  adjustStocksByLocationId(data) {
946
1069
  return this.http.put(`${this.actionUrl}/levels/adjust`, data, { withCredentials: true });
947
1070
  }
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' });
1071
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InventoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1072
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InventoryService, providedIn: 'root' });
950
1073
  }
951
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InventoryService, decorators: [{
1074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InventoryService, decorators: [{
952
1075
  type: Injectable,
953
1076
  args: [{
954
1077
  providedIn: 'root',
@@ -960,10 +1083,10 @@ class NotificationStore {
960
1083
  getCount() {
961
1084
  return this.$count.asObservable();
962
1085
  }
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' });
1086
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1087
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationStore, providedIn: 'root' });
965
1088
  }
966
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationStore, decorators: [{
1089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationStore, decorators: [{
967
1090
  type: Injectable,
968
1091
  args: [{
969
1092
  providedIn: 'root',
@@ -1035,10 +1158,10 @@ class NotificationService {
1035
1158
  return data;
1036
1159
  }));
1037
1160
  }
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' });
1161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1162
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationService, providedIn: 'root' });
1040
1163
  }
1041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, decorators: [{
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationService, decorators: [{
1042
1165
  type: Injectable,
1043
1166
  args: [{
1044
1167
  providedIn: 'root',
@@ -1046,34 +1169,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1046
1169
  }] });
1047
1170
 
1048
1171
  class ProductCategoryService extends BaseService {
1049
- init() {
1050
- this.endpoint = 'products/categories';
1051
- super.init();
1172
+ endpoint = 'products/categories';
1173
+ find(options, withCredentials = true) {
1174
+ return this.get(undefined, {
1175
+ params: options,
1176
+ withCredentials,
1177
+ });
1178
+ }
1179
+ getProductCategory(categoryId, options) {
1180
+ return this.get(categoryId, {
1181
+ ...(options ?? {}),
1182
+ withCredentials: options?.withCredentials ?? true,
1183
+ });
1184
+ }
1185
+ create(data) {
1186
+ return this.post(undefined, data, {
1187
+ withCredentials: true,
1188
+ });
1189
+ }
1190
+ update(id, data) {
1191
+ return this.put(id, data, {
1192
+ withCredentials: true,
1193
+ });
1194
+ }
1195
+ deleteProductCategory(categoryId, options) {
1196
+ return this.delete(categoryId, {
1197
+ ...(options ?? {}),
1198
+ withCredentials: options?.withCredentials ?? true,
1199
+ });
1052
1200
  }
1053
1201
  uploadMedia(id, data) {
1054
- return this.http.post(`${this.actionUrl}/${id}/media`, data, {
1202
+ return this.post(`${id}/media`, data, {
1055
1203
  withCredentials: true,
1056
1204
  });
1057
1205
  }
1058
1206
  deleteMedia(id, mediaId) {
1059
- return this.http.delete(`${this.actionUrl}/${id}/media/${mediaId}`, {
1207
+ return this.delete(`${id}/media/${mediaId}`, {
1060
1208
  withCredentials: true,
1061
1209
  });
1062
1210
  }
1063
1211
  importFromExcel(data) {
1064
- return this.http.post(`${this.actionUrl}/excel`, data, {
1212
+ return this.post('excel', data, {
1065
1213
  withCredentials: true,
1066
1214
  });
1067
1215
  }
1068
1216
  createFromExcel(data) {
1069
- return this.http.post(`${this.actionUrl}/list`, data, {
1217
+ return this.post('list', data, {
1070
1218
  withCredentials: true,
1071
1219
  });
1072
1220
  }
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' });
1221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductCategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1222
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductCategoryService, providedIn: 'root' });
1075
1223
  }
1076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ProductCategoryService, decorators: [{
1224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ProductCategoryService, decorators: [{
1077
1225
  type: Injectable,
1078
1226
  args: [{
1079
1227
  providedIn: 'root',
@@ -1115,10 +1263,10 @@ class NotificationTemplateService {
1115
1263
  withCredentials: true,
1116
1264
  });
1117
1265
  }
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' });
1266
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationTemplateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1267
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationTemplateService, providedIn: 'root' });
1120
1268
  }
1121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationTemplateService, decorators: [{
1269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: NotificationTemplateService, decorators: [{
1122
1270
  type: Injectable,
1123
1271
  args: [{
1124
1272
  providedIn: 'root',
@@ -1126,10 +1274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1126
1274
  }] });
1127
1275
 
1128
1276
  class FulfillmentService extends BaseService {
1129
- init() {
1130
- this.endpoint = 'fulfillments';
1131
- super.init();
1132
- }
1277
+ endpoint = 'fulfillments';
1133
1278
  fulfill(orderId, data) {
1134
1279
  return this.http.post(`${this.actionUrl}/orders/${orderId}`, data, {
1135
1280
  withCredentials: true,
@@ -1140,10 +1285,10 @@ class FulfillmentService extends BaseService {
1140
1285
  withCredentials: true,
1141
1286
  });
1142
1287
  }
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' });
1288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FulfillmentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1289
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FulfillmentService, providedIn: 'root' });
1145
1290
  }
1146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FulfillmentService, decorators: [{
1291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FulfillmentService, decorators: [{
1147
1292
  type: Injectable,
1148
1293
  args: [{
1149
1294
  providedIn: 'root',
@@ -1159,10 +1304,10 @@ class TitleService {
1159
1304
  setTitle(newTitle) {
1160
1305
  this.titleService.setTitle(`${newTitle} - ${this.environment.name}`);
1161
1306
  }
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' });
1307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TitleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1308
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TitleService, providedIn: 'root' });
1164
1309
  }
1165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TitleService, decorators: [{
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TitleService, decorators: [{
1166
1311
  type: Injectable,
1167
1312
  args: [{
1168
1313
  providedIn: 'root',
@@ -1170,13 +1315,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1170
1315
  }] });
1171
1316
 
1172
1317
  class PostService extends BaseService {
1173
- init() {
1174
- this.endpoint = 'posts';
1175
- super.init();
1176
- }
1318
+ endpoint = 'posts';
1177
1319
  list(options, withCredentials = false) {
1178
- return this.http.get(this.actionUrl, {
1179
- params: this.params(options),
1320
+ return this.get(undefined, {
1321
+ params: options,
1180
1322
  withCredentials,
1181
1323
  });
1182
1324
  }
@@ -1184,51 +1326,50 @@ class PostService extends BaseService {
1184
1326
  return this.list({ ...options, status: options?.status ?? 'PUBLISHED' }, false);
1185
1327
  }
1186
1328
  getByIdOrSlug(idOrSlug, withCredentials = false) {
1187
- return this.http.get(`${this.actionUrl}/${idOrSlug}`, {
1329
+ return this.get(idOrSlug, {
1188
1330
  withCredentials,
1189
1331
  });
1190
1332
  }
1191
1333
  me(options) {
1192
- return this.http.get(`${this.actionUrl}/me`, {
1193
- params: this.params(options),
1194
- withCredentials: true,
1334
+ return this.get('me', {
1335
+ params: options,
1195
1336
  });
1196
1337
  }
1197
1338
  merchant(options) {
1198
- return this.http.get(`${this.actionUrl}/merchant`, {
1199
- params: this.params(options),
1339
+ return this.get('merchant', {
1340
+ params: options,
1200
1341
  withCredentials: true,
1201
1342
  });
1202
1343
  }
1203
1344
  createPost(payload) {
1204
- return this.http.post(this.actionUrl, payload, {
1345
+ return this.post(undefined, payload, {
1205
1346
  withCredentials: true,
1206
1347
  });
1207
1348
  }
1208
1349
  updatePost(id, payload) {
1209
- return this.http.put(`${this.actionUrl}/${id}`, payload, {
1350
+ return this.put(id, payload, {
1210
1351
  withCredentials: true,
1211
1352
  });
1212
1353
  }
1213
1354
  saveDraft(id, payload = {}) {
1214
- return this.http.post(`${this.actionUrl}/${id}/draft`, payload, {
1355
+ return this.post(`${id}/draft`, payload, {
1215
1356
  withCredentials: true,
1216
1357
  });
1217
1358
  }
1218
1359
  publish(id, payload = {}) {
1219
- return this.http.post(`${this.actionUrl}/${id}/publish`, payload, {
1360
+ return this.post(`${id}/publish`, payload, {
1220
1361
  withCredentials: true,
1221
1362
  });
1222
1363
  }
1223
1364
  preview(payload) {
1224
- return this.http.post(`${this.actionUrl}/preview`, payload, {
1365
+ return this.post('preview', payload, {
1225
1366
  withCredentials: true,
1226
1367
  });
1227
1368
  }
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' });
1369
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PostService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1370
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PostService, providedIn: 'root' });
1230
1371
  }
1231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PostService, decorators: [{
1372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PostService, decorators: [{
1232
1373
  type: Injectable,
1233
1374
  args: [{
1234
1375
  providedIn: 'root',
@@ -1236,25 +1377,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1236
1377
  }] });
1237
1378
 
1238
1379
  class OrderPayoutService extends BaseService {
1239
- init() {
1240
- this.endpoint = 'orders/payouts';
1241
- super.init();
1380
+ endpoint = 'orders/payouts';
1381
+ find(options, withCredentials = true) {
1382
+ return this.get(undefined, {
1383
+ params: options,
1384
+ withCredentials,
1385
+ });
1386
+ }
1387
+ getPayout(id, withCredentials = true) {
1388
+ return this.get(id, {
1389
+ withCredentials,
1390
+ });
1242
1391
  }
1243
1392
  me(options) {
1244
- return this.http.get(`${this.actionUrl}/me`, {
1393
+ return this.get('me', {
1245
1394
  params: options,
1246
1395
  withCredentials: true,
1247
1396
  });
1248
1397
  }
1249
1398
  approve(id) {
1250
- return this.http.post(`${this.actionUrl}/${id}/approve`, {}, {
1399
+ return this.post(`${id}/approve`, {}, {
1251
1400
  withCredentials: true,
1252
1401
  });
1253
1402
  }
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' });
1403
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderPayoutService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1404
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderPayoutService, providedIn: 'root' });
1256
1405
  }
1257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrderPayoutService, decorators: [{
1406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrderPayoutService, decorators: [{
1258
1407
  type: Injectable,
1259
1408
  args: [{
1260
1409
  providedIn: 'root',
@@ -1262,9 +1411,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1262
1411
  }] });
1263
1412
 
1264
1413
  class ResourceService extends BaseService {
1265
- init() {
1266
- this.endpoint = 'resources';
1267
- super.init();
1414
+ endpoint = 'resources';
1415
+ find(options, withCredentials = true) {
1416
+ return this.get(undefined, {
1417
+ params: options,
1418
+ withCredentials,
1419
+ });
1420
+ }
1421
+ getResource(resourceId, options) {
1422
+ return this.get(resourceId, {
1423
+ ...(options ?? {}),
1424
+ withCredentials: options?.withCredentials ?? true,
1425
+ });
1426
+ }
1427
+ create(data) {
1428
+ return this.post(undefined, data, {
1429
+ withCredentials: true,
1430
+ });
1431
+ }
1432
+ update(id, data) {
1433
+ return this.put(id, data, {
1434
+ withCredentials: true,
1435
+ });
1436
+ }
1437
+ deleteResource(resourceId, options) {
1438
+ return this.delete(resourceId, {
1439
+ ...(options ?? {}),
1440
+ withCredentials: options?.withCredentials ?? true,
1441
+ });
1268
1442
  }
1269
1443
  me(options) {
1270
1444
  return this.http.get(`${this.actionUrl}/me`, {
@@ -1423,10 +1597,10 @@ class ResourceService extends BaseService {
1423
1597
  withCredentials: true,
1424
1598
  });
1425
1599
  }
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' });
1600
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1601
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceService, providedIn: 'root' });
1428
1602
  }
1429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceService, decorators: [{
1603
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceService, decorators: [{
1430
1604
  type: Injectable,
1431
1605
  args: [{
1432
1606
  providedIn: 'root',
@@ -1434,9 +1608,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1434
1608
  }] });
1435
1609
 
1436
1610
  class ResourceCategoryService extends BaseService {
1437
- init() {
1438
- this.endpoint = 'resources/categories';
1439
- super.init();
1611
+ endpoint = 'resources/categories';
1612
+ find(options, withCredentials = true) {
1613
+ return this.get(undefined, {
1614
+ params: options,
1615
+ withCredentials,
1616
+ });
1440
1617
  }
1441
1618
  uploadMedia(id, data) {
1442
1619
  return this.http.post(`${this.actionUrl}/${id}/media`, data, {
@@ -1448,10 +1625,10 @@ class ResourceCategoryService extends BaseService {
1448
1625
  withCredentials: true,
1449
1626
  });
1450
1627
  }
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' });
1628
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceCategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1629
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceCategoryService, providedIn: 'root' });
1453
1630
  }
1454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ResourceCategoryService, decorators: [{
1631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ResourceCategoryService, decorators: [{
1455
1632
  type: Injectable,
1456
1633
  args: [{
1457
1634
  providedIn: 'root',
@@ -1459,10 +1636,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1459
1636
  }] });
1460
1637
 
1461
1638
  class BookingService extends BaseService {
1462
- init() {
1463
- this.endpoint = 'bookings';
1464
- super.init();
1465
- }
1639
+ endpoint = 'bookings';
1466
1640
  by(options) {
1467
1641
  return this.http.get(`${this.actionUrl}/items/by`, {
1468
1642
  params: options,
@@ -1522,10 +1696,10 @@ class BookingService extends BaseService {
1522
1696
  withCredentials: true,
1523
1697
  });
1524
1698
  }
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' });
1699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BookingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1700
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BookingService, providedIn: 'root' });
1527
1701
  }
1528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BookingService, decorators: [{
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BookingService, decorators: [{
1529
1703
  type: Injectable,
1530
1704
  args: [{
1531
1705
  providedIn: 'root',
@@ -1533,14 +1707,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1533
1707
  }] });
1534
1708
 
1535
1709
  class FacilityService extends BaseService {
1536
- init() {
1537
- this.endpoint = 'facilities';
1538
- super.init();
1539
- }
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' });
1710
+ endpoint = 'facilities';
1711
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FacilityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1712
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FacilityService, providedIn: 'root' });
1542
1713
  }
1543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FacilityService, decorators: [{
1714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FacilityService, decorators: [{
1544
1715
  type: Injectable,
1545
1716
  args: [{
1546
1717
  providedIn: 'root',
@@ -1548,14 +1719,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1548
1719
  }] });
1549
1720
 
1550
1721
  class AmenityService extends BaseService {
1551
- init() {
1552
- this.endpoint = 'resources/amenities';
1553
- super.init();
1722
+ endpoint = 'resources/amenities';
1723
+ find(options, withCredentials = true) {
1724
+ return this.get(undefined, {
1725
+ params: options,
1726
+ withCredentials,
1727
+ });
1554
1728
  }
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' });
1729
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AmenityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1730
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AmenityService, providedIn: 'root' });
1557
1731
  }
1558
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AmenityService, decorators: [{
1732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AmenityService, decorators: [{
1559
1733
  type: Injectable,
1560
1734
  args: [{
1561
1735
  providedIn: 'root',
@@ -1563,9 +1737,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
1563
1737
  }] });
1564
1738
 
1565
1739
  class PropertyService extends BaseService {
1566
- init() {
1567
- this.endpoint = 'properties';
1568
- super.init();
1740
+ endpoint = 'properties';
1741
+ find(options, withCredentials = true) {
1742
+ return this.get(undefined, {
1743
+ params: options,
1744
+ withCredentials,
1745
+ });
1746
+ }
1747
+ getProperty(propertyId, options) {
1748
+ return this.get(propertyId, {
1749
+ ...(options ?? {}),
1750
+ withCredentials: options?.withCredentials ?? true,
1751
+ });
1752
+ }
1753
+ create(data) {
1754
+ return this.post(undefined, data, {
1755
+ withCredentials: true,
1756
+ });
1757
+ }
1758
+ update(id, data) {
1759
+ return this.put(id, data, {
1760
+ withCredentials: true,
1761
+ });
1762
+ }
1763
+ deleteProperty(propertyId, options) {
1764
+ return this.delete(propertyId, {
1765
+ ...(options ?? {}),
1766
+ withCredentials: options?.withCredentials ?? true,
1767
+ });
1569
1768
  }
1570
1769
  me(options) {
1571
1770
  return this.http.get(`${this.actionUrl}/me`, {
@@ -1993,10 +2192,10 @@ class PropertyService extends BaseService {
1993
2192
  normalizeCode(value) {
1994
2193
  return typeof value === 'string' ? value.trim().toUpperCase() : value;
1995
2194
  }
1996
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1997
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, providedIn: 'root' });
2195
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2196
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyService, providedIn: 'root' });
1998
2197
  }
1999
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyService, decorators: [{
2198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyService, decorators: [{
2000
2199
  type: Injectable,
2001
2200
  args: [{
2002
2201
  providedIn: 'root',
@@ -2004,9 +2203,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2004
2203
  }] });
2005
2204
 
2006
2205
  class FeatureService extends BaseService {
2007
- init() {
2008
- this.endpoint = 'properties/user-features';
2009
- super.init();
2206
+ endpoint = 'properties/user-features';
2207
+ find(options, withCredentials = true) {
2208
+ return this.get(undefined, {
2209
+ params: options,
2210
+ withCredentials,
2211
+ });
2212
+ }
2213
+ update(featureId, data) {
2214
+ return this.put(featureId, data, {
2215
+ withCredentials: true,
2216
+ });
2010
2217
  }
2011
2218
  addFeature(data) {
2012
2219
  return this.http.post(`${this.actionUrl}`, data, {
@@ -2023,10 +2230,10 @@ class FeatureService extends BaseService {
2023
2230
  withCredentials: true,
2024
2231
  });
2025
2232
  }
2026
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2027
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, providedIn: 'root' });
2233
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FeatureService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2234
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FeatureService, providedIn: 'root' });
2028
2235
  }
2029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FeatureService, decorators: [{
2236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FeatureService, decorators: [{
2030
2237
  type: Injectable,
2031
2238
  args: [{
2032
2239
  providedIn: 'root',
@@ -2034,30 +2241,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2034
2241
  }] });
2035
2242
 
2036
2243
  class PaymentService extends BaseService {
2037
- init() {
2038
- this.endpoint = 'payments';
2039
- super.init();
2244
+ endpoint = 'payments';
2245
+ find(options, withCredentials = true) {
2246
+ return this.get(undefined, {
2247
+ params: options,
2248
+ withCredentials,
2249
+ });
2250
+ }
2251
+ getPayment(id, withCredentials = true) {
2252
+ return this.get(id, {
2253
+ withCredentials,
2254
+ });
2040
2255
  }
2041
2256
  me(options) {
2042
- return this.http.get(`${this.actionUrl}/me`, {
2257
+ return this.get('me', {
2043
2258
  params: options,
2044
2259
  withCredentials: true,
2045
2260
  });
2046
2261
  }
2047
2262
  createPaymentIntent(data) {
2048
- return this.http.post(`${this.actionUrl}/intents`, data, {
2263
+ return this.post('intents', data, {
2049
2264
  withCredentials: true,
2050
2265
  });
2051
2266
  }
2052
2267
  createPayment(data) {
2053
- return this.http.post(`${this.actionUrl}`, data, {
2268
+ return this.post(undefined, data, {
2054
2269
  withCredentials: true,
2055
2270
  });
2056
2271
  }
2057
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2058
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, providedIn: 'root' });
2272
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PaymentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2273
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PaymentService, providedIn: 'root' });
2059
2274
  }
2060
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PaymentService, decorators: [{
2275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PaymentService, decorators: [{
2061
2276
  type: Injectable,
2062
2277
  args: [{
2063
2278
  providedIn: 'root',
@@ -2065,9 +2280,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2065
2280
  }] });
2066
2281
 
2067
2282
  class OfferingService extends BaseService {
2068
- init() {
2069
- this.endpoint = 'offerings';
2070
- super.init();
2283
+ endpoint = 'offerings';
2284
+ find(options, withCredentials = true) {
2285
+ return this.get(undefined, {
2286
+ params: options,
2287
+ withCredentials,
2288
+ });
2289
+ }
2290
+ getOffering(offeringId, options) {
2291
+ return this.get(offeringId, {
2292
+ ...(options ?? {}),
2293
+ withCredentials: options?.withCredentials ?? true,
2294
+ });
2295
+ }
2296
+ createOffering(data) {
2297
+ return this.post(undefined, data, {
2298
+ withCredentials: true,
2299
+ });
2300
+ }
2301
+ updateOffering(offeringId, data) {
2302
+ return this.put(offeringId, data, {
2303
+ withCredentials: true,
2304
+ });
2071
2305
  }
2072
2306
  me(options) {
2073
2307
  return this.http.get(`${this.actionUrl}/me`, {
@@ -2419,10 +2653,10 @@ class OfferingService extends BaseService {
2419
2653
  deleteVideo(id, videoId, y) {
2420
2654
  return this.http.delete(`${this.actionUrl}/${id}/videos/${videoId}`, { withCredentials: true });
2421
2655
  }
2422
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2423
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, providedIn: 'root' });
2656
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OfferingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2657
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OfferingService, providedIn: 'root' });
2424
2658
  }
2425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OfferingService, decorators: [{
2659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OfferingService, decorators: [{
2426
2660
  type: Injectable,
2427
2661
  args: [{
2428
2662
  providedIn: 'root',
@@ -2430,9 +2664,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2430
2664
  }] });
2431
2665
 
2432
2666
  class MembershipService extends BaseService {
2433
- init() {
2434
- this.endpoint = 'memberships';
2435
- super.init();
2667
+ endpoint = 'memberships';
2668
+ findMemberships(options) {
2669
+ return this.http.get(`${this.actionUrl}`, {
2670
+ params: options,
2671
+ withCredentials: true,
2672
+ });
2436
2673
  }
2437
2674
  me(options) {
2438
2675
  return this.http.get(`${this.actionUrl}/me`, {
@@ -2481,10 +2718,10 @@ class MembershipService extends BaseService {
2481
2718
  withCredentials: true,
2482
2719
  });
2483
2720
  }
2484
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2485
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, providedIn: 'root' });
2721
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MembershipService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2722
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MembershipService, providedIn: 'root' });
2486
2723
  }
2487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: MembershipService, decorators: [{
2724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MembershipService, decorators: [{
2488
2725
  type: Injectable,
2489
2726
  args: [{
2490
2727
  providedIn: 'root',
@@ -2492,9 +2729,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2492
2729
  }] });
2493
2730
 
2494
2731
  class CategoryService extends BaseService {
2495
- init() {
2496
- this.endpoint = 'categories';
2497
- super.init();
2732
+ endpoint = 'categories';
2733
+ find(options, withCredentials = true) {
2734
+ return this.get(undefined, {
2735
+ params: options,
2736
+ withCredentials,
2737
+ });
2738
+ }
2739
+ getCategory(categoryId, options) {
2740
+ return this.get(categoryId, {
2741
+ ...(options ?? {}),
2742
+ withCredentials: options?.withCredentials ?? true,
2743
+ });
2744
+ }
2745
+ create(data) {
2746
+ return this.post(undefined, data, {
2747
+ withCredentials: true,
2748
+ });
2749
+ }
2750
+ update(id, data) {
2751
+ return this.put(id, data, {
2752
+ withCredentials: true,
2753
+ });
2754
+ }
2755
+ deleteCategory(categoryId, options) {
2756
+ return this.delete(categoryId, {
2757
+ ...(options ?? {}),
2758
+ withCredentials: options?.withCredentials ?? true,
2759
+ });
2498
2760
  }
2499
2761
  uploadMedia(id, data) {
2500
2762
  return this.http.post(`${this.actionUrl}/${id}/media`, data, {
@@ -2542,10 +2804,10 @@ class CategoryService extends BaseService {
2542
2804
  withCredentials: true,
2543
2805
  });
2544
2806
  }
2545
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2546
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, providedIn: 'root' });
2807
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2808
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CategoryService, providedIn: 'root' });
2547
2809
  }
2548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: CategoryService, decorators: [{
2810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CategoryService, decorators: [{
2549
2811
  type: Injectable,
2550
2812
  args: [{
2551
2813
  providedIn: 'root',
@@ -2567,7 +2829,7 @@ class AssistantStreamService {
2567
2829
  'client-id': this.environment.clientId,
2568
2830
  ...(init?.headers ?? {}),
2569
2831
  };
2570
- fetch(`${this.environment.baseUrl}/conversations`, {
2832
+ fetch(`${this.environment.baseUrl}/conversations/direct`, {
2571
2833
  method: 'POST',
2572
2834
  body: JSON.stringify(req),
2573
2835
  headers,
@@ -2756,10 +3018,10 @@ class AssistantStreamService {
2756
3018
  // Fallback: unknown event name -> json wrapper
2757
3019
  return { type: 'json', data: parsed };
2758
3020
  }
2759
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2760
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, providedIn: 'root' });
3021
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AssistantStreamService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3022
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AssistantStreamService, providedIn: 'root' });
2761
3023
  }
2762
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AssistantStreamService, decorators: [{
3024
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AssistantStreamService, decorators: [{
2763
3025
  type: Injectable,
2764
3026
  args: [{ providedIn: 'root' }]
2765
3027
  }] });
@@ -3025,10 +3287,10 @@ class ConversationService {
3025
3287
  nextId() {
3026
3288
  return Math.random().toString(36).slice(2) + Date.now().toString(36);
3027
3289
  }
3028
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3029
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, providedIn: 'root' });
3290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3291
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationService, providedIn: 'root' });
3030
3292
  }
3031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationService, decorators: [{
3293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationService, decorators: [{
3032
3294
  type: Injectable,
3033
3295
  args: [{ providedIn: 'root' }]
3034
3296
  }] });
@@ -3040,19 +3302,16 @@ class ConversationInitService {
3040
3302
  init(message) {
3041
3303
  return firstValueFrom(this.http.post(`${this.environment.baseUrl}/conversations/init`, { message }, { withCredentials: true }));
3042
3304
  }
3043
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3044
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, providedIn: 'root' });
3305
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3306
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationInitService, providedIn: 'root' });
3045
3307
  }
3046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ConversationInitService, decorators: [{
3308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationInitService, decorators: [{
3047
3309
  type: Injectable,
3048
3310
  args: [{ providedIn: 'root' }]
3049
3311
  }] });
3050
3312
 
3051
3313
  class PropertySearchService extends BaseService {
3052
- init() {
3053
- this.endpoint = 'properties';
3054
- super.init();
3055
- }
3314
+ endpoint = 'properties';
3056
3315
  search(rawParams) {
3057
3316
  const params = this.stripUndefined(rawParams);
3058
3317
  // Decide route: empty filter → DB list; else → Elasticsearch-backed search
@@ -3091,10 +3350,10 @@ class PropertySearchService extends BaseService {
3091
3350
  isEmptyFilter(params, ignoreKeys = ['page', 'limit', 'sort']) {
3092
3351
  return Object.entries(params).every(([k, v]) => ignoreKeys.includes(k) || v === undefined || v === null || v === '' || (Array.isArray(v) && v.length === 0));
3093
3352
  }
3094
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3095
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, providedIn: 'root' });
3353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertySearchService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3354
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertySearchService, providedIn: 'root' });
3096
3355
  }
3097
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertySearchService, decorators: [{
3356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertySearchService, decorators: [{
3098
3357
  type: Injectable,
3099
3358
  args: [{
3100
3359
  providedIn: 'root',
@@ -3122,10 +3381,10 @@ class TimeZoneService {
3122
3381
  // proxy /worldtime/api/ip
3123
3382
  return this.http.get(`/worldtime/api/ip`).pipe(map((r) => r.timezone));
3124
3383
  }
3125
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3126
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, providedIn: 'root' });
3384
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TimeZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3385
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TimeZoneService, providedIn: 'root' });
3127
3386
  }
3128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: TimeZoneService, decorators: [{
3387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: TimeZoneService, decorators: [{
3129
3388
  type: Injectable,
3130
3389
  args: [{
3131
3390
  providedIn: 'root',
@@ -3133,14 +3392,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3133
3392
  }] });
3134
3393
 
3135
3394
  class BillingService extends BaseService {
3136
- init() {
3137
- this.endpoint = 'billing';
3138
- super.init();
3139
- }
3140
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3141
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, providedIn: 'root' });
3395
+ endpoint = 'billing';
3396
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3397
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingService, providedIn: 'root' });
3142
3398
  }
3143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BillingService, decorators: [{
3399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingService, decorators: [{
3144
3400
  type: Injectable,
3145
3401
  args: [{
3146
3402
  providedIn: 'root',
@@ -3148,9 +3404,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3148
3404
  }] });
3149
3405
 
3150
3406
  class InvoiceService extends BaseService {
3151
- init() {
3152
- this.endpoint = 'billing/invoices';
3153
- super.init();
3407
+ endpoint = 'billing/invoices';
3408
+ create(data) {
3409
+ return this.post(undefined, data, {
3410
+ withCredentials: true,
3411
+ });
3412
+ }
3413
+ update(id, data) {
3414
+ return this.put(id, data, {
3415
+ withCredentials: true,
3416
+ });
3154
3417
  }
3155
3418
  createByManager(data) {
3156
3419
  return this.http.post(`${this.actionUrl}`, data, {
@@ -3195,10 +3458,10 @@ class InvoiceService extends BaseService {
3195
3458
  withCredentials: true,
3196
3459
  });
3197
3460
  }
3198
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3199
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, providedIn: 'root' });
3461
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3462
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceService, providedIn: 'root' });
3200
3463
  }
3201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceService, decorators: [{
3464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceService, decorators: [{
3202
3465
  type: Injectable,
3203
3466
  args: [{
3204
3467
  providedIn: 'root',
@@ -3207,10 +3470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3207
3470
 
3208
3471
  // src/app/data/property-highlights.service.ts
3209
3472
  class PropertyHighlightsService extends BaseService {
3210
- init() {
3211
- this.endpoint = 'properties';
3212
- super.init();
3213
- }
3473
+ endpoint = 'properties';
3214
3474
  // Highlights
3215
3475
  getHighlights(id) {
3216
3476
  return this.http.get(`${this.actionUrl}/${id}/highlights`, { withCredentials: false });
@@ -3234,19 +3494,16 @@ class PropertyHighlightsService extends BaseService {
3234
3494
  deleteHighlightAt(id, index) {
3235
3495
  return this.http.delete(`${this.actionUrl}/${id}/highlights/${index}`, { withCredentials: true });
3236
3496
  }
3237
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3238
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, providedIn: 'root' });
3497
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyHighlightsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3498
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyHighlightsService, providedIn: 'root' });
3239
3499
  }
3240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyHighlightsService, decorators: [{
3500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyHighlightsService, decorators: [{
3241
3501
  type: Injectable,
3242
3502
  args: [{ providedIn: 'root' }]
3243
3503
  }] });
3244
3504
 
3245
3505
  class FloorplanService extends BaseService {
3246
- init() {
3247
- this.endpoint = 'properties';
3248
- super.init();
3249
- }
3506
+ endpoint = 'properties';
3250
3507
  uploadFloorplan(propertyId, data) {
3251
3508
  return this.http.post(`${this.actionUrl}/${propertyId}/floorplans`, data, {
3252
3509
  withCredentials: true,
@@ -3260,10 +3517,10 @@ class FloorplanService extends BaseService {
3260
3517
  withCredentials: true,
3261
3518
  });
3262
3519
  }
3263
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3264
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, providedIn: 'root' });
3520
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FloorplanService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3521
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FloorplanService, providedIn: 'root' });
3265
3522
  }
3266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: FloorplanService, decorators: [{
3523
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: FloorplanService, decorators: [{
3267
3524
  type: Injectable,
3268
3525
  args: [{
3269
3526
  providedIn: 'root',
@@ -3271,19 +3528,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3271
3528
  }] });
3272
3529
 
3273
3530
  class PropertyStatsService extends BaseService {
3274
- init() {
3275
- this.endpoint = 'properties';
3276
- super.init();
3277
- }
3531
+ endpoint = 'properties';
3278
3532
  stats() {
3279
3533
  return this.http
3280
3534
  .get(`${this.actionUrl}/stats`, { withCredentials: true })
3281
3535
  .pipe(map((res) => res.data));
3282
3536
  }
3283
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3284
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, providedIn: 'root' });
3537
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3538
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyStatsService, providedIn: 'root' });
3285
3539
  }
3286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyStatsService, decorators: [{
3540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyStatsService, decorators: [{
3287
3541
  type: Injectable,
3288
3542
  args: [{
3289
3543
  providedIn: 'root',
@@ -3291,19 +3545,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3291
3545
  }] });
3292
3546
 
3293
3547
  class InvoiceStatsService extends BaseService {
3294
- init() {
3295
- this.endpoint = 'billing/invoices';
3296
- super.init();
3297
- }
3548
+ endpoint = 'billing/invoices';
3298
3549
  stats() {
3299
3550
  return this.http
3300
3551
  .get(`${this.actionUrl}/stats`, { withCredentials: true })
3301
3552
  .pipe(map((res) => res.data));
3302
3553
  }
3303
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3304
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, providedIn: 'root' });
3554
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceStatsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3555
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceStatsService, providedIn: 'root' });
3305
3556
  }
3306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceStatsService, decorators: [{
3557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceStatsService, decorators: [{
3307
3558
  type: Injectable,
3308
3559
  args: [{
3309
3560
  providedIn: 'root',
@@ -3311,11 +3562,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3311
3562
  }] });
3312
3563
 
3313
3564
  class PropertyOfferService extends BaseService {
3565
+ endpoint = 'properties';
3314
3566
  propertyService = inject(PropertyService);
3315
- init() {
3316
- this.endpoint = 'properties';
3317
- super.init();
3318
- }
3319
3567
  makeOffer(propertyId, data) {
3320
3568
  return this.http.post(`${this.actionUrl}/${propertyId}/offers`, data, {
3321
3569
  withCredentials: true,
@@ -3495,10 +3743,10 @@ class PropertyOfferService extends BaseService {
3495
3743
  isEmptyFilter(params, ignoreKeys = ['page', 'limit', 'sort']) {
3496
3744
  return Object.entries(params).every(([k, v]) => ignoreKeys.includes(k) || v === undefined || v === null || v === '' || (Array.isArray(v) && v.length === 0));
3497
3745
  }
3498
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3499
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, providedIn: 'root' });
3746
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3747
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferService, providedIn: 'root' });
3500
3748
  }
3501
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferService, decorators: [{
3749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferService, decorators: [{
3502
3750
  type: Injectable,
3503
3751
  args: [{
3504
3752
  providedIn: 'root',
@@ -3506,15 +3754,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3506
3754
  }] });
3507
3755
 
3508
3756
  class PropertyViewingService extends BaseService {
3757
+ endpoint = 'properties';
3509
3758
  propertyService = inject(PropertyService);
3510
- init() {
3511
- this.endpoint = 'properties';
3512
- super.init();
3513
- }
3514
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3515
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, providedIn: 'root' });
3759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyViewingService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3760
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyViewingService, providedIn: 'root' });
3516
3761
  }
3517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyViewingService, decorators: [{
3762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyViewingService, decorators: [{
3518
3763
  type: Injectable,
3519
3764
  args: [{
3520
3765
  providedIn: 'root',
@@ -3523,10 +3768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3523
3768
 
3524
3769
  // angular-automation/src/lib/services/automation.service.ts
3525
3770
  class AutomationService extends BaseService {
3526
- init() {
3527
- this.endpoint = 'automations';
3528
- super.init();
3529
- }
3771
+ endpoint = 'automations';
3530
3772
  // -----------------------
3531
3773
  // /automations
3532
3774
  // ---------- Summary ----------
@@ -3651,10 +3893,10 @@ class AutomationService extends BaseService {
3651
3893
  scheduleId,
3652
3894
  });
3653
3895
  }
3654
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3655
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, providedIn: 'root' });
3896
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AutomationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3897
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AutomationService, providedIn: 'root' });
3656
3898
  }
3657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AutomationService, decorators: [{
3899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AutomationService, decorators: [{
3658
3900
  type: Injectable,
3659
3901
  args: [{
3660
3902
  providedIn: 'root',
@@ -3688,9 +3930,9 @@ class LanguageService {
3688
3930
  storageKey = 'hl';
3689
3931
  cookieKey = 'hl';
3690
3932
  options = LANGUAGE_OPTIONS;
3691
- lang = signal(this.detectInitial(), ...(ngDevMode ? [{ debugName: "lang" }] : []));
3692
- currentOption = computed(() => this.findByCode(this.lang()) ?? LANGUAGE_OPTIONS[0], ...(ngDevMode ? [{ debugName: "currentOption" }] : []));
3693
- acceptLanguage = computed(() => this.currentOption().locale, ...(ngDevMode ? [{ debugName: "acceptLanguage" }] : []));
3933
+ lang = signal(this.detectInitial(), ...(ngDevMode ? [{ debugName: "lang" }] : /* istanbul ignore next */ []));
3934
+ currentOption = computed(() => this.findByCode(this.lang()) ?? LANGUAGE_OPTIONS[0], ...(ngDevMode ? [{ debugName: "currentOption" }] : /* istanbul ignore next */ []));
3935
+ acceptLanguage = computed(() => this.currentOption().locale, ...(ngDevMode ? [{ debugName: "acceptLanguage" }] : /* istanbul ignore next */ []));
3694
3936
  set(lang) {
3695
3937
  const option = this.findByCode(lang);
3696
3938
  if (!option)
@@ -3798,21 +4040,21 @@ class LanguageService {
3798
4040
  }
3799
4041
  return cookieHeader ?? '';
3800
4042
  }
3801
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3802
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, providedIn: 'root' });
4043
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LanguageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4044
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LanguageService, providedIn: 'root' });
3803
4045
  }
3804
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LanguageService, decorators: [{
4046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LanguageService, decorators: [{
3805
4047
  type: Injectable,
3806
4048
  args: [{ providedIn: 'root' }]
3807
4049
  }] });
3808
4050
 
3809
4051
  class I18nLocaleService {
3810
4052
  language = inject(LanguageService);
3811
- lang = computed(() => this.language.acceptLanguage(), ...(ngDevMode ? [{ debugName: "lang" }] : []));
3812
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3813
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, providedIn: 'root' });
4053
+ lang = computed(() => this.language.acceptLanguage(), ...(ngDevMode ? [{ debugName: "lang" }] : /* istanbul ignore next */ []));
4054
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: I18nLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4055
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: I18nLocaleService, providedIn: 'root' });
3814
4056
  }
3815
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: I18nLocaleService, decorators: [{
4057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: I18nLocaleService, decorators: [{
3816
4058
  type: Injectable,
3817
4059
  args: [{ providedIn: 'root' }]
3818
4060
  }] });
@@ -3841,10 +4083,10 @@ class EnumApiClient {
3841
4083
  });
3842
4084
  return this.http.get(`${this.baseUrl}/${resource}/enums`, { headers }).pipe(map((res) => res.data));
3843
4085
  }
3844
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3845
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, providedIn: 'root' });
4086
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumApiClient, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4087
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumApiClient, providedIn: 'root' });
3846
4088
  }
3847
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumApiClient, decorators: [{
4089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumApiClient, decorators: [{
3848
4090
  type: Injectable,
3849
4091
  args: [{ providedIn: 'root' }]
3850
4092
  }] });
@@ -3867,19 +4109,16 @@ class EnumCacheService {
3867
4109
  clear() {
3868
4110
  this.cache.clear();
3869
4111
  }
3870
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3871
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, providedIn: 'root' });
4112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4113
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumCacheService, providedIn: 'root' });
3872
4114
  }
3873
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: EnumCacheService, decorators: [{
4115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: EnumCacheService, decorators: [{
3874
4116
  type: Injectable,
3875
4117
  args: [{ providedIn: 'root' }]
3876
4118
  }] });
3877
4119
 
3878
4120
  class InvoiceLineService extends BaseService {
3879
- init() {
3880
- this.endpoint = 'billing/invoices';
3881
- super.init();
3882
- }
4121
+ endpoint = 'billing/invoices';
3883
4122
  createByManager(data) {
3884
4123
  return this.http.post(`${this.actionUrl}`, data, {
3885
4124
  withCredentials: true,
@@ -3913,10 +4152,10 @@ class InvoiceLineService extends BaseService {
3913
4152
  withCredentials: true,
3914
4153
  });
3915
4154
  }
3916
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3917
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, providedIn: 'root' });
4155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceLineService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4156
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceLineService, providedIn: 'root' });
3918
4157
  }
3919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: InvoiceLineService, decorators: [{
4158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: InvoiceLineService, decorators: [{
3920
4159
  type: Injectable,
3921
4160
  args: [{
3922
4161
  providedIn: 'root',
@@ -3924,10 +4163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
3924
4163
  }] });
3925
4164
 
3926
4165
  class PropertyOfferCounterService extends BaseService {
3927
- init() {
3928
- this.endpoint = 'properties';
3929
- super.init();
3930
- }
4166
+ endpoint = 'properties';
3931
4167
  getNegotiationViewByAgent(id) {
3932
4168
  return this.http.get(`${this.actionUrl}/offers/${id}/negotiation-view/agent`, {
3933
4169
  withCredentials: true,
@@ -4064,10 +4300,10 @@ class PropertyOfferCounterService extends BaseService {
4064
4300
  release(id) {
4065
4301
  return this.http.post(`${this.actionUrl}/offers/${id}/edit-lock/release`, { withCredentials: true });
4066
4302
  }
4067
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4068
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, providedIn: 'root' });
4303
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferCounterService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4304
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferCounterService, providedIn: 'root' });
4069
4305
  }
4070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PropertyOfferCounterService, decorators: [{
4306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PropertyOfferCounterService, decorators: [{
4071
4307
  type: Injectable,
4072
4308
  args: [{
4073
4309
  providedIn: 'root',
@@ -4075,112 +4311,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4075
4311
  }] });
4076
4312
 
4077
4313
  class ApplicationService extends BaseService {
4078
- init() {
4079
- this.endpoint = 'platform/applications';
4080
- super.init();
4081
- }
4314
+ endpoint = 'platform/applications';
4082
4315
  findApplications(options) {
4083
- return this.http
4084
- .get(this.actionUrl, {
4085
- params: toApiRequestParams(options),
4086
- withCredentials: true,
4087
- })
4088
- .pipe(map((response) => this.toApplicationPage(response.data)));
4316
+ return this.get(undefined, {
4317
+ params: options,
4318
+ });
4089
4319
  }
4090
4320
  findApplicationById(id) {
4091
- return this.http
4092
- .get(`${this.actionUrl}/${id}`, {
4093
- withCredentials: true,
4094
- })
4095
- .pipe(map((response) => response.data));
4321
+ return this.get(id).pipe(this.unwrapData());
4096
4322
  }
4097
4323
  createApplication(request) {
4098
- return this.http
4099
- .post(this.actionUrl, request, {
4100
- withCredentials: true,
4101
- })
4102
- .pipe(map((response) => response.data));
4324
+ return this.post(undefined, request).pipe(this.unwrapData());
4103
4325
  }
4104
4326
  updateApplication(id, request) {
4105
- return this.http
4106
- .put(`${this.actionUrl}/${id}`, request, {
4107
- withCredentials: true,
4108
- })
4109
- .pipe(map((response) => response.data));
4327
+ return this.put(id, request).pipe(this.unwrapData());
4110
4328
  }
4111
4329
  findApplicationOrganizations(id, options) {
4112
- return this.http
4113
- .get(`${this.actionUrl}/${id}/organizations`, {
4114
- params: toApiRequestParams(options),
4115
- withCredentials: true,
4116
- })
4117
- .pipe(map((response) => this.toOrganizationPage(response.data)));
4330
+ return this.get(`${id}/organizations`, { params: options }).pipe(map((response) => this.toSimplePage(response.data, (items, total) => ({
4331
+ items,
4332
+ total,
4333
+ }))));
4118
4334
  }
4119
4335
  findApplicationMembers(id, options) {
4120
- return this.http
4121
- .get(`${this.actionUrl}/${id}/members`, {
4122
- params: toApiRequestParams(options),
4123
- withCredentials: true,
4124
- })
4125
- .pipe(map((response) => this.toMemberPage(response)));
4336
+ return this.get(`${id}/members`, { params: options }).pipe(map((response) => this.toMemberPage(response)));
4126
4337
  }
4127
4338
  findApplicationMemberById(id, memberId) {
4128
- return this.http
4129
- .get(`${this.actionUrl}/${id}/members/${memberId}`, {
4130
- withCredentials: true,
4131
- })
4132
- .pipe(map((response) => this.toMemberDetail(this.unwrapData(response))));
4339
+ return this.get(`${id}/members/${memberId}`).pipe(map((response) => this.toMemberDetail(this.unwrapEnvelope(response))));
4133
4340
  }
4134
4341
  resetOrganizationOwnerPassword(id, organizationId) {
4135
- return this.http
4136
- .post(`${this.actionUrl}/${id}/organizations/${organizationId}/owner/password/reset-request`, {}, {
4137
- withCredentials: true,
4138
- })
4139
- .pipe(map(() => undefined));
4342
+ return this.post(`${id}/organizations/${organizationId}/owner/password/reset-request`, {}).pipe(map(() => undefined));
4140
4343
  }
4141
- toApplicationPage(payload) {
4142
- if (Array.isArray(payload)) {
4143
- return {
4144
- items: payload,
4145
- total: payload.length,
4146
- };
4344
+ unwrapEnvelope(payload) {
4345
+ if (payload && typeof payload === 'object' && 'data' in payload) {
4346
+ return payload.data;
4147
4347
  }
4148
- return {
4149
- items: payload.items ?? [],
4150
- total: payload.total ?? payload.items?.length ?? 0,
4151
- };
4348
+ return payload;
4152
4349
  }
4153
- toOrganizationPage(payload) {
4350
+ toSimplePage(payload, factory) {
4154
4351
  if (Array.isArray(payload)) {
4155
- return {
4156
- items: payload,
4157
- total: payload.length,
4158
- };
4352
+ return factory(payload, payload.length);
4159
4353
  }
4160
- return {
4161
- items: payload.items ?? [],
4162
- total: payload.total ?? payload.items?.length ?? 0,
4163
- };
4354
+ const items = Array.isArray(payload.items) ? payload.items : [];
4355
+ const total = payload.total ?? items.length;
4356
+ return factory(items, total);
4164
4357
  }
4165
4358
  toMemberPage(payload) {
4166
- if (Array.isArray(payload)) {
4167
- return {
4168
- items: payload.map((item) => this.toMemberSummary(item)),
4169
- total: payload.length,
4170
- };
4171
- }
4172
- const data = this.unwrapData(payload);
4173
- if (Array.isArray(data)) {
4359
+ const metaCount = this.readPaginationCount(payload);
4360
+ const unwrapped = this.unwrapEnvelope(payload);
4361
+ if (Array.isArray(unwrapped)) {
4174
4362
  return {
4175
- items: data.map((item) => this.toMemberSummary(item)),
4176
- total: payload?.meta?.pagination?.count ?? data.length,
4363
+ items: unwrapped.map((item) => this.toMemberSummary(item)),
4364
+ total: metaCount ?? unwrapped.length,
4177
4365
  };
4178
4366
  }
4179
- const value = this.asRecord(data);
4180
- const items = Array.isArray(value['items']) ? value['items'] : [];
4367
+ const value = this.asRecord(unwrapped);
4368
+ const rawItems = Array.isArray(value['items']) ? value['items'] : [];
4181
4369
  return {
4182
- items: items.map((item) => this.toMemberSummary(item)),
4183
- total: this.readNumber(value['total']) ?? payload?.meta?.pagination?.count ?? items.length,
4370
+ items: rawItems.map((item) => this.toMemberSummary(item)),
4371
+ total: this.readNumber(value['total']) ?? metaCount ?? rawItems.length,
4184
4372
  };
4185
4373
  }
4186
4374
  toMemberDetail(payload) {
@@ -4199,9 +4387,11 @@ class ApplicationService extends BaseService {
4199
4387
  const value = this.asRecord(payload);
4200
4388
  const firstName = this.readOptionalString(value['firstName']);
4201
4389
  const lastName = this.readOptionalString(value['lastName']);
4202
- const derivedFullName = [firstName, lastName].filter((item) => !!item).join(' ').trim();
4203
- const fullName = this.readOptionalString(value['fullName']) ??
4204
- (derivedFullName.length > 0 ? derivedFullName : null);
4390
+ const derivedFullName = [firstName, lastName]
4391
+ .filter((item) => !!item)
4392
+ .join(' ')
4393
+ .trim();
4394
+ const fullName = this.readOptionalString(value['fullName']) ?? (derivedFullName.length > 0 ? derivedFullName : null);
4205
4395
  const organizations = this.readOrganizationMemberships(value['organizations']) ??
4206
4396
  this.readOrganizationMemberships(value['organizationMemberships']);
4207
4397
  return {
@@ -4286,6 +4476,12 @@ class ApplicationService extends BaseService {
4286
4476
  }
4287
4477
  return payload.filter((item) => typeof item === 'string' && item.length > 0);
4288
4478
  }
4479
+ readPaginationCount(payload) {
4480
+ const value = this.asRecord(payload);
4481
+ const meta = this.asRecord(value['meta']);
4482
+ const pagination = this.asRecord(meta['pagination']);
4483
+ return this.readNumber(pagination['count']);
4484
+ }
4289
4485
  readString(value) {
4290
4486
  return typeof value === 'string' ? value : '';
4291
4487
  }
@@ -4301,16 +4497,10 @@ class ApplicationService extends BaseService {
4301
4497
  asRecord(value) {
4302
4498
  return value && typeof value === 'object' ? value : {};
4303
4499
  }
4304
- unwrapData(payload) {
4305
- if (payload && typeof payload === 'object' && 'data' in payload) {
4306
- return payload.data;
4307
- }
4308
- return payload;
4309
- }
4310
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4311
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, providedIn: 'root' });
4500
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ApplicationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4501
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ApplicationService, providedIn: 'root' });
4312
4502
  }
4313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ApplicationService, decorators: [{
4503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ApplicationService, decorators: [{
4314
4504
  type: Injectable,
4315
4505
  args: [{
4316
4506
  providedIn: 'root',
@@ -4318,24 +4508,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4318
4508
  }] });
4319
4509
 
4320
4510
  class PlatformEndpointService extends BaseService {
4321
- init() {
4322
- this.endpoint = 'platform/endpoints';
4323
- super.init();
4324
- }
4511
+ endpoint = 'platform/endpoints';
4325
4512
  findEndpoints(options) {
4326
- return this.http
4327
- .get(this.actionUrl, {
4513
+ return this.get(undefined, {
4328
4514
  params: toApiRequestParams(options),
4329
4515
  withCredentials: true,
4330
4516
  })
4331
4517
  .pipe(map((response) => this.toPage(response)));
4332
4518
  }
4333
4519
  findEndpointById(id) {
4334
- return this.http
4335
- .get(`${this.actionUrl}/${id}`, {
4520
+ return this.get(id, {
4336
4521
  withCredentials: true,
4337
- })
4338
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4522
+ }).pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4339
4523
  }
4340
4524
  toPage(payload) {
4341
4525
  if (Array.isArray(payload)) {
@@ -4379,7 +4563,9 @@ class PlatformEndpointService extends BaseService {
4379
4563
  this.readOptionalString(value['security']),
4380
4564
  status: this.readOptionalString(value['status']) ?? (this.readBoolean(value['enabled']) ? 'ENABLED' : 'DISABLED'),
4381
4565
  enabled: this.readBoolean(value['enabled']),
4382
- publicAccess: this.readBoolean(value['publicAccess']) || this.readBoolean(value['public']) || this.readBoolean(value['anonymousAccess']),
4566
+ publicAccess: this.readBoolean(value['publicAccess']) ||
4567
+ this.readBoolean(value['public']) ||
4568
+ this.readBoolean(value['anonymousAccess']),
4383
4569
  permissionCount: this.readNumber(value['permissionCount']) ?? permissions.length,
4384
4570
  updatedAt: this.readOptionalString(value['updatedAt']),
4385
4571
  };
@@ -4453,20 +4639,14 @@ class PlatformEndpointService extends BaseService {
4453
4639
  asRecord(value) {
4454
4640
  return value && typeof value === 'object' ? value : {};
4455
4641
  }
4456
- unwrapData(payload) {
4457
- if (payload && typeof payload === 'object' && 'data' in payload) {
4458
- return payload.data;
4459
- }
4460
- return payload;
4461
- }
4462
4642
  extractAttributes(value, knownKeys) {
4463
4643
  const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
4464
4644
  return entries.length ? Object.fromEntries(entries) : null;
4465
4645
  }
4466
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4467
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, providedIn: 'root' });
4646
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformEndpointService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4647
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformEndpointService, providedIn: 'root' });
4468
4648
  }
4469
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformEndpointService, decorators: [{
4649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformEndpointService, decorators: [{
4470
4650
  type: Injectable,
4471
4651
  args: [{
4472
4652
  providedIn: 'root',
@@ -4474,41 +4654,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4474
4654
  }] });
4475
4655
 
4476
4656
  class PlatformServiceRegistryService extends BaseService {
4477
- init() {
4478
- this.endpoint = 'platform/service-registry';
4479
- super.init();
4480
- }
4657
+ endpoint = 'platform/service-registry';
4481
4658
  findServices(options) {
4482
- return this.http
4483
- .get(this.actionUrl, {
4659
+ return this.get(undefined, {
4484
4660
  params: toApiRequestParams(options),
4485
4661
  withCredentials: true,
4486
4662
  })
4487
4663
  .pipe(map((response) => this.toPage(response)));
4488
4664
  }
4489
4665
  findServiceById(id) {
4490
- return this.http
4491
- .get(`${this.actionUrl}/${id}`, {
4666
+ return this.get(id, {
4492
4667
  withCredentials: true,
4493
4668
  })
4494
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4669
+ .pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4495
4670
  }
4496
4671
  createService(request) {
4497
- return this.http
4498
- .post(this.actionUrl, request, {
4672
+ return this.post(undefined, request, {
4499
4673
  withCredentials: true,
4500
- })
4501
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4674
+ }).pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4502
4675
  }
4503
4676
  updateService(id, request) {
4504
- return this.http
4505
- .put(`${this.actionUrl}/${id}`, request, {
4677
+ return this.put(id, request, {
4506
4678
  withCredentials: true,
4507
- })
4508
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4679
+ }).pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4509
4680
  }
4510
4681
  deleteService(id) {
4511
- return this.http.delete(`${this.actionUrl}/${id}`, {
4682
+ return this.delete(id, {
4512
4683
  withCredentials: true,
4513
4684
  });
4514
4685
  }
@@ -4606,20 +4777,14 @@ class PlatformServiceRegistryService extends BaseService {
4606
4777
  asRecord(value) {
4607
4778
  return value && typeof value === 'object' ? value : {};
4608
4779
  }
4609
- unwrapData(payload) {
4610
- if (payload && typeof payload === 'object' && 'data' in payload) {
4611
- return payload.data;
4612
- }
4613
- return payload;
4614
- }
4615
4780
  extractAttributes(value, knownKeys) {
4616
4781
  const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
4617
4782
  return entries.length ? Object.fromEntries(entries) : null;
4618
4783
  }
4619
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4620
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, providedIn: 'root' });
4784
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformServiceRegistryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4785
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformServiceRegistryService, providedIn: 'root' });
4621
4786
  }
4622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformServiceRegistryService, decorators: [{
4787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformServiceRegistryService, decorators: [{
4623
4788
  type: Injectable,
4624
4789
  args: [{
4625
4790
  providedIn: 'root',
@@ -4627,48 +4792,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4627
4792
  }] });
4628
4793
 
4629
4794
  class PlatformAuthClientService extends BaseService {
4630
- init() {
4631
- this.endpoint = 'platform/clients';
4632
- super.init();
4633
- }
4795
+ endpoint = 'platform/clients';
4634
4796
  findClients(options) {
4635
- return this.http
4636
- .get(this.actionUrl, {
4797
+ return this.get(undefined, {
4637
4798
  params: toApiRequestParams(options),
4638
4799
  withCredentials: true,
4639
4800
  })
4640
4801
  .pipe(map((response) => this.toPage(response)));
4641
4802
  }
4642
4803
  findClientById(id) {
4643
- return this.http
4644
- .get(`${this.actionUrl}/${id}`, {
4804
+ return this.get(id, {
4645
4805
  withCredentials: true,
4646
4806
  })
4647
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4807
+ .pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4648
4808
  }
4649
4809
  createClient(request) {
4650
- return this.http
4651
- .post(this.actionUrl, request, {
4810
+ return this.post(undefined, request, {
4652
4811
  withCredentials: true,
4653
4812
  })
4654
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4813
+ .pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4655
4814
  }
4656
4815
  updateClient(id, request) {
4657
- return this.http
4658
- .put(`${this.actionUrl}/${id}`, request, {
4816
+ return this.put(id, request, {
4659
4817
  withCredentials: true,
4660
4818
  })
4661
- .pipe(map((response) => this.toDetail(this.unwrapData(response))));
4819
+ .pipe(map((response) => this.toDetail(this.unwrapPayload(response))));
4662
4820
  }
4663
4821
  deleteClient(id) {
4664
- return this.http.delete(`${this.actionUrl}/${id}`, {
4822
+ return this.delete(id, {
4665
4823
  withCredentials: true,
4666
4824
  });
4667
4825
  }
4668
4826
  resetClientSecret(id) {
4669
- return this.http
4670
- .post(`${this.actionUrl}/${id}/reset`, {}, { withCredentials: true })
4671
- .pipe(map((response) => this.toSecretReset(this.unwrapData(response))));
4827
+ return this
4828
+ .post(`${id}/reset`, {}, { withCredentials: true })
4829
+ .pipe(map((response) => this.toSecretReset(this.unwrapPayload(response))));
4672
4830
  }
4673
4831
  toPage(payload) {
4674
4832
  if (Array.isArray(payload)) {
@@ -4775,20 +4933,14 @@ class PlatformAuthClientService extends BaseService {
4775
4933
  asRecord(value) {
4776
4934
  return value && typeof value === 'object' ? value : {};
4777
4935
  }
4778
- unwrapData(payload) {
4779
- if (payload && typeof payload === 'object' && 'data' in payload) {
4780
- return payload.data;
4781
- }
4782
- return payload;
4783
- }
4784
4936
  extractAttributes(value, knownKeys) {
4785
4937
  const entries = Object.entries(value).filter(([key]) => !knownKeys.includes(key));
4786
4938
  return entries.length ? Object.fromEntries(entries) : null;
4787
4939
  }
4788
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4789
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, providedIn: 'root' });
4940
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformAuthClientService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4941
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformAuthClientService, providedIn: 'root' });
4790
4942
  }
4791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformAuthClientService, decorators: [{
4943
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformAuthClientService, decorators: [{
4792
4944
  type: Injectable,
4793
4945
  args: [{
4794
4946
  providedIn: 'root',
@@ -4796,31 +4948,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4796
4948
  }] });
4797
4949
 
4798
4950
  class PlatformUserService extends BaseService {
4799
- init() {
4800
- this.endpoint = 'platform/users';
4801
- super.init();
4802
- }
4951
+ endpoint = 'platform/users';
4803
4952
  findUsers(options) {
4804
- return this.http
4805
- .get(this.actionUrl, {
4953
+ return this.get(undefined, {
4806
4954
  params: toApiRequestParams(options),
4807
4955
  withCredentials: true,
4808
4956
  })
4809
4957
  .pipe(map((response) => this.toUserPage(response)));
4810
4958
  }
4811
4959
  findUserById(id) {
4812
- return this.http
4813
- .get(`${this.actionUrl}/${id}`, {
4960
+ return this.get(id, {
4814
4961
  withCredentials: true,
4815
4962
  })
4816
- .pipe(map((response) => this.toUserDetail(this.unwrapData(response))));
4963
+ .pipe(map((response) => this.toUserDetail(this.unwrapPayload(response))));
4817
4964
  }
4818
4965
  findUserContext(id) {
4819
- return this.http
4820
- .get(`${this.actionUrl}/${id}/context`, {
4966
+ return this
4967
+ .get(`${id}/context`, {
4821
4968
  withCredentials: true,
4822
4969
  })
4823
- .pipe(map((response) => this.toUserContext(this.unwrapData(response))), catchError(() => of(null)));
4970
+ .pipe(map((response) => this.toUserContext(this.unwrapPayload(response))), catchError(() => of(null)));
4824
4971
  }
4825
4972
  toUserPage(payload) {
4826
4973
  if (Array.isArray(payload)) {
@@ -4933,16 +5080,10 @@ class PlatformUserService extends BaseService {
4933
5080
  asRecord(value) {
4934
5081
  return value && typeof value === 'object' ? value : {};
4935
5082
  }
4936
- unwrapData(payload) {
4937
- if (payload && typeof payload === 'object' && 'data' in payload) {
4938
- return payload.data;
4939
- }
4940
- return payload;
4941
- }
4942
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4943
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, providedIn: 'root' });
5083
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5084
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformUserService, providedIn: 'root' });
4944
5085
  }
4945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PlatformUserService, decorators: [{
5086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PlatformUserService, decorators: [{
4946
5087
  type: Injectable,
4947
5088
  args: [{
4948
5089
  providedIn: 'root',
@@ -4950,30 +5091,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
4950
5091
  }] });
4951
5092
 
4952
5093
  class PermissionService extends BaseService {
4953
- init() {
4954
- this.endpoint = 'platform/role-permissions';
4955
- super.init();
4956
- }
5094
+ endpoint = 'platform/role-permissions';
4957
5095
  findRoles(options) {
4958
- return this.http.get(`${this.actionUrl}/roles`, {
4959
- params: this.params(options),
5096
+ return this.get('roles', {
5097
+ params: options,
4960
5098
  withCredentials: true,
4961
5099
  });
4962
5100
  }
4963
5101
  getRoleSummary(roleId, options) {
4964
- return this.http.get(`${this.actionUrl}/roles/${roleId}`, {
4965
- params: this.params(options),
5102
+ return this.get(`roles/${roleId}`, {
5103
+ params: options,
4966
5104
  withCredentials: true,
4967
5105
  });
4968
5106
  }
4969
5107
  findAssignablePermissions(roleId, options) {
4970
- return this.http.get(`${this.actionUrl}/roles/${roleId}/permissions`, {
4971
- params: this.params(options),
5108
+ return this.get(`roles/${roleId}/permissions`, {
5109
+ params: options,
4972
5110
  withCredentials: true,
4973
5111
  });
4974
5112
  }
4975
5113
  saveRolePermissions(roleId, request) {
4976
- return this.http.put(`${this.actionUrl}/roles/${roleId}/permissions`, request, {
5114
+ return this.put(`roles/${roleId}/permissions`, request, {
4977
5115
  withCredentials: true,
4978
5116
  });
4979
5117
  }
@@ -4993,10 +5131,10 @@ class PermissionService extends BaseService {
4993
5131
  items: values,
4994
5132
  }));
4995
5133
  }
4996
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4997
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, providedIn: 'root' });
5134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5135
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PermissionService, providedIn: 'root' });
4998
5136
  }
4999
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PermissionService, decorators: [{
5137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: PermissionService, decorators: [{
5000
5138
  type: Injectable,
5001
5139
  args: [{
5002
5140
  providedIn: 'root',
@@ -5004,10 +5142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5004
5142
  }] });
5005
5143
 
5006
5144
  class RoleService extends BaseService {
5007
- init() {
5008
- this.endpoint = 'platform/roles';
5009
- super.init();
5010
- }
5145
+ endpoint = 'platform/roles';
5011
5146
  // ---------------------------------------------------------------------------
5012
5147
  // Platform roles
5013
5148
  // ---------------------------------------------------------------------------
@@ -5022,9 +5157,7 @@ class RoleService extends BaseService {
5022
5157
  return this.http.get(`${this.actionUrl}/platform/${id}`).pipe(map((response) => response.data));
5023
5158
  }
5024
5159
  createPlatformRole(request) {
5025
- return this.http
5026
- .post(`${this.actionUrl}/platform`, request)
5027
- .pipe(map((response) => response.data));
5160
+ return this.http.post(`platform`, request).pipe(map((response) => response.data));
5028
5161
  }
5029
5162
  updatePlatformRole(id, request) {
5030
5163
  return this.http
@@ -5047,14 +5180,8 @@ class RoleService extends BaseService {
5047
5180
  // ---------------------------------------------------------------------------
5048
5181
  // Application roles
5049
5182
  // ---------------------------------------------------------------------------
5050
- findApplicationRoles(appId, options) {
5051
- return this.http
5052
- .get(`${this.actionUrl}/applications`, {
5053
- params: toApiRequestParams(options, {
5054
- appId,
5055
- }),
5056
- })
5057
- .pipe(map((response) => response.data));
5183
+ findApplicationRoles(appId) {
5184
+ return this.get(`/applications/${appId}`, {}).pipe(this.unwrapData());
5058
5185
  }
5059
5186
  findApplicationRoleById(id, appId) {
5060
5187
  return this.http
@@ -5214,10 +5341,10 @@ class RoleService extends BaseService {
5214
5341
  }
5215
5342
  return segments.join('/');
5216
5343
  }
5217
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5218
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, providedIn: 'root' });
5344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RoleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5345
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RoleService, providedIn: 'root' });
5219
5346
  }
5220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RoleService, decorators: [{
5347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RoleService, decorators: [{
5221
5348
  type: Injectable,
5222
5349
  args: [{
5223
5350
  providedIn: 'root',
@@ -5225,10 +5352,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5225
5352
  }] });
5226
5353
 
5227
5354
  class OrganizationInvitationService extends BaseService {
5228
- init() {
5229
- this.endpoint = 'platform/organizations';
5230
- super.init();
5231
- }
5355
+ endpoint = 'platform/organizations';
5232
5356
  findInvitations(orgId) {
5233
5357
  return this.http
5234
5358
  .get(`${this.actionUrl}/${orgId}/invitations`, {
@@ -5277,10 +5401,10 @@ class OrganizationInvitationService extends BaseService {
5277
5401
  total: payload.total ?? payload.items?.length ?? 0,
5278
5402
  };
5279
5403
  }
5280
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5281
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, providedIn: 'root' });
5404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationInvitationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5405
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationInvitationService, providedIn: 'root' });
5282
5406
  }
5283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationInvitationService, decorators: [{
5407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationInvitationService, decorators: [{
5284
5408
  type: Injectable,
5285
5409
  args: [{
5286
5410
  providedIn: 'root',
@@ -5288,37 +5412,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5288
5412
  }] });
5289
5413
 
5290
5414
  class OrganizationMemberService extends BaseService {
5291
- init() {
5292
- this.endpoint = 'platform/organizations';
5293
- super.init();
5294
- }
5415
+ endpoint = 'platform/organizations';
5295
5416
  findMembers(orgId) {
5296
- return this.http
5297
- .get(`${this.actionUrl}/${orgId}/members`, {
5417
+ return this.get(`${orgId}/members`, {
5298
5418
  withCredentials: true,
5299
5419
  })
5300
5420
  .pipe(map((response) => this.toMembers(response.data)));
5301
5421
  }
5302
5422
  findMemberById(orgId, memberId) {
5303
- return this.http
5304
- .get(`${this.actionUrl}/${orgId}/members/${memberId}`, {
5423
+ return this.get(`${orgId}/members/${memberId}`, {
5305
5424
  withCredentials: true,
5306
5425
  })
5307
5426
  .pipe(map((response) => this.normalizeMember(response.data)));
5308
5427
  }
5309
5428
  updateMemberRoles(orgId, memberId, request) {
5310
- return this.http
5311
- .put(`${this.actionUrl}/${orgId}/members/${memberId}/roles`, request, {
5429
+ return this.put(`${orgId}/members/${memberId}/roles`, request, {
5312
5430
  withCredentials: true,
5313
- })
5314
- .pipe(map((response) => this.normalizeMember(response.data)));
5431
+ }).pipe(map((response) => this.normalizeMember(response.data)));
5315
5432
  }
5316
5433
  resetMemberPassword(orgId, memberId) {
5317
- return this.http
5318
- .post(`${this.actionUrl}/${orgId}/members/${memberId}/password/reset-request`, {}, {
5434
+ return this.post(`${orgId}/members/${memberId}/password/reset-request`, {}, {
5319
5435
  withCredentials: true,
5320
- })
5321
- .pipe(map(() => undefined));
5436
+ }).pipe(map(() => undefined));
5322
5437
  }
5323
5438
  toMembers(payload) {
5324
5439
  if (Array.isArray(payload)) {
@@ -5332,10 +5447,10 @@ class OrganizationMemberService extends BaseService {
5332
5447
  roles: member.roles ?? [],
5333
5448
  };
5334
5449
  }
5335
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5336
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, providedIn: 'root' });
5450
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationMemberService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5451
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationMemberService, providedIn: 'root' });
5337
5452
  }
5338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OrganizationMemberService, decorators: [{
5453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OrganizationMemberService, decorators: [{
5339
5454
  type: Injectable,
5340
5455
  args: [{
5341
5456
  providedIn: 'root',
@@ -5343,10 +5458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5343
5458
  }] });
5344
5459
 
5345
5460
  class OnboardingApplicantService extends BaseService {
5346
- init() {
5347
- this.endpoint = 'onboarding/applications';
5348
- super.init();
5349
- }
5461
+ endpoint = 'onboarding/applications';
5350
5462
  createApplication(payload) {
5351
5463
  return this.http
5352
5464
  .post(this.actionUrl, payload, {
@@ -5410,10 +5522,10 @@ class OnboardingApplicantService extends BaseService {
5410
5522
  })
5411
5523
  .pipe(map((response) => response.data));
5412
5524
  }
5413
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5414
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, providedIn: 'root' });
5525
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingApplicantService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5526
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingApplicantService, providedIn: 'root' });
5415
5527
  }
5416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingApplicantService, decorators: [{
5528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingApplicantService, decorators: [{
5417
5529
  type: Injectable,
5418
5530
  args: [{
5419
5531
  providedIn: 'root',
@@ -5421,64 +5533,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5421
5533
  }] });
5422
5534
 
5423
5535
  class OnboardingAdminService extends BaseService {
5424
- init() {
5425
- this.endpoint = 'onboarding/admin/applications';
5426
- super.init();
5427
- }
5428
- list(query) {
5429
- return this.http
5430
- .get(this.actionUrl, {
5431
- params: this.params(query),
5432
- withCredentials: true,
5433
- })
5434
- .pipe(map((response) => response.data));
5536
+ endpoint = 'onboarding/admin/applications';
5537
+ list(options) {
5538
+ return this.get(undefined, { params: options }).pipe();
5435
5539
  }
5436
5540
  getApplication(applicationId) {
5437
- return this.http
5438
- .get(`${this.actionUrl}/${applicationId}`, {
5439
- withCredentials: true,
5440
- })
5441
- .pipe(map((response) => response.data));
5541
+ return this.get(applicationId).pipe(this.unwrapData());
5442
5542
  }
5443
5543
  getDocumentPreviewUrl(applicationId, documentId) {
5444
- return this.http
5445
- .get(`${this.actionUrl}/${applicationId}/documents/${documentId}/preview-url`, {
5446
- withCredentials: true,
5447
- })
5448
- .pipe(map((response) => response.data));
5544
+ return this.get(`${applicationId}/documents/${documentId}/preview-url`).pipe(this.unwrapData());
5449
5545
  }
5450
5546
  startReview(applicationId) {
5451
- return this.http
5452
- .post(`${this.actionUrl}/${applicationId}/review/start`, {}, {
5453
- withCredentials: true,
5454
- })
5455
- .pipe(map((response) => response.data));
5547
+ return this.post(`${applicationId}/review/start`).pipe(this.unwrapData());
5456
5548
  }
5457
5549
  needMoreInfo(applicationId, payload) {
5458
- return this.http
5459
- .post(`${this.actionUrl}/${applicationId}/need-more-info`, payload, {
5460
- withCredentials: true,
5461
- })
5462
- .pipe(map((response) => response.data));
5550
+ return this.post(`${applicationId}/need-more-info`, payload).pipe(this.unwrapData());
5463
5551
  }
5464
5552
  approve(applicationId, payload) {
5465
- return this.http
5466
- .post(`${this.actionUrl}/${applicationId}/approve`, payload, {
5467
- withCredentials: true,
5468
- })
5469
- .pipe(map((response) => response.data));
5553
+ return this.post(`${applicationId}/approve`, payload).pipe(this.unwrapData());
5470
5554
  }
5471
5555
  fail(applicationId, payload) {
5472
- return this.http
5473
- .post(`${this.actionUrl}/${applicationId}/fail`, payload, {
5474
- withCredentials: true,
5475
- })
5476
- .pipe(map((response) => response.data));
5556
+ return this.post(`${applicationId}/fail`, payload).pipe(this.unwrapData());
5477
5557
  }
5478
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5479
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, providedIn: 'root' });
5558
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingAdminService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5559
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingAdminService, providedIn: 'root' });
5480
5560
  }
5481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingAdminService, decorators: [{
5561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingAdminService, decorators: [{
5482
5562
  type: Injectable,
5483
5563
  args: [{
5484
5564
  providedIn: 'root',
@@ -5486,21 +5566,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
5486
5566
  }] });
5487
5567
 
5488
5568
  class OnboardingDocumentService extends BaseService {
5489
- init() {
5490
- this.endpoint = 'onboarding/documents';
5491
- super.init();
5492
- }
5569
+ endpoint = 'onboarding/documents';
5493
5570
  getPreviewUrl(documentId) {
5494
- return this.http
5495
- .get(`${this.actionUrl}/${documentId}/preview-url`, {
5571
+ return this.get(`${documentId}/preview-url`, {
5496
5572
  withCredentials: true,
5497
5573
  })
5498
- .pipe(map((response) => response.data));
5574
+ .pipe(this.unwrapData());
5575
+ }
5576
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingDocumentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5577
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingDocumentService, providedIn: 'root' });
5578
+ }
5579
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: OnboardingDocumentService, decorators: [{
5580
+ type: Injectable,
5581
+ args: [{
5582
+ providedIn: 'root',
5583
+ }]
5584
+ }] });
5585
+
5586
+ class BillingProfileService extends BaseService {
5587
+ endpoint = 'billing/profile';
5588
+ getOrCreate() {
5589
+ return this.get();
5590
+ }
5591
+ updateProfile(body) {
5592
+ return this.put(undefined, body);
5499
5593
  }
5500
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingDocumentService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5501
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingDocumentService, providedIn: 'root' });
5594
+ patchProfile(body) {
5595
+ return this.patch(undefined, body);
5596
+ }
5597
+ patchProfile1(body) {
5598
+ return this.patchProfile(body);
5599
+ }
5600
+ enable() {
5601
+ return this.patch(undefined, {
5602
+ enabled: true,
5603
+ });
5604
+ }
5605
+ disable() {
5606
+ return this.patch(undefined, {
5607
+ enabled: false,
5608
+ });
5609
+ }
5610
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingProfileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5611
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingProfileService, providedIn: 'root' });
5502
5612
  }
5503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: OnboardingDocumentService, decorators: [{
5613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BillingProfileService, decorators: [{
5504
5614
  type: Injectable,
5505
5615
  args: [{
5506
5616
  providedIn: 'root',
@@ -5522,10 +5632,10 @@ class LoadingInterceptor {
5522
5632
  }
5523
5633
  }));
5524
5634
  }
5525
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5526
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, providedIn: 'root' });
5635
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5636
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingInterceptor, providedIn: 'root' });
5527
5637
  }
5528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LoadingInterceptor, decorators: [{
5638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoadingInterceptor, decorators: [{
5529
5639
  type: Injectable,
5530
5640
  args: [{
5531
5641
  providedIn: 'root',
@@ -5575,10 +5685,10 @@ class BackButtonDirective {
5575
5685
  onClick() {
5576
5686
  this.navigation.back();
5577
5687
  }
5578
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BackButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5579
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: BackButtonDirective, isStandalone: true, selector: "[rolatechBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
5688
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BackButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5689
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.5", type: BackButtonDirective, isStandalone: true, selector: "[rolatechBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
5580
5690
  }
5581
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BackButtonDirective, decorators: [{
5691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: BackButtonDirective, decorators: [{
5582
5692
  type: Directive,
5583
5693
  args: [{
5584
5694
  selector: '[rolatechBackButton]',
@@ -5592,10 +5702,10 @@ class HideFooterDirective {
5592
5702
  layout = inject(LayoutService);
5593
5703
  ngOnInit() { this.layout.setHideFooter(true); }
5594
5704
  ngOnDestroy() { this.layout.setHideFooter(false); }
5595
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: HideFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5596
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.1", type: HideFooterDirective, isStandalone: true, selector: "[rolatechHideFooter]", ngImport: i0 });
5705
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: HideFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5706
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.5", type: HideFooterDirective, isStandalone: true, selector: "[rolatechHideFooter]", ngImport: i0 });
5597
5707
  }
5598
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: HideFooterDirective, decorators: [{
5708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: HideFooterDirective, decorators: [{
5599
5709
  type: Directive,
5600
5710
  args: [{
5601
5711
  selector: '[rolatechHideFooter]',
@@ -5645,6 +5755,32 @@ var PropertyOfferStatus;
5645
5755
  PropertyOfferStatus["CANCELLED"] = "CANCELLED";
5646
5756
  })(PropertyOfferStatus || (PropertyOfferStatus = {}));
5647
5757
 
5758
+ var PropertyViewingType;
5759
+ (function (PropertyViewingType) {
5760
+ PropertyViewingType["RENTAL"] = "Rental";
5761
+ PropertyViewingType["SALE"] = "Sale";
5762
+ })(PropertyViewingType || (PropertyViewingType = {}));
5763
+ var PropertyViewerCategory;
5764
+ (function (PropertyViewerCategory) {
5765
+ PropertyViewerCategory["TENANT"] = "TENANT";
5766
+ PropertyViewerCategory["AGENT"] = "AGENT";
5767
+ })(PropertyViewerCategory || (PropertyViewerCategory = {}));
5768
+ var PropertyApplicantType;
5769
+ (function (PropertyApplicantType) {
5770
+ PropertyApplicantType["INDIVIDUAL"] = "Individual";
5771
+ PropertyApplicantType["CORPORATE"] = "Corporate";
5772
+ PropertyApplicantType["STUDENT"] = "Student";
5773
+ })(PropertyApplicantType || (PropertyApplicantType = {}));
5774
+ var PropertyViewingStatus;
5775
+ (function (PropertyViewingStatus) {
5776
+ PropertyViewingStatus["PENDING"] = "Pending";
5777
+ PropertyViewingStatus["COUNTERED"] = "Countered";
5778
+ PropertyViewingStatus["APPROVED"] = "Approved";
5779
+ PropertyViewingStatus["REJECTED"] = "Rejected";
5780
+ PropertyViewingStatus["CANCELLED"] = "Cancelled";
5781
+ PropertyViewingStatus["COMPLETED"] = "Completed";
5782
+ })(PropertyViewingStatus || (PropertyViewingStatus = {}));
5783
+
5648
5784
  // angular-automation/src/lib/models/automation.models.ts
5649
5785
  const SCHEDULE_CRON_META = [
5650
5786
  { value: 'EVERY_5_MINUTES', label: 'Every 5 minutes', description: 'Runs every 5 minutes' },
@@ -5656,7 +5792,6 @@ const SCHEDULE_CRON_META = [
5656
5792
 
5657
5793
  function provideAngularServices() {
5658
5794
  const providers = [
5659
- BaseService,
5660
5795
  LoadingService,
5661
5796
  MediaService,
5662
5797
  LayoutService,
@@ -5774,5 +5909,5 @@ function onboardingVatModeLabel(mode) {
5774
5909
  * Generated bundle index. Do not edit.
5775
5910
  */
5776
5911
 
5777
- export { AmenityService, ApplicationService, AutomationService, BackButtonDirective, BaseService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, EnumApiClient, EnumCacheService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, I18nLocaleService, InventoryService, InvoiceLineService, InvoiceService, InvoiceStatsService, LanguageService, 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, OnboardingDocumentService, 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 };
5912
+ export { AmenityService, ApplicationService, AutomationService, BackButtonDirective, BaseService, BillingProfileService, BillingService, BookingService, BreadcrumbService, CartEventType, CartService, CategoryService, ConversationInitService, ConversationService, DialogComponent, DialogService, EnumApiClient, EnumCacheService, FacilityService, FeatureService, FloorplanService, FulfillmentService, HideFooterDirective, I18nLocaleService, InventoryService, InvoiceLineService, InvoiceService, InvoiceStatsService, LanguageService, 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, OnboardingDocumentService, OrderPayoutService, OrderService, OrganizationInvitationService, OrganizationMemberService, PROPERTY_OFFER_STATUS_LABEL, PaymentService, PermissionService, PlatformAuthClientService, PlatformEndpointService, PlatformServiceRegistryService, PlatformUserService, PostService, ProductCategoryService, ProductService, PropertyApplicantType, PropertyHighlightsService, PropertyOfferCounterService, PropertyOfferService, PropertyOfferStatus, PropertySearchService, PropertyService, PropertyStatsService, PropertyViewerCategory, PropertyViewingService, PropertyViewingStatus, PropertyViewingType, ResourceCategoryService, ResourceService, RoleService, SCHEDULE_CRON_META, SERVICE_DIRECTIVES, SidenavService, SnackBarService, SupportService, ThemeService, TimeZoneService, TitleService, acceptLanguageInterceptor, offerStatusLabel, onboardingApplicantTypeLabel, onboardingDocumentTypeLabel, onboardingIssueTypeLabel, onboardingStatusLabel, onboardingVatModeLabel, provideAngularServices };
5778
5913
  //# sourceMappingURL=rolatech-angular-services.mjs.map