ApiSchemasVariables
Variable: expense
const expense: object & Typed<{
amount: {
amount: string;
currency: string;
};
date?: string;
note?: string;
owedBy?: readonly string[];
paidBy: string;
split?: readonly object[];
title: string;
}>;Defined in: packages/core/src/schemas/library/money.ts:27
An expense someone paid for a group, and how it splits. Every version is kept, since who changed an amount matters when settling up.
Type Declaration
description
readonly description: "Something one person paid for a group, to split and settle up. Your own bank records are std.transaction." = 'Something one person paid for a group, to split and settle up. Your own bank records are std.transaction.';history
readonly history: "all" = 'all';name
readonly name: "std.expense" = 'std.expense';schema
readonly schema: object;schema.properties
readonly properties: object;schema.properties.amount
readonly amount: object & object;Type Declaration
properties
properties: object;properties.amount
amount: object;properties.amount.maxLength
maxLength: number = max;properties.amount.minLength?
minLength?: number = min;properties.amount.type
type: "string";properties.currency
currency: object;properties.currency.maxLength
maxLength: number = 3;properties.currency.minLength
minLength: number = 3;properties.currency.type
type: "string";required
required: readonly ["amount", "currency"];type
type: "object";x-kind
readonly "x-kind": "money";schema.properties.date
readonly date: object & object;Type Declaration
maxLength
maxLength: number = 10;minLength
minLength: number = 10;type
type: "string";x-kind
readonly "x-kind": "day";schema.properties.note
readonly note: object;schema.properties.note.maxLength
maxLength: number = max;schema.properties.note.minLength?
minLength?: number = min;schema.properties.note.type
type: "string";schema.properties.owedBy
readonly owedBy: object;schema.properties.owedBy.items
items: object & object;Type Declaration
maxLength
maxLength: number = max;minLength?
minLength?: number = min;type
type: "string";x-kind
readonly "x-kind": "did";schema.properties.owedBy.maxItems
maxItems: number = max;schema.properties.owedBy.type
type: "array";schema.properties.paidBy
readonly paidBy: object & object;Type Declaration
maxLength
maxLength: number = max;minLength?
minLength?: number = min;type
type: "string";x-kind
readonly "x-kind": "did";schema.properties.split
readonly split: object;schema.properties.split.description
readonly description: "Who owes a share; equal shares when left out" = 'Who owes a share; equal shares when left out';schema.properties.split.items
readonly items: object;schema.properties.split.items.properties
readonly properties: object;schema.properties.split.items.properties.did
readonly did: object & object;Type Declaration
maxLength
maxLength: number = max;minLength?
minLength?: number = min;type
type: "string";x-kind
readonly "x-kind": "did";schema.properties.split.items.properties.share
readonly share: object;schema.properties.split.items.properties.share.maxLength
maxLength: number = max;schema.properties.split.items.properties.share.minLength?
minLength?: number = min;schema.properties.split.items.properties.share.type
type: "string";schema.properties.split.items.required
readonly required: readonly ["did"];schema.properties.split.items.type
readonly type: "object" = 'object';schema.properties.split.maxItems
readonly maxItems: 100 = 100;schema.properties.split.type
readonly type: "array" = 'array';schema.properties.title
readonly title: object;schema.properties.title.maxLength
maxLength: number = max;schema.properties.title.minLength?
minLength?: number = min;schema.properties.title.type
type: "string";schema.required
readonly required: readonly ["title", "amount", "paidBy"];schema.type
readonly type: "object" = 'object';title
readonly title: "Expense" = 'Expense';topics
readonly topics: readonly ["paidBy", "owedBy"];