mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Upgrade grats
This commit is contained in:
parent
d2c8cf872d
commit
0497f2e903
8 changed files with 1443 additions and 1527 deletions
|
|
@ -3,3 +3,4 @@
|
|||
**/build/
|
||||
**/dist/
|
||||
*.min.js
|
||||
packages/skin-database/api/graphql/schema.ts
|
||||
|
|
@ -4,4 +4,5 @@ packages/webamp/demo/built/
|
|||
packages/webamp/built/
|
||||
packages/webamp/dist/
|
||||
packages/webamp-modern/build/
|
||||
packages/webamp-modern/tools/eslint-rules/dist/
|
||||
packages/webamp-modern/tools/eslint-rules/dist/
|
||||
packages/skin-database/api/graphql/schema.ts
|
||||
|
|
@ -1 +1 @@
|
|||
api/graphql/schema.ts
|
||||
./api/graphql/schema.ts
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Router } from "express";
|
|||
import { graphqlHTTP } from "express-graphql";
|
||||
|
||||
import DEFAULT_QUERY from "./defaultQuery";
|
||||
import { schema } from "./schema";
|
||||
import { getSchema } from "./schema";
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ const extensions = ({
|
|||
router.use(
|
||||
"/",
|
||||
graphqlHTTP({
|
||||
schema,
|
||||
schema: getSchema(),
|
||||
graphiql: {
|
||||
defaultQuery: DEFAULT_QUERY,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,372 +1,5 @@
|
|||
# Schema generated by Grats (https://grats.capt.dev)
|
||||
# Do not manually edit. Regenerate by running `npx grats`.
|
||||
"""A file found within a Winamp Skin's .wsz archive"""
|
||||
type ArchiveFile {
|
||||
"""
|
||||
The date on the file inside the archive. Given in simplified extended ISO
|
||||
format (ISO 8601).
|
||||
"""
|
||||
date: String
|
||||
|
||||
"""The md5 hash of the file within the archive"""
|
||||
file_md5: String
|
||||
|
||||
"""Filename of the file within the archive"""
|
||||
filename: String
|
||||
|
||||
"""Is the file a directory?"""
|
||||
is_directory: Boolean
|
||||
|
||||
"""
|
||||
The uncompressed size of the file in bytes.
|
||||
|
||||
**Note:** Will be `null` for directories
|
||||
"""
|
||||
size: Int
|
||||
|
||||
"""The skin in which this file was found"""
|
||||
skin: Skin
|
||||
|
||||
"""The content of the file, if it's a text file"""
|
||||
text_content: String
|
||||
|
||||
"""
|
||||
A URL to download the file. **Note:** This is powered by a little
|
||||
serverless Cloudflare function which tries to exctact the file on the fly.
|
||||
It may not work for all files.
|
||||
"""
|
||||
url: String
|
||||
}
|
||||
|
||||
"""A classic Winamp skin"""
|
||||
type ClassicSkin implements Node & Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
|
||||
"""String representation (rgb usually) of the skin's average color"""
|
||||
average_color: String
|
||||
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
|
||||
"""Does the skin include sprite sheets for the media library?"""
|
||||
has_media_library: Boolean
|
||||
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
|
||||
"""
|
||||
The date on which this skin was last updated in the Algolia search index.
|
||||
Given in simplified extended ISO format (ISO 8601).
|
||||
"""
|
||||
last_algolia_index_update_date: String
|
||||
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
|
||||
"""URL of the skin on the Winamp Skin Museum"""
|
||||
museum_url: String
|
||||
|
||||
"""Has the skin been flagged as "not safe for wrok"?"""
|
||||
nsfw: Boolean
|
||||
|
||||
"""Text of the readme file extracted from the skin"""
|
||||
readme_text: String
|
||||
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
|
||||
"""URL of a screenshot of the skin"""
|
||||
screenshot_url: String
|
||||
|
||||
"""The number of transparent pixels rendered by the skin."""
|
||||
transparent_pixels: Int
|
||||
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
|
||||
"""URL of webamp.org with the skin loaded"""
|
||||
webamp_url: String
|
||||
}
|
||||
|
||||
"""Statistics about the contents of the Museum's database."""
|
||||
type DatabaseStatistics {
|
||||
"""
|
||||
The number of skins that have been approved for tweeting. This includes both
|
||||
tweeted and untweeted skins.
|
||||
|
||||
**Note:** Skins can be both approved and rejected by different users.
|
||||
"""
|
||||
approved_skins_count: Int
|
||||
|
||||
"""
|
||||
The number of skins that have been marked as NSFW.
|
||||
|
||||
**Note:** Skins can be approved and rejected by different users.
|
||||
**Note:** Generally skins that have been marked NSFW are also marked as rejected.
|
||||
"""
|
||||
nsfw_skins_count: Int
|
||||
|
||||
"""
|
||||
The number of skins that have been rejected for tweeting.
|
||||
|
||||
**Note:** Skins can be both approved and rejected by different users.
|
||||
**Note:** Generally skins that have been marked NSFW are also marked as rejected.
|
||||
"""
|
||||
rejected_skins_count: Int
|
||||
|
||||
"""
|
||||
The number of skins that have been approved for tweeting, but not yet tweeted.
|
||||
"""
|
||||
tweetable_skins_count: Int
|
||||
|
||||
"""
|
||||
The number of skins in the Museum that have been tweeted by `@winampskins`
|
||||
"""
|
||||
tweeted_skins_count: Int
|
||||
|
||||
"""The total number of classic skins in the Museum's database"""
|
||||
unique_classic_skins_count: Int
|
||||
|
||||
"""The number of skins that have never been reviewed."""
|
||||
unreviewed_skins_count: Int
|
||||
|
||||
"""Skins uploads that have errored during processing."""
|
||||
uploads_in_error_state_count: Int
|
||||
|
||||
"""
|
||||
Skins uplaods awaiting processing. This can happen when there are a large
|
||||
number of skin uplaods at the same time, or when the skin uploading processing
|
||||
pipeline gets stuck.
|
||||
"""
|
||||
uploads_pending_processing_count: Int
|
||||
|
||||
"""
|
||||
Number of skins that have been uploaded to the Museum via the web interface.
|
||||
"""
|
||||
web_uploads_count: Int
|
||||
}
|
||||
|
||||
type InternetArchiveItem {
|
||||
"""The Internet Archive's unique identifier for this item"""
|
||||
identifier: String
|
||||
|
||||
"""
|
||||
The date and time that we last scraped this item's metadata.
|
||||
**Note:** This field is temporary and will be removed in the future.
|
||||
The date format is just what we get from the database, and it's ambiguous.
|
||||
"""
|
||||
last_metadata_scrape_date_UNSTABLE: String
|
||||
|
||||
"""URL to get the Internet Archive's metadata for this item in JSON form."""
|
||||
metadata_url: String
|
||||
|
||||
"""
|
||||
Our cached version of the metadata avaliable at \`metadata_url\` (above)
|
||||
"""
|
||||
raw_metadata_json: String
|
||||
|
||||
"""The skin that this item contains"""
|
||||
skin: Skin
|
||||
|
||||
"""The URL where this item can be viewed on the Internet Archive"""
|
||||
url: String
|
||||
}
|
||||
|
||||
"""
|
||||
A "modern" Winamp skin. These skins use the `.wal` file extension and are free-form.
|
||||
|
||||
Most functionality in the Winamp Skin Museum is centered around "classic" skins,
|
||||
which are currently called just `Skin` in this schema.
|
||||
"""
|
||||
type ModernSkin implements Node & Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
average_color: String @deprecated(reason: "Needed for migration")
|
||||
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
museum_url: String @deprecated(reason: "Needed for migration")
|
||||
nsfw: Boolean @deprecated(reason: "Needed for migration")
|
||||
readme_text: String @deprecated(reason: "Needed for migration")
|
||||
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
screenshot_url: String
|
||||
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
webamp_url: String @deprecated(reason: "Needed for migration")
|
||||
}
|
||||
|
||||
"""A collection of "modern" Winamp skins"""
|
||||
type ModernSkinsConnection {
|
||||
"""The total number of skins matching the filter"""
|
||||
count: Int
|
||||
|
||||
"""The list of skins"""
|
||||
nodes: [ModernSkin]
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
"""
|
||||
Approve skin for tweeting
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
approve_skin(md5: String!): Boolean
|
||||
|
||||
"""
|
||||
Mark a skin as NSFW
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
mark_skin_nsfw(md5: String!): Boolean
|
||||
|
||||
"""
|
||||
Reject skin for tweeting
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
reject_skin(md5: String!): Boolean
|
||||
|
||||
"""
|
||||
Request that an admin check if this skin is NSFW.
|
||||
Unlike other review mutation endpoints, this one does not require being logged
|
||||
in.
|
||||
"""
|
||||
request_nsfw_review_for_skin(md5: String!): Boolean
|
||||
|
||||
"""
|
||||
Send a message to the admin of the site. Currently this appears in Discord.
|
||||
"""
|
||||
send_feedback(email: String, message: String!, url: String): Boolean
|
||||
|
||||
"""Mutations for the upload flow"""
|
||||
upload: UploadMutations
|
||||
}
|
||||
|
||||
"""
|
||||
A globally unique object. The `id` here is intended only for use within
|
||||
GraphQL.
|
||||
https://graphql.org/learn/global-object-identification/
|
||||
"""
|
||||
interface Node {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""
|
||||
Fetch archive file by it's MD5 hash
|
||||
|
||||
Get information about a file found within a skin's wsz/wal/zip archive.
|
||||
"""
|
||||
fetch_archive_file_by_md5(md5: String!): ArchiveFile
|
||||
|
||||
"""
|
||||
Get an archive.org item by its identifier. You can find this in the URL:
|
||||
|
||||
https://archive.org/details/<identifier>/
|
||||
"""
|
||||
fetch_internet_archive_item_by_identifier(identifier: String!): InternetArchiveItem
|
||||
|
||||
"""Get a skin by its MD5 hash"""
|
||||
fetch_skin_by_md5(md5: String!): Skin
|
||||
|
||||
"""Get a tweet by its URL"""
|
||||
fetch_tweet_by_url(url: String!): Tweet
|
||||
|
||||
"""The currently authenticated user, if any."""
|
||||
me: User
|
||||
|
||||
"""All modern skins in the database"""
|
||||
modern_skins(first: Int! = 10, offset: Int! = 0): ModernSkinsConnection
|
||||
|
||||
"""
|
||||
Get a globally unique object by its ID.
|
||||
|
||||
https://graphql.org/learn/global-object-identification/
|
||||
"""
|
||||
node(id: ID!): Node
|
||||
|
||||
"""
|
||||
Search the database using the Algolia search index used by the Museum.
|
||||
|
||||
Useful for locating a particular skin.
|
||||
"""
|
||||
search_skins(first: Int! = 10, offset: Int! = 0, query: String!): [Skin]
|
||||
|
||||
"""A random skin that needs to be reviewed"""
|
||||
skin_to_review: Skin
|
||||
|
||||
"""
|
||||
All classic skins in the database
|
||||
|
||||
**Note:** We don't currently support combining sorting and filtering.
|
||||
"""
|
||||
skins(filter: SkinsFilterOption, first: Int! = 10, offset: Int! = 0, sort: SkinsSortOption): SkinsConnection
|
||||
|
||||
"""A namespace for statistics about the database"""
|
||||
statistics: DatabaseStatistics
|
||||
|
||||
"""Tweets tweeted by `@winampskins`"""
|
||||
tweets(first: Int! = 10, offset: Int! = 0, sort: TweetsSortOption): TweetsConnection
|
||||
|
||||
"""Get the status of a batch of uploads by ids"""
|
||||
upload_statuses(ids: [String!]!): [SkinUpload]
|
||||
|
||||
"""Get the status of a batch of uploads by md5s"""
|
||||
upload_statuses_by_md5(md5s: [String!]!): [SkinUpload] @deprecated(reason: "Prefer `upload_statuses` instead, were we operate on ids.")
|
||||
}
|
||||
|
||||
"""The judgement made about a skin by a moderator"""
|
||||
enum Rating {
|
||||
APPROVED
|
||||
|
|
@ -374,91 +7,6 @@ enum Rating {
|
|||
REJECTED
|
||||
}
|
||||
|
||||
"""
|
||||
A review of a skin. Done either on the Museum's Tinder-style
|
||||
review page, or via the Discord bot.
|
||||
"""
|
||||
type Review {
|
||||
"""The rating that the user gave the skin"""
|
||||
rating: Rating
|
||||
|
||||
"""
|
||||
The user who made the review (if known). **Note:** In the early days we didn't
|
||||
track this, so many will be null.
|
||||
"""
|
||||
reviewer: String
|
||||
|
||||
"""The skin that was reviewed"""
|
||||
skin: Skin
|
||||
}
|
||||
|
||||
"""
|
||||
A Winamp skin. Could be modern or classic.
|
||||
|
||||
**Note**: At some point in the future, this might be renamed to `Skin`.
|
||||
"""
|
||||
interface Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
average_color: String @deprecated(reason: "Needed for migration")
|
||||
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
museum_url: String @deprecated(reason: "Needed for migration")
|
||||
nsfw: Boolean @deprecated(reason: "Needed for migration")
|
||||
readme_text: String @deprecated(reason: "Needed for migration")
|
||||
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
screenshot_url: String
|
||||
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
webamp_url: String @deprecated(reason: "Needed for migration")
|
||||
}
|
||||
|
||||
"""Information about an attempt to upload a skin to the Museum."""
|
||||
type SkinUpload {
|
||||
id: String
|
||||
|
||||
"""
|
||||
Skin that was uploaded. **Note:** This is null if the skin has not yet been
|
||||
fully processed. (status == ARCHIVED)
|
||||
"""
|
||||
skin: Skin
|
||||
status: SkinUploadStatus
|
||||
|
||||
"""Md5 hash given when requesting the upload URL."""
|
||||
upload_md5: String
|
||||
}
|
||||
|
||||
"""
|
||||
The current status of a pending upload.
|
||||
|
||||
|
|
@ -473,15 +21,6 @@ enum SkinUploadStatus {
|
|||
URL_REQUESTED
|
||||
}
|
||||
|
||||
"""A collection of classic Winamp skins"""
|
||||
type SkinsConnection {
|
||||
"""The total number of skins matching the filter"""
|
||||
count: Int
|
||||
|
||||
"""The list of skins"""
|
||||
nodes: [Skin]
|
||||
}
|
||||
|
||||
enum SkinsFilterOption {
|
||||
APPROVED
|
||||
NSFW
|
||||
|
|
@ -493,21 +32,412 @@ enum SkinsSortOption {
|
|||
MUSEUM
|
||||
}
|
||||
|
||||
enum TweetsSortOption {
|
||||
LIKES
|
||||
RETWEETS
|
||||
}
|
||||
|
||||
"""
|
||||
A globally unique object. The `id` here is intended only for use within
|
||||
GraphQL.
|
||||
https://graphql.org/learn/global-object-identification/
|
||||
"""
|
||||
interface Node {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
"""
|
||||
A Winamp skin. Could be modern or classic.
|
||||
|
||||
**Note**: At some point in the future, this might be renamed to `Skin`.
|
||||
"""
|
||||
interface Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
average_color: String @deprecated(reason: "Needed for migration")
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
museum_url: String @deprecated(reason: "Needed for migration")
|
||||
nsfw: Boolean @deprecated(reason: "Needed for migration")
|
||||
readme_text: String @deprecated(reason: "Needed for migration")
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
screenshot_url: String
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
webamp_url: String @deprecated(reason: "Needed for migration")
|
||||
}
|
||||
|
||||
"""Input object used for a user to request an UploadUrl"""
|
||||
input UploadUrlRequest {
|
||||
filename: String!
|
||||
md5: String!
|
||||
}
|
||||
|
||||
"""A file found within a Winamp Skin's .wsz archive"""
|
||||
type ArchiveFile {
|
||||
"""
|
||||
The date on the file inside the archive. Given in simplified extended ISO
|
||||
format (ISO 8601).
|
||||
"""
|
||||
date: String
|
||||
"""The md5 hash of the file within the archive"""
|
||||
file_md5: String
|
||||
"""Filename of the file within the archive"""
|
||||
filename: String
|
||||
"""Is the file a directory?"""
|
||||
is_directory: Boolean
|
||||
"""
|
||||
The uncompressed size of the file in bytes.
|
||||
|
||||
**Note:** Will be `null` for directories
|
||||
"""
|
||||
size: Int
|
||||
"""The skin in which this file was found"""
|
||||
skin: Skin
|
||||
"""The content of the file, if it's a text file"""
|
||||
text_content: String
|
||||
"""
|
||||
A URL to download the file. **Note:** This is powered by a little
|
||||
serverless Cloudflare function which tries to exctact the file on the fly.
|
||||
It may not work for all files.
|
||||
"""
|
||||
url: String
|
||||
}
|
||||
|
||||
"""A classic Winamp skin"""
|
||||
type ClassicSkin implements Node & Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
"""String representation (rgb usually) of the skin's average color"""
|
||||
average_color: String
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
"""Does the skin include sprite sheets for the media library?"""
|
||||
has_media_library: Boolean
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
"""
|
||||
The date on which this skin was last updated in the Algolia search index.
|
||||
Given in simplified extended ISO format (ISO 8601).
|
||||
"""
|
||||
last_algolia_index_update_date: String
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
"""URL of the skin on the Winamp Skin Museum"""
|
||||
museum_url: String
|
||||
"""Has the skin been flagged as "not safe for wrok"?"""
|
||||
nsfw: Boolean
|
||||
"""Text of the readme file extracted from the skin"""
|
||||
readme_text: String
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
"""URL of a screenshot of the skin"""
|
||||
screenshot_url: String
|
||||
"""The number of transparent pixels rendered by the skin."""
|
||||
transparent_pixels: Int
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
"""URL of webamp.org with the skin loaded"""
|
||||
webamp_url: String
|
||||
}
|
||||
|
||||
"""Statistics about the contents of the Museum's database."""
|
||||
type DatabaseStatistics {
|
||||
"""
|
||||
The number of skins that have been approved for tweeting. This includes both
|
||||
tweeted and untweeted skins.
|
||||
|
||||
**Note:** Skins can be both approved and rejected by different users.
|
||||
"""
|
||||
approved_skins_count: Int
|
||||
"""
|
||||
The number of skins that have been marked as NSFW.
|
||||
|
||||
**Note:** Skins can be approved and rejected by different users.
|
||||
**Note:** Generally skins that have been marked NSFW are also marked as rejected.
|
||||
"""
|
||||
nsfw_skins_count: Int
|
||||
"""
|
||||
The number of skins that have been rejected for tweeting.
|
||||
|
||||
**Note:** Skins can be both approved and rejected by different users.
|
||||
**Note:** Generally skins that have been marked NSFW are also marked as rejected.
|
||||
"""
|
||||
rejected_skins_count: Int
|
||||
"""
|
||||
The number of skins that have been approved for tweeting, but not yet tweeted.
|
||||
"""
|
||||
tweetable_skins_count: Int
|
||||
"""
|
||||
The number of skins in the Museum that have been tweeted by `@winampskins`
|
||||
"""
|
||||
tweeted_skins_count: Int
|
||||
"""The total number of classic skins in the Museum's database"""
|
||||
unique_classic_skins_count: Int
|
||||
"""The number of skins that have never been reviewed."""
|
||||
unreviewed_skins_count: Int
|
||||
"""Skins uploads that have errored during processing."""
|
||||
uploads_in_error_state_count: Int
|
||||
"""
|
||||
Skins uplaods awaiting processing. This can happen when there are a large
|
||||
number of skin uplaods at the same time, or when the skin uploading processing
|
||||
pipeline gets stuck.
|
||||
"""
|
||||
uploads_pending_processing_count: Int
|
||||
"""
|
||||
Number of skins that have been uploaded to the Museum via the web interface.
|
||||
"""
|
||||
web_uploads_count: Int
|
||||
}
|
||||
|
||||
type InternetArchiveItem {
|
||||
"""The Internet Archive's unique identifier for this item"""
|
||||
identifier: String
|
||||
"""
|
||||
The date and time that we last scraped this item's metadata.
|
||||
**Note:** This field is temporary and will be removed in the future.
|
||||
The date format is just what we get from the database, and it's ambiguous.
|
||||
"""
|
||||
last_metadata_scrape_date_UNSTABLE: String
|
||||
"""URL to get the Internet Archive's metadata for this item in JSON form."""
|
||||
metadata_url: String
|
||||
"""
|
||||
Our cached version of the metadata avaliable at \`metadata_url\` (above)
|
||||
"""
|
||||
raw_metadata_json: String
|
||||
"""The skin that this item contains"""
|
||||
skin: Skin
|
||||
"""The URL where this item can be viewed on the Internet Archive"""
|
||||
url: String
|
||||
}
|
||||
|
||||
"""
|
||||
A "modern" Winamp skin. These skins use the `.wal` file extension and are free-form.
|
||||
|
||||
Most functionality in the Winamp Skin Museum is centered around "classic" skins,
|
||||
which are currently called just `Skin` in this schema.
|
||||
"""
|
||||
type ModernSkin implements Node & Skin {
|
||||
"""List of files contained within the skin's .wsz archive"""
|
||||
archive_files: [ArchiveFile]
|
||||
average_color: String @deprecated(reason: "Needed for migration")
|
||||
"""URL to download the skin"""
|
||||
download_url: String
|
||||
"""
|
||||
Filename of skin when uploaded to the Museum. Note: In some cases a skin
|
||||
has been uploaded under multiple names. Here we just pick one.
|
||||
"""
|
||||
filename(
|
||||
"""
|
||||
If true, the the correct file extension (.wsz or .wal) will be .
|
||||
Otherwise, the original user-uploaded file extension will be used.
|
||||
"""
|
||||
normalize_extension: Boolean = false
|
||||
): String
|
||||
"""GraphQL ID of the skin"""
|
||||
id: ID!
|
||||
"""The skin's "item" at archive.org"""
|
||||
internet_archive_item: InternetArchiveItem
|
||||
"""MD5 hash of the skin's file"""
|
||||
md5: String
|
||||
museum_url: String @deprecated(reason: "Needed for migration")
|
||||
nsfw: Boolean @deprecated(reason: "Needed for migration")
|
||||
readme_text: String @deprecated(reason: "Needed for migration")
|
||||
"""
|
||||
Times that the skin has been reviewed either on the Museum's Tinder-style
|
||||
reivew page, or via the Discord bot.
|
||||
"""
|
||||
reviews: [Review]
|
||||
screenshot_url: String
|
||||
"""Has the skin been tweeted?"""
|
||||
tweeted: Boolean
|
||||
"""List of `@winampskins` tweets that mentioned the skin."""
|
||||
tweets: [Tweet]
|
||||
webamp_url: String @deprecated(reason: "Needed for migration")
|
||||
}
|
||||
|
||||
"""A collection of "modern" Winamp skins"""
|
||||
type ModernSkinsConnection {
|
||||
"""The total number of skins matching the filter"""
|
||||
count: Int
|
||||
"""The list of skins"""
|
||||
nodes: [ModernSkin]
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
"""
|
||||
Approve skin for tweeting
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
approve_skin(md5: String!): Boolean
|
||||
"""
|
||||
Mark a skin as NSFW
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
mark_skin_nsfw(md5: String!): Boolean
|
||||
"""
|
||||
Reject skin for tweeting
|
||||
|
||||
**Note:** Requires being logged in
|
||||
"""
|
||||
reject_skin(md5: String!): Boolean
|
||||
"""
|
||||
Request that an admin check if this skin is NSFW.
|
||||
Unlike other review mutation endpoints, this one does not require being logged
|
||||
in.
|
||||
"""
|
||||
request_nsfw_review_for_skin(md5: String!): Boolean
|
||||
"""
|
||||
Send a message to the admin of the site. Currently this appears in Discord.
|
||||
"""
|
||||
send_feedback(email: String, message: String!, url: String): Boolean
|
||||
"""Mutations for the upload flow"""
|
||||
upload: UploadMutations
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""
|
||||
Fetch archive file by it's MD5 hash
|
||||
|
||||
Get information about a file found within a skin's wsz/wal/zip archive.
|
||||
"""
|
||||
fetch_archive_file_by_md5(md5: String!): ArchiveFile
|
||||
"""
|
||||
Get an archive.org item by its identifier. You can find this in the URL:
|
||||
|
||||
https://archive.org/details/<identifier>/
|
||||
"""
|
||||
fetch_internet_archive_item_by_identifier(identifier: String!): InternetArchiveItem
|
||||
"""Get a skin by its MD5 hash"""
|
||||
fetch_skin_by_md5(md5: String!): Skin
|
||||
"""Get a tweet by its URL"""
|
||||
fetch_tweet_by_url(url: String!): Tweet
|
||||
"""The currently authenticated user, if any."""
|
||||
me: User
|
||||
"""All modern skins in the database"""
|
||||
modern_skins(first: Int! = 10, offset: Int! = 0): ModernSkinsConnection
|
||||
"""
|
||||
Get a globally unique object by its ID.
|
||||
|
||||
https://graphql.org/learn/global-object-identification/
|
||||
"""
|
||||
node(id: ID!): Node
|
||||
"""
|
||||
Search the database using the Algolia search index used by the Museum.
|
||||
|
||||
Useful for locating a particular skin.
|
||||
"""
|
||||
search_skins(first: Int! = 10, offset: Int! = 0, query: String!): [Skin]
|
||||
"""A random skin that needs to be reviewed"""
|
||||
skin_to_review: Skin
|
||||
"""
|
||||
All classic skins in the database
|
||||
|
||||
**Note:** We don't currently support combining sorting and filtering.
|
||||
"""
|
||||
skins(filter: SkinsFilterOption, first: Int! = 10, offset: Int! = 0, sort: SkinsSortOption): SkinsConnection
|
||||
"""A namespace for statistics about the database"""
|
||||
statistics: DatabaseStatistics
|
||||
"""Tweets tweeted by `@winampskins`"""
|
||||
tweets(first: Int! = 10, offset: Int! = 0, sort: TweetsSortOption): TweetsConnection
|
||||
"""Get the status of a batch of uploads by ids"""
|
||||
upload_statuses(ids: [String!]!): [SkinUpload]
|
||||
"""Get the status of a batch of uploads by md5s"""
|
||||
upload_statuses_by_md5(md5s: [String!]!): [SkinUpload] @deprecated(reason: "Prefer `upload_statuses` instead, were we operate on ids.")
|
||||
}
|
||||
|
||||
"""
|
||||
A review of a skin. Done either on the Museum's Tinder-style
|
||||
review page, or via the Discord bot.
|
||||
"""
|
||||
type Review {
|
||||
"""The rating that the user gave the skin"""
|
||||
rating: Rating
|
||||
"""
|
||||
The user who made the review (if known). **Note:** In the early days we didn't
|
||||
track this, so many will be null.
|
||||
"""
|
||||
reviewer: String
|
||||
"""The skin that was reviewed"""
|
||||
skin: Skin
|
||||
}
|
||||
|
||||
"""Information about an attempt to upload a skin to the Museum."""
|
||||
type SkinUpload {
|
||||
id: String
|
||||
"""
|
||||
Skin that was uploaded. **Note:** This is null if the skin has not yet been
|
||||
fully processed. (status == ARCHIVED)
|
||||
"""
|
||||
skin: Skin
|
||||
status: SkinUploadStatus
|
||||
"""Md5 hash given when requesting the upload URL."""
|
||||
upload_md5: String
|
||||
}
|
||||
|
||||
"""A collection of classic Winamp skins"""
|
||||
type SkinsConnection {
|
||||
"""The total number of skins matching the filter"""
|
||||
count: Int
|
||||
"""The list of skins"""
|
||||
nodes: [Skin]
|
||||
}
|
||||
|
||||
"""A tweet made by `@winampskins` mentioning a Winamp skin"""
|
||||
type Tweet {
|
||||
"""
|
||||
Number of likes the tweet has received. Updated nightly. (Note: Recent likes on older tweets may not be reflected here)
|
||||
"""
|
||||
likes: Int
|
||||
|
||||
"""
|
||||
Number of retweets the tweet has received. Updated nightly. (Note: Recent retweets on older tweets may not be reflected here)
|
||||
"""
|
||||
retweets: Int
|
||||
|
||||
"""The skin featured in this Tweet"""
|
||||
skin: Skin
|
||||
|
||||
"""
|
||||
URL of the tweet. **Note:** Early on in the bot's life we just recorded
|
||||
_which_ skins were tweeted, not any info about the actual tweet. This means we
|
||||
|
|
@ -520,16 +450,10 @@ type Tweet {
|
|||
type TweetsConnection {
|
||||
"""The total number of tweets"""
|
||||
count: Int
|
||||
|
||||
"""The list of tweets"""
|
||||
nodes: [Tweet]
|
||||
}
|
||||
|
||||
enum TweetsSortOption {
|
||||
LIKES
|
||||
RETWEETS
|
||||
}
|
||||
|
||||
"""
|
||||
Mutations for the upload flow
|
||||
|
||||
|
|
@ -547,7 +471,6 @@ type UploadMutations {
|
|||
the collection.
|
||||
"""
|
||||
get_upload_urls(files: [UploadUrlRequest!]!): [UploadUrl]
|
||||
|
||||
"""Notify the server that the user is done uploading."""
|
||||
report_skin_uploaded(id: String!, md5: String!): Boolean
|
||||
}
|
||||
|
|
@ -562,12 +485,6 @@ type UploadUrl {
|
|||
url: String
|
||||
}
|
||||
|
||||
"""Input object used for a user to request an UploadUrl"""
|
||||
input UploadUrlRequest {
|
||||
filename: String!
|
||||
md5: String!
|
||||
}
|
||||
|
||||
type User {
|
||||
username: String
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -29,6 +29,7 @@
|
|||
"express-sitemap-xml": "^2.0.0",
|
||||
"fast-xml-parser": "^4.2.2",
|
||||
"graphql": "16.6.0",
|
||||
"grats": "^0.0.11",
|
||||
"imagemin": "^7.0.0",
|
||||
"imagemin-optipng": "^7.0.0",
|
||||
"knex": "^0.21.1",
|
||||
|
|
@ -64,9 +65,9 @@
|
|||
"@types/supertest": "^2.0.10",
|
||||
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
||||
"@typescript-eslint/parser": "^5.15.0",
|
||||
"grats": "^0.0.22",
|
||||
"supertest": "^6.0.1",
|
||||
"typescript": "^3.8.3",
|
||||
"grats": "0.0.0-main-d4d43d4b"
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"graphql": "16.6.0"
|
||||
|
|
|
|||
15
yarn.lock
15
yarn.lock
|
|
@ -14765,20 +14765,15 @@ graphql-ws@^5.4.1:
|
|||
resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.11.1.tgz"
|
||||
integrity sha512-AlOO/Gt0fXuSHXe/Weo6o3rIQVnH5MW7ophzeYzL+vYNlkf0NbWRJ6IIFgtSLcv9JpTlQdxSpB3t0SnM47/BHA==
|
||||
|
||||
graphql@16.6.0:
|
||||
graphql@16.6.0, graphql@^16.6.0:
|
||||
version "16.6.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.6.0.tgz#c2dcffa4649db149f6282af726c8c83f1c7c5fdb"
|
||||
integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==
|
||||
|
||||
graphql@^16.6.0:
|
||||
version "16.8.1"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07"
|
||||
integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==
|
||||
|
||||
grats@0.0.0-main-d4d43d4b:
|
||||
version "0.0.0-main-d4d43d4b"
|
||||
resolved "https://registry.yarnpkg.com/grats/-/grats-0.0.0-main-d4d43d4b.tgz#5e81c5558568251b9e026aeb77782198a8647a6d"
|
||||
integrity sha512-SvxKQ5VV5W4tcxPHWutt5JSt2MUFbeWydKuiloPIIhzibiMMwNdCoPIO1E8YnQN//tCEsRdFqeV29zu/tENQeQ==
|
||||
grats@^0.0.22:
|
||||
version "0.0.22"
|
||||
resolved "https://registry.yarnpkg.com/grats/-/grats-0.0.22.tgz#a391122dbd0c0de84ee3f2cadca4bbbe11fa129c"
|
||||
integrity sha512-CqP0/M1GIa9l24o+fkazIzbAQrtDGaLWFV731M9/q0j7ehL5/hjF6PqvxkNYMefA20R73ygtxyr7XW3ebSH0Zw==
|
||||
dependencies:
|
||||
commander "^10.0.0"
|
||||
graphql "^16.6.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue