mirror of
https://github.com/Athou/commafeed.git
synced 2026-10-28 16:09:16 +00:00
normalize line endings
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Entry details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Category implements Serializable {
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "parent category id")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "parent category name")
|
||||
private String parentName;
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "category children categories", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Category> children = new ArrayList<>();
|
||||
|
||||
@Schema(description = "category feeds", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Subscription> feeds = new ArrayList<>();
|
||||
|
||||
@Schema(description = "whether the category is expanded or collapsed", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean expanded;
|
||||
|
||||
@Schema(description = "position of the category in the list", requiredMode = RequiredMode.REQUIRED)
|
||||
private int position;
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Entry details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Category implements Serializable {
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "parent category id")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "parent category name")
|
||||
private String parentName;
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "category children categories", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Category> children = new ArrayList<>();
|
||||
|
||||
@Schema(description = "category feeds", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Subscription> feeds = new ArrayList<>();
|
||||
|
||||
@Schema(description = "whether the category is expanded or collapsed", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean expanded;
|
||||
|
||||
@Schema(description = "position of the category in the list", requiredMode = RequiredMode.REQUIRED)
|
||||
private int position;
|
||||
}
|
||||
@@ -1,50 +1,50 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "List of entries with some metadata")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Entries implements Serializable {
|
||||
|
||||
@Schema(description = "name of the feed or the category requested", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "error or warning message")
|
||||
private String message;
|
||||
|
||||
@Schema(description = "times the server tried to refresh the feed and failed", requiredMode = RequiredMode.REQUIRED)
|
||||
private int errorCount;
|
||||
|
||||
@Schema(description = "URL of the website, extracted from the feed, only filled if querying for feed entries, not category entries")
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "list generation timestamp", requiredMode = RequiredMode.REQUIRED)
|
||||
private long timestamp;
|
||||
|
||||
@Schema(description = "if the query has more elements", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean hasMore;
|
||||
|
||||
@Schema(description = "the requested offset")
|
||||
private int offset;
|
||||
|
||||
@Schema(description = "the requested limit")
|
||||
private int limit;
|
||||
|
||||
@Schema(description = "list of entries", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Entry> entries = new ArrayList<>();
|
||||
|
||||
@Schema(
|
||||
description = "if true, the unread flag was ignored in the request, all entries are returned regardless of their read status",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean ignoredReadStatus;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "List of entries with some metadata")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Entries implements Serializable {
|
||||
|
||||
@Schema(description = "name of the feed or the category requested", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "error or warning message")
|
||||
private String message;
|
||||
|
||||
@Schema(description = "times the server tried to refresh the feed and failed", requiredMode = RequiredMode.REQUIRED)
|
||||
private int errorCount;
|
||||
|
||||
@Schema(description = "URL of the website, extracted from the feed, only filled if querying for feed entries, not category entries")
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "list generation timestamp", requiredMode = RequiredMode.REQUIRED)
|
||||
private long timestamp;
|
||||
|
||||
@Schema(description = "if the query has more elements", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean hasMore;
|
||||
|
||||
@Schema(description = "the requested offset")
|
||||
private int offset;
|
||||
|
||||
@Schema(description = "the requested limit")
|
||||
private int limit;
|
||||
|
||||
@Schema(description = "list of entries", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<Entry> entries = new ArrayList<>();
|
||||
|
||||
@Schema(
|
||||
description = "if true, the unread flag was ignored in the request, all entries are returned regardless of their read status",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean ignoredReadStatus;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,174 +1,174 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.commafeed.backend.feed.FeedUtils;
|
||||
import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.model.FeedEntryContent;
|
||||
import com.commafeed.backend.model.FeedEntryStatus;
|
||||
import com.commafeed.backend.model.FeedEntryTag;
|
||||
import com.commafeed.backend.model.FeedSubscription;
|
||||
import com.rometools.rome.feed.synd.SyndContentImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEnclosureImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.SyndEntryImpl;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Entry details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Entry implements Serializable {
|
||||
|
||||
@Schema(description = "entry id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "entry guid", requiredMode = RequiredMode.REQUIRED)
|
||||
private String guid;
|
||||
|
||||
@Schema(description = "entry title", requiredMode = RequiredMode.REQUIRED)
|
||||
private String title;
|
||||
|
||||
@Schema(description = "entry content", requiredMode = RequiredMode.REQUIRED)
|
||||
private String content;
|
||||
|
||||
@Schema(description = "comma-separated list of categories")
|
||||
private String categories;
|
||||
|
||||
@Schema(description = "whether entry content and title are rtl", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean rtl;
|
||||
|
||||
@Schema(description = "entry author")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "entry enclosure url, if any")
|
||||
private String enclosureUrl;
|
||||
|
||||
@Schema(description = "entry enclosure mime type, if any")
|
||||
private String enclosureType;
|
||||
|
||||
@Schema(description = "entry media description, if any")
|
||||
private String mediaDescription;
|
||||
|
||||
@Schema(description = "entry media thumbnail url, if any")
|
||||
private String mediaThumbnailUrl;
|
||||
|
||||
@Schema(description = "entry media thumbnail width, if any")
|
||||
private Integer mediaThumbnailWidth;
|
||||
|
||||
@Schema(description = "entry media thumbnail height, if any")
|
||||
private Integer mediaThumbnailHeight;
|
||||
|
||||
@Schema(description = "entry publication date", type = "number", requiredMode = RequiredMode.REQUIRED)
|
||||
private Instant date;
|
||||
|
||||
@Schema(description = "entry insertion date in the database", type = "number", requiredMode = RequiredMode.REQUIRED)
|
||||
private Instant insertedDate;
|
||||
|
||||
@Schema(description = "feed id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedId;
|
||||
|
||||
@Schema(description = "feed name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedName;
|
||||
|
||||
@Schema(description = "this entry's feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedUrl;
|
||||
|
||||
@Schema(description = "this entry's website url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "The favicon url to use for this feed", requiredMode = RequiredMode.REQUIRED)
|
||||
private String iconUrl;
|
||||
|
||||
@Schema(description = "entry url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "read status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean read;
|
||||
|
||||
@Schema(description = "starred status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean starred;
|
||||
|
||||
@Schema(description = "whether the entry is still markable (old entry statuses are discarded)", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean markable;
|
||||
|
||||
@Schema(description = "tags", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<String> tags;
|
||||
|
||||
public static Entry build(FeedEntryStatus status, boolean proxyImages) {
|
||||
Entry entry = new Entry();
|
||||
|
||||
FeedEntry feedEntry = status.getEntry();
|
||||
FeedSubscription sub = status.getSubscription();
|
||||
FeedEntryContent content = feedEntry.getContent();
|
||||
|
||||
entry.setId(String.valueOf(feedEntry.getId()));
|
||||
entry.setGuid(feedEntry.getGuid());
|
||||
entry.setRead(status.isRead());
|
||||
entry.setStarred(status.isStarred());
|
||||
entry.setMarkable(status.isMarkable());
|
||||
entry.setDate(feedEntry.getPublished());
|
||||
entry.setInsertedDate(feedEntry.getInserted());
|
||||
entry.setUrl(feedEntry.getUrl());
|
||||
entry.setFeedName(sub.getTitle());
|
||||
entry.setFeedId(String.valueOf(sub.getId()));
|
||||
entry.setFeedUrl(sub.getFeed().getUrl());
|
||||
entry.setFeedLink(sub.getFeed().getLink());
|
||||
entry.setIconUrl(FeedUtils.getFaviconUrl(sub));
|
||||
entry.setTags(status.getTags().stream().map(FeedEntryTag::getName).toList());
|
||||
|
||||
if (content != null) {
|
||||
entry.setRtl(content.isRTL());
|
||||
entry.setTitle(content.getTitle());
|
||||
entry.setContent(proxyImages ? FeedUtils.proxyImages(content.getContent()) : content.getContent());
|
||||
entry.setAuthor(content.getAuthor());
|
||||
|
||||
entry.setEnclosureType(content.getEnclosureType());
|
||||
entry.setEnclosureUrl(proxyImages && StringUtils.contains(content.getEnclosureType(), "image")
|
||||
? FeedUtils.proxyImage(content.getEnclosureUrl())
|
||||
: content.getEnclosureUrl());
|
||||
|
||||
entry.setMediaDescription(content.getMediaDescription());
|
||||
entry.setMediaThumbnailUrl(proxyImages ? FeedUtils.proxyImage(content.getMediaThumbnailUrl()) : content.getMediaThumbnailUrl());
|
||||
entry.setMediaThumbnailWidth(content.getMediaThumbnailWidth());
|
||||
entry.setMediaThumbnailHeight(content.getMediaThumbnailHeight());
|
||||
|
||||
entry.setCategories(content.getCategories());
|
||||
}
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
public SyndEntry asRss() {
|
||||
SyndEntry entry = new SyndEntryImpl();
|
||||
|
||||
entry.setUri(getGuid());
|
||||
entry.setTitle(getTitle());
|
||||
entry.setAuthor(getAuthor());
|
||||
|
||||
SyndContentImpl content = new SyndContentImpl();
|
||||
content.setValue(getContent());
|
||||
entry.setContents(Collections.singletonList(content));
|
||||
|
||||
if (getEnclosureUrl() != null) {
|
||||
SyndEnclosureImpl enclosure = new SyndEnclosureImpl();
|
||||
enclosure.setType(getEnclosureType());
|
||||
enclosure.setUrl(getEnclosureUrl());
|
||||
entry.setEnclosures(Collections.singletonList(enclosure));
|
||||
}
|
||||
|
||||
entry.setLink(getUrl());
|
||||
entry.setPublishedDate(getDate() == null ? null : Date.from(getDate()));
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.commafeed.backend.feed.FeedUtils;
|
||||
import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.model.FeedEntryContent;
|
||||
import com.commafeed.backend.model.FeedEntryStatus;
|
||||
import com.commafeed.backend.model.FeedEntryTag;
|
||||
import com.commafeed.backend.model.FeedSubscription;
|
||||
import com.rometools.rome.feed.synd.SyndContentImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEnclosureImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.SyndEntryImpl;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Entry details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Entry implements Serializable {
|
||||
|
||||
@Schema(description = "entry id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "entry guid", requiredMode = RequiredMode.REQUIRED)
|
||||
private String guid;
|
||||
|
||||
@Schema(description = "entry title", requiredMode = RequiredMode.REQUIRED)
|
||||
private String title;
|
||||
|
||||
@Schema(description = "entry content", requiredMode = RequiredMode.REQUIRED)
|
||||
private String content;
|
||||
|
||||
@Schema(description = "comma-separated list of categories")
|
||||
private String categories;
|
||||
|
||||
@Schema(description = "whether entry content and title are rtl", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean rtl;
|
||||
|
||||
@Schema(description = "entry author")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "entry enclosure url, if any")
|
||||
private String enclosureUrl;
|
||||
|
||||
@Schema(description = "entry enclosure mime type, if any")
|
||||
private String enclosureType;
|
||||
|
||||
@Schema(description = "entry media description, if any")
|
||||
private String mediaDescription;
|
||||
|
||||
@Schema(description = "entry media thumbnail url, if any")
|
||||
private String mediaThumbnailUrl;
|
||||
|
||||
@Schema(description = "entry media thumbnail width, if any")
|
||||
private Integer mediaThumbnailWidth;
|
||||
|
||||
@Schema(description = "entry media thumbnail height, if any")
|
||||
private Integer mediaThumbnailHeight;
|
||||
|
||||
@Schema(description = "entry publication date", type = "number", requiredMode = RequiredMode.REQUIRED)
|
||||
private Instant date;
|
||||
|
||||
@Schema(description = "entry insertion date in the database", type = "number", requiredMode = RequiredMode.REQUIRED)
|
||||
private Instant insertedDate;
|
||||
|
||||
@Schema(description = "feed id", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedId;
|
||||
|
||||
@Schema(description = "feed name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedName;
|
||||
|
||||
@Schema(description = "this entry's feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedUrl;
|
||||
|
||||
@Schema(description = "this entry's website url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "The favicon url to use for this feed", requiredMode = RequiredMode.REQUIRED)
|
||||
private String iconUrl;
|
||||
|
||||
@Schema(description = "entry url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "read status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean read;
|
||||
|
||||
@Schema(description = "starred status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean starred;
|
||||
|
||||
@Schema(description = "whether the entry is still markable (old entry statuses are discarded)", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean markable;
|
||||
|
||||
@Schema(description = "tags", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<String> tags;
|
||||
|
||||
public static Entry build(FeedEntryStatus status, boolean proxyImages) {
|
||||
Entry entry = new Entry();
|
||||
|
||||
FeedEntry feedEntry = status.getEntry();
|
||||
FeedSubscription sub = status.getSubscription();
|
||||
FeedEntryContent content = feedEntry.getContent();
|
||||
|
||||
entry.setId(String.valueOf(feedEntry.getId()));
|
||||
entry.setGuid(feedEntry.getGuid());
|
||||
entry.setRead(status.isRead());
|
||||
entry.setStarred(status.isStarred());
|
||||
entry.setMarkable(status.isMarkable());
|
||||
entry.setDate(feedEntry.getPublished());
|
||||
entry.setInsertedDate(feedEntry.getInserted());
|
||||
entry.setUrl(feedEntry.getUrl());
|
||||
entry.setFeedName(sub.getTitle());
|
||||
entry.setFeedId(String.valueOf(sub.getId()));
|
||||
entry.setFeedUrl(sub.getFeed().getUrl());
|
||||
entry.setFeedLink(sub.getFeed().getLink());
|
||||
entry.setIconUrl(FeedUtils.getFaviconUrl(sub));
|
||||
entry.setTags(status.getTags().stream().map(FeedEntryTag::getName).toList());
|
||||
|
||||
if (content != null) {
|
||||
entry.setRtl(content.isRTL());
|
||||
entry.setTitle(content.getTitle());
|
||||
entry.setContent(proxyImages ? FeedUtils.proxyImages(content.getContent()) : content.getContent());
|
||||
entry.setAuthor(content.getAuthor());
|
||||
|
||||
entry.setEnclosureType(content.getEnclosureType());
|
||||
entry.setEnclosureUrl(proxyImages && StringUtils.contains(content.getEnclosureType(), "image")
|
||||
? FeedUtils.proxyImage(content.getEnclosureUrl())
|
||||
: content.getEnclosureUrl());
|
||||
|
||||
entry.setMediaDescription(content.getMediaDescription());
|
||||
entry.setMediaThumbnailUrl(proxyImages ? FeedUtils.proxyImage(content.getMediaThumbnailUrl()) : content.getMediaThumbnailUrl());
|
||||
entry.setMediaThumbnailWidth(content.getMediaThumbnailWidth());
|
||||
entry.setMediaThumbnailHeight(content.getMediaThumbnailHeight());
|
||||
|
||||
entry.setCategories(content.getCategories());
|
||||
}
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
public SyndEntry asRss() {
|
||||
SyndEntry entry = new SyndEntryImpl();
|
||||
|
||||
entry.setUri(getGuid());
|
||||
entry.setTitle(getTitle());
|
||||
entry.setAuthor(getAuthor());
|
||||
|
||||
SyndContentImpl content = new SyndContentImpl();
|
||||
content.setValue(getContent());
|
||||
entry.setContents(Collections.singletonList(content));
|
||||
|
||||
if (getEnclosureUrl() != null) {
|
||||
SyndEnclosureImpl enclosure = new SyndEnclosureImpl();
|
||||
enclosure.setType(getEnclosureType());
|
||||
enclosure.setUrl(getEnclosureUrl());
|
||||
entry.setEnclosures(Collections.singletonList(enclosure));
|
||||
}
|
||||
|
||||
entry.setLink(getUrl());
|
||||
entry.setPublishedDate(getDate() == null ? null : Date.from(getDate()));
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class FeedInfo implements Serializable {
|
||||
|
||||
@Schema(description = "url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "title", requiredMode = RequiredMode.REQUIRED)
|
||||
private String title;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed details")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class FeedInfo implements Serializable {
|
||||
|
||||
@Schema(description = "url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "title", requiredMode = RequiredMode.REQUIRED)
|
||||
private String title;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Server infos")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class ServerInfo implements Serializable {
|
||||
|
||||
@Schema
|
||||
private String announcement;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private String version;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private String gitCommit;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean allowRegistrations;
|
||||
|
||||
@Schema
|
||||
private String googleAnalyticsCode;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean smtpEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean demoAccountEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean websocketEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long websocketPingInterval;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long treeReloadInterval;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long forceRefreshCooldownDuration;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Server infos")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class ServerInfo implements Serializable {
|
||||
|
||||
@Schema
|
||||
private String announcement;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private String version;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private String gitCommit;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean allowRegistrations;
|
||||
|
||||
@Schema
|
||||
private String googleAnalyticsCode;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean smtpEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean demoAccountEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean websocketEnabled;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long websocketPingInterval;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long treeReloadInterval;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private long forceRefreshCooldownDuration;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User settings")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Settings implements Serializable {
|
||||
|
||||
@Schema(description = "user's preferred language, english if none", requiredMode = RequiredMode.REQUIRED)
|
||||
private String language;
|
||||
|
||||
@Schema(
|
||||
description = "user reads all entries or unread entries only",
|
||||
allowableValues = "all,unread",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String readingMode;
|
||||
|
||||
@Schema(
|
||||
description = "user reads entries in ascending or descending order",
|
||||
allowableValues = "asc,desc",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String readingOrder;
|
||||
|
||||
@Schema(description = "user wants category and feeds with no unread entries shown", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean showRead;
|
||||
|
||||
@Schema(description = "In expanded view, scroll through entries mark them as read", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean scrollMarks;
|
||||
|
||||
@Schema(description = "user's custom css for the website")
|
||||
private String customCss;
|
||||
|
||||
@Schema(description = "user's custom js for the website")
|
||||
private String customJs;
|
||||
|
||||
@Schema(description = "user's preferred scroll speed when navigating between entries", requiredMode = RequiredMode.REQUIRED)
|
||||
private int scrollSpeed;
|
||||
|
||||
@Schema(
|
||||
description = "whether to scroll to the selected entry",
|
||||
allowableValues = "always,never,if_needed",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String scrollMode;
|
||||
|
||||
@Schema(description = "number of entries to keep above the selected entry when scrolling", requiredMode = RequiredMode.REQUIRED)
|
||||
private int entriesToKeepOnTopWhenScrolling;
|
||||
|
||||
@Schema(
|
||||
description = "whether to show the star icon in the header of entries",
|
||||
allowableValues = "always,never,on_desktop,on_mobile",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String starIconDisplayMode;
|
||||
|
||||
@Schema(
|
||||
description = "whether to show the external link icon in the header of entries",
|
||||
allowableValues = "always,never,on_desktop,on_mobile",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String externalLinkIconDisplayMode;
|
||||
|
||||
@Schema(description = "ask for confirmation when marking all entries as read", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean markAllAsReadConfirmation;
|
||||
|
||||
@Schema(description = "show commafeed's own context menu on right click", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean customContextMenu;
|
||||
|
||||
@Schema(description = "on mobile, show action buttons at the bottom of the screen", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean mobileFooter;
|
||||
|
||||
@Schema(description = "show unread count in the title", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean unreadCountTitle;
|
||||
|
||||
@Schema(description = "show unread count in the favicon", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean unreadCountFavicon;
|
||||
|
||||
@Schema(description = "sharing settings", requiredMode = RequiredMode.REQUIRED)
|
||||
private SharingSettings sharingSettings = new SharingSettings();
|
||||
|
||||
@Schema(description = "User sharing settings")
|
||||
@Data
|
||||
public static class SharingSettings implements Serializable {
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean email;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean gmail;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean facebook;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean twitter;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean tumblr;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean pocket;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean instapaper;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean buffer;
|
||||
}
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User settings")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Settings implements Serializable {
|
||||
|
||||
@Schema(description = "user's preferred language, english if none", requiredMode = RequiredMode.REQUIRED)
|
||||
private String language;
|
||||
|
||||
@Schema(
|
||||
description = "user reads all entries or unread entries only",
|
||||
allowableValues = "all,unread",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String readingMode;
|
||||
|
||||
@Schema(
|
||||
description = "user reads entries in ascending or descending order",
|
||||
allowableValues = "asc,desc",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String readingOrder;
|
||||
|
||||
@Schema(description = "user wants category and feeds with no unread entries shown", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean showRead;
|
||||
|
||||
@Schema(description = "In expanded view, scroll through entries mark them as read", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean scrollMarks;
|
||||
|
||||
@Schema(description = "user's custom css for the website")
|
||||
private String customCss;
|
||||
|
||||
@Schema(description = "user's custom js for the website")
|
||||
private String customJs;
|
||||
|
||||
@Schema(description = "user's preferred scroll speed when navigating between entries", requiredMode = RequiredMode.REQUIRED)
|
||||
private int scrollSpeed;
|
||||
|
||||
@Schema(
|
||||
description = "whether to scroll to the selected entry",
|
||||
allowableValues = "always,never,if_needed",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String scrollMode;
|
||||
|
||||
@Schema(description = "number of entries to keep above the selected entry when scrolling", requiredMode = RequiredMode.REQUIRED)
|
||||
private int entriesToKeepOnTopWhenScrolling;
|
||||
|
||||
@Schema(
|
||||
description = "whether to show the star icon in the header of entries",
|
||||
allowableValues = "always,never,on_desktop,on_mobile",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String starIconDisplayMode;
|
||||
|
||||
@Schema(
|
||||
description = "whether to show the external link icon in the header of entries",
|
||||
allowableValues = "always,never,on_desktop,on_mobile",
|
||||
requiredMode = RequiredMode.REQUIRED)
|
||||
private String externalLinkIconDisplayMode;
|
||||
|
||||
@Schema(description = "ask for confirmation when marking all entries as read", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean markAllAsReadConfirmation;
|
||||
|
||||
@Schema(description = "show commafeed's own context menu on right click", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean customContextMenu;
|
||||
|
||||
@Schema(description = "on mobile, show action buttons at the bottom of the screen", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean mobileFooter;
|
||||
|
||||
@Schema(description = "show unread count in the title", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean unreadCountTitle;
|
||||
|
||||
@Schema(description = "show unread count in the favicon", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean unreadCountFavicon;
|
||||
|
||||
@Schema(description = "sharing settings", requiredMode = RequiredMode.REQUIRED)
|
||||
private SharingSettings sharingSettings = new SharingSettings();
|
||||
|
||||
@Schema(description = "User sharing settings")
|
||||
@Data
|
||||
public static class SharingSettings implements Serializable {
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean email;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean gmail;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean facebook;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean twitter;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean tumblr;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean pocket;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean instapaper;
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean buffer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import com.commafeed.backend.feed.FeedUtils;
|
||||
import com.commafeed.backend.model.Feed;
|
||||
import com.commafeed.backend.model.FeedCategory;
|
||||
import com.commafeed.backend.model.FeedSubscription;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User information")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Subscription implements Serializable {
|
||||
|
||||
@Schema(description = "subscription id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "subscription name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "error message while fetching the feed")
|
||||
private String message;
|
||||
|
||||
@Schema(description = "error count", requiredMode = RequiredMode.REQUIRED)
|
||||
private int errorCount;
|
||||
|
||||
@Schema(description = "last time the feed was refreshed", type = "number")
|
||||
private Instant lastRefresh;
|
||||
|
||||
@Schema(description = "next time the feed refresh is planned, null if refresh is already queued", type = "number")
|
||||
private Instant nextRefresh;
|
||||
|
||||
@Schema(description = "this subscription's feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedUrl;
|
||||
|
||||
@Schema(description = "this subscription's website url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "The favicon url to use for this feed", requiredMode = RequiredMode.REQUIRED)
|
||||
private String iconUrl;
|
||||
|
||||
@Schema(description = "unread count", requiredMode = RequiredMode.REQUIRED)
|
||||
private long unread;
|
||||
|
||||
@Schema(description = "category id")
|
||||
private String categoryId;
|
||||
|
||||
@Schema(description = "position of the subscription's in the list")
|
||||
private int position;
|
||||
|
||||
@Schema(description = "date of the newest item", type = "number")
|
||||
private Instant newestItemTime;
|
||||
|
||||
@Schema(description = "JEXL string evaluated on new entries to mark them as read if they do not match")
|
||||
private String filter;
|
||||
|
||||
public static Subscription build(FeedSubscription subscription, UnreadCount unreadCount) {
|
||||
FeedCategory category = subscription.getCategory();
|
||||
Feed feed = subscription.getFeed();
|
||||
Subscription sub = new Subscription();
|
||||
sub.setId(subscription.getId());
|
||||
sub.setName(subscription.getTitle());
|
||||
sub.setPosition(subscription.getPosition());
|
||||
sub.setMessage(feed.getMessage());
|
||||
sub.setErrorCount(feed.getErrorCount());
|
||||
sub.setFeedUrl(feed.getUrl());
|
||||
sub.setFeedLink(feed.getLink());
|
||||
sub.setIconUrl(FeedUtils.getFaviconUrl(subscription));
|
||||
sub.setLastRefresh(feed.getLastUpdated());
|
||||
sub.setNextRefresh(
|
||||
(feed.getDisabledUntil() != null && feed.getDisabledUntil().isBefore(Instant.now())) ? null : feed.getDisabledUntil());
|
||||
sub.setUnread(unreadCount.getUnreadCount());
|
||||
sub.setNewestItemTime(unreadCount.getNewestItemTime());
|
||||
sub.setCategoryId(category == null ? null : String.valueOf(category.getId()));
|
||||
sub.setFilter(subscription.getFilter());
|
||||
return sub;
|
||||
}
|
||||
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import com.commafeed.backend.feed.FeedUtils;
|
||||
import com.commafeed.backend.model.Feed;
|
||||
import com.commafeed.backend.model.FeedCategory;
|
||||
import com.commafeed.backend.model.FeedSubscription;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User information")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class Subscription implements Serializable {
|
||||
|
||||
@Schema(description = "subscription id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "subscription name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "error message while fetching the feed")
|
||||
private String message;
|
||||
|
||||
@Schema(description = "error count", requiredMode = RequiredMode.REQUIRED)
|
||||
private int errorCount;
|
||||
|
||||
@Schema(description = "last time the feed was refreshed", type = "number")
|
||||
private Instant lastRefresh;
|
||||
|
||||
@Schema(description = "next time the feed refresh is planned, null if refresh is already queued", type = "number")
|
||||
private Instant nextRefresh;
|
||||
|
||||
@Schema(description = "this subscription's feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedUrl;
|
||||
|
||||
@Schema(description = "this subscription's website url", requiredMode = RequiredMode.REQUIRED)
|
||||
private String feedLink;
|
||||
|
||||
@Schema(description = "The favicon url to use for this feed", requiredMode = RequiredMode.REQUIRED)
|
||||
private String iconUrl;
|
||||
|
||||
@Schema(description = "unread count", requiredMode = RequiredMode.REQUIRED)
|
||||
private long unread;
|
||||
|
||||
@Schema(description = "category id")
|
||||
private String categoryId;
|
||||
|
||||
@Schema(description = "position of the subscription's in the list")
|
||||
private int position;
|
||||
|
||||
@Schema(description = "date of the newest item", type = "number")
|
||||
private Instant newestItemTime;
|
||||
|
||||
@Schema(description = "JEXL string evaluated on new entries to mark them as read if they do not match")
|
||||
private String filter;
|
||||
|
||||
public static Subscription build(FeedSubscription subscription, UnreadCount unreadCount) {
|
||||
FeedCategory category = subscription.getCategory();
|
||||
Feed feed = subscription.getFeed();
|
||||
Subscription sub = new Subscription();
|
||||
sub.setId(subscription.getId());
|
||||
sub.setName(subscription.getTitle());
|
||||
sub.setPosition(subscription.getPosition());
|
||||
sub.setMessage(feed.getMessage());
|
||||
sub.setErrorCount(feed.getErrorCount());
|
||||
sub.setFeedUrl(feed.getUrl());
|
||||
sub.setFeedLink(feed.getLink());
|
||||
sub.setIconUrl(FeedUtils.getFaviconUrl(subscription));
|
||||
sub.setLastRefresh(feed.getLastUpdated());
|
||||
sub.setNextRefresh(
|
||||
(feed.getDisabledUntil() != null && feed.getDisabledUntil().isBefore(Instant.now())) ? null : feed.getDisabledUntil());
|
||||
sub.setUnread(unreadCount.getUnreadCount());
|
||||
sub.setNewestItemTime(unreadCount.getNewestItemTime());
|
||||
sub.setCategoryId(category == null ? null : String.valueOf(category.getId()));
|
||||
sub.setFilter(subscription.getFilter());
|
||||
return sub;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +1,34 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Unread count")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class UnreadCount implements Serializable {
|
||||
|
||||
@Schema
|
||||
private long feedId;
|
||||
|
||||
@Schema
|
||||
private long unreadCount;
|
||||
|
||||
@Schema(type = "number")
|
||||
private Instant newestItemTime;
|
||||
|
||||
public UnreadCount() {
|
||||
}
|
||||
|
||||
public UnreadCount(long feedId, long unreadCount, Instant newestItemTime) {
|
||||
this.feedId = feedId;
|
||||
this.unreadCount = unreadCount;
|
||||
this.newestItemTime = newestItemTime;
|
||||
}
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Unread count")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class UnreadCount implements Serializable {
|
||||
|
||||
@Schema
|
||||
private long feedId;
|
||||
|
||||
@Schema
|
||||
private long unreadCount;
|
||||
|
||||
@Schema(type = "number")
|
||||
private Instant newestItemTime;
|
||||
|
||||
public UnreadCount() {
|
||||
}
|
||||
|
||||
public UnreadCount(long feedId, long unreadCount, Instant newestItemTime) {
|
||||
this.feedId = feedId;
|
||||
this.unreadCount = unreadCount;
|
||||
this.newestItemTime = newestItemTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User information")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class UserModel implements Serializable {
|
||||
|
||||
@Schema(description = "user id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "user name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "user email, if any")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "api key")
|
||||
private String apiKey;
|
||||
|
||||
@Schema(description = "user password, never returned by the api")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "account status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean enabled;
|
||||
|
||||
@Schema(description = "account creation date", type = "number")
|
||||
private Instant created;
|
||||
|
||||
@Schema(description = "last login date", type = "number")
|
||||
private Instant lastLogin;
|
||||
|
||||
@Schema(description = "user is admin", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean admin;
|
||||
|
||||
@Schema(description = "user last force refresh", type = "number")
|
||||
private Instant lastForceRefresh;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "User information")
|
||||
@Data
|
||||
@RegisterForReflection
|
||||
public class UserModel implements Serializable {
|
||||
|
||||
@Schema(description = "user id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "user name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "user email, if any")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "api key")
|
||||
private String apiKey;
|
||||
|
||||
@Schema(description = "user password, never returned by the api")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "account status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean enabled;
|
||||
|
||||
@Schema(description = "account creation date", type = "number")
|
||||
private Instant created;
|
||||
|
||||
@Schema(description = "last login date", type = "number")
|
||||
private Instant lastLogin;
|
||||
|
||||
@Schema(description = "user is admin", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean admin;
|
||||
|
||||
@Schema(description = "user last force refresh", type = "number")
|
||||
private Instant lastForceRefresh;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Add Category Request")
|
||||
@Data
|
||||
public class AddCategoryRequest implements Serializable {
|
||||
|
||||
@Schema(description = "name", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "parent category id, if any")
|
||||
@Size(max = 128)
|
||||
private String parentId;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Add Category Request")
|
||||
@Data
|
||||
public class AddCategoryRequest implements Serializable {
|
||||
|
||||
@Schema(description = "name", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "parent category id, if any")
|
||||
@Size(max = 128)
|
||||
private String parentId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Save User information")
|
||||
@Data
|
||||
public class AdminSaveUserRequest implements Serializable {
|
||||
|
||||
@Schema(description = "user id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "user name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "user email, if any")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "user password")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "account status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean enabled;
|
||||
|
||||
@Schema(description = "user is admin", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean admin;
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Save User information")
|
||||
@Data
|
||||
public class AdminSaveUserRequest implements Serializable {
|
||||
|
||||
@Schema(description = "user id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "user name", requiredMode = RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "user email, if any")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "user password")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "account status", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean enabled;
|
||||
|
||||
@Schema(description = "user is admin", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean admin;
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Category modification request")
|
||||
@Data
|
||||
public class CategoryModificationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "new name, null if not changed")
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "new parent category id")
|
||||
@Size(max = 128)
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "new display position, null if not changed")
|
||||
private Integer position;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Category modification request")
|
||||
@Data
|
||||
public class CategoryModificationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "new name, null if not changed")
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "new parent category id")
|
||||
@Size(max = 128)
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "new display position, null if not changed")
|
||||
private Integer position;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Mark Request")
|
||||
@Data
|
||||
public class CollapseRequest implements Serializable {
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "collapse", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean collapse;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Mark Request")
|
||||
@Data
|
||||
public class CollapseRequest implements Serializable {
|
||||
|
||||
@Schema(description = "category id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "collapse", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean collapse;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed information request")
|
||||
@Data
|
||||
public class FeedInfoRequest implements Serializable {
|
||||
|
||||
@Schema(description = "feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 4096)
|
||||
private String url;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed information request")
|
||||
@Data
|
||||
public class FeedInfoRequest implements Serializable {
|
||||
|
||||
@Schema(description = "feed url", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 4096)
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed modification request")
|
||||
@Data
|
||||
public class FeedModificationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "new name, null if not changed")
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "new parent category id")
|
||||
@Size(max = 128)
|
||||
private String categoryId;
|
||||
|
||||
@Schema(description = "new display position, null if not changed")
|
||||
private Integer position;
|
||||
|
||||
@Schema(description = "JEXL string evaluated on new entries to mark them as read if they do not match")
|
||||
@Size(max = 4096)
|
||||
private String filter;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Feed modification request")
|
||||
@Data
|
||||
public class FeedModificationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "new name, null if not changed")
|
||||
@Size(max = 128)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "new parent category id")
|
||||
@Size(max = 128)
|
||||
private String categoryId;
|
||||
|
||||
@Schema(description = "new display position, null if not changed")
|
||||
private Integer position;
|
||||
|
||||
@Schema(description = "JEXL string evaluated on new entries to mark them as read if they do not match")
|
||||
@Size(max = 4096)
|
||||
private String filter;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema
|
||||
@Data
|
||||
public class IDRequest implements Serializable {
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema
|
||||
@Data
|
||||
public class IDRequest implements Serializable {
|
||||
|
||||
@Schema(requiredMode = RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Mark Request")
|
||||
@Data
|
||||
public class MarkRequest implements Serializable {
|
||||
|
||||
@Schema(description = "entry id, category id, 'all' or 'starred'", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "mark as read or unread", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean read;
|
||||
|
||||
@Schema(description = "mark only entries older than this", requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private Long olderThan;
|
||||
|
||||
@Schema(
|
||||
description = "pass the timestamp you got from the entry list to avoid marking entries that may have been fetched in the mean time and never displayed",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private Long insertedBefore;
|
||||
|
||||
@Schema(
|
||||
description = "only mark read if a feed has these keywords in the title or rss content",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
@Size(max = 128)
|
||||
private String keywords;
|
||||
|
||||
@Schema(
|
||||
description = "if marking a category or 'all', exclude those subscriptions from the marking",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private List<Long> excludedSubscriptions;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Mark Request")
|
||||
@Data
|
||||
public class MarkRequest implements Serializable {
|
||||
|
||||
@Schema(description = "entry id, category id, 'all' or 'starred'", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "mark as read or unread", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean read;
|
||||
|
||||
@Schema(description = "mark only entries older than this", requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private Long olderThan;
|
||||
|
||||
@Schema(
|
||||
description = "pass the timestamp you got from the entry list to avoid marking entries that may have been fetched in the mean time and never displayed",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private Long insertedBefore;
|
||||
|
||||
@Schema(
|
||||
description = "only mark read if a feed has these keywords in the title or rss content",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
@Size(max = 128)
|
||||
private String keywords;
|
||||
|
||||
@Schema(
|
||||
description = "if marking a category or 'all', exclude those subscriptions from the marking",
|
||||
requiredMode = RequiredMode.NOT_REQUIRED)
|
||||
private List<Long> excludedSubscriptions;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Multiple Mark Request")
|
||||
@Data
|
||||
public class MultipleMarkRequest implements Serializable {
|
||||
|
||||
@Schema(description = "list of mark requests", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<@Valid MarkRequest> requests;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Multiple Mark Request")
|
||||
@Data
|
||||
public class MultipleMarkRequest implements Serializable {
|
||||
|
||||
@Schema(description = "list of mark requests", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<@Valid MarkRequest> requests;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
@Schema
|
||||
public class PasswordResetRequest implements Serializable {
|
||||
|
||||
@Schema(description = "email address for password recovery", requiredMode = RequiredMode.REQUIRED)
|
||||
@Email
|
||||
@NotEmpty
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
@Schema
|
||||
public class PasswordResetRequest implements Serializable {
|
||||
|
||||
@Schema(description = "email address for password recovery", requiredMode = RequiredMode.REQUIRED)
|
||||
@Email
|
||||
@NotEmpty
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
}
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import com.commafeed.security.password.ValidPassword;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Profile modification request")
|
||||
@Data
|
||||
public class ProfileModificationRequest implements Serializable {
|
||||
@Schema(description = "current user password, required to change profile data", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String currentPassword;
|
||||
|
||||
@Schema(description = "changes email of the user, if specified")
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
|
||||
@Schema(description = "changes password of the user, if specified")
|
||||
@ValidPassword
|
||||
private String newPassword;
|
||||
|
||||
@Schema(description = "generate a new api key")
|
||||
private boolean newApiKey;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import com.commafeed.security.password.ValidPassword;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Profile modification request")
|
||||
@Data
|
||||
public class ProfileModificationRequest implements Serializable {
|
||||
@Schema(description = "current user password, required to change profile data", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String currentPassword;
|
||||
|
||||
@Schema(description = "changes email of the user, if specified")
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
|
||||
@Schema(description = "changes password of the user, if specified")
|
||||
@ValidPassword
|
||||
private String newPassword;
|
||||
|
||||
@Schema(description = "generate a new api key")
|
||||
private boolean newApiKey;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import com.commafeed.security.password.ValidPassword;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
@Schema
|
||||
public class RegistrationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "username, between 3 and 32 characters", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(min = 3, max = 32)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "password, minimum 6 characters", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@ValidPassword
|
||||
private String password;
|
||||
|
||||
@Schema(description = "email address for password recovery", requiredMode = RequiredMode.REQUIRED)
|
||||
@Email
|
||||
@NotEmpty
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import com.commafeed.security.password.ValidPassword;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
@Schema
|
||||
public class RegistrationRequest implements Serializable {
|
||||
|
||||
@Schema(description = "username, between 3 and 32 characters", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(min = 3, max = 32)
|
||||
private String name;
|
||||
|
||||
@Schema(description = "password, minimum 6 characters", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@ValidPassword
|
||||
private String password;
|
||||
|
||||
@Schema(description = "email address for password recovery", requiredMode = RequiredMode.REQUIRED)
|
||||
@Email
|
||||
@NotEmpty
|
||||
@Size(max = 255)
|
||||
private String email;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Star Request")
|
||||
@Data
|
||||
public class StarRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "feed id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long feedId;
|
||||
|
||||
@Schema(description = "starred or not", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean starred;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Star Request")
|
||||
@Data
|
||||
public class StarRequest implements Serializable {
|
||||
|
||||
@Schema(description = "id", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "feed id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long feedId;
|
||||
|
||||
@Schema(description = "starred or not", requiredMode = RequiredMode.REQUIRED)
|
||||
private boolean starred;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Subscription request")
|
||||
@Data
|
||||
public class SubscribeRequest implements Serializable {
|
||||
|
||||
@Schema(description = "url of the feed", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 4096)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "name of the feed for the user", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String title;
|
||||
|
||||
@Schema(description = "id of the user category to place the feed in")
|
||||
@Size(max = 128)
|
||||
private String categoryId;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Subscription request")
|
||||
@Data
|
||||
public class SubscribeRequest implements Serializable {
|
||||
|
||||
@Schema(description = "url of the feed", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 4096)
|
||||
private String url;
|
||||
|
||||
@Schema(description = "name of the feed for the user", requiredMode = RequiredMode.REQUIRED)
|
||||
@NotEmpty
|
||||
@Size(max = 128)
|
||||
private String title;
|
||||
|
||||
@Schema(description = "id of the user category to place the feed in")
|
||||
@Size(max = 128)
|
||||
private String categoryId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Tag Request")
|
||||
@Data
|
||||
public class TagRequest implements Serializable {
|
||||
|
||||
@Schema(description = "entry id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long entryId;
|
||||
|
||||
@Schema(description = "tags", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<String> tags;
|
||||
|
||||
}
|
||||
package com.commafeed.frontend.model.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Schema(description = "Tag Request")
|
||||
@Data
|
||||
public class TagRequest implements Serializable {
|
||||
|
||||
@Schema(description = "entry id", requiredMode = RequiredMode.REQUIRED)
|
||||
private Long entryId;
|
||||
|
||||
@Schema(description = "tags", requiredMode = RequiredMode.REQUIRED)
|
||||
private List<String> tags;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user