splid-js-googlesheet-updater/node_modules/splid-js/dist/mjs/methods/createExpense.d.ts
2025-05-27 21:06:02 +02:00

69 lines
1.8 KiB
TypeScript

import { RequestConfig } from '../requestConfig';
import { EntryItem } from '../types/entry';
import { IsoTime } from '../types/primitives';
export interface CreateExpenseResponse {
success: {
createdAt: IsoTime;
objectId: string;
};
}
type Options = {
groupId: string;
title?: string;
date?: Date;
category?: {
type: any;
originalName: any;
};
payers: Record<string, number> | (string | {
id: string;
amount: number;
})[];
currencyCode?: string;
};
type Item = {
title?: string;
amount: number;
profiteers: Record<string, number> | (string | {
id: string;
share: number;
})[];
};
export declare function createExpense(config: RequestConfig, options: Options, items: Omit<Item, 'title'> | Item[]): {
readonly id: "createExpense";
readonly path: "/parse/classes/Entry";
readonly method: "POST";
readonly body: {
readonly category: {
type: any;
originalName: any;
};
readonly UpdateInstallationID: string;
readonly GlobalId: string;
readonly title: string;
readonly secondaryPayers: {};
readonly notes: {
readonly __op: "Delete";
};
readonly primaryPayer: string;
readonly date: {
__type: string;
iso: string;
};
readonly createdGlobally: {
readonly __type: "Date";
readonly iso: string;
};
readonly isDeleted: false;
readonly group: {
readonly __type: "Pointer";
readonly className: "_User";
readonly objectId: string;
};
readonly items: EntryItem[];
readonly isPayment: false;
readonly UpdateID: string;
readonly currencyCode: string;
};
};
export {};