channel.api.graphql 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. type Query {
  2. channels(options: ChannelListOptions): ChannelList!
  3. channel(id: ID!): Channel
  4. activeChannel: Channel!
  5. }
  6. type Mutation {
  7. "Create a new Channel"
  8. createChannel(input: CreateChannelInput!): CreateChannelResult!
  9. "Update an existing Channel"
  10. updateChannel(input: UpdateChannelInput!): UpdateChannelResult!
  11. "Delete a Channel"
  12. deleteChannel(id: ID!): DeletionResponse!
  13. "Delete multiple Channels"
  14. deleteChannels(ids: [ID!]!): [DeletionResponse!]!
  15. }
  16. type ChannelList implements PaginatedList {
  17. items: [Channel!]!
  18. totalItems: Int!
  19. }
  20. input ChannelListOptions
  21. input CreateChannelInput {
  22. code: String!
  23. token: String!
  24. defaultLanguageCode: LanguageCode!
  25. pricesIncludeTax: Boolean!
  26. currencyCode: CurrencyCode!
  27. defaultTaxZoneId: ID!
  28. defaultShippingZoneId: ID!
  29. sellerId: ID
  30. }
  31. input UpdateChannelInput {
  32. id: ID!
  33. code: String
  34. token: String
  35. defaultLanguageCode: LanguageCode
  36. pricesIncludeTax: Boolean
  37. currencyCode: CurrencyCode
  38. defaultTaxZoneId: ID
  39. defaultShippingZoneId: ID
  40. sellerId: ID
  41. }
  42. "Returned if attempting to set a Channel's defaultLanguageCode to a language which is not enabled in GlobalSettings"
  43. type LanguageNotAvailableError implements ErrorResult {
  44. errorCode: ErrorCode!
  45. message: String!
  46. languageCode: String!
  47. }
  48. union CreateChannelResult = Channel | LanguageNotAvailableError
  49. union UpdateChannelResult = Channel | LanguageNotAvailableError