const API_BASE = `/api/endpoint`;

/**
* API endpoint definitions. You can pass these to APIInterface.call().
*
* @namespace APIEndpoints
* @memberof module:libresignage/api
*/
module.exports = {
	/** Get the user quota data. */
	USER_GET_QUOTA: {
		uri:      `${API_BASE}/user/user_get_quota.php`,
		method:   "GET",
		auth:     true
	},
	/** Create a new user. */
	USER_CREATE: {
		uri:      `${API_BASE}/user/user_create.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Remove a user. */
	USER_REMOVE: {
		uri:      `${API_BASE}/user/user_remove.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Save a user. */
	USER_SAVE: {
		uri:      `${API_BASE}/user/user_save.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Get userdata of a specific user. */
	USER_GET: {
		uri:      `${API_BASE}/user/user_get.php`,
		method:   "GET",
		auth:     true
	},
	/** Get userdata of the current user. */
	USER_GET_CURRENT: {
		uri:      `${API_BASE}/user/user_get_current.php`,
		method:   "GET",
		auth:     true
	},
	/** Get all userdata. */
	USERS_GET_ALL: {
		uri:      `${API_BASE}/user/users_get_all.php`,
		method:   "GET",
		auth:     true
	},
	/** Get a list of existing usernames. */
	USERS_LIST: {
		uri:      `${API_BASE}/user/users_list.php`,
		method:   "GET",
		auth:     true
	},
	/** Get a list of existing slide IDs. */
	SLIDE_LIST: {
		uri:      `${API_BASE}/slide/slide_list.php`,
		method:   "GET",
		auth:     true
	},
	/** Get data of a specific slide. */
	SLIDE_GET: {
		uri:      `${API_BASE}/slide/slide_get.php`,
		method:   "GET",
		auth:     true,
	},
	/** Save a slide. */
	SLIDE_SAVE: {
		uri:      `${API_BASE}/slide/slide_save.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Duplicate a slide. */
	SLIDE_DUP: {
		uri:      `${API_BASE}/slide/slide_dup.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Remove a slide. */
	SLIDE_RM: {
		uri:      `${API_BASE}/slide/slide_rm.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Acquire a slide lock. */
	SLIDE_LOCK_ACQUIRE: {
		uri:      `${API_BASE}/slide/slide_lock_acquire.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Release a slide lock. */
	SLIDE_LOCK_RELEASE: {
		uri:      `${API_BASE}/slide/slide_lock_release.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Upload a slide asset. */
	SLIDE_UPLOAD_ASSET: {
		uri:      `${API_BASE}/slide/asset/slide_upload_asset.php`,
		method:   "POST",
		req_mime: "multipart/form-data",
		auth:     true
	},
	/** Remove a slide asset. */
	SLIDE_REMOVE_ASSET: {
		uri:      `${API_BASE}/slide/asset/slide_remove_asset.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Get a slide asset. */
	SLIDE_GET_ASSET: {
		uri:      `${API_BASE}/slide/asset/slide_get_asset.php`,
		method:   "GET",
		auth:     true
	},
	/** Get the thumbnail of a slide asset. */
	SLIDE_GET_ASSET_THUMB: {
		uri:      `${API_BASE}/slide/asset/slide_get_asset_thumb.php`,
		method:   "GET",
		auth:     true
	},
	/** Get queue data. */
	QUEUE_GET: {
		uri:      `${API_BASE}/queue/queue_get.php`,
		method:   "GET",
		auth:     true
	},
	/** Create a queue. */
	QUEUE_CREATE: {
		uri:      `${API_BASE}/queue/queue_create.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Get a list of all queue names. */
	QUEUE_LIST: {
		uri:      `${API_BASE}/queue/queue_list.php`,
		method:   "GET",
		auth:     true
	},
	/** Remove a queue and any slides in it. */
	QUEUE_REMOVE: {
		uri:      `${API_BASE}/queue/queue_remove.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Log in to the API. */
	AUTH_LOGIN: {
		uri:      `${API_BASE}/auth/auth_login.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     false
	},
	/** Log out of the API. */
	AUTH_LOGOUT: {
		uri:      `${API_BASE}/auth/auth_logout.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Log out all sessions except the calling one. */
	AUTH_LOGOUT_OTHER: {
		uri:      `${API_BASE}/auth/auth_logout_other.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Renew a session. */
	AUTH_SESSION_RENEW: {
		uri:      `${API_BASE}/auth/auth_session_renew.php`,
		method:   "POST",
		req_mime: "application/json",
		auth:     true
	},
	/** Get all sessions of the calling user. */
	AUTH_GET_SESSIONS: {
		uri:       `${API_BASE}/auth/auth_get_sessions.php`,
		method:   "GET",
		auth:     true
	},
	/** Get the authentication data of the current session. */
	AUTH_GET_DATA: {
		uri:      `${API_BASE}/auth/auth_get_data.php`,
		method:   "GET",
		auth:     true
	},
	/** Get the configured server limits. */
	SERVER_LIMITS: {
		uri:      `${API_BASE}/general/server_limits.php`,
		method:   "GET",
		auth:     false
	},
	/** Get LibreSignage version information. */
	VER_INFO: {
		uri:      `${API_BASE}/general/ver_info.php`,
		method:   "GET",
		auth:     false
	}
};
