This commit is contained in:
parent
4697b44504
commit
81173f989a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -149,3 +149,4 @@ dev-server.pid
|
||||||
backups/
|
backups/
|
||||||
poetry.lock
|
poetry.lock
|
||||||
.venv
|
.venv
|
||||||
|
.ruff_cache
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
[0.2.18]
|
||||||
|
- schema: added Shout.seo string field
|
||||||
|
- resolvers: added /new-author webhook resolver
|
||||||
|
- services: auth connector upgraded
|
||||||
|
|
||||||
|
|
||||||
[0.2.17]
|
[0.2.17]
|
||||||
- schema: enum types workaround, ReactionKind, InviteStatus, ShoutVisibility
|
- schema: enum types workaround, ReactionKind, InviteStatus, ShoutVisibility
|
||||||
- schema: Shout.created_by, Shout.updated_by
|
- schema: Shout.created_by, Shout.updated_by
|
||||||
|
|
|
@ -87,3 +87,5 @@ class Shout(Base):
|
||||||
lang = Column(String, nullable=False, default="ru", comment="Language")
|
lang = Column(String, nullable=False, default="ru", comment="Language")
|
||||||
version_of = Column(ForeignKey("shout.id"), nullable=True)
|
version_of = Column(ForeignKey("shout.id"), nullable=True)
|
||||||
oid = Column(String, nullable=True)
|
oid = Column(String, nullable=True)
|
||||||
|
|
||||||
|
seo = Column(String, nullable=True) # JSON
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "discoursio-core"
|
name = "discoursio-core"
|
||||||
version = "0.2.17"
|
version = "0.2.18"
|
||||||
description = "core module for discours.io"
|
description = "core module for discours.io"
|
||||||
authors = ["discoursio devteam"]
|
authors = ["discoursio devteam"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -13,7 +13,7 @@ enum ReactionStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ReactionKind {
|
enum ReactionKind {
|
||||||
# collabs
|
# collabs
|
||||||
AGREE
|
AGREE
|
||||||
DISAGREE
|
DISAGREE
|
||||||
ASK
|
ASK
|
||||||
|
@ -29,7 +29,6 @@ enum ReactionKind {
|
||||||
DISLIKE
|
DISLIKE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
enum FollowingEntity {
|
enum FollowingEntity {
|
||||||
TOPIC
|
TOPIC
|
||||||
AUTHOR
|
AUTHOR
|
||||||
|
@ -37,17 +36,14 @@ enum FollowingEntity {
|
||||||
REACTIONS
|
REACTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
enum InviteStatus {
|
enum InviteStatus {
|
||||||
PENDING
|
PENDING
|
||||||
ACCEPTED
|
ACCEPTED
|
||||||
REJECTED
|
REJECTED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Типы
|
# Типы
|
||||||
|
|
||||||
|
|
||||||
type AuthorFollowings {
|
type AuthorFollowings {
|
||||||
unread: Int
|
unread: Int
|
||||||
topics: [String]
|
topics: [String]
|
||||||
|
@ -77,6 +73,7 @@ type Author {
|
||||||
last_seen: Int
|
last_seen: Int
|
||||||
updated_at: Int
|
updated_at: Int
|
||||||
deleted_at: Int
|
deleted_at: Int
|
||||||
|
seo: String
|
||||||
# synthetic
|
# synthetic
|
||||||
stat: AuthorStat # ratings inside
|
stat: AuthorStat # ratings inside
|
||||||
communities: [Community]
|
communities: [Community]
|
||||||
|
@ -292,81 +289,79 @@ type Result {
|
||||||
communities: [Community]
|
communities: [Community]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Мутации
|
# Мутации
|
||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
# author
|
# author
|
||||||
rate_author(rated_slug: String!, value: Int!): Result!
|
rate_author(rated_slug: String!, value: Int!): Result!
|
||||||
update_profile(profile: ProfileInput!): Result!
|
update_profile(profile: ProfileInput!): Result!
|
||||||
|
|
||||||
# editor
|
# editor
|
||||||
create_shout(inp: ShoutInput!): Result!
|
create_shout(inp: ShoutInput!): Result!
|
||||||
update_shout(shout_id: Int!, shout_input: ShoutInput, publish: Boolean): Result!
|
update_shout(shout_id: Int!, shout_input: ShoutInput, publish: Boolean): Result!
|
||||||
delete_shout(shout_id: Int!): Result!
|
delete_shout(shout_id: Int!): Result!
|
||||||
|
|
||||||
# follower
|
# follower
|
||||||
follow(what: FollowingEntity!, slug: String!): Result!
|
follow(what: FollowingEntity!, slug: String!): Result!
|
||||||
unfollow(what: FollowingEntity!, slug: String!): Result!
|
unfollow(what: FollowingEntity!, slug: String!): Result!
|
||||||
|
|
||||||
# topic
|
# topic
|
||||||
create_topic(input: TopicInput!): Result!
|
create_topic(input: TopicInput!): Result!
|
||||||
update_topic(input: TopicInput!): Result!
|
update_topic(input: TopicInput!): Result!
|
||||||
delete_topic(slug: String!): Result!
|
delete_topic(slug: String!): Result!
|
||||||
|
|
||||||
# reaction
|
# reaction
|
||||||
create_reaction(reaction: ReactionInput!): Result!
|
create_reaction(reaction: ReactionInput!): Result!
|
||||||
update_reaction(id: Int!, reaction: ReactionInput!): Result!
|
update_reaction(id: Int!, reaction: ReactionInput!): Result!
|
||||||
delete_reaction(id: Int!): Result!
|
delete_reaction(id: Int!): Result!
|
||||||
|
|
||||||
# collab
|
# collab
|
||||||
create_invite(slug: String, author_id: Int): Result!
|
create_invite(slug: String, author_id: Int): Result!
|
||||||
remove_author(slug: String, author_id: Int): Result!
|
remove_author(slug: String, author_id: Int): Result!
|
||||||
remove_invite(invite_id: Int!): Result!
|
remove_invite(invite_id: Int!): Result!
|
||||||
accept_invite(invite_id: Int!): Result!
|
accept_invite(invite_id: Int!): Result!
|
||||||
reject_invite(invite_id: Int!): Result!
|
reject_invite(invite_id: Int!): Result!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Запросы
|
# Запросы
|
||||||
|
|
||||||
type Query {
|
type Query {
|
||||||
# author
|
# author
|
||||||
get_author(slug: String, author_id: Int): Author
|
get_author(slug: String, author_id: Int): Author
|
||||||
get_author_id(user: String!): Author
|
get_author_id(user: String!): Author
|
||||||
load_authors_all(limit: Int, offset: Int): [Author]
|
load_authors_all(limit: Int, offset: Int): [Author]
|
||||||
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
||||||
get_author_followed(slug: String, user: String, author_id: Int): [Author]
|
get_author_followed(slug: String, user: String, author_id: Int): [Author]
|
||||||
load_authors_by(by: AuthorsBy, limit: Int, offset: Int): [Author]
|
load_authors_by(by: AuthorsBy, limit: Int, offset: Int): [Author]
|
||||||
|
|
||||||
# community
|
# community
|
||||||
get_community: Community
|
get_community: Community
|
||||||
get_communities_all: [Community]
|
get_communities_all: [Community]
|
||||||
|
|
||||||
# editor
|
# editor
|
||||||
get_shouts_drafts: [Shout]
|
get_shouts_drafts: [Shout]
|
||||||
|
|
||||||
# follower
|
# follower
|
||||||
get_my_followed: Result # { authors topics communities }
|
get_my_followed: Result # { authors topics communities }
|
||||||
get_shout_followers(slug: String, shout_id: Int): [Author]
|
get_shout_followers(slug: String, shout_id: Int): [Author]
|
||||||
|
|
||||||
# reaction
|
# reaction
|
||||||
load_reactions_by(by: ReactionBy!, limit: Int, offset: Int): [Reaction]
|
load_reactions_by(by: ReactionBy!, limit: Int, offset: Int): [Reaction]
|
||||||
|
|
||||||
# reader
|
# reader
|
||||||
get_shout(slug: String, shout_id: Int): Shout
|
get_shout(slug: String, shout_id: Int): Shout
|
||||||
load_shouts_followed(follower_id: Int!, limit: Int, offset: Int): [Shout] # userReactedShouts
|
load_shouts_followed(follower_id: Int!, limit: Int, offset: Int): [Shout] # userReactedShouts
|
||||||
load_shouts_by(options: LoadShoutsOptions): [Shout]
|
load_shouts_by(options: LoadShoutsOptions): [Shout]
|
||||||
load_shouts_search(text: String!, limit: Int, offset: Int): [Shout]
|
load_shouts_search(text: String!, limit: Int, offset: Int): [Shout]
|
||||||
load_shouts_feed(options: LoadShoutsOptions): [Shout]
|
load_shouts_feed(options: LoadShoutsOptions): [Shout]
|
||||||
load_shouts_unrated(limit: Int, offset: Int): [Shout]
|
load_shouts_unrated(limit: Int, offset: Int): [Shout]
|
||||||
load_shouts_random_top(options: LoadShoutsOptions): [Shout]
|
load_shouts_random_top(options: LoadShoutsOptions): [Shout]
|
||||||
load_shouts_drafts: [Shout]
|
load_shouts_drafts: [Shout]
|
||||||
|
|
||||||
# topic
|
# topic
|
||||||
get_topic(slug: String!): Topic
|
get_topic(slug: String!): Topic
|
||||||
get_topics_all: [Topic]
|
get_topics_all: [Topic]
|
||||||
get_topics_random(amount: Int): [Topic]
|
get_topics_random(amount: Int): [Topic]
|
||||||
get_topics_by_author(slug: String, user: String, author_id: Int): [Topic]
|
get_topics_by_author(slug: String, user: String, author_id: Int): [Topic]
|
||||||
get_topics_by_community(slug: String, community_id: Int): [Topic]
|
get_topics_by_community(slug: String, community_id: Int): [Topic]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user