backend/source/types.ts
fenris f90567d043 [task-192]
## Tasks

- [192](https://vikunja.ramsch.sx/tasks/192)

## Zugehörige MRs

- [datamodel](misc/zeitbild-datamodel#1)
- [frontend-dali](misc/zeitbild-frontend-dali#1)

Reviewed-on: misc/zeitbild-backend#1
Co-authored-by: Fenris Wolf <fenris@folksprak.org>
Co-committed-by: Fenris Wolf <fenris@folksprak.org>
2025-09-25 17:05:15 +02:00

131 lines
1.5 KiB
TypeScript

/**
*/
namespace _zeitbild
{
/**
*/
export enum enum_access_level {
none,
view,
edit,
admin
}
/**
*/
export type type_user_id = int;
/**
*/
export type type_user_object = {
name : string;
email_address : (
null
|
string
);
dav_token : (
null
|
string
);
};
/**
*/
export type type_event_object = {
name : string;
begin : lib_plankton.pit.type_datetime;
end : (
null
|
lib_plankton.pit.type_datetime
);
location : (
null
|
string
);
link : (
null
|
string
);
description : (
null
|
string
);
};
/**
*/
export type type_local_resource_event_id = int;
/**
*/
export type type_resource_id = int;
/**
*/
export type type_resource_object = (
{
kind : "local";
data : {
event_ids : Array<
type_local_resource_event_id
>;
};
}
|
{
kind : "ics_feed";
data : {
url : string;
from_fucked_up_wordpress : boolean;
};
}
);
/**
*/
export type type_calendar_id = int;
/**
*/
export type type_calendar_object = {
name : string;
access : {
public : boolean;
default_level : enum_access_level;
attributed : lib_plankton.map.type_map<
type_user_id,
enum_access_level
>;
};
resource_id : type_resource_id;
};
/**
*/
export type type_event_extended = {
calendar_id : type_calendar_id;
calendar_name : string;
access_level : enum_access_level;
event_id : (null | type_local_resource_event_id);
event_object : type_event_object;
};
}