""" Photowall Graphql Schema """ scalar DateTime scalar Date scalar JSON type Query { orders(pagination: PaginationInput!, filter: DateFilterInput!): OrdersResult order(id: ID!): Order products( pagination: PaginationInput! filter: ProductsFilterInput! ): ProductsResult product(id: Int!): Product categories: [Category] category(id: Int!): Category keywords: [Keyword] keyword(id: Int!): Keyword designers(limit: Int): [Designer] designer(id: Int!): Designer markets: [Market] market(name: String!): Market locales: [Locale] locale(value: String!): Locale interiors(filter: InteriorsFilterInput): [Interior] } input PaginationInput { limit: Int! """ offset is not implemented yet and result will always return as if it was 0. Implement when needed. """ offset: Int } input DateInput { from: Date! to: Date! } input DateFilterInput { dates: DateInput } input ProductsFilterInput { visible: Boolean browsable: Boolean } type PaginationResult { total: Int! offset: Int! limit: Int! } type OrdersResult { pagination: PaginationResult! items: [Order] } type ProductsResult { pagination: PaginationResult! items: [Product] } """ Only return valid interiors for product, type and orientation """ input InteriorsFilterInput { productId: Int! type: InteriorType! orientation: Orientation! } type Market { id: ID! name: String! vat: Float! currency: String! priceAdjustment: Float! } type Locale { id: ID! value: String! name: String! fallbackId: Int } type Address { id: ID! firstname: String lastname: String recipientName: String companyname: String address1: String address2: String countryCode: String city: String zipcode: String stateCountyOrRegion: String } type ContactInformation { email: String phone: String address: Address } type Order { id: ID! inserted: DateTime! paid: Boolean! confirmed: Boolean! delivered: Boolean! newsletter: Boolean creditInvoice: Boolean canceled: Boolean reminder: Boolean deliveredDate: DateTime countryCode: String language: String deliveryCountryCode: String deliveryMethod: String deliveryPrice: String deliveryVat: Float customerType: String paymentType: String attention: String currency: String exchangeRate: Float exchangeRateEur: Float invoiceId: String contractCustomerId: Int vatNumber: String comment: String cancelsOrderId: Int cancelledByOrderId: Int orderlogId: Int resellerStore: String orderSum: Float klarnaOrderId: String pwintyId: Int email: String phone: String deliveryEmail: String deliveryPhone: String customerFirstname: String customerLastname: String customerEmail: String customerCellphone: String flyerIds: String billingInformation: ContactInformation deliveryInformation: ContactInformation billingAddressId: Int deliveryAddressId: Int """ pwinty needs to be updated with market being a subtype """ market: Market locale: Locale rows: [OrderRow] } type OrderRow { id: ID! artNo: String code: String commission: Int commissionAmount: Float commissionResale: Int designer: String designerId: Int designerPath: String discountType: String discountValue: Float displayHeight: Float displayWidth: Float edge: String frameColor: String framed: Int group: ProductGroup height: Int imagedonotprint: Int imageprocessed: Int imageprocessingrejected: Int inserted: DateTime material: String measureUnit: String mirrored: Int modifier: String name: String noShipping: Boolean order: Order orderId: Int path: String price: Float printId: Int process: Boolean productGroup: String productId: Int pwintyImageId: Int pwintySku: String resolution: Int status: String type: String vat: Float weight: Int width: Int x: Float y: Float } type Category { id: ID! name: String path: String pathNumeric: String isLeaf: Int depth: Int childCount: Int lft: Int rgt: Int products: [Product] } type Product { id: ID! stockid: Int path: String! visible: Boolean! browsable: Boolean! inserted: DateTime! updated: DateTime printProducts: [PrintProduct] blacklisting: [ProductBlacklist] categories: [Category] designerId: Int designer: Designer keywords: [Keyword] ref1: String ref2: String ref3: String related: [Product] wallpaperTypes: [ProductWallpaperType] fields: ProductFields orientation: Orientation """ Will be single values return in later release """ type: [ProductType] # Below are for debug and will be removed soon fields_json: JSON } type ProductFields { artNo: String! name: String! height: Int width: Int photowallResolution: Int canvasResolution: Int wallpaperResolution: Int copyright: String proportionsWarning: String marginWidthMax: Int marginWidthMin: Int marginHeightMax: Int marginHeightMin: Int focusXpoint: Float focusYpoint: Float focusXpoint2: Float focusYpoint2: Float batch: String imageResolution: Int printFileWidth: Int printFileHeight: Int printFileDpi: Int } enum Orientation { UNKNOWN STANDING LANDSCAPE SQUARE } enum ProductGroup { PHOTO_WALLPAPER CANVAS """ WALLPAPER is tiling """ WALLPAPER OLD_REMOVED DO_IT_YOURSELF_FRAME """ Not used """ DESIGNER_WALLPAPER POSTER FRAMED_PRINT UNKNOWN } enum ProductType { UNKNOWN PHOTO ILLUSTRATION } enum ProductWallpaperType { WALLMURAL DESIGN } type ProductBlacklist { id: ID! groupId: Int! group: ProductGroup! market: Market! inserted: DateTime! updated: DateTime! } type PrintProduct { id: ID! groupId: Int! group: ProductGroup! inserted: DateTime! updated: DateTime interiors: [Interior] } enum InteriorType { WALLPAPER PAINTING POSTER FRAMED_PRINT } type Interior { """ room id """ id: ID! roomName: String position: Int roomType: String uri: String roomNumber: Int type: InteriorType orientation: Orientation } type Designer { id: ID! name: String path: String orderRows(pagination: PaginationInput!, filter: DateFilterInput): [OrderRow] } enum KeywordType { NOT_SET COLOR } type Keyword { id: ID! value: String! type: KeywordType products: [Product] } # Mutations below input ProductInfoInput { name: String! artNo: String! path: String! batch: String! copyright: String! ref1: String! ref2: String! ref3: String! designerId: Int browsable: Boolean! visible: Boolean! printFileWidth: Int! printFileHeight: Int! printFileDpi: Int! } input ProductBlacklistingInput { """ Only ones used are ProductGroup: PHOTO_WALLPAPER CANVAS WALLPAPER POSTER """ marketId: Int! groupIds: [Int] } type Mutation { productInfo(productId: Int!, info: ProductInfoInput!): Product productBlacklisting( productId: Int! markets: [ProductBlacklistingInput] ): Product productGroup(productId: Int!, groupIds: [Int]): Product productKeywords(productId: Int!, keywordIds: [Int]): Product addKeyword(name: String!, type: KeywordType): Keyword }