| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040 |
- import gql from 'graphql-tag';
- import {
- ADMINISTRATOR_FRAGMENT,
- ASSET_FRAGMENT,
- CHANNEL_FRAGMENT,
- COLLECTION_FRAGMENT,
- COUNTRY_FRAGMENT,
- CURRENT_USER_FRAGMENT,
- CUSTOMER_FRAGMENT,
- CUSTOMER_GROUP_FRAGMENT,
- FACET_WITH_VALUES_FRAGMENT,
- FULFILLMENT_FRAGMENT,
- GLOBAL_SETTINGS_FRAGMENT,
- ORDER_FRAGMENT,
- ORDER_WITH_LINES_FRAGMENT,
- PAYMENT_FRAGMENT,
- PRODUCT_OPTION_GROUP_FRAGMENT,
- PRODUCT_VARIANT_FRAGMENT,
- PRODUCT_WITH_OPTIONS_FRAGMENT,
- PRODUCT_WITH_VARIANTS_FRAGMENT,
- PROMOTION_FRAGMENT,
- ROLE_FRAGMENT,
- SHIPPING_METHOD_FRAGMENT,
- TAX_RATE_FRAGMENT,
- VARIANT_WITH_STOCK_FRAGMENT,
- } from './fragments';
- export const CREATE_ADMINISTRATOR = gql`
- mutation CreateAdministrator($input: CreateAdministratorInput!) {
- createAdministrator(input: $input) {
- ...Administrator
- }
- }
- ${ADMINISTRATOR_FRAGMENT}
- `;
- export const UPDATE_PRODUCT = gql`
- mutation UpdateProduct($input: UpdateProductInput!) {
- updateProduct(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const CREATE_PRODUCT = gql`
- mutation CreateProduct($input: CreateProductInput!) {
- createProduct(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const GET_PRODUCT_WITH_VARIANTS = gql`
- query GetProductWithVariants($id: ID, $slug: String) {
- product(slug: $slug, id: $id) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const GET_PRODUCT_LIST = gql`
- query GetProductList($options: ProductListOptions) {
- products(options: $options) {
- items {
- id
- languageCode
- name
- slug
- featuredAsset {
- id
- preview
- }
- }
- totalItems
- }
- }
- `;
- export const CREATE_PRODUCT_VARIANTS = gql`
- mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {
- createProductVariants(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_PRODUCT_VARIANTS = gql`
- mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {
- updateProductVariants(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_TAX_RATE = gql`
- mutation UpdateTaxRate($input: UpdateTaxRateInput!) {
- updateTaxRate(input: $input) {
- ...TaxRate
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const CREATE_FACET = gql`
- mutation CreateFacet($input: CreateFacetInput!) {
- createFacet(input: $input) {
- ...FacetWithValues
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const UPDATE_FACET = gql`
- mutation UpdateFacet($input: UpdateFacetInput!) {
- updateFacet(input: $input) {
- ...FacetWithValues
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const GET_CUSTOMER_LIST = gql`
- query GetCustomerList($options: CustomerListOptions) {
- customers(options: $options) {
- items {
- id
- title
- firstName
- lastName
- emailAddress
- phoneNumber
- user {
- id
- identifier
- verified
- }
- }
- totalItems
- }
- }
- `;
- export const GET_ASSET_LIST = gql`
- query GetAssetList($options: AssetListOptions) {
- assets(options: $options) {
- items {
- ...Asset
- }
- totalItems
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const CREATE_ROLE = gql`
- mutation CreateRole($input: CreateRoleInput!) {
- createRole(input: $input) {
- ...Role
- }
- }
- ${ROLE_FRAGMENT}
- `;
- export const CREATE_COLLECTION = gql`
- mutation CreateCollection($input: CreateCollectionInput!) {
- createCollection(input: $input) {
- ...Collection
- }
- }
- ${COLLECTION_FRAGMENT}
- `;
- export const UPDATE_COLLECTION = gql`
- mutation UpdateCollection($input: UpdateCollectionInput!) {
- updateCollection(input: $input) {
- ...Collection
- }
- }
- ${COLLECTION_FRAGMENT}
- `;
- export const GET_CUSTOMER = gql`
- query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {
- customer(id: $id) {
- ...Customer
- orders(options: $orderListOptions) {
- items {
- id
- code
- state
- total
- currencyCode
- updatedAt
- }
- totalItems
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const ATTEMPT_LOGIN = gql`
- mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean) {
- login(username: $username, password: $password, rememberMe: $rememberMe) {
- ...CurrentUser
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${CURRENT_USER_FRAGMENT}
- `;
- export const GET_COUNTRY_LIST = gql`
- query GetCountryList($options: CountryListOptions) {
- countries(options: $options) {
- items {
- id
- code
- name
- enabled
- }
- totalItems
- }
- }
- `;
- export const UPDATE_COUNTRY = gql`
- mutation UpdateCountry($input: UpdateCountryInput!) {
- updateCountry(input: $input) {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const GET_FACET_LIST = gql`
- query GetFacetList($options: FacetListOptions) {
- facets(options: $options) {
- items {
- ...FacetWithValues
- }
- totalItems
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const GET_FACET_LIST_SIMPLE = gql`
- query GetFacetListSimple($options: FacetListOptions) {
- facets(options: $options) {
- items {
- id
- name
- }
- totalItems
- }
- }
- `;
- export const DELETE_PRODUCT = gql`
- mutation DeleteProduct($id: ID!) {
- deleteProduct(id: $id) {
- result
- }
- }
- `;
- export const GET_PRODUCT_SIMPLE = gql`
- query GetProductSimple($id: ID, $slug: String) {
- product(slug: $slug, id: $id) {
- id
- slug
- }
- }
- `;
- export const GET_STOCK_MOVEMENT = gql`
- query GetStockMovement($id: ID!) {
- product(id: $id) {
- id
- variants {
- ...VariantWithStock
- }
- }
- }
- ${VARIANT_WITH_STOCK_FRAGMENT}
- `;
- export const GET_RUNNING_JOBS = gql`
- query GetRunningJobs($options: JobListOptions) {
- jobs(options: $options) {
- items {
- id
- queueName
- state
- isSettled
- duration
- }
- totalItems
- }
- }
- `;
- export const CREATE_PROMOTION = gql`
- mutation CreatePromotion($input: CreatePromotionInput!) {
- createPromotion(input: $input) {
- ...Promotion
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${PROMOTION_FRAGMENT}
- `;
- export const ME = gql`
- query Me {
- me {
- ...CurrentUser
- }
- }
- ${CURRENT_USER_FRAGMENT}
- `;
- export const CREATE_CHANNEL = gql`
- mutation CreateChannel($input: CreateChannelInput!) {
- createChannel(input: $input) {
- ...Channel
- ... on LanguageNotAvailableError {
- errorCode
- message
- languageCode
- }
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const DELETE_PRODUCT_VARIANT = gql`
- mutation DeleteProductVariant($id: ID!) {
- deleteProductVariant(id: $id) {
- result
- message
- }
- }
- `;
- export const ASSIGN_PRODUCT_TO_CHANNEL = gql`
- mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {
- assignProductsToChannel(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const REMOVE_PRODUCT_FROM_CHANNEL = gql`
- mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {
- removeProductsFromChannel(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const ASSIGN_PRODUCTVARIANT_TO_CHANNEL = gql`
- mutation AssignProductVariantsToChannel($input: AssignProductVariantsToChannelInput!) {
- assignProductVariantsToChannel(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const REMOVE_PRODUCTVARIANT_FROM_CHANNEL = gql`
- mutation RemoveProductVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {
- removeProductVariantsFromChannel(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_ASSET = gql`
- mutation UpdateAsset($input: UpdateAssetInput!) {
- updateAsset(input: $input) {
- ...Asset
- ... on Asset {
- tags {
- id
- value
- }
- focalPoint {
- x
- y
- }
- }
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const DELETE_ASSET = gql`
- mutation DeleteAsset($input: DeleteAssetInput!) {
- deleteAsset(input: $input) {
- result
- message
- }
- }
- `;
- export const UPDATE_CHANNEL = gql`
- mutation UpdateChannel($input: UpdateChannelInput!) {
- updateChannel(input: $input) {
- ...Channel
- ... on LanguageNotAvailableError {
- errorCode
- message
- languageCode
- }
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const GET_CUSTOMER_HISTORY = gql`
- query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {
- customer(id: $id) {
- id
- history(options: $options) {
- totalItems
- items {
- id
- administrator {
- id
- }
- type
- data
- }
- }
- }
- }
- `;
- export const GET_ORDER = gql`
- query GetOrder($id: ID!) {
- order(id: $id) {
- ...OrderWithLines
- }
- }
- ${ORDER_WITH_LINES_FRAGMENT}
- `;
- export const CREATE_CUSTOMER_GROUP = gql`
- mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
- createCustomerGroup(input: $input) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const REMOVE_CUSTOMERS_FROM_GROUP = gql`
- mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {
- removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const CREATE_FULFILLMENT = gql`
- mutation CreateFulfillment($input: FulfillOrderInput!) {
- addFulfillmentToOrder(input: $input) {
- ...Fulfillment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on CreateFulfillmentError {
- fulfillmentHandlerError
- }
- }
- }
- ${FULFILLMENT_FRAGMENT}
- `;
- export const TRANSIT_FULFILLMENT = gql`
- mutation TransitFulfillment($id: ID!, $state: String!) {
- transitionFulfillmentToState(id: $id, state: $state) {
- ...Fulfillment
- ... on FulfillmentStateTransitionError {
- errorCode
- message
- transitionError
- fromState
- toState
- }
- }
- }
- ${FULFILLMENT_FRAGMENT}
- `;
- export const GET_ORDER_FULFILLMENTS = gql`
- query GetOrderFulfillments($id: ID!) {
- order(id: $id) {
- id
- state
- fulfillments {
- id
- state
- nextStates
- method
- summary {
- orderLine {
- id
- }
- quantity
- }
- }
- }
- }
- `;
- export const GET_ORDERS_LIST = gql`
- query GetOrderList($options: OrderListOptions) {
- orders(options: $options) {
- items {
- ...Order
- }
- totalItems
- }
- }
- ${ORDER_FRAGMENT}
- `;
- export const CREATE_ADDRESS = gql`
- mutation CreateAddress($id: ID!, $input: CreateAddressInput!) {
- createCustomerAddress(customerId: $id, input: $input) {
- id
- fullName
- company
- streetLine1
- streetLine2
- city
- province
- postalCode
- country {
- code
- name
- }
- phoneNumber
- defaultShippingAddress
- defaultBillingAddress
- }
- }
- `;
- export const UPDATE_ADDRESS = gql`
- mutation UpdateAddress($input: UpdateAddressInput!) {
- updateCustomerAddress(input: $input) {
- id
- defaultShippingAddress
- defaultBillingAddress
- country {
- code
- name
- }
- }
- }
- `;
- export const CREATE_CUSTOMER = gql`
- mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {
- createCustomer(input: $input, password: $password) {
- ...Customer
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const UPDATE_CUSTOMER = gql`
- mutation UpdateCustomer($input: UpdateCustomerInput!) {
- updateCustomer(input: $input) {
- ...Customer
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const DELETE_CUSTOMER = gql`
- mutation DeleteCustomer($id: ID!) {
- deleteCustomer(id: $id) {
- result
- }
- }
- `;
- export const UPDATE_CUSTOMER_NOTE = gql`
- mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {
- updateCustomerNote(input: $input) {
- id
- data
- isPublic
- }
- }
- `;
- export const DELETE_CUSTOMER_NOTE = gql`
- mutation DeleteCustomerNote($id: ID!) {
- deleteCustomerNote(id: $id) {
- result
- message
- }
- }
- `;
- export const UPDATE_CUSTOMER_GROUP = gql`
- mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {
- updateCustomerGroup(input: $input) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const DELETE_CUSTOMER_GROUP = gql`
- mutation DeleteCustomerGroup($id: ID!) {
- deleteCustomerGroup(id: $id) {
- result
- message
- }
- }
- `;
- export const GET_CUSTOMER_GROUPS = gql`
- query GetCustomerGroups($options: CustomerGroupListOptions) {
- customerGroups(options: $options) {
- items {
- id
- name
- }
- totalItems
- }
- }
- `;
- export const GET_CUSTOMER_GROUP = gql`
- query GetCustomerGroup($id: ID!, $options: CustomerListOptions) {
- customerGroup(id: $id) {
- id
- name
- customers(options: $options) {
- items {
- id
- }
- totalItems
- }
- }
- }
- `;
- export const ADD_CUSTOMERS_TO_GROUP = gql`
- mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {
- addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const GET_CUSTOMER_WITH_GROUPS = gql`
- query GetCustomerWithGroups($id: ID!) {
- customer(id: $id) {
- id
- groups {
- id
- name
- }
- }
- }
- `;
- export const ADMIN_TRANSITION_TO_STATE = gql`
- mutation AdminTransition($id: ID!, $state: String!) {
- transitionOrderToState(id: $id, state: $state) {
- ...Order
- ... on OrderStateTransitionError {
- errorCode
- message
- transitionError
- fromState
- toState
- }
- }
- }
- ${ORDER_FRAGMENT}
- `;
- export const CANCEL_ORDER = gql`
- mutation CancelOrder($input: CancelOrderInput!) {
- cancelOrder(input: $input) {
- ...CanceledOrder
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- fragment CanceledOrder on Order {
- id
- state
- lines {
- id
- quantity
- }
- }
- `;
- export const UPDATE_GLOBAL_SETTINGS = gql`
- mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {
- updateGlobalSettings(input: $input) {
- ...GlobalSettings
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${GLOBAL_SETTINGS_FRAGMENT}
- `;
- export const UPDATE_ROLE = gql`
- mutation UpdateRole($input: UpdateRoleInput!) {
- updateRole(input: $input) {
- ...Role
- }
- }
- ${ROLE_FRAGMENT}
- `;
- export const GET_PRODUCTS_WITH_VARIANT_PRICES = gql`
- query GetProductsWithVariantPrices {
- products {
- items {
- id
- slug
- variants {
- id
- price
- priceWithTax
- currencyCode
- sku
- facetValues {
- id
- code
- }
- }
- }
- }
- }
- `;
- export const CREATE_PRODUCT_OPTION_GROUP = gql`
- mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {
- createProductOptionGroup(input: $input) {
- ...ProductOptionGroup
- }
- }
- ${PRODUCT_OPTION_GROUP_FRAGMENT}
- `;
- export const ADD_OPTION_GROUP_TO_PRODUCT = gql`
- mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {
- addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {
- ...ProductWithOptions
- }
- }
- ${PRODUCT_WITH_OPTIONS_FRAGMENT}
- `;
- export const CREATE_SHIPPING_METHOD = gql`
- mutation CreateShippingMethod($input: CreateShippingMethodInput!) {
- createShippingMethod(input: $input) {
- ...ShippingMethod
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const SETTLE_PAYMENT = gql`
- mutation SettlePayment($id: ID!) {
- settlePayment(id: $id) {
- ...Payment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on SettlePaymentError {
- paymentErrorMessage
- }
- }
- }
- ${PAYMENT_FRAGMENT}
- `;
- export const GET_ORDER_HISTORY = gql`
- query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {
- order(id: $id) {
- id
- history(options: $options) {
- totalItems
- items {
- id
- type
- administrator {
- id
- }
- data
- }
- }
- }
- }
- `;
- export const UPDATE_SHIPPING_METHOD = gql`
- mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {
- updateShippingMethod(input: $input) {
- ...ShippingMethod
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const GET_ASSET = gql`
- query GetAsset($id: ID!) {
- asset(id: $id) {
- ...Asset
- width
- height
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const GET_ASSET_FRAGMENT_FIRST = gql`
- fragment AssetFragFirst on Asset {
- id
- preview
- }
- query GetAssetFragmentFirst($id: ID!) {
- asset(id: $id) {
- ...AssetFragFirst
- }
- }
- `;
- export const ASSET_WITH_TAGS_AND_FOCAL_POINT_FRAGMENT = gql`
- fragment AssetWithTagsAndFocalPoint on Asset {
- ...Asset
- focalPoint {
- x
- y
- }
- tags {
- id
- value
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const CREATE_ASSETS = gql`
- mutation CreateAssets($input: [CreateAssetInput!]!) {
- createAssets(input: $input) {
- ...AssetWithTagsAndFocalPoint
- ... on MimeTypeError {
- message
- fileName
- mimeType
- }
- }
- }
- ${ASSET_WITH_TAGS_AND_FOCAL_POINT_FRAGMENT}
- `;
- export const DELETE_SHIPPING_METHOD = gql`
- mutation DeleteShippingMethod($id: ID!) {
- deleteShippingMethod(id: $id) {
- result
- message
- }
- }
- `;
- export const ASSIGN_PROMOTIONS_TO_CHANNEL = gql`
- mutation AssignPromotionToChannel($input: AssignPromotionsToChannelInput!) {
- assignPromotionsToChannel(input: $input) {
- id
- name
- }
- }
- `;
- export const REMOVE_PROMOTIONS_FROM_CHANNEL = gql`
- mutation RemovePromotionFromChannel($input: RemovePromotionsFromChannelInput!) {
- removePromotionsFromChannel(input: $input) {
- id
- name
- }
- }
- `;
- export const GET_TAX_RATES_LIST = gql`
- query GetTaxRates($options: TaxRateListOptions) {
- taxRates(options: $options) {
- items {
- ...TaxRate
- }
- totalItems
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const GET_SHIPPING_METHOD_LIST = gql`
- query GetShippingMethodList {
- shippingMethods {
- items {
- ...ShippingMethod
- }
- totalItems
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const GET_COLLECTIONS = gql`
- query GetCollections {
- collections {
- items {
- id
- name
- position
- parent {
- id
- name
- }
- }
- }
- }
- `;
- export const TRANSITION_PAYMENT_TO_STATE = gql`
- mutation TransitionPaymentToState($id: ID!, $state: String!) {
- transitionPaymentToState(id: $id, state: $state) {
- ...Payment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on PaymentStateTransitionError {
- transitionError
- }
- }
- }
- ${PAYMENT_FRAGMENT}
- `;
- export const GET_PRODUCT_VARIANT_LIST = gql`
- query GetProductVariantList($options: ProductVariantListOptions, $productId: ID) {
- productVariants(options: $options, productId: $productId) {
- items {
- id
- name
- sku
- price
- priceWithTax
- currencyCode
- prices {
- currencyCode
- price
- }
- }
- totalItems
- }
- }
- `;
- export const DELETE_PROMOTION = gql`
- mutation DeletePromotion($id: ID!) {
- deletePromotion(id: $id) {
- result
- }
- }
- `;
- export const GET_CHANNELS = gql`
- query GetChannels {
- channels {
- items {
- id
- code
- token
- }
- }
- }
- `;
- export const UPDATE_ADMINISTRATOR = gql`
- mutation UpdateAdministrator($input: UpdateAdministratorInput!) {
- updateAdministrator(input: $input) {
- ...Administrator
- }
- }
- ${ADMINISTRATOR_FRAGMENT}
- `;
- export const ASSIGN_COLLECTIONS_TO_CHANNEL = gql`
- mutation AssignCollectionsToChannel($input: AssignCollectionsToChannelInput!) {
- assignCollectionsToChannel(input: $input) {
- ...Collection
- }
- }
- ${COLLECTION_FRAGMENT}
- `;
|