Merge pull request #2 from Accords-Library/develop
Library Items can now be of Group type instead of relying on the Other type
This commit is contained in:
commit
4c2ca5e1b2
|
@ -82,6 +82,7 @@ query getWebsiteInterface($language_code: String) {
|
||||||
order_by
|
order_by
|
||||||
group_by
|
group_by
|
||||||
select_option_sidebar
|
select_option_sidebar
|
||||||
|
group
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,6 +149,7 @@ query getLibraryItemsPreview($language_code: String) {
|
||||||
subtitle
|
subtitle
|
||||||
slug
|
slug
|
||||||
root_item
|
root_item
|
||||||
|
primary
|
||||||
thumbnail {
|
thumbnail {
|
||||||
data {
|
data {
|
||||||
attributes {
|
attributes {
|
||||||
|
@ -230,7 +232,7 @@ query getLibraryItemsPreview($language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on ComponentMetadataOther {
|
... on ComponentMetadataGroup {
|
||||||
subtype {
|
subtype {
|
||||||
data {
|
data {
|
||||||
attributes {
|
attributes {
|
||||||
|
@ -243,6 +245,18 @@ query getLibraryItemsPreview($language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
subitems_type {
|
||||||
|
data {
|
||||||
|
attributes {
|
||||||
|
slug
|
||||||
|
titles(
|
||||||
|
filters: { language: { code: { eq: $language_code } } }
|
||||||
|
) {
|
||||||
|
title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +422,7 @@ query getLibraryItem($slug: String, $language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on ComponentMetadataOther {
|
... on ComponentMetadataGroup {
|
||||||
subtype {
|
subtype {
|
||||||
data {
|
data {
|
||||||
attributes {
|
attributes {
|
||||||
|
@ -421,6 +435,18 @@ query getLibraryItem($slug: String, $language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
subitems_type {
|
||||||
|
data {
|
||||||
|
attributes {
|
||||||
|
slug
|
||||||
|
titles(
|
||||||
|
filters: { language: { code: { eq: $language_code } } }
|
||||||
|
) {
|
||||||
|
title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
subitem_of {
|
subitem_of {
|
||||||
|
@ -528,7 +554,7 @@ query getLibraryItem($slug: String, $language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on ComponentMetadataOther {
|
... on ComponentMetadataGroup {
|
||||||
subtype {
|
subtype {
|
||||||
data {
|
data {
|
||||||
attributes {
|
attributes {
|
||||||
|
@ -543,6 +569,20 @@ query getLibraryItem($slug: String, $language_code: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
subitems_type {
|
||||||
|
data {
|
||||||
|
attributes {
|
||||||
|
slug
|
||||||
|
titles(
|
||||||
|
filters: {
|
||||||
|
language: { code: { eq: $language_code } }
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,7 @@ export type GetWebsiteInterfaceQuery = {
|
||||||
order_by: string;
|
order_by: string;
|
||||||
group_by: string;
|
group_by: string;
|
||||||
select_option_sidebar: string;
|
select_option_sidebar: string;
|
||||||
|
group: string;
|
||||||
};
|
};
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
@ -252,6 +253,7 @@ export type GetLibraryItemsPreviewQuery = {
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
root_item: boolean;
|
root_item: boolean;
|
||||||
|
primary: boolean;
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
__typename: "UploadFileEntityResponse";
|
__typename: "UploadFileEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
|
@ -290,13 +292,13 @@ export type GetLibraryItemsPreviewQuery = {
|
||||||
};
|
};
|
||||||
metadata: Array<
|
metadata: Array<
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataBooks";
|
__typename: "ComponentMetadataAudio";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "TextualSubtypeEntityResponse";
|
__typename: "AudioSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "TextualSubtypeEntity";
|
__typename: "AudioSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "TextualSubtype";
|
__typename: "AudioSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -307,13 +309,13 @@ export type GetLibraryItemsPreviewQuery = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataVideo";
|
__typename: "ComponentMetadataBooks";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "VideoSubtypeEntityResponse";
|
__typename: "TextualSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "VideoSubtypeEntity";
|
__typename: "TextualSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "VideoSubtype";
|
__typename: "TextualSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -338,13 +340,27 @@ export type GetLibraryItemsPreviewQuery = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataAudio";
|
__typename: "ComponentMetadataGroup";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "AudioSubtypeEntityResponse";
|
__typename: "GroupSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "AudioSubtypeEntity";
|
__typename: "GroupSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "AudioSubtype";
|
__typename: "GroupSubtype";
|
||||||
|
slug: string;
|
||||||
|
titles: Array<{
|
||||||
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
title: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
subitems_type: {
|
||||||
|
__typename: "MetadataTypeEntityResponse";
|
||||||
|
data: {
|
||||||
|
__typename: "MetadataTypeEntity";
|
||||||
|
attributes: {
|
||||||
|
__typename: "MetadataType";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -354,14 +370,15 @@ export type GetLibraryItemsPreviewQuery = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
| { __typename: "ComponentMetadataOther" }
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataOther";
|
__typename: "ComponentMetadataVideo";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "OtherSubtypeEntityResponse";
|
__typename: "VideoSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "OtherSubtypeEntity";
|
__typename: "VideoSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "OtherSubtype";
|
__typename: "VideoSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -476,6 +493,23 @@ export type GetLibraryItemQuery = {
|
||||||
description: string;
|
description: string;
|
||||||
}>;
|
}>;
|
||||||
metadata: Array<
|
metadata: Array<
|
||||||
|
| {
|
||||||
|
__typename: "ComponentMetadataAudio";
|
||||||
|
subtype: {
|
||||||
|
__typename: "AudioSubtypeEntityResponse";
|
||||||
|
data: {
|
||||||
|
__typename: "AudioSubtypeEntity";
|
||||||
|
attributes: {
|
||||||
|
__typename: "AudioSubtype";
|
||||||
|
slug: string;
|
||||||
|
titles: Array<{
|
||||||
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
title: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataBooks";
|
__typename: "ComponentMetadataBooks";
|
||||||
binding_type: Enum_Componentmetadatabooks_Binding_Type;
|
binding_type: Enum_Componentmetadatabooks_Binding_Type;
|
||||||
|
@ -507,22 +541,6 @@ export type GetLibraryItemQuery = {
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
|
||||||
__typename: "ComponentMetadataVideo";
|
|
||||||
subtype: {
|
|
||||||
__typename: "VideoSubtypeEntityResponse";
|
|
||||||
data: {
|
|
||||||
__typename: "VideoSubtypeEntity";
|
|
||||||
attributes: {
|
|
||||||
__typename: "VideoSubtype";
|
|
||||||
titles: Array<{
|
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
|
||||||
title: string;
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataGame";
|
__typename: "ComponentMetadataGame";
|
||||||
platforms: {
|
platforms: {
|
||||||
|
@ -571,13 +589,27 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataAudio";
|
__typename: "ComponentMetadataGroup";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "AudioSubtypeEntityResponse";
|
__typename: "GroupSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "AudioSubtypeEntity";
|
__typename: "GroupSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "AudioSubtype";
|
__typename: "GroupSubtype";
|
||||||
|
slug: string;
|
||||||
|
titles: Array<{
|
||||||
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
title: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
subitems_type: {
|
||||||
|
__typename: "MetadataTypeEntityResponse";
|
||||||
|
data: {
|
||||||
|
__typename: "MetadataTypeEntity";
|
||||||
|
attributes: {
|
||||||
|
__typename: "MetadataType";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -587,15 +619,15 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
| { __typename: "ComponentMetadataOther" }
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataOther";
|
__typename: "ComponentMetadataVideo";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "OtherSubtypeEntityResponse";
|
__typename: "VideoSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "OtherSubtypeEntity";
|
__typename: "VideoSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "OtherSubtype";
|
__typename: "VideoSubtype";
|
||||||
slug: string;
|
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -667,13 +699,13 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
metadata: Array<
|
metadata: Array<
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataBooks";
|
__typename: "ComponentMetadataAudio";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "TextualSubtypeEntityResponse";
|
__typename: "AudioSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "TextualSubtypeEntity";
|
__typename: "AudioSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "TextualSubtype";
|
__typename: "AudioSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -684,13 +716,13 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataVideo";
|
__typename: "ComponentMetadataBooks";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "VideoSubtypeEntityResponse";
|
__typename: "TextualSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "VideoSubtypeEntity";
|
__typename: "TextualSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "VideoSubtype";
|
__typename: "TextualSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -715,13 +747,27 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataAudio";
|
__typename: "ComponentMetadataGroup";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "AudioSubtypeEntityResponse";
|
__typename: "GroupSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "AudioSubtypeEntity";
|
__typename: "GroupSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "AudioSubtype";
|
__typename: "GroupSubtype";
|
||||||
|
slug: string;
|
||||||
|
titles: Array<{
|
||||||
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
title: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
subitems_type: {
|
||||||
|
__typename: "MetadataTypeEntityResponse";
|
||||||
|
data: {
|
||||||
|
__typename: "MetadataTypeEntity";
|
||||||
|
attributes: {
|
||||||
|
__typename: "MetadataType";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
@ -731,14 +777,15 @@ export type GetLibraryItemQuery = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
| { __typename: "ComponentMetadataOther" }
|
||||||
| {
|
| {
|
||||||
__typename: "ComponentMetadataOther";
|
__typename: "ComponentMetadataVideo";
|
||||||
subtype: {
|
subtype: {
|
||||||
__typename: "OtherSubtypeEntityResponse";
|
__typename: "VideoSubtypeEntityResponse";
|
||||||
data: {
|
data: {
|
||||||
__typename: "OtherSubtypeEntity";
|
__typename: "VideoSubtypeEntity";
|
||||||
attributes: {
|
attributes: {
|
||||||
__typename: "OtherSubtype";
|
__typename: "VideoSubtype";
|
||||||
slug: string;
|
slug: string;
|
||||||
titles: Array<{
|
titles: Array<{
|
||||||
__typename: "ComponentTranslationsSimpleTitle";
|
__typename: "ComponentTranslationsSimpleTitle";
|
||||||
|
|
|
@ -103,7 +103,6 @@ export async function getContentsSlugs(
|
||||||
return await graphQL(query, JSON.stringify(variables));
|
return await graphQL(query, JSON.stringify(variables));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export async function getContents(
|
export async function getContents(
|
||||||
variables: GetContentsQueryVariables
|
variables: GetContentsQueryVariables
|
||||||
): Promise<GetContentsQuery> {
|
): Promise<GetContentsQuery> {
|
||||||
|
|
|
@ -509,6 +509,12 @@ type ComponentMetadataGame {
|
||||||
): LanguageRelationResponseCollection
|
): LanguageRelationResponseCollection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ComponentMetadataGroup {
|
||||||
|
id: ID!
|
||||||
|
subtype: GroupSubtypeEntityResponse
|
||||||
|
subitems_type: MetadataTypeEntityResponse
|
||||||
|
}
|
||||||
|
|
||||||
type ComponentMetadataMerch {
|
type ComponentMetadataMerch {
|
||||||
id: ID!
|
id: ID!
|
||||||
merch_item: MerchItemEntityResponse
|
merch_item: MerchItemEntityResponse
|
||||||
|
@ -516,7 +522,6 @@ type ComponentMetadataMerch {
|
||||||
|
|
||||||
type ComponentMetadataOther {
|
type ComponentMetadataOther {
|
||||||
id: ID!
|
id: ID!
|
||||||
subtype: OtherSubtypeEntityResponse
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ComponentMetadataVideo {
|
type ComponentMetadataVideo {
|
||||||
|
@ -1801,6 +1806,46 @@ type GlossaryItemTypeEntityResponseCollection {
|
||||||
meta: ResponseCollectionMeta!
|
meta: ResponseCollectionMeta!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input GroupSubtypeFiltersInput {
|
||||||
|
id: IDFilterInput
|
||||||
|
slug: StringFilterInput
|
||||||
|
createdAt: DateTimeFilterInput
|
||||||
|
updatedAt: DateTimeFilterInput
|
||||||
|
and: [GroupSubtypeFiltersInput]
|
||||||
|
or: [GroupSubtypeFiltersInput]
|
||||||
|
not: GroupSubtypeFiltersInput
|
||||||
|
}
|
||||||
|
|
||||||
|
input GroupSubtypeInput {
|
||||||
|
slug: String
|
||||||
|
titles: [ComponentTranslationsSimpleTitleInput]
|
||||||
|
}
|
||||||
|
|
||||||
|
type GroupSubtype {
|
||||||
|
slug: String!
|
||||||
|
titles(
|
||||||
|
filters: ComponentTranslationsSimpleTitleFiltersInput
|
||||||
|
pagination: PaginationArg = {}
|
||||||
|
sort: [String] = []
|
||||||
|
): [ComponentTranslationsSimpleTitle]
|
||||||
|
createdAt: DateTime
|
||||||
|
updatedAt: DateTime
|
||||||
|
}
|
||||||
|
|
||||||
|
type GroupSubtypeEntity {
|
||||||
|
id: ID
|
||||||
|
attributes: GroupSubtype
|
||||||
|
}
|
||||||
|
|
||||||
|
type GroupSubtypeEntityResponse {
|
||||||
|
data: GroupSubtypeEntity
|
||||||
|
}
|
||||||
|
|
||||||
|
type GroupSubtypeEntityResponseCollection {
|
||||||
|
data: [GroupSubtypeEntity!]!
|
||||||
|
meta: ResponseCollectionMeta!
|
||||||
|
}
|
||||||
|
|
||||||
input LanguageFiltersInput {
|
input LanguageFiltersInput {
|
||||||
id: IDFilterInput
|
id: IDFilterInput
|
||||||
name: StringFilterInput
|
name: StringFilterInput
|
||||||
|
@ -1846,11 +1891,12 @@ type LanguageRelationResponseCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
union LibraryItemMetadataDynamicZone =
|
union LibraryItemMetadataDynamicZone =
|
||||||
ComponentMetadataBooks
|
ComponentMetadataAudio
|
||||||
| ComponentMetadataVideo
|
| ComponentMetadataBooks
|
||||||
| ComponentMetadataGame
|
| ComponentMetadataGame
|
||||||
| ComponentMetadataAudio
|
| ComponentMetadataGroup
|
||||||
| ComponentMetadataOther
|
| ComponentMetadataOther
|
||||||
|
| ComponentMetadataVideo
|
||||||
| Error
|
| Error
|
||||||
|
|
||||||
scalar LibraryItemMetadataDynamicZoneInput
|
scalar LibraryItemMetadataDynamicZoneInput
|
||||||
|
@ -2013,6 +2059,46 @@ type MerchItemRelationResponseCollection {
|
||||||
data: [MerchItemEntity!]!
|
data: [MerchItemEntity!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input MetadataTypeFiltersInput {
|
||||||
|
id: IDFilterInput
|
||||||
|
slug: StringFilterInput
|
||||||
|
createdAt: DateTimeFilterInput
|
||||||
|
updatedAt: DateTimeFilterInput
|
||||||
|
and: [MetadataTypeFiltersInput]
|
||||||
|
or: [MetadataTypeFiltersInput]
|
||||||
|
not: MetadataTypeFiltersInput
|
||||||
|
}
|
||||||
|
|
||||||
|
input MetadataTypeInput {
|
||||||
|
slug: String
|
||||||
|
titles: [ComponentTranslationsSimpleTitleInput]
|
||||||
|
}
|
||||||
|
|
||||||
|
type MetadataType {
|
||||||
|
slug: String!
|
||||||
|
titles(
|
||||||
|
filters: ComponentTranslationsSimpleTitleFiltersInput
|
||||||
|
pagination: PaginationArg = {}
|
||||||
|
sort: [String] = []
|
||||||
|
): [ComponentTranslationsSimpleTitle]
|
||||||
|
createdAt: DateTime
|
||||||
|
updatedAt: DateTime
|
||||||
|
}
|
||||||
|
|
||||||
|
type MetadataTypeEntity {
|
||||||
|
id: ID
|
||||||
|
attributes: MetadataType
|
||||||
|
}
|
||||||
|
|
||||||
|
type MetadataTypeEntityResponse {
|
||||||
|
data: MetadataTypeEntity
|
||||||
|
}
|
||||||
|
|
||||||
|
type MetadataTypeEntityResponseCollection {
|
||||||
|
data: [MetadataTypeEntity!]!
|
||||||
|
meta: ResponseCollectionMeta!
|
||||||
|
}
|
||||||
|
|
||||||
input OtherSubtypeFiltersInput {
|
input OtherSubtypeFiltersInput {
|
||||||
id: IDFilterInput
|
id: IDFilterInput
|
||||||
slug: StringFilterInput
|
slug: StringFilterInput
|
||||||
|
@ -2490,72 +2576,85 @@ type WeaponStoryTypeEntityResponseCollection {
|
||||||
|
|
||||||
input WebsiteInterfaceFiltersInput {
|
input WebsiteInterfaceFiltersInput {
|
||||||
id: IDFilterInput
|
id: IDFilterInput
|
||||||
language: LanguageFiltersInput
|
library: StringFilterInput
|
||||||
main_library: StringFilterInput
|
contents: StringFilterInput
|
||||||
main_library_description: StringFilterInput
|
wiki: StringFilterInput
|
||||||
main_news: StringFilterInput
|
chronicles: StringFilterInput
|
||||||
main_merch: StringFilterInput
|
library_short_description: StringFilterInput
|
||||||
main_gallery: StringFilterInput
|
contents_short_description: StringFilterInput
|
||||||
main_archives: StringFilterInput
|
wiki_short_description: StringFilterInput
|
||||||
main_about_us: StringFilterInput
|
chronicles_short_description: StringFilterInput
|
||||||
main_licensing: StringFilterInput
|
news: StringFilterInput
|
||||||
main_copyright: StringFilterInput
|
merch: StringFilterInput
|
||||||
|
gallery: StringFilterInput
|
||||||
|
archives: StringFilterInput
|
||||||
|
about_us: StringFilterInput
|
||||||
|
licensing_notice: StringFilterInput
|
||||||
|
copyright_notice: StringFilterInput
|
||||||
|
contents_description: StringFilterInput
|
||||||
|
type: StringFilterInput
|
||||||
|
category: StringFilterInput
|
||||||
|
categories: StringFilterInput
|
||||||
|
size: StringFilterInput
|
||||||
|
release_date: StringFilterInput
|
||||||
|
release_year: StringFilterInput
|
||||||
|
details: StringFilterInput
|
||||||
|
price: StringFilterInput
|
||||||
|
width: StringFilterInput
|
||||||
|
height: StringFilterInput
|
||||||
|
thickness: StringFilterInput
|
||||||
|
subitem: StringFilterInput
|
||||||
|
subitems: StringFilterInput
|
||||||
|
subitem_of: StringFilterInput
|
||||||
|
variant: StringFilterInput
|
||||||
|
variants: StringFilterInput
|
||||||
|
variant_of: StringFilterInput
|
||||||
|
summary: StringFilterInput
|
||||||
|
audio: StringFilterInput
|
||||||
|
video: StringFilterInput
|
||||||
|
textual: StringFilterInput
|
||||||
|
game: StringFilterInput
|
||||||
|
other: StringFilterInput
|
||||||
|
return_to: StringFilterInput
|
||||||
|
left_to_right: StringFilterInput
|
||||||
|
right_to_left: StringFilterInput
|
||||||
|
page: StringFilterInput
|
||||||
|
pages: StringFilterInput
|
||||||
|
page_order: StringFilterInput
|
||||||
|
binding: StringFilterInput
|
||||||
|
type_information: StringFilterInput
|
||||||
|
front_matter: StringFilterInput
|
||||||
|
back_matter: StringFilterInput
|
||||||
|
open_content: StringFilterInput
|
||||||
|
read_content: StringFilterInput
|
||||||
|
watch_content: StringFilterInput
|
||||||
|
listen_content: StringFilterInput
|
||||||
|
view_scans: StringFilterInput
|
||||||
|
paperback: StringFilterInput
|
||||||
|
hardcover: StringFilterInput
|
||||||
|
ui_language: LanguageFiltersInput
|
||||||
|
languages: StringFilterInput
|
||||||
|
select_language: StringFilterInput
|
||||||
|
language: StringFilterInput
|
||||||
library_description: StringFilterInput
|
library_description: StringFilterInput
|
||||||
library_item_summary: StringFilterInput
|
|
||||||
library_item_gallery: StringFilterInput
|
|
||||||
library_item_details: StringFilterInput
|
|
||||||
library_item_subitems: StringFilterInput
|
|
||||||
library_item_variants: StringFilterInput
|
|
||||||
library_item_content: StringFilterInput
|
|
||||||
global_return_label: StringFilterInput
|
|
||||||
global_subitem_of: StringFilterInput
|
|
||||||
global_type: StringFilterInput
|
|
||||||
global_width: StringFilterInput
|
|
||||||
global_height: StringFilterInput
|
|
||||||
global_thickness: StringFilterInput
|
|
||||||
global_binding: StringFilterInput
|
|
||||||
global_language: StringFilterInput
|
|
||||||
global_languages: StringFilterInput
|
|
||||||
global_page: StringFilterInput
|
|
||||||
global_pages: StringFilterInput
|
|
||||||
global_page_order: StringFilterInput
|
|
||||||
global_release_date: StringFilterInput
|
|
||||||
global_price: StringFilterInput
|
|
||||||
library_item_physical_size: StringFilterInput
|
|
||||||
library_item_type_information: StringFilterInput
|
|
||||||
library_item_front_matter: StringFilterInput
|
|
||||||
library_item_back_matter: StringFilterInput
|
|
||||||
library_item_type_textual: StringFilterInput
|
|
||||||
library_item_type_audio: StringFilterInput
|
|
||||||
library_item_type_game: StringFilterInput
|
|
||||||
library_item_type_video: StringFilterInput
|
|
||||||
library_item_type_other: StringFilterInput
|
|
||||||
library_item_open_content: StringFilterInput
|
|
||||||
library_item_view_scans: StringFilterInput
|
|
||||||
content_read_content: StringFilterInput
|
|
||||||
content_watch_content: StringFilterInput
|
|
||||||
content_listen_content: StringFilterInput
|
|
||||||
global_category: StringFilterInput
|
|
||||||
global_categories: StringFilterInput
|
|
||||||
global_paperback: StringFilterInput
|
|
||||||
global_hardcover: StringFilterInput
|
|
||||||
global_left_to_right: StringFilterInput
|
|
||||||
global_right_to_left: StringFilterInput
|
|
||||||
main_wiki: StringFilterInput
|
|
||||||
main_wiki_description: StringFilterInput
|
|
||||||
main_chronicles: StringFilterInput
|
|
||||||
main_chronicles_description: StringFilterInput
|
|
||||||
library_items: StringFilterInput
|
|
||||||
library_items_description: StringFilterInput
|
|
||||||
library_content: StringFilterInput
|
|
||||||
library_content_description: StringFilterInput
|
|
||||||
wiki_description: StringFilterInput
|
wiki_description: StringFilterInput
|
||||||
news_description: StringFilterInput
|
|
||||||
chronicles_description: StringFilterInput
|
chronicles_description: StringFilterInput
|
||||||
|
news_description: StringFilterInput
|
||||||
|
merch_description: StringFilterInput
|
||||||
gallery_description: StringFilterInput
|
gallery_description: StringFilterInput
|
||||||
archives_description: StringFilterInput
|
archives_description: StringFilterInput
|
||||||
about_us_description: StringFilterInput
|
about_us_description: StringFilterInput
|
||||||
merch_description: StringFilterInput
|
page_not_found: StringFilterInput
|
||||||
|
default_description: StringFilterInput
|
||||||
|
name: StringFilterInput
|
||||||
|
show_subitems: StringFilterInput
|
||||||
|
show_primary_items: StringFilterInput
|
||||||
|
show_secondary_items: StringFilterInput
|
||||||
|
no_type: StringFilterInput
|
||||||
|
no_year: StringFilterInput
|
||||||
|
order_by: StringFilterInput
|
||||||
|
group_by: StringFilterInput
|
||||||
|
select_option_sidebar: StringFilterInput
|
||||||
createdAt: DateTimeFilterInput
|
createdAt: DateTimeFilterInput
|
||||||
updatedAt: DateTimeFilterInput
|
updatedAt: DateTimeFilterInput
|
||||||
and: [WebsiteInterfaceFiltersInput]
|
and: [WebsiteInterfaceFiltersInput]
|
||||||
|
@ -2564,141 +2663,167 @@ input WebsiteInterfaceFiltersInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
input WebsiteInterfaceInput {
|
input WebsiteInterfaceInput {
|
||||||
language: ID
|
library: String
|
||||||
main_library: String
|
contents: String
|
||||||
main_library_description: String
|
wiki: String
|
||||||
main_news: String
|
chronicles: String
|
||||||
main_merch: String
|
library_short_description: String
|
||||||
main_gallery: String
|
contents_short_description: String
|
||||||
main_archives: String
|
wiki_short_description: String
|
||||||
main_about_us: String
|
chronicles_short_description: String
|
||||||
main_licensing: String
|
news: String
|
||||||
main_copyright: String
|
merch: String
|
||||||
|
gallery: String
|
||||||
|
archives: String
|
||||||
|
about_us: String
|
||||||
|
licensing_notice: String
|
||||||
|
copyright_notice: String
|
||||||
|
contents_description: String
|
||||||
|
type: String
|
||||||
|
category: String
|
||||||
|
categories: String
|
||||||
|
size: String
|
||||||
|
release_date: String
|
||||||
|
release_year: String
|
||||||
|
details: String
|
||||||
|
price: String
|
||||||
|
width: String
|
||||||
|
height: String
|
||||||
|
thickness: String
|
||||||
|
subitem: String
|
||||||
|
subitems: String
|
||||||
|
subitem_of: String
|
||||||
|
variant: String
|
||||||
|
variants: String
|
||||||
|
variant_of: String
|
||||||
|
summary: String
|
||||||
|
audio: String
|
||||||
|
video: String
|
||||||
|
textual: String
|
||||||
|
game: String
|
||||||
|
other: String
|
||||||
|
return_to: String
|
||||||
|
left_to_right: String
|
||||||
|
right_to_left: String
|
||||||
|
page: String
|
||||||
|
pages: String
|
||||||
|
page_order: String
|
||||||
|
binding: String
|
||||||
|
type_information: String
|
||||||
|
front_matter: String
|
||||||
|
back_matter: String
|
||||||
|
open_content: String
|
||||||
|
read_content: String
|
||||||
|
watch_content: String
|
||||||
|
listen_content: String
|
||||||
|
view_scans: String
|
||||||
|
paperback: String
|
||||||
|
hardcover: String
|
||||||
|
ui_language: ID
|
||||||
|
languages: String
|
||||||
|
select_language: String
|
||||||
|
language: String
|
||||||
library_description: String
|
library_description: String
|
||||||
library_item_summary: String
|
|
||||||
library_item_gallery: String
|
|
||||||
library_item_details: String
|
|
||||||
library_item_subitems: String
|
|
||||||
library_item_variants: String
|
|
||||||
library_item_content: String
|
|
||||||
global_return_label: String
|
|
||||||
global_subitem_of: String
|
|
||||||
global_type: String
|
|
||||||
global_width: String
|
|
||||||
global_height: String
|
|
||||||
global_thickness: String
|
|
||||||
global_binding: String
|
|
||||||
global_language: String
|
|
||||||
global_languages: String
|
|
||||||
global_page: String
|
|
||||||
global_pages: String
|
|
||||||
global_page_order: String
|
|
||||||
global_release_date: String
|
|
||||||
global_price: String
|
|
||||||
library_item_physical_size: String
|
|
||||||
library_item_type_information: String
|
|
||||||
library_item_front_matter: String
|
|
||||||
library_item_back_matter: String
|
|
||||||
library_item_type_textual: String
|
|
||||||
library_item_type_audio: String
|
|
||||||
library_item_type_game: String
|
|
||||||
library_item_type_video: String
|
|
||||||
library_item_type_other: String
|
|
||||||
library_item_open_content: String
|
|
||||||
library_item_view_scans: String
|
|
||||||
content_read_content: String
|
|
||||||
content_watch_content: String
|
|
||||||
content_listen_content: String
|
|
||||||
global_category: String
|
|
||||||
global_categories: String
|
|
||||||
global_paperback: String
|
|
||||||
global_hardcover: String
|
|
||||||
global_left_to_right: String
|
|
||||||
global_right_to_left: String
|
|
||||||
main_wiki: String
|
|
||||||
main_wiki_description: String
|
|
||||||
main_chronicles: String
|
|
||||||
main_chronicles_description: String
|
|
||||||
library_items: String
|
|
||||||
library_items_description: String
|
|
||||||
library_content: String
|
|
||||||
library_content_description: String
|
|
||||||
wiki_description: String
|
wiki_description: String
|
||||||
news_description: String
|
|
||||||
chronicles_description: String
|
chronicles_description: String
|
||||||
|
news_description: String
|
||||||
|
merch_description: String
|
||||||
gallery_description: String
|
gallery_description: String
|
||||||
archives_description: String
|
archives_description: String
|
||||||
about_us_description: String
|
about_us_description: String
|
||||||
merch_description: String
|
page_not_found: String
|
||||||
|
default_description: String
|
||||||
|
name: String
|
||||||
|
show_subitems: String
|
||||||
|
show_primary_items: String
|
||||||
|
show_secondary_items: String
|
||||||
|
no_type: String
|
||||||
|
no_year: String
|
||||||
|
order_by: String
|
||||||
|
group_by: String
|
||||||
|
select_option_sidebar: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebsiteInterface {
|
type WebsiteInterface {
|
||||||
language: LanguageEntityResponse
|
library: String
|
||||||
main_library: String
|
contents: String
|
||||||
main_library_description: String
|
wiki: String
|
||||||
main_news: String
|
chronicles: String
|
||||||
main_merch: String
|
library_short_description: String
|
||||||
main_gallery: String
|
contents_short_description: String
|
||||||
main_archives: String
|
wiki_short_description: String
|
||||||
main_about_us: String
|
chronicles_short_description: String
|
||||||
main_licensing: String
|
news: String
|
||||||
main_copyright: String
|
merch: String
|
||||||
|
gallery: String
|
||||||
|
archives: String
|
||||||
|
about_us: String
|
||||||
|
licensing_notice: String
|
||||||
|
copyright_notice: String
|
||||||
|
contents_description: String
|
||||||
|
type: String
|
||||||
|
category: String
|
||||||
|
categories: String
|
||||||
|
size: String
|
||||||
|
release_date: String
|
||||||
|
release_year: String
|
||||||
|
details: String
|
||||||
|
price: String
|
||||||
|
width: String
|
||||||
|
height: String
|
||||||
|
thickness: String
|
||||||
|
subitem: String
|
||||||
|
subitems: String
|
||||||
|
subitem_of: String
|
||||||
|
variant: String
|
||||||
|
variants: String
|
||||||
|
variant_of: String
|
||||||
|
summary: String
|
||||||
|
audio: String
|
||||||
|
video: String
|
||||||
|
textual: String
|
||||||
|
game: String
|
||||||
|
other: String
|
||||||
|
return_to: String
|
||||||
|
left_to_right: String
|
||||||
|
right_to_left: String
|
||||||
|
page: String
|
||||||
|
pages: String
|
||||||
|
page_order: String
|
||||||
|
binding: String
|
||||||
|
type_information: String
|
||||||
|
front_matter: String
|
||||||
|
back_matter: String
|
||||||
|
open_content: String
|
||||||
|
read_content: String
|
||||||
|
watch_content: String
|
||||||
|
listen_content: String
|
||||||
|
view_scans: String
|
||||||
|
paperback: String
|
||||||
|
hardcover: String
|
||||||
|
ui_language: LanguageEntityResponse
|
||||||
|
languages: String
|
||||||
|
select_language: String
|
||||||
|
language: String
|
||||||
library_description: String
|
library_description: String
|
||||||
library_item_summary: String
|
|
||||||
library_item_gallery: String
|
|
||||||
library_item_details: String
|
|
||||||
library_item_subitems: String
|
|
||||||
library_item_variants: String
|
|
||||||
library_item_content: String
|
|
||||||
global_return_label: String
|
|
||||||
global_subitem_of: String
|
|
||||||
global_type: String
|
|
||||||
global_width: String
|
|
||||||
global_height: String
|
|
||||||
global_thickness: String
|
|
||||||
global_binding: String
|
|
||||||
global_language: String
|
|
||||||
global_languages: String
|
|
||||||
global_page: String
|
|
||||||
global_pages: String
|
|
||||||
global_page_order: String
|
|
||||||
global_release_date: String
|
|
||||||
global_price: String
|
|
||||||
library_item_physical_size: String
|
|
||||||
library_item_type_information: String
|
|
||||||
library_item_front_matter: String
|
|
||||||
library_item_back_matter: String
|
|
||||||
library_item_type_textual: String
|
|
||||||
library_item_type_audio: String
|
|
||||||
library_item_type_game: String
|
|
||||||
library_item_type_video: String
|
|
||||||
library_item_type_other: String
|
|
||||||
library_item_open_content: String
|
|
||||||
library_item_view_scans: String
|
|
||||||
content_read_content: String
|
|
||||||
content_watch_content: String
|
|
||||||
content_listen_content: String
|
|
||||||
global_category: String
|
|
||||||
global_categories: String
|
|
||||||
global_paperback: String
|
|
||||||
global_hardcover: String
|
|
||||||
global_left_to_right: String
|
|
||||||
global_right_to_left: String
|
|
||||||
main_wiki: String
|
|
||||||
main_wiki_description: String
|
|
||||||
main_chronicles: String
|
|
||||||
main_chronicles_description: String
|
|
||||||
library_items: String
|
|
||||||
library_items_description: String
|
|
||||||
library_content: String
|
|
||||||
library_content_description: String
|
|
||||||
wiki_description: String
|
wiki_description: String
|
||||||
news_description: String
|
|
||||||
chronicles_description: String
|
chronicles_description: String
|
||||||
|
news_description: String
|
||||||
|
merch_description: String
|
||||||
gallery_description: String
|
gallery_description: String
|
||||||
archives_description: String
|
archives_description: String
|
||||||
about_us_description: String
|
about_us_description: String
|
||||||
merch_description: String
|
page_not_found: String
|
||||||
|
default_description: String
|
||||||
|
name: String
|
||||||
|
show_subitems: String
|
||||||
|
show_primary_items: String
|
||||||
|
show_secondary_items: String
|
||||||
|
no_type: String
|
||||||
|
no_year: String
|
||||||
|
order_by: String
|
||||||
|
group_by: String
|
||||||
|
select_option_sidebar: String
|
||||||
createdAt: DateTime
|
createdAt: DateTime
|
||||||
updatedAt: DateTime
|
updatedAt: DateTime
|
||||||
}
|
}
|
||||||
|
@ -2819,6 +2944,7 @@ union GenericMorph =
|
||||||
| ComponentMetadataAudio
|
| ComponentMetadataAudio
|
||||||
| ComponentMetadataBooks
|
| ComponentMetadataBooks
|
||||||
| ComponentMetadataGame
|
| ComponentMetadataGame
|
||||||
|
| ComponentMetadataGroup
|
||||||
| ComponentMetadataMerch
|
| ComponentMetadataMerch
|
||||||
| ComponentMetadataOther
|
| ComponentMetadataOther
|
||||||
| ComponentMetadataVideo
|
| ComponentMetadataVideo
|
||||||
|
@ -2866,9 +2992,11 @@ union GenericMorph =
|
||||||
| GamePlatform
|
| GamePlatform
|
||||||
| GlossaryItem
|
| GlossaryItem
|
||||||
| GlossaryItemType
|
| GlossaryItemType
|
||||||
|
| GroupSubtype
|
||||||
| Language
|
| Language
|
||||||
| LibraryItem
|
| LibraryItem
|
||||||
| MerchItem
|
| MerchItem
|
||||||
|
| MetadataType
|
||||||
| OtherSubtype
|
| OtherSubtype
|
||||||
| Post
|
| Post
|
||||||
| RangedContent
|
| RangedContent
|
||||||
|
@ -2963,6 +3091,12 @@ type Query {
|
||||||
pagination: PaginationArg = {}
|
pagination: PaginationArg = {}
|
||||||
sort: [String] = []
|
sort: [String] = []
|
||||||
): GlossaryItemTypeEntityResponseCollection
|
): GlossaryItemTypeEntityResponseCollection
|
||||||
|
groupSubtype(id: ID): GroupSubtypeEntityResponse
|
||||||
|
groupSubtypes(
|
||||||
|
filters: GroupSubtypeFiltersInput
|
||||||
|
pagination: PaginationArg = {}
|
||||||
|
sort: [String] = []
|
||||||
|
): GroupSubtypeEntityResponseCollection
|
||||||
language(id: ID): LanguageEntityResponse
|
language(id: ID): LanguageEntityResponse
|
||||||
languages(
|
languages(
|
||||||
filters: LanguageFiltersInput
|
filters: LanguageFiltersInput
|
||||||
|
@ -2981,6 +3115,12 @@ type Query {
|
||||||
pagination: PaginationArg = {}
|
pagination: PaginationArg = {}
|
||||||
sort: [String] = []
|
sort: [String] = []
|
||||||
): MerchItemEntityResponseCollection
|
): MerchItemEntityResponseCollection
|
||||||
|
metadataType(id: ID): MetadataTypeEntityResponse
|
||||||
|
metadataTypes(
|
||||||
|
filters: MetadataTypeFiltersInput
|
||||||
|
pagination: PaginationArg = {}
|
||||||
|
sort: [String] = []
|
||||||
|
): MetadataTypeEntityResponseCollection
|
||||||
otherSubtype(id: ID): OtherSubtypeEntityResponse
|
otherSubtype(id: ID): OtherSubtypeEntityResponse
|
||||||
otherSubtypes(
|
otherSubtypes(
|
||||||
filters: OtherSubtypeFiltersInput
|
filters: OtherSubtypeFiltersInput
|
||||||
|
@ -3116,6 +3256,12 @@ type Mutation {
|
||||||
data: GlossaryItemTypeInput!
|
data: GlossaryItemTypeInput!
|
||||||
): GlossaryItemTypeEntityResponse
|
): GlossaryItemTypeEntityResponse
|
||||||
deleteGlossaryItemType(id: ID!): GlossaryItemTypeEntityResponse
|
deleteGlossaryItemType(id: ID!): GlossaryItemTypeEntityResponse
|
||||||
|
createGroupSubtype(data: GroupSubtypeInput!): GroupSubtypeEntityResponse
|
||||||
|
updateGroupSubtype(
|
||||||
|
id: ID!
|
||||||
|
data: GroupSubtypeInput!
|
||||||
|
): GroupSubtypeEntityResponse
|
||||||
|
deleteGroupSubtype(id: ID!): GroupSubtypeEntityResponse
|
||||||
createLanguage(data: LanguageInput!): LanguageEntityResponse
|
createLanguage(data: LanguageInput!): LanguageEntityResponse
|
||||||
updateLanguage(id: ID!, data: LanguageInput!): LanguageEntityResponse
|
updateLanguage(id: ID!, data: LanguageInput!): LanguageEntityResponse
|
||||||
deleteLanguage(id: ID!): LanguageEntityResponse
|
deleteLanguage(id: ID!): LanguageEntityResponse
|
||||||
|
@ -3125,6 +3271,12 @@ type Mutation {
|
||||||
createMerchItem(data: MerchItemInput!): MerchItemEntityResponse
|
createMerchItem(data: MerchItemInput!): MerchItemEntityResponse
|
||||||
updateMerchItem(id: ID!, data: MerchItemInput!): MerchItemEntityResponse
|
updateMerchItem(id: ID!, data: MerchItemInput!): MerchItemEntityResponse
|
||||||
deleteMerchItem(id: ID!): MerchItemEntityResponse
|
deleteMerchItem(id: ID!): MerchItemEntityResponse
|
||||||
|
createMetadataType(data: MetadataTypeInput!): MetadataTypeEntityResponse
|
||||||
|
updateMetadataType(
|
||||||
|
id: ID!
|
||||||
|
data: MetadataTypeInput!
|
||||||
|
): MetadataTypeEntityResponse
|
||||||
|
deleteMetadataType(id: ID!): MetadataTypeEntityResponse
|
||||||
createOtherSubtype(data: OtherSubtypeInput!): OtherSubtypeEntityResponse
|
createOtherSubtype(data: OtherSubtypeInput!): OtherSubtypeEntityResponse
|
||||||
updateOtherSubtype(
|
updateOtherSubtype(
|
||||||
id: ID!
|
id: ID!
|
||||||
|
|
|
@ -33,12 +33,21 @@ export default function Library(props: LibraryProps): JSX.Element {
|
||||||
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
||||||
|
|
||||||
const [showSubitems, setShowSubitems] = useState<boolean>(false);
|
const [showSubitems, setShowSubitems] = useState<boolean>(false);
|
||||||
|
const [showPrimaryItems, setShowPrimaryItems] = useState<boolean>(true);
|
||||||
|
const [showSecondaryItems, setShowSecondaryItems] = useState<boolean>(false);
|
||||||
const [sortingMethod, setSortingMethod] = useState<number>(0);
|
const [sortingMethod, setSortingMethod] = useState<number>(0);
|
||||||
const [groupingMethod, setGroupingMethod] = useState<number>(-1);
|
const [groupingMethod, setGroupingMethod] = useState<number>(-1);
|
||||||
|
|
||||||
const [filteredItems, setFilteredItems] = useState<
|
const [filteredItems, setFilteredItems] = useState<
|
||||||
LibraryProps["libraryItems"]["libraryItems"]["data"]
|
LibraryProps["libraryItems"]["libraryItems"]["data"]
|
||||||
>(filterItems(showSubitems, props.libraryItems.libraryItems.data));
|
>(
|
||||||
|
filterItems(
|
||||||
|
showSubitems,
|
||||||
|
showPrimaryItems,
|
||||||
|
showSecondaryItems,
|
||||||
|
props.libraryItems.libraryItems.data
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
const [sortedItems, setSortedItem] = useState<
|
const [sortedItems, setSortedItem] = useState<
|
||||||
LibraryProps["libraryItems"]["libraryItems"]["data"]
|
LibraryProps["libraryItems"]["libraryItems"]["data"]
|
||||||
|
@ -50,9 +59,19 @@ export default function Library(props: LibraryProps): JSX.Element {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setFilteredItems(
|
setFilteredItems(
|
||||||
filterItems(showSubitems, props.libraryItems.libraryItems.data)
|
filterItems(
|
||||||
|
showSubitems,
|
||||||
|
showPrimaryItems,
|
||||||
|
showSecondaryItems,
|
||||||
|
props.libraryItems.libraryItems.data
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}, [showSubitems, props.libraryItems.libraryItems.data]);
|
}, [
|
||||||
|
showSubitems,
|
||||||
|
props.libraryItems.libraryItems.data,
|
||||||
|
showPrimaryItems,
|
||||||
|
showSecondaryItems,
|
||||||
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSortedItem(sortBy(sortingMethod, filteredItems));
|
setSortedItem(sortBy(sortingMethod, filteredItems));
|
||||||
|
@ -95,6 +114,16 @@ export default function Library(props: LibraryProps): JSX.Element {
|
||||||
<p className="flex-shrink-0">{langui.show_subitems}:</p>
|
<p className="flex-shrink-0">{langui.show_subitems}:</p>
|
||||||
<Switch state={showSubitems} setState={setShowSubitems} />
|
<Switch state={showSubitems} setState={setShowSubitems} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row gap-2 place-items-center">
|
||||||
|
<p className="flex-shrink-0">{langui.show_primary_items}:</p>
|
||||||
|
<Switch state={showPrimaryItems} setState={setShowPrimaryItems} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row gap-2 place-items-center">
|
||||||
|
<p className="flex-shrink-0">{langui.show_secondary_items}:</p>
|
||||||
|
<Switch state={showSecondaryItems} setState={setShowSecondaryItems} />
|
||||||
|
</div>
|
||||||
</SubPanel>
|
</SubPanel>
|
||||||
);
|
);
|
||||||
const contentPanel = (
|
const contentPanel = (
|
||||||
|
@ -162,6 +191,7 @@ function getGroups(
|
||||||
groupType.set(langui.textual, []);
|
groupType.set(langui.textual, []);
|
||||||
groupType.set(langui.video, []);
|
groupType.set(langui.video, []);
|
||||||
groupType.set(langui.other, []);
|
groupType.set(langui.other, []);
|
||||||
|
groupType.set(langui.group, []);
|
||||||
groupType.set(langui.no_type, []);
|
groupType.set(langui.no_type, []);
|
||||||
items.map((item) => {
|
items.map((item) => {
|
||||||
if (item.attributes.metadata.length > 0) {
|
if (item.attributes.metadata.length > 0) {
|
||||||
|
@ -179,26 +209,28 @@ function getGroups(
|
||||||
groupType.get(langui.video)?.push(item);
|
groupType.get(langui.video)?.push(item);
|
||||||
break;
|
break;
|
||||||
case "ComponentMetadataOther":
|
case "ComponentMetadataOther":
|
||||||
switch (
|
|
||||||
item.attributes.metadata[0].subtype.data.attributes.slug
|
|
||||||
) {
|
|
||||||
case "audio-case":
|
|
||||||
groupType.get(langui.audio)?.push(item);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "video-case":
|
|
||||||
groupType.get(langui.video)?.push(item);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "game-case":
|
|
||||||
groupType.get(langui.game)?.push(item);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
groupType.get(langui.other)?.push(item);
|
groupType.get(langui.other)?.push(item);
|
||||||
break;
|
break;
|
||||||
|
case "ComponentMetadataGroup":
|
||||||
|
switch (
|
||||||
|
item.attributes.metadata[0].subitems_type.data.attributes.slug
|
||||||
|
) {
|
||||||
|
case "audio":
|
||||||
|
groupType.get(langui.audio)?.push(item);
|
||||||
|
break;
|
||||||
|
case "video":
|
||||||
|
groupType.get(langui.video)?.push(item);
|
||||||
|
break;
|
||||||
|
case "game":
|
||||||
|
groupType.get(langui.game)?.push(item);
|
||||||
|
break;
|
||||||
|
case "textual":
|
||||||
|
groupType.get(langui.textual)?.push(item);
|
||||||
|
break;
|
||||||
|
case "mixed":
|
||||||
|
groupType.get(langui.group)?.push(item);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,21 +274,25 @@ function getGroups(
|
||||||
|
|
||||||
function filterItems(
|
function filterItems(
|
||||||
showSubitems: boolean,
|
showSubitems: boolean,
|
||||||
|
showPrimaryItems: boolean,
|
||||||
|
showSecondaryItems: boolean,
|
||||||
items: LibraryProps["libraryItems"]["libraryItems"]["data"]
|
items: LibraryProps["libraryItems"]["libraryItems"]["data"]
|
||||||
): LibraryProps["libraryItems"]["libraryItems"]["data"] {
|
): LibraryProps["libraryItems"]["libraryItems"]["data"] {
|
||||||
return [...items].filter((item) => {
|
return [...items].filter((item) => {
|
||||||
let result = true;
|
if (!showSubitems && !item.attributes.root_item) return false;
|
||||||
if (!showSubitems && !item.attributes.root_item) result = false;
|
|
||||||
if (
|
if (
|
||||||
|
showSubitems &&
|
||||||
item.attributes.metadata.length > 0 &&
|
item.attributes.metadata.length > 0 &&
|
||||||
item.attributes.metadata[0].__typename === "ComponentMetadataOther" &&
|
item.attributes.metadata[0].__typename === "ComponentMetadataGroup" &&
|
||||||
(item.attributes.metadata[0].subtype.data.attributes.slug ===
|
(item.attributes.metadata[0].subtype.data.attributes.slug ===
|
||||||
"variant-set" ||
|
"variant-set" ||
|
||||||
item.attributes.metadata[0].subtype.data.attributes.slug ===
|
item.attributes.metadata[0].subtype.data.attributes.slug ===
|
||||||
"relation-set")
|
"relation-set")
|
||||||
)
|
)
|
||||||
result = false;
|
return false;
|
||||||
return result;
|
if (item.attributes.primary && !showPrimaryItems) return false;
|
||||||
|
if (!item.attributes.primary && !showSecondaryItems) return false;
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,8 @@ export function prettyItemType(
|
||||||
return langui.game;
|
return langui.game;
|
||||||
case "ComponentMetadataVideo":
|
case "ComponentMetadataVideo":
|
||||||
return langui.video;
|
return langui.video;
|
||||||
|
case "ComponentMetadataGroup":
|
||||||
|
return langui.group;
|
||||||
case "ComponentMetadataOther":
|
case "ComponentMetadataOther":
|
||||||
return langui.other;
|
return langui.other;
|
||||||
default:
|
default:
|
||||||
|
@ -82,21 +84,32 @@ export function prettyItemSubType(metadata: {
|
||||||
__typename: GetLibraryItemsPreviewQuery["libraryItems"]["data"][number]["attributes"]["metadata"][number]["__typename"];
|
__typename: GetLibraryItemsPreviewQuery["libraryItems"]["data"][number]["attributes"]["metadata"][number]["__typename"];
|
||||||
subtype?: any;
|
subtype?: any;
|
||||||
platforms?: any;
|
platforms?: any;
|
||||||
|
subitems_type?: any;
|
||||||
}): string {
|
}): string {
|
||||||
switch (metadata.__typename) {
|
switch (metadata.__typename) {
|
||||||
case "ComponentMetadataAudio":
|
case "ComponentMetadataAudio":
|
||||||
case "ComponentMetadataBooks":
|
case "ComponentMetadataBooks":
|
||||||
case "ComponentMetadataVideo":
|
case "ComponentMetadataVideo":
|
||||||
case "ComponentMetadataOther": {
|
|
||||||
return metadata.subtype.data.attributes.titles.length > 0
|
return metadata.subtype.data.attributes.titles.length > 0
|
||||||
? metadata.subtype.data.attributes.titles[0].title
|
? metadata.subtype.data.attributes.titles[0].title
|
||||||
: prettySlug(metadata.subtype.data.attributes.slug);
|
: prettySlug(metadata.subtype.data.attributes.slug);
|
||||||
}
|
|
||||||
case "ComponentMetadataGame":
|
case "ComponentMetadataGame":
|
||||||
return metadata.platforms.data.length > 0
|
return metadata.platforms.data.length > 0
|
||||||
? metadata.platforms.data[0].attributes.short
|
? metadata.platforms.data[0].attributes.short
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
|
case "ComponentMetadataGroup": {
|
||||||
|
const firstPart =
|
||||||
|
metadata.subtype.data.attributes.titles.length > 0
|
||||||
|
? metadata.subtype.data.attributes.titles[0].title
|
||||||
|
: prettySlug(metadata.subtype.data.attributes.slug);
|
||||||
|
|
||||||
|
const secondPart =
|
||||||
|
metadata.subitems_type.data.attributes.titles.length > 0
|
||||||
|
? metadata.subitems_type.data.attributes.titles[0].title
|
||||||
|
: prettySlug(metadata.subitems_type.data.attributes.slug);
|
||||||
|
return `${secondPart} ${firstPart})`;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue