Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
Showing only changes of commit cd7082b764 - Show all commits

View File

@ -115,6 +115,18 @@ interface Media {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MappingConnection! ): MappingConnection!
"A list of your wiki submissions for this media"
myWikiSubmissions(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption]
): WikiSubmissionConnection!
"The time of the next release of this media" "The time of the next release of this media"
nextRelease: ISO8601DateTime nextRelease: ISO8601DateTime
"The country in which the media was primarily produced" "The country in which the media was primarily produced"
@ -219,6 +231,9 @@ union FavoriteItemUnion = Anime | Character | Manga | Person
"Objects which are Mappable" "Objects which are Mappable"
union MappingItemUnion = Anime | Category | Character | Episode | Manga | Person | Producer union MappingItemUnion = Anime | Category | Character | Episode | Manga | Person | Producer
"Objects which are Reportable"
union ReportItemUnion = Comment | MediaReaction | Post | Review
"A user account on Kitsu" "A user account on Kitsu"
type Account implements WithTimestamps { type Account implements WithTimestamps {
"The country this user resides in" "The country this user resides in"
@ -252,6 +267,19 @@ type Account implements WithTimestamps {
updatedAt: ISO8601DateTime! updatedAt: ISO8601DateTime!
} }
type AccountMutations {
"Send a password reset email"
resetPassword(
"The email address to reset the password for"
email: String!
): AccountResetPasswordPayload
}
"Autogenerated return type of AccountResetPassword"
type AccountResetPasswordPayload {
email: String!
}
type Anime implements Episodic & Media & WithTimestamps { type Anime implements Episodic & Media & WithTimestamps {
"The recommended minimum age group for this media" "The recommended minimum age group for this media"
ageRating: AgeRatingEnum ageRating: AgeRatingEnum
@ -318,6 +346,18 @@ type Anime implements Episodic & Media & WithTimestamps {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MappingConnection! ): MappingConnection!
"A list of your wiki submissions for this media"
myWikiSubmissions(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption]
): WikiSubmissionConnection!
"The time of the next release of this media" "The time of the next release of this media"
nextRelease: ISO8601DateTime nextRelease: ISO8601DateTime
"The country in which the media was primarily produced" "The country in which the media was primarily produced"
@ -647,9 +687,9 @@ type Comment implements WithTimestamps {
"The user who created this comment for the parent post." "The user who created this comment for the parent post."
author: Profile! author: Profile!
"Unmodified content." "Unmodified content."
content: String! content: String
"Html formatted content." "Html formatted content."
contentFormatted: String! contentFormatted: String
createdAt: ISO8601DateTime! createdAt: ISO8601DateTime!
id: ID! id: ID!
"Users who liked this comment" "Users who liked this comment"
@ -811,6 +851,47 @@ type FavoriteEdge {
node: Favorite node: Favorite
} }
"Related media grouped together"
type Franchise implements WithTimestamps {
createdAt: ISO8601DateTime!
id: ID!
"All media related to a franchise"
installments(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [InstallmentSortOption]
): InstallmentConnection
"The name of this franchise in various languages"
titles: TitlesList!
updatedAt: ISO8601DateTime!
}
"The connection type for Franchise."
type FranchiseConnection {
"A list of edges."
edges: [FranchiseEdge]
"A list of nodes."
nodes: [Franchise]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type FranchiseEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Franchise
}
type Generic implements Error { type Generic implements Error {
"The error code." "The error code."
code: String code: String
@ -833,19 +914,54 @@ type Image {
views(names: [String!]): [ImageView!]! views(names: [String!]): [ImageView!]!
} }
type ImageView implements WithTimestamps { type ImageView {
createdAt: ISO8601DateTime!
"The height of the image" "The height of the image"
height: Int height: Int
"The name of this view of the image" "The name of this view of the image"
name: String! name: String!
updatedAt: ISO8601DateTime!
"The URL of this view of the image" "The URL of this view of the image"
url: String! url: String!
"The width of the image" "The width of the image"
width: Int width: Int
} }
"Individual media that belongs to a franchise"
type Installment implements WithTimestamps {
"Order based chronologically"
alternativeOrder: Int
createdAt: ISO8601DateTime!
"The franchise related to this installment"
franchise: Franchise!
id: ID!
"The media related to this installment"
media: Media!
"Order based by date released"
releaseOrder: Int
"Further explains the media relationship corresponding to a franchise"
tag: InstallmentTagEnum
updatedAt: ISO8601DateTime!
}
"The connection type for Installment."
type InstallmentConnection {
"A list of edges."
edges: [InstallmentEdge]
"A list of nodes."
nodes: [Installment]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type InstallmentEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Installment
}
"The user library filterable by media_type and status" "The user library filterable by media_type and status"
type Library { type Library {
"All Library Entries for a specific Media" "All Library Entries for a specific Media"
@ -1201,6 +1317,18 @@ type Manga implements Media & WithTimestamps {
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int
): MappingConnection! ): MappingConnection!
"A list of your wiki submissions for this media"
myWikiSubmissions(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption]
): WikiSubmissionConnection!
"The time of the next release of this media" "The time of the next release of this media"
nextRelease: ISO8601DateTime nextRelease: ISO8601DateTime
"The country in which the media was primarily produced" "The country in which the media was primarily produced"
@ -1567,12 +1695,14 @@ type MediaStaffEdge {
} }
type Mutation { type Mutation {
account: AccountMutations!
anime: AnimeMutations! anime: AnimeMutations!
episode: EpisodeMutations! episode: EpisodeMutations!
libraryEntry: LibraryEntryMutations! libraryEntry: LibraryEntryMutations!
mapping: MappingMutations! mapping: MappingMutations!
post: PostMutations! post: PostMutations!
pro: ProMutations! pro: ProMutations!
wikiSubmission: WikiSubmissionMutations!
} }
"Information about pagination in a connection." "Information about pagination in a connection."
@ -1645,9 +1775,9 @@ type Post implements WithTimestamps {
sort: [CommentSortOption] sort: [CommentSortOption]
): CommentConnection! ): CommentConnection!
"Unmodified content." "Unmodified content."
content: String! content: String
"Html formatted content." "Html formatted content."
contentFormatted: String! contentFormatted: String
createdAt: ISO8601DateTime! createdAt: ISO8601DateTime!
"Users that are watching this post" "Users that are watching this post"
follows( follows(
@ -1718,12 +1848,12 @@ type PostMutations {
"Lock a Post." "Lock a Post."
lock( lock(
"Lock a Post." "Lock a Post."
input: LockInput! input: PostLockInput!
): PostLockPayload ): PostLockPayload
"Unlock a Post." "Unlock a Post."
unlock( unlock(
"Unlock a Post." "Unlock a Post."
input: UnlockInput! input: PostUnlockInput!
): PostUnlockPayload ): PostUnlockPayload
} }
@ -1854,9 +1984,11 @@ type Profile implements WithTimestamps {
before: String, before: String,
"Returns the first _n_ elements from the list." "Returns the first _n_ elements from the list."
first: Int, first: Int,
kind: [LibraryEventKindEnum!], "Will return all if not supplied"
kind: [LibraryEventKindEnum!] = [PROGRESSED, UPDATED, REACTED, RATED, ANNOTATED],
"Returns the last _n_ elements from the list." "Returns the last _n_ elements from the list."
last: Int last: Int,
sort: [LibraryEventSortOption]
): LibraryEventConnection! ): LibraryEventConnection!
"The user's general location" "The user's general location"
location: String location: String
@ -1891,6 +2023,18 @@ type Profile implements WithTimestamps {
proMessage: String proMessage: String
"The PRO level the user currently has" "The PRO level the user currently has"
proTier: ProTierEnum proTier: ProTierEnum
"Reviews created by this user"
reviews(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption]
): ReviewConnection
"Links to the user on other (social media) sites." "Links to the user on other (social media) sites."
siteLinks( siteLinks(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -1913,6 +2057,20 @@ type Profile implements WithTimestamps {
waifu: Character waifu: Character
"The properly-gendered term for the user's waifu. This should normally only be 'Waifu' or 'Husbando' but some people are jerks, including the person who wrote this..." "The properly-gendered term for the user's waifu. This should normally only be 'Waifu' or 'Husbando' but some people are jerks, including the person who wrote this..."
waifuOrHusbando: String waifuOrHusbando: String
"Wiki submissions created by this user"
wikiSubmissions(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption],
"Will return all if not supplied"
statuses: [WikiSubmissionStatusEnum!] = [DRAFT, PENDING, APPROVED, REJECTED]
): WikiSubmissionConnection!
} }
"The connection type for Profile." "The connection type for Profile."
@ -2014,6 +2172,21 @@ type Query {
findProfileById(id: ID!): Profile findProfileById(id: ID!): Profile
"Find a single User by Slug" "Find a single User by Slug"
findProfileBySlug(slug: String!): Profile findProfileBySlug(slug: String!): Profile
"Find a single Report by ID"
findReportById(id: ID!): Report
"Find a single Wiki Submission by ID"
findWikiSubmissionById(id: ID!): WikiSubmission
"All Franchise in the Kitsu database"
franchises(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): FranchiseConnection
"List trending media on Kitsu" "List trending media on Kitsu"
globalTrending( globalTrending(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -2101,6 +2274,30 @@ type Query {
): ProfileConnection! ): ProfileConnection!
"Random anime or manga" "Random anime or manga"
randomMedia(ageRatings: [AgeRatingEnum!]!, mediaType: MediaTypeEnum!): Media! randomMedia(ageRatings: [AgeRatingEnum!]!, mediaType: MediaTypeEnum!): Media!
"All Reports in the Kitsu database"
reports(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): ReportConnection
"Select all Reports that match with a supplied status."
reportsByStatus(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
"Will return all if not supplied"
statuses: [ReportStatusEnum!] = [REPORTED, RESOLVED, DECLINED]
): ReportConnection
"Search for Anime by title using Algolia. The most relevant results will be at the top." "Search for Anime by title using Algolia. The most relevant results will be at the top."
searchAnimeByTitle( searchAnimeByTitle(
"Returns the elements in the list that come after the specified cursor." "Returns the elements in the list that come after the specified cursor."
@ -2153,6 +2350,20 @@ type Query {
): ProfileConnection ): ProfileConnection
"Get your current session info" "Get your current session info"
session: Session! session: Session!
"Select all Wiki Submissions that match with a supplied status."
wikiSubmissionsByStatuses(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int,
sort: [WikiSubmissionSortOption],
"Will return all if not supplied"
statuses: [WikiSubmissionStatusEnum!] = [DRAFT, PENDING, APPROVED, REJECTED]
): WikiSubmissionConnection
} }
"A quote from a media" "A quote from a media"
@ -2228,6 +2439,101 @@ type QuoteLineEdge {
node: QuoteLine node: QuoteLine
} }
"A report made by a user"
type Report implements WithTimestamps {
createdAt: ISO8601DateTime!
"Additional information related to why the report was made"
explanation: String
id: ID!
"The moderator who responded to this report"
moderator: Profile
"The entity that the report is related to"
naughty: ReportItemUnion!
"The reason for why the report was made"
reason: ReportReasonEnum!
"The user who made this report"
reporter: Profile!
"The resolution status for this report"
status: ReportStatusEnum!
updatedAt: ISO8601DateTime!
}
"The connection type for Report."
type ReportConnection {
"A list of edges."
edges: [ReportEdge]
"A list of nodes."
nodes: [Report]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type ReportEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Report
}
"A media review made by a user"
type Review implements WithTimestamps {
"The author who wrote this review."
author: Profile!
"The review data"
content: String!
createdAt: ISO8601DateTime!
"The review data formatted"
formattedContent: String!
id: ID!
"Does this review contain spoilers from the media"
isSpoiler: Boolean!
"The library entry related to this review."
libraryEntry: LibraryEntry!
"Users who liked this review"
likes(
"Returns the elements in the list that come after the specified cursor."
after: String,
"Returns the elements in the list that come before the specified cursor."
before: String,
"Returns the first _n_ elements from the list."
first: Int,
"Returns the last _n_ elements from the list."
last: Int
): ProfileConnection!
"The media related to this review."
media: Media!
"When this review was written based on media progress."
progress: Int!
"The user rating for this media"
rating: Int!
"Potentially migrated over from hummingbird."
source: String!
updatedAt: ISO8601DateTime!
}
"The connection type for Review."
type ReviewConnection {
"A list of edges."
edges: [ReviewEdge]
"A list of nodes."
nodes: [Review]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"An edge in a connection."
type ReviewEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Review
}
"Information about a user session" "Information about a user session"
type Session { type Session {
"The account associated with this session" "The account associated with this session"
@ -2417,6 +2723,79 @@ type Volume implements WithTimestamps {
updatedAt: ISO8601DateTime! updatedAt: ISO8601DateTime!
} }
"A Wiki Submission is used to either create or edit existing data in our database. This will allow a simple and convient way for users to submit issues/corrections without all the work being left to the mods."
type WikiSubmission implements WithTimestamps {
"The user who created this draft"
author: Profile!
createdAt: ISO8601DateTime!
"The full object that holds all the details for any modifications/additions/deletions made to the entity you are editing. This will be validated using JSON Schema."
data: JSON
id: ID!
"Any additional information that may need to be provided related to the Wiki Submission"
notes: String
"The status of the Wiki Submission"
status: WikiSubmissionStatusEnum!
"The title given to the Wiki Submission. This will default to the title of what is being edited."
title: String
updatedAt: ISO8601DateTime!
}
"The connection type for WikiSubmission."
type WikiSubmissionConnection {
"A list of edges."
edges: [WikiSubmissionEdge]
"A list of nodes."
nodes: [WikiSubmission]
"Information to aid in pagination."
pageInfo: PageInfo!
"The total amount of nodes."
totalCount: Int!
}
"Autogenerated return type of WikiSubmissionCreateDraft"
type WikiSubmissionCreateDraftPayload {
errors: [Error!]
wikiSubmission: WikiSubmission
}
"An edge in a connection."
type WikiSubmissionEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: WikiSubmission
}
type WikiSubmissionMutations {
"Create a wiki submission draft"
createDraft(
"Create a wiki submission draft."
input: WikiSubmissionCreateDraftInput!
): WikiSubmissionCreateDraftPayload
"Submit a wiki submission draft"
submitDraft(
"Submit a wiki submission draft. This will change the status to pending."
input: WikiSubmissionSubmitDraftInput!
): WikiSubmissionSubmitDraftPayload
"Update a wiki submission draft"
updateDraft(
"Update a wiki submission draft."
input: WikiSubmissionUpdateDraftInput!
): WikiSubmissionUpdateDraftPayload
}
"Autogenerated return type of WikiSubmissionSubmitDraft"
type WikiSubmissionSubmitDraftPayload {
errors: [Error!]
wikiSubmission: WikiSubmission
}
"Autogenerated return type of WikiSubmissionUpdateDraft"
type WikiSubmissionUpdateDraftPayload {
errors: [Error!]
wikiSubmission: WikiSubmission
}
enum AgeRatingEnum { enum AgeRatingEnum {
"Acceptable for all ages" "Acceptable for all ages"
G G
@ -2468,6 +2847,26 @@ enum FollowSortEnum {
FOLLOWING_FOLLOWER FOLLOWING_FOLLOWER
} }
enum InstallmentSortEnum {
ALTERNATIVE_ORDER
RELEASE_ORDER
}
enum InstallmentTagEnum {
"Same universe/world/reality/timeline, completely different characters."
ALTERNATE_SETTING
"Same setting, same characters, story is told differently."
ALTERNATE_VERSION
"Characters from different media meet in the same story."
CROSSOVER
"The main story."
MAIN_STORY
"Takes place sometime during the main storyline."
SIDE_STORY
"Uses characters of a different series, but is not an alternate setting or story."
SPINOFF
}
enum LibraryEntryStatusEnum { enum LibraryEntryStatusEnum {
"The user completed this media." "The user completed this media."
COMPLETED COMPLETED
@ -2494,6 +2893,11 @@ enum LibraryEventKindEnum {
UPDATED UPDATED
} }
enum LibraryEventSortEnum {
CREATED_AT
UPDATED_AT
}
enum LockedReasonEnum { enum LockedReasonEnum {
CLOSED CLOSED
SPAM SPAM
@ -2622,6 +3026,23 @@ enum ReleaseStatusEnum {
UPCOMING UPCOMING
} }
enum ReportReasonEnum {
"No bulli!"
BULLYING
"Not Safe For Work"
NSFW
OFFENSIVE
OTHER
SPAM
SPOILER
}
enum ReportStatusEnum {
DECLINED
REPORTED
RESOLVED
}
enum SitePermissionEnum { enum SitePermissionEnum {
"Administrator/staff member of Kitsu" "Administrator/staff member of Kitsu"
ADMIN ADMIN
@ -2645,6 +3066,18 @@ enum TitleLanguagePreferenceEnum {
ROMANIZED ROMANIZED
} }
enum WikiSubmissionSortEnum {
CREATED_AT
UPDATED_AT
}
enum WikiSubmissionStatusEnum {
APPROVED
DRAFT
PENDING
REJECTED
}
input AnimeCreateInput { input AnimeCreateInput {
ageRating: AgeRatingEnum ageRating: AgeRatingEnum
ageRatingGuide: String ageRatingGuide: String
@ -2716,6 +3149,11 @@ input GenericDeleteInput {
id: ID! id: ID!
} }
input InstallmentSortOption {
direction: SortDirection!
on: InstallmentSortEnum!
}
input LibraryEntryCreateInput { input LibraryEntryCreateInput {
finishedAt: ISO8601DateTime finishedAt: ISO8601DateTime
mediaId: ID! mediaId: ID!
@ -2781,9 +3219,9 @@ input LibraryEntryUpdateStatusByMediaInput {
status: LibraryEntryStatusEnum! status: LibraryEntryStatusEnum!
} }
input LockInput { input LibraryEventSortOption {
id: ID! direction: SortDirection!
lockedReason: LockedReasonEnum! on: LibraryEventSortEnum!
} }
input MappingCreateInput { input MappingCreateInput {
@ -2806,11 +3244,20 @@ input PostLikeSortOption {
on: PostLikeSortEnum! on: PostLikeSortEnum!
} }
input PostLockInput {
id: ID!
lockedReason: LockedReasonEnum!
}
input PostSortOption { input PostSortOption {
direction: SortDirection! direction: SortDirection!
on: PostSortEnum! on: PostSortEnum!
} }
input PostUnlockInput {
id: ID!
}
input TitlesListInput { input TitlesListInput {
alternatives: [String!] alternatives: [String!]
canonical: String canonical: String
@ -2818,8 +3265,28 @@ input TitlesListInput {
localized: Map localized: Map
} }
input UnlockInput { input WikiSubmissionCreateDraftInput {
data: JSON!
notes: String
title: String
}
input WikiSubmissionSortOption {
direction: SortDirection!
on: WikiSubmissionSortEnum!
}
input WikiSubmissionSubmitDraftInput {
data: JSON!
id: ID! id: ID!
notes: String
title: String
}
input WikiSubmissionUpdateDraftInput {
data: JSON!
id: ID!
notes: String
} }
@ -2832,6 +3299,9 @@ scalar ISO8601Date
"An ISO 8601-encoded datetime" "An ISO 8601-encoded datetime"
scalar ISO8601DateTime scalar ISO8601DateTime
"Represents untyped JSON"
scalar JSON
"A loose key-value map in GraphQL" "A loose key-value map in GraphQL"
scalar Map scalar Map