schema.graphqls 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type Query {
  4. customerDownloadableProducts: CustomerDownloadableProducts @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\CustomerDownloadableProducts") @doc(description: "The query returns the contents of a customer's downloadable products")
  5. }
  6. type CustomerDownloadableProducts {
  7. items: [CustomerDownloadableProduct] @doc(description: "List of purchased downloadable items")
  8. }
  9. type CustomerDownloadableProduct {
  10. order_increment_id: String
  11. date: String
  12. status: String
  13. download_url: String
  14. remaining_downloads: String
  15. }
  16. type DownloadableProduct implements ProductInterface, CustomizableProductInterface @doc(description: "DownloadableProduct defines a product that the customer downloads") {
  17. downloadable_product_samples: [DownloadableProductSamples] @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\Product\\DownloadableOptions") @doc(description: "An array containing information about samples of this downloadable product.")
  18. downloadable_product_links: [DownloadableProductLinks] @resolver(class: "Magento\\DownloadableGraphQl\\Model\\Resolver\\Product\\DownloadableOptions") @doc(description: "An array containing information about the links for this downloadable product")
  19. links_purchased_separately: Int @doc(description: "A value of 1 indicates that each link in the array must be purchased separately")
  20. links_title: String @doc(description: "The heading above the list of downloadable products")
  21. }
  22. enum DownloadableFileTypeEnum @doc(description: "This enumeration specifies whether a link or sample is a file or URL") {
  23. FILE
  24. URL
  25. }
  26. type DownloadableProductLinks @doc(description: "DownloadableProductLinks defines characteristics of a downloadable product") {
  27. id: Int @doc(description: "The unique ID for the link to the downloadable product")
  28. title: String @doc(description: "The display name of the link")
  29. sort_order: Int @doc(description: "A number indicating the sort order")
  30. is_shareable: Boolean @doc(description: "Indicates whether the link is shareable")
  31. price: Float @doc(description: "The price of the downloadable product")
  32. number_of_downloads: Int @doc(description: "The maximum number of times the product can be downloaded. A value of 0 means unlimited.")
  33. link_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
  34. sample_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
  35. sample_file: String @doc(description: "The relative path to the downloadable sample")
  36. sample_url: String @doc(description: "The relative URL to the downloadable sample")
  37. }
  38. type DownloadableProductSamples @doc(description: "DownloadableProductSamples defines characteristics of a downloadable product") {
  39. id: Int @doc(description: "The unique ID for the downloadable product sample")
  40. title: String @doc(description: "The display name of the sample")
  41. sort_order: Int @doc(description: "A number indicating the sort order")
  42. sample_type: DownloadableFileTypeEnum @doc(description: "Either FILE or URL")
  43. sample_file: String @doc(description: "The relative path to the downloadable sample")
  44. sample_url: String @doc(description: "The relative URL to the downloadable sample")
  45. }