Add Profile/Channel entities with CRUD and remove legacy parser builder.
Introduce reusable ParserProfile and ParseChannel, pair jobs with enqueue flatten, Events admin CRUD, and drop inline/legacy parser-builder UI and aliases. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,9 +4,11 @@ import type {
|
||||
Consumer,
|
||||
ConsumerCreate,
|
||||
ConsumerUpdate,
|
||||
EventCreate,
|
||||
EventFilters,
|
||||
EventListResponse,
|
||||
EventRecord,
|
||||
EventUpdate,
|
||||
ParseJob,
|
||||
ParseJobCreate,
|
||||
ParseJobUpdate,
|
||||
@@ -69,6 +71,26 @@ export function fetchEvents(filters: EventFilters = {}): Promise<EventListRespon
|
||||
);
|
||||
}
|
||||
|
||||
export function createEvent(payload: EventCreate): Promise<EventRecord> {
|
||||
return request<EventRecord>(
|
||||
"/events",
|
||||
{ method: "POST", body: JSON.stringify(payload) },
|
||||
ADMIN_BASE,
|
||||
);
|
||||
}
|
||||
|
||||
export function updateEvent(id: number, payload: EventUpdate): Promise<EventRecord> {
|
||||
return request<EventRecord>(
|
||||
`/events/${id}`,
|
||||
{ method: "PATCH", body: JSON.stringify(payload) },
|
||||
ADMIN_BASE,
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteEvent(id: number): Promise<void> {
|
||||
return request<void>(`/events/${id}`, { method: "DELETE" }, ADMIN_BASE);
|
||||
}
|
||||
|
||||
export function fetchConsumers(): Promise<Consumer[]> {
|
||||
return request<Consumer[]>("/consumers", undefined, ADMIN_BASE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user