mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-05 18:15:27 +00:00
TD-730,TD-775: Wachter config to appConfig, add headers logging, fix errors logging (#267)
This commit is contained in:
parent
5c664d2ebb
commit
0a5e5f70fa
@ -4,9 +4,8 @@ Admin Dashboard
|
||||
|
||||
## ⚙️ Installation
|
||||
|
||||
1. Add environment and configurations:
|
||||
1. Add configurations:
|
||||
|
||||
- [`.env`](./_.env)
|
||||
- [`src/assets/appConfig.json`](./src/assets/_appConfig.json)
|
||||
- [`src/assets/authConfig.json`](./src/assets/_authConfig.json)
|
||||
|
||||
@ -21,7 +20,6 @@ You can copy from examples like this one: [`_appConfig.json`](./src/assets/_appC
|
||||
|
||||
Running in stage mode needs files:
|
||||
|
||||
- `.env.stage`
|
||||
- `src/assets/appConfig.stage.json`
|
||||
- `src/assets/authConfig.stage.json`
|
||||
|
||||
|
66
package-lock.json
generated
66
package-lock.json
generated
@ -24,14 +24,14 @@
|
||||
"@ngneat/input-mask": "6.0.0",
|
||||
"@ngneat/until-destroy": "9.2.2",
|
||||
"@s-libs/ng-core": "16.0.0",
|
||||
"@vality/deanonimus-proto": "2.0.1-2a3d5ad.0",
|
||||
"@vality/domain-proto": "2.0.1-c65fc2e.0",
|
||||
"@vality/dominant-cache-proto": "2.0.1-99f38c9.0",
|
||||
"@vality/fistful-proto": "2.0.0",
|
||||
"@vality/magista-proto": "2.0.2-e46bba2.0",
|
||||
"@vality/deanonimus-proto": "2.0.0",
|
||||
"@vality/domain-proto": "2.0.1-f718741.0",
|
||||
"@vality/dominant-cache-proto": "2.0.0",
|
||||
"@vality/fistful-proto": "2.0.1-ed97a0e.0",
|
||||
"@vality/magista-proto": "2.0.2-37b81e6.0",
|
||||
"@vality/ng-core": "16.2.1-pr-40-5f4b5be.0",
|
||||
"@vality/payout-manager-proto": "2.0.1-b079679.0",
|
||||
"@vality/repairer-proto": "2.0.1-8f7973d.0",
|
||||
"@vality/payout-manager-proto": "2.0.0",
|
||||
"@vality/repairer-proto": "2.0.2-f5e3b7a.0",
|
||||
"@vality/thrift-ts": "2.4.1-8ad5123.0",
|
||||
"@vality/woody": "0.1.1",
|
||||
"coerce-property": "15.0.1",
|
||||
@ -70,7 +70,6 @@
|
||||
"@vality/prettier-config": "3.0.1-pr-33-1086ab7.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cspell": "^7.0.0",
|
||||
"dotenv": "16.0.0",
|
||||
"eslint": "^8.39.0",
|
||||
"jasmine-core": "4.2.0",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
@ -5769,19 +5768,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vality/deanonimus-proto": {
|
||||
"version": "2.0.1-2a3d5ad.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/deanonimus-proto/-/deanonimus-proto-2.0.1-2a3d5ad.0.tgz",
|
||||
"integrity": "sha512-p/kR6o1mTWatvzpltDbSzJjRiA75ph8N5CZm5FTa+5ZgGer9pSN4sZhRGJj/iIfZkXZuVNZp9kisS+4+QKx13A=="
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/deanonimus-proto/-/deanonimus-proto-2.0.0.tgz",
|
||||
"integrity": "sha512-yJ461cgtyvhwZ90dzJX0EeforN4NQhnA9MoBpU1aocPB6C1gNJFUa5+29d5OFg00zbw1/eW12dVd/pKEakjGKA=="
|
||||
},
|
||||
"node_modules/@vality/domain-proto": {
|
||||
"version": "2.0.1-c65fc2e.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-2.0.1-c65fc2e.0.tgz",
|
||||
"integrity": "sha512-ZJiIvl4F1Np821XHxzACw0KNk8wF9u7QOjW4XaJZ88b4N99Sp5DdQKWZPHRRGmj27nORqam9DxZdwdV0KoEabw=="
|
||||
"version": "2.0.1-f718741.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-2.0.1-f718741.0.tgz",
|
||||
"integrity": "sha512-YHnB5UTWZrg13y19Th1R0hffazsqrrVOWhw4eD1kXvCC16uy8h/+Ys9iReayjqZuNc7lxQo39HsAfsHksYDEQQ=="
|
||||
},
|
||||
"node_modules/@vality/dominant-cache-proto": {
|
||||
"version": "2.0.1-99f38c9.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/dominant-cache-proto/-/dominant-cache-proto-2.0.1-99f38c9.0.tgz",
|
||||
"integrity": "sha512-8cVI0giJwXxj4KBG4sAvZ6TrnwlWNKCRQVghufsJOoW1B+z1QbyfoAKZe2WTtrod2jRxbhOWQ9ebv0wxRx4Pog=="
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/dominant-cache-proto/-/dominant-cache-proto-2.0.0.tgz",
|
||||
"integrity": "sha512-Jxo7n8/2xo8D/y7g0v1iFjr5MijOYmJ0hiHNTqoj/D0elzRhHAeRBur9F8h4RDf6sd2/+FmtVlprc7+q0/AGig=="
|
||||
},
|
||||
"node_modules/@vality/eslint-config": {
|
||||
"version": "8.0.1-pr-33-541079b.0",
|
||||
@ -5991,14 +5990,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vality/fistful-proto": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-2.0.0.tgz",
|
||||
"integrity": "sha512-CAU7aumScf4t3/TMV42SS5E/7oM5EfXiLbLp2TAzJoE+u5Qht4ycWPvlziYrcvayWoaHyCKW8w1CvbdiqBRZjw=="
|
||||
"version": "2.0.1-ed97a0e.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-2.0.1-ed97a0e.0.tgz",
|
||||
"integrity": "sha512-5dySIV3rgocHr2ZYB26dqHBquv8+yNOPMP7huU5aXqYFDVEy4M/4igrROcRWc8nCBtaOkKvRIBhrGhlQzgijiQ=="
|
||||
},
|
||||
"node_modules/@vality/magista-proto": {
|
||||
"version": "2.0.2-e46bba2.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/magista-proto/-/magista-proto-2.0.2-e46bba2.0.tgz",
|
||||
"integrity": "sha512-2cPVToAJRdt1CFQ6G/C6ngw6hp94Jp7WFtPtNvtlcCSXRYRnppoi3KpK14tBH9SlLeqrpSy0IrIsCnAkj7tFfg=="
|
||||
"version": "2.0.2-37b81e6.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/magista-proto/-/magista-proto-2.0.2-37b81e6.0.tgz",
|
||||
"integrity": "sha512-gJizpTWuB74L+XuJ+dUaxAwJDkycdnuVwrXWIl/NKcS7++/zgrgTpw+tM5/Te3rWqkkCnSxC1SK0C4aPbbtifg=="
|
||||
},
|
||||
"node_modules/@vality/ng-core": {
|
||||
"version": "16.2.1-pr-40-5f4b5be.0",
|
||||
@ -6028,9 +6027,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vality/payout-manager-proto": {
|
||||
"version": "2.0.1-b079679.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-2.0.1-b079679.0.tgz",
|
||||
"integrity": "sha512-KcojE7liP3rhPounDpmzWAcKwGyqTNaYWg8Bn3NB1bERTxVbzelvcBVt49PvueJsDQRXhGg/6jBoYMD+9iES+g=="
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-2.0.0.tgz",
|
||||
"integrity": "sha512-eBR/QJQObjfRQPOSR29vafvvfYVaAvrKJGYVxGo7j4ZWWf9KWDlR4cipixNnZyZ/esLNX2fdqebWbfogrOBdSA=="
|
||||
},
|
||||
"node_modules/@vality/prettier-config": {
|
||||
"version": "3.0.1-pr-33-1086ab7.0",
|
||||
@ -6045,9 +6044,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vality/repairer-proto": {
|
||||
"version": "2.0.1-8f7973d.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/repairer-proto/-/repairer-proto-2.0.1-8f7973d.0.tgz",
|
||||
"integrity": "sha512-9/xlI6Q3yP0UUtcP5RGmy9H1lMzC/kNOlJCpoW7vNVtPbnHIwRLSOIL63+aGaNCCqlzeZPky7o57c1D3El05kQ=="
|
||||
"version": "2.0.2-f5e3b7a.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/repairer-proto/-/repairer-proto-2.0.2-f5e3b7a.0.tgz",
|
||||
"integrity": "sha512-/hpCVTAkTY4ovYMB16SSldkQebYQbthmqvx+HUwFX6F05kLCN8Kvxabyuwf7GrgpoPfJyri0B/A3nraxa0KW+g=="
|
||||
},
|
||||
"node_modules/@vality/thrift-ts": {
|
||||
"version": "2.4.1-8ad5123.0",
|
||||
@ -11253,15 +11252,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz",
|
||||
"integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/duplexer": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
|
||||
|
19
package.json
19
package.json
@ -3,8 +3,8 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "ng serve --proxy-config proxy.conf.js --port 4200",
|
||||
"stage": "cross-env NODE_ENV=stage ng serve --proxy-config proxy.conf.js --port 4201 --configuration=stage",
|
||||
"start": "ng serve --port 4200",
|
||||
"stage": "cross-env NODE_ENV=stage ng serve --port 4201 --configuration=stage",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint --max-warnings=0",
|
||||
@ -32,14 +32,14 @@
|
||||
"@ngneat/input-mask": "6.0.0",
|
||||
"@ngneat/until-destroy": "9.2.2",
|
||||
"@s-libs/ng-core": "16.0.0",
|
||||
"@vality/deanonimus-proto": "2.0.1-2a3d5ad.0",
|
||||
"@vality/domain-proto": "2.0.1-c65fc2e.0",
|
||||
"@vality/dominant-cache-proto": "2.0.1-99f38c9.0",
|
||||
"@vality/fistful-proto": "2.0.0",
|
||||
"@vality/magista-proto": "2.0.2-e46bba2.0",
|
||||
"@vality/deanonimus-proto": "2.0.0",
|
||||
"@vality/domain-proto": "2.0.1-f718741.0",
|
||||
"@vality/dominant-cache-proto": "2.0.0",
|
||||
"@vality/fistful-proto": "2.0.1-ed97a0e.0",
|
||||
"@vality/magista-proto": "2.0.2-37b81e6.0",
|
||||
"@vality/ng-core": "16.2.1-pr-40-5f4b5be.0",
|
||||
"@vality/payout-manager-proto": "2.0.1-b079679.0",
|
||||
"@vality/repairer-proto": "2.0.1-8f7973d.0",
|
||||
"@vality/payout-manager-proto": "2.0.0",
|
||||
"@vality/repairer-proto": "2.0.2-f5e3b7a.0",
|
||||
"@vality/thrift-ts": "2.4.1-8ad5123.0",
|
||||
"@vality/woody": "0.1.1",
|
||||
"coerce-property": "15.0.1",
|
||||
@ -78,7 +78,6 @@
|
||||
"@vality/prettier-config": "3.0.1-pr-33-1086ab7.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cspell": "^7.0.0",
|
||||
"dotenv": "16.0.0",
|
||||
"eslint": "^8.39.0",
|
||||
"jasmine-core": "4.2.0",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
|
@ -1,27 +0,0 @@
|
||||
require('dotenv').config({ path: ['.env', process.env.NODE_ENV].filter(Boolean).join('.') });
|
||||
|
||||
const { PROXY_TARGET } = process.env;
|
||||
const REQUIRED_ENV = [PROXY_TARGET];
|
||||
|
||||
if (REQUIRED_ENV.findIndex((e) => !e) !== -1) {
|
||||
throw new Error('[proxy.conf.js] Set required environment variables!');
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
context: [
|
||||
'/v1',
|
||||
'/v3',
|
||||
'/stat',
|
||||
'/fistful',
|
||||
'/file_storage',
|
||||
'/deanonimus',
|
||||
'/payout/management',
|
||||
'/wachter',
|
||||
],
|
||||
target: PROXY_TARGET,
|
||||
secure: false,
|
||||
logLevel: 'debug',
|
||||
changeOrigin: true,
|
||||
},
|
||||
];
|
@ -11,11 +11,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AccounterService {
|
||||
private client$: Observable<accounter_AccounterCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('Accounter')),
|
||||
);
|
||||
@ -30,7 +35,7 @@ export class AccounterService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -20,11 +20,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ClaimManagementService {
|
||||
private client$: Observable<claim_management_ClaimManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('ClaimManagement')),
|
||||
);
|
||||
@ -39,7 +44,7 @@ export class ClaimManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -10,11 +10,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DeanonimusService {
|
||||
private client$: Observable<deanonimus_DeanonimusCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('Deanonimus')),
|
||||
);
|
||||
@ -29,7 +34,7 @@ export class DeanonimusService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -12,11 +12,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ManagementService {
|
||||
private client$: Observable<deposit_ManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('DepositManagement')),
|
||||
);
|
||||
@ -31,7 +36,7 @@ export class ManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -10,11 +10,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class RepositoryService {
|
||||
private client$: Observable<domain_config_RepositoryCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('Domain')),
|
||||
);
|
||||
@ -29,7 +34,7 @@ export class RepositoryService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -29,7 +29,7 @@ export class DominantCacheService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -12,11 +12,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class FistfulAdminService {
|
||||
private client$: Observable<fistful_admin_FistfulAdminCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('FistfulAdmin')),
|
||||
);
|
||||
@ -31,7 +36,7 @@ export class FistfulAdminService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -10,11 +10,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class FistfulStatisticsService {
|
||||
private client$: Observable<fistful_stat_FistfulStatisticsCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('FistfulStatistics')),
|
||||
);
|
||||
@ -29,7 +34,7 @@ export class FistfulStatisticsService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -18,11 +18,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class MerchantStatisticsService {
|
||||
private client$: Observable<magista_MerchantStatisticsServiceCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('MerchantStatistics')),
|
||||
);
|
||||
@ -37,7 +42,7 @@ export class MerchantStatisticsService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -25,11 +25,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class InvoicingService {
|
||||
private client$: Observable<payment_processing_InvoicingCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('Invoicing')),
|
||||
);
|
||||
@ -44,7 +49,7 @@ export class InvoicingService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -11,11 +11,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PartyManagementService {
|
||||
private client$: Observable<payment_processing_PartyManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('PartyManagement')),
|
||||
);
|
||||
@ -30,7 +35,7 @@ export class PartyManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -10,11 +10,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PayoutManagementService {
|
||||
private client$: Observable<payout_manager_PayoutManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('PayoutManagement')),
|
||||
);
|
||||
@ -29,7 +34,7 @@ export class PayoutManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -16,11 +16,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class RepairManagementService {
|
||||
private client$: Observable<repairer_RepairManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('RepairManagement')),
|
||||
);
|
||||
@ -35,7 +40,7 @@ export class RepairManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -12,11 +12,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ManagementService {
|
||||
private client$: Observable<wallet_ManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('WalletManagement')),
|
||||
);
|
||||
@ -31,7 +36,7 @@ export class ManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -11,11 +11,16 @@ import { combineLatest, from, map, Observable, switchMap } from 'rxjs';
|
||||
import { KeycloakTokenInfoService, toWachterHeaders } from '@cc/app/shared/services';
|
||||
import { environment } from '@cc/environments/environment';
|
||||
|
||||
import { ConfigService } from '../../core/config.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ManagementService {
|
||||
private client$: Observable<withdrawal_ManagementCodegenClient>;
|
||||
|
||||
constructor(private keycloakTokenInfoService: KeycloakTokenInfoService) {
|
||||
constructor(
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
configService: ConfigService,
|
||||
) {
|
||||
const headers$ = this.keycloakTokenInfoService.decoded$.pipe(
|
||||
map(toWachterHeaders('WithdrawalManagement')),
|
||||
);
|
||||
@ -30,7 +35,7 @@ export class ManagementService {
|
||||
metadata,
|
||||
headers,
|
||||
logging: environment.logging.requests,
|
||||
path: '/wachter',
|
||||
...configService.config.api.wachter,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -1,3 +1,13 @@
|
||||
interface Endpoint {
|
||||
hostname: string;
|
||||
path: string;
|
||||
port?: string;
|
||||
https?: boolean;
|
||||
}
|
||||
|
||||
export interface AppConfig {
|
||||
fileStorageEndpoint: string;
|
||||
api: {
|
||||
wachter: Endpoint;
|
||||
};
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
{
|
||||
"fileStorageEndpoint": "https://files.sample.vality.dev"
|
||||
"fileStorageEndpoint": "https://files.sample.vality.dev",
|
||||
"api": {
|
||||
"wachter": {
|
||||
"hostname": "control-center.vality.dev",
|
||||
"path": "/wachter"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user