compile and linting

This commit is contained in:
clauspeterhuebner 2025-07-04 18:50:12 +02:00
parent 4ca94b189c
commit 74ffb8df58
8 changed files with 26 additions and 75 deletions

View File

@ -1,48 +0,0 @@
// import { JWTPayload } from 'jose'
import { JwtPayloadType } from './JwtPayloadType'
export class DisburseJwtPayloadType extends JwtPayloadType {
static DISBURSE_ACTIVATION_TYPE = 'disburse-activation'
sendercommunityuuid: string
sendergradidoid: string
recipientcommunityuuid: string
recipientcommunityname: string
recipientgradidoid: string
recipientfirstname: string
code: string
amount: string
memo: string
validuntil: string
recipientalias: string
constructor(
senderCommunityUuid: string,
senderGradidoId: string,
recipientCommunityUuid: string,
recipientCommunityName: string,
recipientGradidoId: string,
recipientFirstName: string,
code: string,
amount: string,
memo: string,
validUntil: string,
recipientAlias: string,
) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
super()
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
this.tokentype = DisburseJwtPayloadType.DISBURSE_ACTIVATION_TYPE
this.sendercommunityuuid = senderCommunityUuid
this.sendergradidoid = senderGradidoId
this.recipientcommunityuuid = recipientCommunityUuid
this.recipientcommunityname = recipientCommunityName
this.recipientgradidoid = recipientGradidoId
this.recipientfirstname = recipientFirstName
this.code = code
this.amount = amount
this.memo = memo
this.validuntil = validUntil
this.recipientalias = recipientAlias
}
}

View File

@ -6,12 +6,10 @@ import { CONFIG } from '@/config'
import { AuthenticationClient as V1_0_AuthenticationClient } from '@/federation/client/1_0/AuthenticationClient'
import { ensureUrlEndsWithSlash } from '@/util/utilities'
import { encryptAndSign } from 'core/src/auth/jwt/JWT'
import { OpenConnectionJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/OpenConnectionJwtPayloadType'
import { getLogger } from 'log4js'
import { EncryptedTransferArgs } from 'core/src/graphql/model/EncryptedTransferArgs'
import { AuthenticationClientFactory } from './client/AuthenticationClientFactory'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { encryptAndSign, EncryptedTransferArgs, OpenConnectionJwtPayloadType } from 'core'
import { getLogger } from 'log4js'
import { AuthenticationClientFactory } from './client/AuthenticationClientFactory'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.federation.authenticateCommunities`)

View File

@ -5,16 +5,16 @@ import {
} from 'database'
import { IsNull } from 'typeorm'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { FederationClient as V1_0_FederationClient } from '@/federation/client/1_0/FederationClient'
import { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
import { FederationClientFactory } from '@/federation/client/FederationClientFactory'
import { LogError } from '@/server/LogError'
import { createKeyPair } from 'core'
import { getLogger } from 'log4js'
import { startCommunityAuthentication } from './authenticateCommunities'
import { PublicCommunityInfoLoggingView } from './client/1_0/logging/PublicCommunityInfoLogging.view'
import { ApiVersionType } from './enum/apiVersionType'
import { createKeyPair } from '@/auth/jwt/JWT'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.federation.validateCommunities`)

View File

@ -1,7 +1,7 @@
import { Decimal } from 'decimal.js-light'
import { Field, ObjectType } from 'type-graphql'
import { RedeemJwtPayloadType } from '@/auth/jwt/payloadtypes/RedeemJwtPayloadType'
import { RedeemJwtPayloadType } from 'core'
import { Community } from './Community'
import { User } from './User'

View File

