30 lines
976 B
TypeScript
30 lines
976 B
TypeScript
import { RequestConfig } from '../requestConfig';
|
|
import { CreatePersonResponse } from './createPerson';
|
|
import { UpdateGroupResponse } from './updateGroup';
|
|
export interface CreateGroupRawResponse {
|
|
result: {
|
|
/**
|
|
* the invite code used to join the group
|
|
*/
|
|
code: string;
|
|
longCode: string;
|
|
extendedShortCode: string;
|
|
objectId: string;
|
|
};
|
|
}
|
|
export interface CreateGroupResponse {
|
|
group: CreateGroupRawResponse;
|
|
groupInfo: UpdateGroupResponse;
|
|
groupMembers: CreatePersonResponse[];
|
|
}
|
|
export type MemberInput = string | {
|
|
name: string;
|
|
initials?: string;
|
|
};
|
|
export interface CreateGroupOptions {
|
|
currencyRates?: Record<string, number>;
|
|
defaultCurrencyCode?: string;
|
|
customCategories?: string[];
|
|
wallpaperID?: string;
|
|
}
|
|
export declare function createGroup(config: RequestConfig, name: string, members: MemberInput[], options?: CreateGroupOptions): Promise<CreateGroupResponse>;
|