Browse Source

Prettify files

pull/6033/head
Thomas Kaul 6 days ago
parent
commit
63c11df1d3
  1. 3
      libs/common/src/lib/interfaces/responses/data-provider-ghostfolio-asset-profile-response.interface.ts
  2. 75
      libs/common/src/lib/interfaces/simplewebauthn.interface.ts
  3. 4
      libs/common/src/lib/validators/is-currency-code.ts
  4. 6
      libs/ui/src/lib/assistant/interfaces/interfaces.ts
  5. 2
      libs/ui/src/lib/entity-logo/entity-logo.component.html

3
libs/common/src/lib/interfaces/responses/data-provider-ghostfolio-asset-profile-response.interface.ts

@ -1,4 +1,3 @@
import { SymbolProfile } from '@prisma/client'; import { SymbolProfile } from '@prisma/client';
export interface DataProviderGhostfolioAssetProfileResponse export interface DataProviderGhostfolioAssetProfileResponse extends Partial<SymbolProfile> {}
extends Partial<SymbolProfile> {}

75
libs/common/src/lib/interfaces/simplewebauthn.interface.ts

@ -3,8 +3,7 @@ export interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
readonly signature: ArrayBuffer; readonly signature: ArrayBuffer;
readonly userHandle: ArrayBuffer | null; readonly userHandle: ArrayBuffer | null;
} }
export interface AuthenticatorAttestationResponse export interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
extends AuthenticatorResponse {
readonly attestationObject: ArrayBuffer; readonly attestationObject: ArrayBuffer;
} }
export interface AuthenticationExtensionsClientInputs { export interface AuthenticationExtensionsClientInputs {
@ -57,8 +56,7 @@ export interface PublicKeyCredentialRequestOptions {
timeout?: number; timeout?: number;
userVerification?: UserVerificationRequirement; userVerification?: UserVerificationRequirement;
} }
export interface PublicKeyCredentialUserEntity export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
extends PublicKeyCredentialEntity {
displayName: string; displayName: string;
id: BufferSource; id: BufferSource;
} }
@ -99,11 +97,10 @@ export declare type BufferSource = ArrayBufferView | ArrayBuffer;
export declare type PublicKeyCredentialType = 'public-key'; export declare type PublicKeyCredentialType = 'public-key';
export declare type UvmEntry = number[]; export declare type UvmEntry = number[];
export interface PublicKeyCredentialCreationOptionsJSON export interface PublicKeyCredentialCreationOptionsJSON extends Omit<
extends Omit< PublicKeyCredentialCreationOptions,
PublicKeyCredentialCreationOptions, 'challenge' | 'user' | 'excludeCredentials'
'challenge' | 'user' | 'excludeCredentials' > {
> {
user: PublicKeyCredentialUserEntityJSON; user: PublicKeyCredentialUserEntityJSON;
challenge: Base64URLString; challenge: Base64URLString;
excludeCredentials: PublicKeyCredentialDescriptorJSON[]; excludeCredentials: PublicKeyCredentialDescriptorJSON[];
@ -113,21 +110,24 @@ export interface PublicKeyCredentialCreationOptionsJSON
* A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to * A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
* (eventually) get passed into navigator.credentials.get(...) in the browser. * (eventually) get passed into navigator.credentials.get(...) in the browser.
*/ */
export interface PublicKeyCredentialRequestOptionsJSON export interface PublicKeyCredentialRequestOptionsJSON extends Omit<
extends Omit< PublicKeyCredentialRequestOptions,
PublicKeyCredentialRequestOptions, 'challenge' | 'allowCredentials'
'challenge' | 'allowCredentials' > {
> {
challenge: Base64URLString; challenge: Base64URLString;
allowCredentials?: PublicKeyCredentialDescriptorJSON[]; allowCredentials?: PublicKeyCredentialDescriptorJSON[];
extensions?: AuthenticationExtensionsClientInputs; extensions?: AuthenticationExtensionsClientInputs;
} }
export interface PublicKeyCredentialDescriptorJSON export interface PublicKeyCredentialDescriptorJSON extends Omit<
extends Omit<PublicKeyCredentialDescriptor, 'id'> { PublicKeyCredentialDescriptor,
'id'
> {
id: Base64URLString; id: Base64URLString;
} }
export interface PublicKeyCredentialUserEntityJSON export interface PublicKeyCredentialUserEntityJSON extends Omit<
extends Omit<PublicKeyCredentialUserEntity, 'id'> { PublicKeyCredentialUserEntity,
'id'
> {
id: string; id: string;
} }
/** /**
@ -140,11 +140,10 @@ export interface AttestationCredential extends PublicKeyCredential {
* A slightly-modified AttestationCredential to simplify working with ArrayBuffers that * A slightly-modified AttestationCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AttestationCredentialJSON export interface AttestationCredentialJSON extends Omit<
extends Omit< AttestationCredential,
AttestationCredential, 'response' | 'rawId' | 'getClientExtensionResults'
'response' | 'rawId' | 'getClientExtensionResults' > {
> {
rawId: Base64URLString; rawId: Base64URLString;
response: AuthenticatorAttestationResponseJSON; response: AuthenticatorAttestationResponseJSON;
clientExtensionResults: AuthenticationExtensionsClientOutputs; clientExtensionResults: AuthenticationExtensionsClientOutputs;
@ -160,11 +159,10 @@ export interface AssertionCredential extends PublicKeyCredential {
* A slightly-modified AssertionCredential to simplify working with ArrayBuffers that * A slightly-modified AssertionCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AssertionCredentialJSON export interface AssertionCredentialJSON extends Omit<
extends Omit< AssertionCredential,
AssertionCredential, 'response' | 'rawId' | 'getClientExtensionResults'
'response' | 'rawId' | 'getClientExtensionResults' > {
> {
rawId: Base64URLString; rawId: Base64URLString;
response: AuthenticatorAssertionResponseJSON; response: AuthenticatorAssertionResponseJSON;
clientExtensionResults: AuthenticationExtensionsClientOutputs; clientExtensionResults: AuthenticationExtensionsClientOutputs;
@ -173,11 +171,10 @@ export interface AssertionCredentialJSON
* A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that * A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AuthenticatorAttestationResponseJSON export interface AuthenticatorAttestationResponseJSON extends Omit<
extends Omit< AuthenticatorAttestationResponseFuture,
AuthenticatorAttestationResponseFuture, 'clientDataJSON' | 'attestationObject'
'clientDataJSON' | 'attestationObject' > {
> {
clientDataJSON: Base64URLString; clientDataJSON: Base64URLString;
attestationObject: Base64URLString; attestationObject: Base64URLString;
} }
@ -185,11 +182,10 @@ export interface AuthenticatorAttestationResponseJSON
* A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that * A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AuthenticatorAssertionResponseJSON export interface AuthenticatorAssertionResponseJSON extends Omit<
extends Omit< AuthenticatorAssertionResponse,
AuthenticatorAssertionResponse, 'authenticatorData' | 'clientDataJSON' | 'signature' | 'userHandle'
'authenticatorData' | 'clientDataJSON' | 'signature' | 'userHandle' > {
> {
authenticatorData: Base64URLString; authenticatorData: Base64URLString;
clientDataJSON: Base64URLString; clientDataJSON: Base64URLString;
signature: Base64URLString; signature: Base64URLString;
@ -217,8 +213,7 @@ export declare type Base64URLString = string;
* *
* Properties marked optional are not supported in all browsers. * Properties marked optional are not supported in all browsers.
*/ */
export interface AuthenticatorAttestationResponseFuture export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
extends AuthenticatorAttestationResponse {
getTransports?: () => AuthenticatorTransport[]; getTransports?: () => AuthenticatorTransport[];
getAuthenticatorData?: () => ArrayBuffer; getAuthenticatorData?: () => ArrayBuffer;
getPublicKey?: () => ArrayBuffer; getPublicKey?: () => ArrayBuffer;

4
libs/common/src/lib/validators/is-currency-code.ts

@ -21,9 +21,7 @@ export function IsCurrencyCode(validationOptions?: ValidationOptions) {
} }
@ValidatorConstraint({ async: false }) @ValidatorConstraint({ async: false })
export class IsExtendedCurrencyConstraint export class IsExtendedCurrencyConstraint implements ValidatorConstraintInterface {
implements ValidatorConstraintInterface
{
public defaultMessage() { public defaultMessage() {
return '$property must be a valid ISO4217 currency code'; return '$property must be a valid ISO4217 currency code';
} }

6
libs/ui/src/lib/assistant/interfaces/interfaces.ts

@ -3,8 +3,10 @@ import { AccountWithValue, DateRange } from '@ghostfolio/common/types';
import { SearchMode } from '../enums/search-mode'; import { SearchMode } from '../enums/search-mode';
export interface AccountSearchResultItem export interface AccountSearchResultItem extends Pick<
extends Pick<AccountWithValue, 'id' | 'name'> { AccountWithValue,
'id' | 'name'
> {
mode: SearchMode.ACCOUNT; mode: SearchMode.ACCOUNT;
routerLink: string[]; routerLink: string[];
} }

2
libs/ui/src/lib/entity-logo/entity-logo.component.html

@ -1,6 +1,6 @@
@if (src) { @if (src) {
<img <img
onerror="this.style.display='none'" onerror="this.style.display = 'none'"
[ngClass]="{ large: size === 'large' }" [ngClass]="{ large: size === 'large' }"
[src]="src" [src]="src"
[title]="tooltip ? tooltip : ''" [title]="tooltip ? tooltip : ''"

Loading…
Cancel
Save