TD-237: New machinegun, deanonimus, messages, file-storage, payout-manager API (#61)

This commit is contained in:
Rinat Arsaev 2022-03-25 17:14:30 +03:00 committed by GitHub
parent 840e1dbddf
commit 2ab2d3ad6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 118 additions and 183 deletions

3
.gitignore vendored
View File

@ -37,8 +37,7 @@ testem.log
.DS_Store
Thumbs.db
/src/assets/meta-*.json
/src/assets/api-meta/
# Thrift codegen
/src/app/thrift-services/**/gen-*/
/src/app/api/**/gen-*/

99
package-lock.json generated
View File

@ -28,11 +28,15 @@
"@s-libs/micro-dash": "^13.1.0",
"@s-libs/ng-core": "^13.1.0",
"@s-libs/rxjs-core": "^13.1.0",
"@vality/deanonimus-proto": "1.0.1-c9a6cae.0",
"@vality/domain-proto": "1.0.1-3efe7df.0",
"@vality/dominant-cache-proto": "1.0.1-5b29d81.0",
"@vality/file-storage-proto": "^1.0.1-424226f.0",
"@vality/fistful-proto": "1.0.1-ea0fe7a.0",
"@vality/machinegun-proto": "1.0.1-277f06e.0",
"@vality/magista-proto": "1.0.1-f1a4bc0.0",
"@vality/payout-manager-proto": "1.0.1-cc9875f.0",
"@vality/messages-proto": "1.0.1-8c5435c.0",
"@vality/payout-manager-proto": "1.0.1-dbed280.0",
"@vality/thrift-ts": "2.2.0-alpha",
"@vality/woody": "^0.1.0",
"angular-file": "3.0.1",
@ -74,7 +78,6 @@
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "~5.8.0",
"concurrently": "^6.5.1",
"deanonimus-proto": "github:valitydev/deanonimus-proto#b9fab4fd1c7690186efdc5974d113c82bd5765e9",
"del": "^5.1.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
@ -94,8 +97,6 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"machinegun-proto": "github:valitydev/machinegun-proto#d814d6948d4ff13f6f41d12c6613f59c805750b2",
"messages-proto": "github:valitydev/messages-proto#a177efb574136961bcd0a8236b4bfc425264de29",
"ngx-build-plus": "^13.0.1",
"prettier": "~2.0.4",
"ts-mockito": "^2.6.1",
@ -5267,6 +5268,11 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@vality/deanonimus-proto": {
"version": "1.0.1-c9a6cae.0",
"resolved": "https://registry.npmjs.org/@vality/deanonimus-proto/-/deanonimus-proto-1.0.1-c9a6cae.0.tgz",
"integrity": "sha512-GjD4N6ZXyuYaGXv4od+lcCGKfIJFi640I6wJ3+O1eA9VrUI4Ro+Ljpu+TLjckMQ6nS1DkXuu+06Dk7Hr5nK1og=="
},
"node_modules/@vality/domain-proto": {
"version": "1.0.1-3efe7df.0",
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-1.0.1-3efe7df.0.tgz",
@ -5277,20 +5283,35 @@
"resolved": "https://registry.npmjs.org/@vality/dominant-cache-proto/-/dominant-cache-proto-1.0.1-5b29d81.0.tgz",
"integrity": "sha512-mk7H5/WeaXoHPSvube14pQEzYbCxnfrdaaA0DVgAHRxQ8CvX/KEtWT4lG78H/Xrg/6WQhP79T/BvujueO5pq8w=="
},
"node_modules/@vality/file-storage-proto": {
"version": "1.0.1-424226f.0",
"resolved": "https://registry.npmjs.org/@vality/file-storage-proto/-/file-storage-proto-1.0.1-424226f.0.tgz",
"integrity": "sha512-FcXDF45Hc9OfsloqSB5lxDAY+AFtStlheZp1GY3feOJi7gTbqadlMMFBFgre1+gH7i6qLQaqCH4C8z/s8U+4Dg=="
},
"node_modules/@vality/fistful-proto": {
"version": "1.0.1-ea0fe7a.0",
"resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-1.0.1-ea0fe7a.0.tgz",
"integrity": "sha512-YHegl0IE9TYGqYIWJXvx7YF+uu0JxkjmyRdXnbQkDQXW2hMBc0C4BLH4QTvdTUp3KcHmU2Up0BS8IRe65iEreA=="
},
"node_modules/@vality/machinegun-proto": {
"version": "1.0.1-277f06e.0",
"resolved": "https://registry.npmjs.org/@vality/machinegun-proto/-/machinegun-proto-1.0.1-277f06e.0.tgz",
"integrity": "sha512-qSotrFM8SY/rrfaIRWiyDFeu8ncMqPw8ohrerrGp5S+UZtGvqF0cHQiXytglK+fbAFJ0scyHgvSFBjc1bUtAzA=="
},
"node_modules/@vality/magista-proto": {
"version": "1.0.1-f1a4bc0.0",
"resolved": "https://registry.npmjs.org/@vality/magista-proto/-/magista-proto-1.0.1-f1a4bc0.0.tgz",
"integrity": "sha512-XD5m8lR712LvcgZYwA8lvpunqQU51fdvcm4o/h184clQ+DOLGYjBoWQfxzw83BhCIFwyJix2X3vfhn3i4OSTpg=="
},
"node_modules/@vality/messages-proto": {
"version": "1.0.1-8c5435c.0",
"resolved": "https://registry.npmjs.org/@vality/messages-proto/-/messages-proto-1.0.1-8c5435c.0.tgz",
"integrity": "sha512-Qa7LVBXp8vV9tf4bx+c0dehk50/wat4mBDRJz5CX7THZFz1wi1+oKx3oOSBGJwzzIx8qGpydXnb70v1wzWEgmA=="
},
"node_modules/@vality/payout-manager-proto": {
"version": "1.0.1-cc9875f.0",
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-1.0.1-cc9875f.0.tgz",
"integrity": "sha512-SFh6O8W62ZwlPr5n8I7EIcLWQfrmdw/eZ3fEVEg/nV/5B9JFtf2TpScHQ0grtO6WDdgLSzBsZa8fpDgr8sDOlw=="
"version": "1.0.1-dbed280.0",
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-1.0.1-dbed280.0.tgz",
"integrity": "sha512-uprNZIFMyLZbFg1TNVelr961pJoNDWUindLl6uhKwzvfSGOkGyko0XPQlD6WTziM7v4ctvsRkLf6xdPnkznjaA=="
},
"node_modules/@vality/thrift-ts": {
"version": "2.2.0-alpha",
@ -9589,13 +9610,6 @@
"node": ">=4.0"
}
},
"node_modules/deanonimus-proto": {
"version": "1.0.0",
"resolved": "git+ssh://git@github.com/valitydev/deanonimus-proto.git#b9fab4fd1c7690186efdc5974d113c82bd5765e9",
"integrity": "sha512-rjnJCnbeJGTG9S67YoRznSZBqUt/N4A5t7qWceQ8o5P8r14byYgs10u5aWRtpr+ELmWwhLRx9Q1r0Xa/I3KkGg==",
"dev": true,
"license": "UNLICENSED"
},
"node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@ -14551,13 +14565,6 @@
"yallist": "^3.0.2"
}
},
"node_modules/machinegun-proto": {
"name": "machinegun_proto",
"version": "1.0.0",
"resolved": "git+ssh://git@github.com/valitydev/machinegun-proto.git#d814d6948d4ff13f6f41d12c6613f59c805750b2",
"integrity": "sha512-eV5nASmWy5ag0O7b2CBBNkenHRjWVZxgXEBBfH6ZTfnpzICnVqVXW5lbYQvEneFxhmiicRFNDk5G/p4U0VsNmg==",
"dev": true
},
"node_modules/magic-string": {
"version": "0.25.7",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
@ -14721,12 +14728,6 @@
"node": ">= 8"
}
},
"node_modules/messages-proto": {
"version": "1.0.0",
"resolved": "git+ssh://git@github.com/valitydev/messages-proto.git#a177efb574136961bcd0a8236b4bfc425264de29",
"integrity": "sha512-WpHAOJwkWk/40dgRUuzBu3skcdgaqp3wRKYpAxo9QCt8WLRCwf1GnHvxJtsvmn7nEHmpSG6CWva3qLpxfQMdlw==",
"dev": true
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@ -26548,6 +26549,11 @@
}
}
},
"@vality/deanonimus-proto": {
"version": "1.0.1-c9a6cae.0",
"resolved": "https://registry.npmjs.org/@vality/deanonimus-proto/-/deanonimus-proto-1.0.1-c9a6cae.0.tgz",
"integrity": "sha512-GjD4N6ZXyuYaGXv4od+lcCGKfIJFi640I6wJ3+O1eA9VrUI4Ro+Ljpu+TLjckMQ6nS1DkXuu+06Dk7Hr5nK1og=="
},
"@vality/domain-proto": {
"version": "1.0.1-3efe7df.0",
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-1.0.1-3efe7df.0.tgz",
@ -26558,20 +26564,35 @@
"resolved": "https://registry.npmjs.org/@vality/dominant-cache-proto/-/dominant-cache-proto-1.0.1-5b29d81.0.tgz",
"integrity": "sha512-mk7H5/WeaXoHPSvube14pQEzYbCxnfrdaaA0DVgAHRxQ8CvX/KEtWT4lG78H/Xrg/6WQhP79T/BvujueO5pq8w=="
},
"@vality/file-storage-proto": {
"version": "1.0.1-424226f.0",
"resolved": "https://registry.npmjs.org/@vality/file-storage-proto/-/file-storage-proto-1.0.1-424226f.0.tgz",
"integrity": "sha512-FcXDF45Hc9OfsloqSB5lxDAY+AFtStlheZp1GY3feOJi7gTbqadlMMFBFgre1+gH7i6qLQaqCH4C8z/s8U+4Dg=="
},
"@vality/fistful-proto": {
"version": "1.0.1-ea0fe7a.0",
"resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-1.0.1-ea0fe7a.0.tgz",
"integrity": "sha512-YHegl0IE9TYGqYIWJXvx7YF+uu0JxkjmyRdXnbQkDQXW2hMBc0C4BLH4QTvdTUp3KcHmU2Up0BS8IRe65iEreA=="
},
"@vality/machinegun-proto": {
"version": "1.0.1-277f06e.0",
"resolved": "https://registry.npmjs.org/@vality/machinegun-proto/-/machinegun-proto-1.0.1-277f06e.0.tgz",
"integrity": "sha512-qSotrFM8SY/rrfaIRWiyDFeu8ncMqPw8ohrerrGp5S+UZtGvqF0cHQiXytglK+fbAFJ0scyHgvSFBjc1bUtAzA=="
},
"@vality/magista-proto": {
"version": "1.0.1-f1a4bc0.0",
"resolved": "https://registry.npmjs.org/@vality/magista-proto/-/magista-proto-1.0.1-f1a4bc0.0.tgz",
"integrity": "sha512-XD5m8lR712LvcgZYwA8lvpunqQU51fdvcm4o/h184clQ+DOLGYjBoWQfxzw83BhCIFwyJix2X3vfhn3i4OSTpg=="
},
"@vality/messages-proto": {
"version": "1.0.1-8c5435c.0",
"resolved": "https://registry.npmjs.org/@vality/messages-proto/-/messages-proto-1.0.1-8c5435c.0.tgz",
"integrity": "sha512-Qa7LVBXp8vV9tf4bx+c0dehk50/wat4mBDRJz5CX7THZFz1wi1+oKx3oOSBGJwzzIx8qGpydXnb70v1wzWEgmA=="
},
"@vality/payout-manager-proto": {
"version": "1.0.1-cc9875f.0",
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-1.0.1-cc9875f.0.tgz",
"integrity": "sha512-SFh6O8W62ZwlPr5n8I7EIcLWQfrmdw/eZ3fEVEg/nV/5B9JFtf2TpScHQ0grtO6WDdgLSzBsZa8fpDgr8sDOlw=="
"version": "1.0.1-dbed280.0",
"resolved": "https://registry.npmjs.org/@vality/payout-manager-proto/-/payout-manager-proto-1.0.1-dbed280.0.tgz",
"integrity": "sha512-uprNZIFMyLZbFg1TNVelr961pJoNDWUindLl6uhKwzvfSGOkGyko0XPQlD6WTziM7v4ctvsRkLf6xdPnkznjaA=="
},
"@vality/thrift-ts": {
"version": "2.2.0-alpha",
@ -30118,12 +30139,6 @@
"integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==",
"dev": true
},
"deanonimus-proto": {
"version": "git+ssh://git@github.com/valitydev/deanonimus-proto.git#b9fab4fd1c7690186efdc5974d113c82bd5765e9",
"integrity": "sha512-rjnJCnbeJGTG9S67YoRznSZBqUt/N4A5t7qWceQ8o5P8r14byYgs10u5aWRtpr+ELmWwhLRx9Q1r0Xa/I3KkGg==",
"dev": true,
"from": "deanonimus-proto@github:valitydev/deanonimus-proto#b9fab4fd1c7690186efdc5974d113c82bd5765e9"
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@ -33911,12 +33926,6 @@
"yallist": "^3.0.2"
}
},
"machinegun-proto": {
"version": "git+ssh://git@github.com/valitydev/machinegun-proto.git#d814d6948d4ff13f6f41d12c6613f59c805750b2",
"integrity": "sha512-eV5nASmWy5ag0O7b2CBBNkenHRjWVZxgXEBBfH6ZTfnpzICnVqVXW5lbYQvEneFxhmiicRFNDk5G/p4U0VsNmg==",
"dev": true,
"from": "machinegun-proto@github:valitydev/machinegun-proto#d814d6948d4ff13f6f41d12c6613f59c805750b2"
},
"magic-string": {
"version": "0.25.7",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
@ -34055,12 +34064,6 @@
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true
},
"messages-proto": {
"version": "git+ssh://git@github.com/valitydev/messages-proto.git#a177efb574136961bcd0a8236b4bfc425264de29",
"integrity": "sha512-WpHAOJwkWk/40dgRUuzBu3skcdgaqp3wRKYpAxo9QCt8WLRCwf1GnHvxJtsvmn7nEHmpSG6CWva3qLpxfQMdlw==",
"dev": true,
"from": "messages-proto@github:valitydev/messages-proto#a177efb574136961bcd0a8236b4bfc425264de29"
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",

View File

@ -7,7 +7,7 @@
"start": "ng serve --proxy-config proxy.conf.js --port 4200",
"build": "ng build --extra-webpack-config webpack.extra.js",
"test": "ng test",
"lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1330",
"lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1335",
"lint-cache-cmd": "npm run lint-cmd -- --cache",
"lint": "npm run lint-cache-cmd",
"lint-fix": "npm run lint-cache-cmd -- --fix",
@ -40,11 +40,15 @@
"@s-libs/micro-dash": "^13.1.0",
"@s-libs/ng-core": "^13.1.0",
"@s-libs/rxjs-core": "^13.1.0",
"@vality/deanonimus-proto": "1.0.1-c9a6cae.0",
"@vality/domain-proto": "1.0.1-3efe7df.0",
"@vality/dominant-cache-proto": "1.0.1-5b29d81.0",
"@vality/file-storage-proto": "1.0.1-424226f.0",
"@vality/fistful-proto": "1.0.1-ea0fe7a.0",
"@vality/machinegun-proto": "1.0.1-277f06e.0",
"@vality/magista-proto": "1.0.1-f1a4bc0.0",
"@vality/payout-manager-proto": "1.0.1-cc9875f.0",
"@vality/messages-proto": "1.0.1-8c5435c.0",
"@vality/payout-manager-proto": "1.0.1-dbed280.0",
"@vality/thrift-ts": "2.2.0-alpha",
"@vality/woody": "^0.1.0",
"angular-file": "3.0.1",
@ -86,7 +90,6 @@
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "~5.8.0",
"concurrently": "^6.5.1",
"deanonimus-proto": "github:valitydev/deanonimus-proto#b9fab4fd1c7690186efdc5974d113c82bd5765e9",
"del": "^5.1.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
@ -96,7 +99,6 @@
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-unused-imports": "^2.0.0",
"eslint-plugin-you-dont-need-lodash-underscore": "^6.11.0",
"file-storage-proto": "github:valitydev/file-storage-proto#281e1ca4cea9bf32229a6c389f0dcf5d49c05a0b",
"glob": "^7.1.6",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
@ -106,8 +108,6 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"machinegun-proto": "github:valitydev/machinegun-proto#d814d6948d4ff13f6f41d12c6613f59c805750b2",
"messages-proto": "github:valitydev/messages-proto#a177efb574136961bcd0a8236b4bfc425264de29",
"ngx-build-plus": "^13.0.1",
"prettier": "~2.0.4",
"ts-mockito": "^2.6.1",

View File

@ -1,67 +1,23 @@
import { Injectable } from '@angular/core';
import * as ThriftPayoutManagementService from '@vality/magista-proto/lib/magista/gen-nodejs/PayoutManagement';
import { Payout, PayoutID, PayoutParams } from '@vality/payout-manager-proto';
import { Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { Injectable, Injector } from '@angular/core';
import {
codegenClientConfig,
CodegenClient,
} from '@vality/payout-manager-proto/lib/payout_manager-PayoutManagement';
import context from '@vality/payout-manager-proto/lib/payout_manager/context';
import * as PayoutManagement from '@vality/payout-manager-proto/lib/payout_manager/gen-nodejs/PayoutManagement';
import { ThriftConnector } from '@cc/app/api/utils/thrift-connector';
import { KeycloakTokenInfoService } from '@cc/app/shared/services';
import { createThriftApi } from '@cc/app/api/utils';
import { PayoutManagerInstanceProviderService } from './payout-manager-instance-provider.service';
@Injectable({
providedIn: 'root',
})
export class PayoutManagementService extends ThriftConnector {
constructor(
protected keycloakTokenInfoService: KeycloakTokenInfoService,
private instanceProvider: PayoutManagerInstanceProviderService
) {
super(keycloakTokenInfoService, ThriftPayoutManagementService, '/payout/management');
}
createPayout(params: PayoutParams): Observable<Payout> {
return this.instanceProvider.methods$.pipe(
switchMap(({ toPlainObject, toThriftInstance }) =>
this.callThriftServiceMethod<Payout>(
'CreatePayout',
toThriftInstance('PayoutParams', params)
).pipe(map((v) => toPlainObject('Payout', v)))
)
);
}
getPayout(id: PayoutID): Observable<Payout> {
return this.instanceProvider.methods$.pipe(
switchMap(({ toPlainObject, toThriftInstance }) =>
this.callThriftServiceMethod<Payout>(
'GetPayout',
toThriftInstance('PayoutID', id)
).pipe(map((v) => toPlainObject('Payout', v)))
)
);
}
confirmPayout(id: PayoutID): Observable<void> {
return this.instanceProvider.methods$.pipe(
switchMap(({ toThriftInstance }) =>
this.callThriftServiceMethod<void>(
'ConfirmPayout',
toThriftInstance('PayoutID', id)
)
)
);
}
cancelPayout(id: PayoutID, details: string): Observable<void> {
return this.instanceProvider.methods$.pipe(
switchMap(({ toThriftInstance }) =>
this.callThriftServiceMethod<void>(
'CancelPayout',
toThriftInstance('PayoutID', id),
details
)
)
);
@Injectable({ providedIn: 'root' })
export class PayoutManagementService extends createThriftApi<CodegenClient>() {
constructor(injector: Injector) {
super(injector, {
service: PayoutManagement,
endpoint: '/payout/management',
metadata: () =>
import('@vality/payout-manager-proto/lib/metadata.json').then((m) => m.default),
context,
...codegenClientConfig,
});
}
}

View File

@ -1,16 +0,0 @@
import { Injectable } from '@angular/core';
import * as context from '@vality/payout-manager-proto/lib/payout_manager/context.js';
import { ProviderSettings, ThriftInstanceProvider } from '../thrift-instance-provider';
@Injectable({ providedIn: 'root' })
export class PayoutManagerInstanceProviderService extends ThriftInstanceProvider {
protected getProviderSettings(): ProviderSettings {
return {
context,
metadataLoad: () =>
import('@vality/payout-manager-proto/lib/metadata.json').then((m) => m.default),
defaultNamespace: 'payout_manager',
};
}
}

View File

@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
import { ThriftApi } from './thrift-api';
import { ThriftApiArgs } from './types/thrift-api-args';
export function createThriftApi<T extends { [N in PropertyKey]: any }>() {
export function createThriftApi<T extends Record<PropertyKey, any>>() {
return (ThriftApi as unknown) as new (...args: ThriftApiArgs) => {
[N in keyof T]: (
...args: Parameters<T[N]>

View File

@ -1,9 +1,9 @@
import { SelectionModel } from '@angular/cdk/collections';
import { Component } from '@angular/core';
import { FormBuilder, FormControl } from '@angular/forms';
import { Machine } from '@vality/machinegun-proto';
import { Observable } from 'rxjs';
import { Machine } from '../../thrift-services/machinegun/gen-model/state_processing';
import { Namespace } from '../../thrift-services/machinegun/model/namespace';
import { ExecStateType } from '../execute';
import { RepairingStatusType } from '../repairing-status/repairing-status.component';

View File

@ -1,10 +1,10 @@
import { Injectable } from '@angular/core';
import { ConversationId } from '@vality/messages-proto';
import { merge, of, Subject } from 'rxjs';
import { catchError, pluck, shareReplay, switchMap } from 'rxjs/operators';
import { progress } from '@cc/app/shared/custom-operators';
import { ConversationId } from '../../../../../thrift-services/messages/gen-model/messages';
import { MessagesService } from '../../../../../thrift-services/messages/messages.service';
@Injectable()

View File

@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { FileData } from '@vality/file-storage-proto';
import { FileID } from '../../../../../../thrift-services/damsel/gen-model/claim_management';
import { FileData } from '../../../../../../thrift-services/file-storage/gen-model/file_storage';
import { FileTimelineItemService } from '../file-timeline-item.service';
@Component({

View File

@ -1,4 +1,5 @@
import { Injectable } from '@angular/core';
import { FileData } from '@vality/file-storage-proto';
import * as moment from 'moment';
import { merge, Observable, of, Subject } from 'rxjs';
import { catchError, filter, map, shareReplay, switchMap } from 'rxjs/operators';
@ -6,7 +7,6 @@ import { catchError, filter, map, shareReplay, switchMap } from 'rxjs/operators'
import { progress } from '@cc/app/shared/custom-operators';
import { FileStorageService } from '../../../../../thrift-services/file-storage/file-storage.service';
import { FileData } from '../../../../../thrift-services/file-storage/gen-model/file_storage';
import { download } from './download';
@Injectable()

View File

@ -1,6 +1,8 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { NewFileResult } from '@vality/file-storage-proto';
import { Value } from '@vality/file-storage-proto/lib/msgpack';
import * as moment from 'moment';
import { forkJoin, merge, Observable, of, Subject } from 'rxjs';
import { catchError, filter, map, shareReplay, switchMap } from 'rxjs/operators';
@ -9,8 +11,6 @@ import { progress } from '@cc/app/shared/custom-operators';
import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management';
import { FileStorageService } from '../../../../thrift-services/file-storage/file-storage.service';
import { NewFileResult } from '../../../../thrift-services/file-storage/gen-model/file_storage';
import { Value } from '../../../../thrift-services/file-storage/gen-model/msgpack';
import { UnsavedClaimChangesetService } from '../../changeset/unsaved-changeset/unsaved-claim-changeset.service';
@Injectable()

View File

@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import { ConversationId, User } from '@vality/messages-proto';
import { forkJoin, merge, of, Subject } from 'rxjs';
import { catchError, filter, shareReplay, switchMap, tap } from 'rxjs/operators';
import * as uuid from 'uuid/v4';
@ -9,7 +10,6 @@ import { progress } from '@cc/app/shared/custom-operators';
import { KeycloakTokenInfoService } from '../../../../keycloak-token-info.service';
import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management';
import { ConversationId, User } from '../../../../thrift-services/messages/gen-model/messages';
import { MessagesService } from '../../../../thrift-services/messages/messages.service';
import { createSingleMessageConversationParams } from '../../../../thrift-services/messages/utils';
import { UnsavedClaimChangesetService } from '../../changeset/unsaved-changeset/unsaved-claim-changeset.service';

View File

@ -15,7 +15,7 @@ export class PayoutDetailsComponent {
payout$ = this.route.params.pipe(
startWith(this.route.snapshot.params),
pluck('payoutId'),
switchMap((id: string) => this.payoutManagementService.getPayout(id)),
switchMap((id: string) => this.payoutManagementService.GetPayout(id)),
shareReplay({ refCount: true, bufferSize: 1 })
);
shop$ = this.payout$.pipe(

View File

@ -27,7 +27,7 @@ export class CancelPayoutDialogComponent {
accept() {
this.payoutManagementService
.cancelPayout(this.data.id, this.detailsControl.value)
.CancelPayout(this.data.id, this.detailsControl.value)
.pipe(progressTo(this.progress$), untilDestroyed(this))
.subscribe({
next: () => {

View File

@ -45,7 +45,7 @@ export class CreatePayoutDialogComponent {
create() {
const { value } = this.control;
this.payoutManagementService
.createPayout(
.CreatePayout(
omitBy(
{
shop_params: {

View File

@ -84,7 +84,7 @@ export class PayoutsTableComponent {
.afterClosed()
.pipe(
filter((res) => res === 'confirm'),
switchMap(() => this.payoutManagementService.confirmPayout(id)),
switchMap(() => this.payoutManagementService.ConfirmPayout(id)),
untilDestroyed(this)
)
.subscribe({

View File

@ -1,7 +1,6 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { Party, PartyID } from '@vality/domain-proto';
import { PartyID } from '../../../thrift-services/damsel/gen-model/domain';
import { Party } from '../../../thrift-services/deanonimus/gen-model/deanonimus';
import { PartyActions } from './party-actions';
import { PartyMenuItemEvent } from './party-menu-item-event';

View File

@ -1,11 +1,11 @@
import { Injectable } from '@angular/core';
import { Party } from '@vality/deanonimus-proto';
import { Observable, of, Subject } from 'rxjs';
import { catchError, map, shareReplay, switchMap } from 'rxjs/operators';
import { progress } from '@cc/app/shared/custom-operators';
import { DeanonimusService } from '../../thrift-services/deanonimus';
import { Party } from '../../thrift-services/deanonimus/gen-model/deanonimus';
@Injectable()
export class FetchPartiesService {
@ -18,7 +18,7 @@ export class FetchPartiesService {
map((hits) => hits.map((hit) => hit.party)),
catchError((err) => {
console.error(err);
return of([]);
return of<Party[]>([]);
})
)
),

View File

@ -1,10 +1,10 @@
import { Injectable, NgZone } from '@angular/core';
import { SearchHit } from '@vality/deanonimus-proto';
import * as Deanonimus from '@vality/deanonimus-proto/lib/deanonimus/gen-nodejs/Deanonimus';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
import { SearchHit } from './gen-model/deanonimus';
import * as Deanonimus from './gen-nodejs/Deanonimus';
@Injectable({ providedIn: 'root' })
export class DeanonimusService extends ThriftService {

View File

@ -1,6 +1,5 @@
import { Party, SearchHit } from '@vality/deanonimus-proto';
import maxBy from 'lodash-es/maxBy';
import { Party, SearchHit } from '../gen-model/deanonimus';
export const getMaxSearchHitParty = (searchHits: SearchHit[]): Party =>
maxBy(searchHits, (searchHit) => searchHit.score)?.party;

View File

@ -1,9 +1,4 @@
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
import { Timestamp } from './gen-model/base';
import {
FileData,
FileDataID,
@ -11,8 +6,13 @@ import {
Metadata,
NewFileResult,
URL,
} from './gen-model/file_storage';
import * as FileStorage from './gen-nodejs/FileStorage';
} from '@vality/file-storage-proto';
import { Timestamp } from '@vality/file-storage-proto/lib/base';
import * as FileStorage from '@vality/file-storage-proto/lib/file_storage/gen-nodejs/FileStorage';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
@Injectable()
export class FileStorageService extends ThriftService {

View File

@ -1,15 +1,15 @@
import { Injectable, NgZone } from '@angular/core';
import { Machine, MachineDescriptor, Reference } from '@vality/machinegun-proto';
import { Namespace } from '@vality/machinegun-proto/lib/base';
import * as Automaton from '@vality/machinegun-proto/lib/state_processing/gen-nodejs/Automaton';
import {
MachineDescriptor as MachineDescriptorObject,
Reference as ReferenceObject,
} from '@vality/machinegun-proto/lib/state_processing/gen-nodejs/state_processing_types';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
import { Namespace } from './gen-model/base';
import { Machine, MachineDescriptor, Reference } from './gen-model/state_processing';
import * as Automaton from './gen-nodejs/Automaton';
import {
MachineDescriptor as MachineDescriptorObject,
Reference as ReferenceObject,
} from './gen-nodejs/state_processing_types';
@Injectable()
export class AutomatonService extends ThriftService {

View File

@ -1,21 +1,21 @@
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
import {
Conversation,
ConversationFilter,
ConversationId,
GetConversationResponse,
User,
} from './gen-model/messages';
} from '@vality/messages-proto';
import {
Conversation as ConversationType,
ConversationFilter as ConversationFilterType,
User as UserType,
} from './gen-nodejs/messages_types';
import * as MessageServiceClient from './gen-nodejs/MessageService';
} from '@vality/messages-proto/lib/messages/gen-nodejs/messages_types';
import * as MessageServiceClient from '@vality/messages-proto/lib/messages/gen-nodejs/MessageService';
import { Observable } from 'rxjs';
import { KeycloakTokenInfoService } from '../../keycloak-token-info.service';
import { ThriftService } from '../services/thrift/thrift-service';
@Injectable()
export class MessagesService extends ThriftService {

View File

@ -1,8 +1,7 @@
import { Conversation, ConversationStatus } from '@vality/messages-proto';
import * as moment from 'moment';
import * as uuid from 'uuid/v4';
import { Conversation, ConversationStatus } from '../gen-model/messages';
export const createSingleMessageConversationParams = (
conversationId: string,
text: string,

View File

@ -1,10 +1,6 @@
{
"proto": {
"damsel": "./node_modules/@vality/domain-proto/proto",
"machinegun": "./node_modules/machinegun-proto/proto",
"fistful": "./node_modules/@vality/fistful-proto/proto",
"messages": "./node_modules/messages-proto/proto",
"file-storage": "./node_modules/file-storage-proto/proto",
"deanonimus": { "path": "./node_modules/deanonimus-proto/proto", "meta": true }
"fistful": "./node_modules/@vality/fistful-proto/proto"
}
}