@ -27,8 +27,6 @@ import { Decimal } from 'decimal.js-light'
import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
import { RIGHTS } from '@/auth/RIGHTS'
import { decode, encode, verify } from '@/auth/jwt/JWT'
import { RedeemJwtPayloadType } from '@/auth/jwt/payloadtypes/RedeemJwtPayloadType'
import {
EVENT_CONTRIBUTION_LINK_REDEEM,
EVENT_TRANSACTION_LINK_CREATE,
@ -39,13 +37,14 @@ import { LogError } from '@/server/LogError'
import { Context, getClientTimezoneOffset, getUser } from '@/server/context'
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
import { TRANSACTION_LINK_LOCK } from '@/util/TRANSACTION_LINK_LOCK'
import { calculateDecay } from 'shared'
import { fullName } from '@/util/utilities'
import { calculateBalance } from '@/util/validate'
import { RedeemJwtPayloadType, decode, encode, verify } from 'core'
import { calculateDecay } from 'shared'
import { DisburseJwtPayloadType } from '@/auth/jwt/payloadtypes/DisburseJwtPayloadType'
import { Logger, getLogger } from 'log4js'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { DisburseJwtPayloadType } from 'core'
import { Logger, getLogger } from 'log4js'
import { executeTransaction } from './TransactionResolver'
import {
getAuthenticatedCommunities,

View File

@ -1 +1,12 @@
export * from './validation/user'
export * from './validation/user'
export * from './auth/jwt/JWT'
export * from './auth/jwt/payloadtypes/AuthenticationJwtPayloadType'
export * from './auth/jwt/payloadtypes/AuthenticationResponseJwtPayloadType'
export * from './auth/jwt/payloadtypes/DisburseJwtPayloadType'
export * from './auth/jwt/payloadtypes/EncryptedJWEJwtPayloadType'
export * from './auth/jwt/payloadtypes/JwtPayloadType'
export * from './auth/jwt/payloadtypes/OpenConnectionJwtPayloadType'
export * from './auth/jwt/payloadtypes/OpenConnectionCallbackJwtPayloadType'
export * from './auth/jwt/payloadtypes/RedeemJwtPayloadType'
export * from './graphql/logic/interpretEncryptedTransferArgs'
export * from './graphql/model/EncryptedTransferArgs'

View File

@ -1,4 +1,6 @@
import { CONFIG } from '@/config'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { AuthenticationJwtPayloadType, AuthenticationResponseJwtPayloadType, encryptAndSign, EncryptedTransferArgs, interpretEncryptedTransferArgs, OpenConnectionCallbackJwtPayloadType, OpenConnectionJwtPayloadType } from 'core'
import {
CommunityLoggingView,
Community as DbCommunity,
@ -8,15 +10,7 @@ import {
} from 'database'
import { getLogger } from 'log4js'
import { Arg, Mutation, Resolver } from 'type-graphql'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { EncryptedTransferArgs } from 'core/src/graphql/model/EncryptedTransferArgs'
import { startAuthentication, startOpenConnectionCallback } from '../util/authenticateCommunity'
import { OpenConnectionJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/OpenConnectionJwtPayloadType'
import { interpretEncryptedTransferArgs } from 'core/src/graphql/logic/interpretEncryptedTransferArgs'
import { OpenConnectionCallbackJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/OpenConnectionCallbackJwtPayloadType'
import { AuthenticationJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/AuthenticationJwtPayloadType'
import { AuthenticationResponseJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/AuthenticationResponseJwtPayloadType'
import { encryptAndSign } from 'core/src/auth/jwt/JWT'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.api.1_0.resolver.AuthenticationResolver`)

View File

@ -1,3 +1,4 @@
import { EncryptedTransferArgs, verifyAndDecrypt } from 'core'
import {
CommunityLoggingView,
Community as DbCommunity,
@ -7,17 +8,13 @@ import {
} from 'database'
import { getLogger } from 'log4js'
import { validate as validateUUID, version as versionUUID } from 'uuid'
import { EncryptedTransferArgs } from 'core/src/graphql/model/EncryptedTransferArgs'
import { AuthenticationClientFactory } from '@/client/AuthenticationClientFactory'
import { randombytes_random } from 'sodium-native'
import { AuthenticationClient as V1_0_AuthenticationClient } from '@/client/1_0/AuthenticationClient'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { encryptAndSign, verifyAndDecrypt } from 'core/src/auth/jwt/JWT'
import { OpenConnectionCallbackJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/OpenConnectionCallbackJwtPayloadType'
import { AuthenticationJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/AuthenticationJwtPayloadType'
import { AuthenticationResponseJwtPayloadType } from 'core/src/auth/jwt/payloadtypes/AuthenticationResponseJwtPayloadType'
import { AuthenticationJwtPayloadType, AuthenticationResponseJwtPayloadType, encryptAndSign, OpenConnectionCallbackJwtPayloadType } from 'core'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.api.1_0.util.authenticateCommunity`)