78 lines
1.5 KiB
TypeScript
78 lines
1.5 KiB
TypeScript
export type ListTemplateKind = 'packing' | 'shopping' | 'todo' | 'custom';
|
|
|
|
export interface ListTemplateItem {
|
|
id: string;
|
|
title: string;
|
|
notes?: string;
|
|
quantity?: number;
|
|
required: boolean;
|
|
position: number;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface ListTemplate {
|
|
id: string;
|
|
ownerId: string;
|
|
name: string;
|
|
description?: string;
|
|
kind: ListTemplateKind;
|
|
items: ListTemplateItem[];
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface UserListItem {
|
|
id: string;
|
|
sourceTemplateItemId?: string;
|
|
title: string;
|
|
notes?: string;
|
|
quantity?: number;
|
|
required: boolean;
|
|
checked: boolean;
|
|
position: number;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface UserList {
|
|
id: string;
|
|
ownerId: string;
|
|
sourceTemplateId?: string;
|
|
name: string;
|
|
description?: string;
|
|
kind: ListTemplateKind;
|
|
reminderAt?: string | null;
|
|
items: UserListItem[];
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface UpdateListTemplateRequest {
|
|
name?: string;
|
|
description?: string;
|
|
kind?: ListTemplateKind;
|
|
}
|
|
|
|
export interface CreateListTemplateRequest {
|
|
name: string;
|
|
description?: string;
|
|
kind?: ListTemplateKind;
|
|
}
|
|
|
|
export interface AddListTemplateItemRequest {
|
|
title: string;
|
|
notes?: string;
|
|
quantity?: number;
|
|
required?: boolean;
|
|
}
|
|
|
|
export interface ReorderListTemplateItemsRequest {
|
|
itemIds: string[];
|
|
}
|
|
|
|
export interface CreateListFromTemplateRequest {
|
|
name?: string;
|
|
description?: string;
|
|
}
|