All files / packages/app trpc-types.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40                                                                               
import type { TRPCQueryOutput } from "~app/trpc";
 
//User
export type User = TRPCQueryOutput<"user.get">;
export type UserSettings = TRPCQueryOutput<"userSettings.get">;
// Peers
export type Peer = TRPCQueryOutput<"peers.get">;
export type ForeignPeer = TRPCQueryOutput<"peers.getForeign">;
 
export type UserConnectionIntentions =
	TRPCQueryOutput<"userConnectionIntentions.getAll">;
export type InboundIntention = UserConnectionIntentions["inbound"][number];
export type OutboundIntention = UserConnectionIntentions["outbound"][number];
 
// Debts
export type AggregatedDebts = TRPCQueryOutput<"debts.getAll">;
export type AggregatedDebt = AggregatedDebts["items"][number];
 
export type DebtsByPeerPage = TRPCQueryOutput<"debts.getByPeerPaged">;
 
export type Debt = TRPCQueryOutput<"debts.get">;
 
export type DebtIntention =
	TRPCQueryOutput<"debtIntentions.getAll">["items"][number];
 
// Receipts
export type Receipt = TRPCQueryOutput<"receipts.get">;
export type ReceiptParticipant = Receipt["participants"][number];
export type ReceiptPayer = Receipt["payers"][number];
export type ReceiptDebts = Receipt["debts"];
export type ReceiptItem = Receipt["items"][number];
export type ReceiptItemPayer = ReceiptItem["payers"][number];
export type ReceiptItemConsumer = ReceiptItem["consumers"][number];
 
export type ReceiptPageEntry =
	TRPCQueryOutput<"receipts.getPaged">["items"][number];
 
// Misc
export type Currencies = TRPCQueryOutput<"currency.top">["items"];