move some code from core into shared

This commit is contained in:
einhornimmond 2025-11-28 18:59:46 +01:00
parent 5370218dc9
commit 933171d208
5 changed files with 5 additions and 12 deletions

View File

@ -1,13 +1,5 @@
import { registerEnumType } from 'type-graphql'
export enum TransactionTypeId {
CREATION = 1,
SEND = 2,
RECEIVE = 3,
// This is a virtual property, never occurring on the database
DECAY = 4,
LINK_SUMMARY = 5,
}
import { TransactionTypeId } from 'database'
registerEnumType(TransactionTypeId, {
name: 'TransactionTypeId', // this one is mandatory

View File

@ -14,9 +14,6 @@ export const decimalSeparatorByLanguage = (a: Decimal, language: string): string
return result
}
export const fullName = (firstName: string, lastName: string): string =>
[firstName, lastName].filter(Boolean).join(' ')
// Function to reset an interface by chatGPT
export function resetInterface<T extends Record<string, any>>(obj: T): T {

View File

@ -3,6 +3,7 @@ export * from './enum'
export * from './const'
export * from './helper'
export * from './logic/decay'
export * from './util'
export * from './jwt/JWT'
export * from './jwt/payloadtypes/AuthenticationJwtPayloadType'
export * from './jwt/payloadtypes/AuthenticationResponseJwtPayloadType'

1
shared/src/util/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './utilities'

View File

@ -0,0 +1,2 @@
export const fullName = (firstName: string, lastName: string): string =>
[firstName, lastName].filter(Boolean).join(' ')