component-dbs-core
Version:
DTO objects shared among device backend
30 lines (29 loc) • 1.56 kB
TypeScript
import { TransactionQueryInput, Transaction, TransactionConnection, TransactionRequestInput } from '../types.d';
import { TransactionDb } from './transactionDb';
import { DeviceVerification, DeviceService } from '../devices';
import { AppSyncClient, EnvironmentService, DynamodbService, LambdaService } from '../common_services';
import { UpdateEventPublisher } from '../common_interfaces';
export declare class TransactionService extends UpdateEventPublisher {
private readonly dynamodbService;
private readonly envService;
private readonly deviceVerify;
private readonly deviceService;
private readonly appsyncClient;
private readonly lambdaService;
transactionDb: TransactionDb;
constructor(dynamodbService: DynamodbService, envService: EnvironmentService, deviceVerify: DeviceVerification, deviceService: DeviceService, appsyncClient: AppSyncClient, lambdaService: LambdaService);
requestTransaction: (accessToken: string, event: TransactionRequestInput) => Promise<{
status: boolean;
}>;
subscribeTransactionResponse(event: any): any;
getTransaction: (transactionUuid: string) => Promise<Transaction>;
getTransactions: (event: TransactionQueryInput, accessToken: string) => Promise<TransactionConnection>;
prepareUpdateEventRequest(item: any, keys: any): {
mutation: import("graphql").DocumentNode;
variables: {
item: any;
};
};
onTransactionStream: (event: any) => Promise<void>;
onTransactionUpdate: (accessToken: string) => Promise<void>;
}