| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- import gql from 'graphql-tag';
- export const COUNTRY_FRAGMENT = gql`
- fragment Country on Country {
- id
- code
- name
- enabled
- translations {
- id
- languageCode
- name
- }
- }
- `;
- export const GET_COUNTRY_LIST = gql`
- query GetCountryList($options: CountryListOptions) {
- countries(options: $options) {
- items {
- id
- code
- name
- enabled
- }
- totalItems
- }
- }
- `;
- export const GET_COUNTRY = gql`
- query GetCountry($id: ID!) {
- country(id: $id) {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const CREATE_COUNTRY = gql`
- mutation CreateCountry($input: CreateCountryInput!) {
- createCountry(input: $input) {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const UPDATE_COUNTRY = gql`
- mutation UpdateCountry($input: UpdateCountryInput!) {
- updateCountry(input: $input) {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const ZONE_FRAGMENT = gql`
- fragment Zone on Zone {
- id
- name
- members {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const GET_ZONES = gql`
- query GetZones {
- zones {
- id
- name
- members {
- id
- name
- code
- }
- }
- }
- `;
- export const GET_ZONE = gql`
- query GetZone($id: ID!) {
- zone(id: $id) {
- ...Zone
- }
- }
- ${ZONE_FRAGMENT}
- `;
- export const CREATE_ZONE = gql`
- mutation CreateZone($input: CreateZoneInput!) {
- createZone(input: $input) {
- ...Zone
- }
- }
- ${ZONE_FRAGMENT}
- `;
- export const UPDATE_ZONE = gql`
- mutation UpdateZone($input: UpdateZoneInput!) {
- updateZone(input: $input) {
- ...Zone
- }
- }
- ${ZONE_FRAGMENT}
- `;
- export const ADD_MEMBERS_TO_ZONE = gql`
- mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {
- addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {
- ...Zone
- }
- }
- ${ZONE_FRAGMENT}
- `;
- export const REMOVE_MEMBERS_FROM_ZONE = gql`
- mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {
- removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {
- ...Zone
- }
- }
- ${ZONE_FRAGMENT}
- `;
- export const TAX_CATEGORY_FRAGMENT = gql`
- fragment TaxCategory on TaxCategory {
- id
- name
- }
- `;
- export const GET_TAX_CATEGORIES = gql`
- query GetTaxCategories {
- taxCategories {
- ...TaxCategory
- }
- }
- ${TAX_CATEGORY_FRAGMENT}
- `;
- export const GET_TAX_CATEGORY = gql`
- query GetTaxCategory($id: ID!) {
- taxCategory(id: $id) {
- ...TaxCategory
- }
- }
- ${TAX_CATEGORY_FRAGMENT}
- `;
- export const CREATE_TAX_CATEGORY = gql`
- mutation CreateTaxCategory($input: CreateTaxCategoryInput!) {
- createTaxCategory(input: $input) {
- ...TaxCategory
- }
- }
- ${TAX_CATEGORY_FRAGMENT}
- `;
- export const UPDATE_TAX_CATEGORY = gql`
- mutation UpdateTaxCategory($input: UpdateTaxCategoryInput!) {
- updateTaxCategory(input: $input) {
- ...TaxCategory
- }
- }
- ${TAX_CATEGORY_FRAGMENT}
- `;
- export const TAX_RATE_FRAGMENT = gql`
- fragment TaxRate on TaxRate {
- id
- name
- enabled
- value
- category {
- id
- name
- }
- zone {
- id
- name
- }
- customerGroup {
- id
- name
- }
- }
- `;
- export const GET_TAX_RATE_LIST = gql`
- query GetTaxRateList($options: TaxRateListOptions) {
- taxRates(options: $options) {
- items {
- ...TaxRate
- }
- totalItems
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const GET_TAX_RATE = gql`
- query GetTaxRate($id: ID!) {
- taxRate(id: $id) {
- ...TaxRate
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const CREATE_TAX_RATE = gql`
- mutation CreateTaxRate($input: CreateTaxRateInput!) {
- createTaxRate(input: $input) {
- ...TaxRate
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const UPDATE_TAX_RATE = gql`
- mutation UpdateTaxRate($input: UpdateTaxRateInput!) {
- updateTaxRate(input: $input) {
- ...TaxRate
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const CHANNEL_FRAGMENT = gql`
- fragment Channel on Channel {
- id
- code
- token
- pricesIncludeTax
- defaultLanguageCode
- defaultShippingZone {
- id
- name
- }
- defaultTaxZone {
- id
- name
- }
- }
- `;
- export const GET_CHANNELS = gql`
- query GetChannels {
- channels {
- ...Channel
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const GET_CHANNEL = gql`
- query GetChannel($id: ID!) {
- channel(id: $id) {
- ...Channel
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const GET_ACTIVE_CHANNEL = gql`
- query GetActiveChannel {
- activeChannel {
- ...Channel
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const CREATE_CHANNEL = gql`
- mutation CreateChannel($input: CreateChannelInput!) {
- createChannel(input: $input) {
- ...Channel
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const UPDATE_CHANNEL = gql`
- mutation UpdateChannel($input: UpdateChannelInput!) {
- updateChannel(input: $input) {
- ...Channel
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const PAYMENT_METHOD_FRAGMENT = gql`
- fragment PaymentMethod on PaymentMethod {
- id
- code
- enabled
- configArgs {
- name
- type
- value
- }
- }
- `;
- export const GET_PAYMENT_METHOD_LIST = gql`
- query GetPaymentMethodList($options: PaymentMethodListOptions!) {
- paymentMethods(options: $options) {
- items {
- ...PaymentMethod
- }
- totalItems
- }
- }
- ${PAYMENT_METHOD_FRAGMENT}
- `;
- export const GET_PAYMENT_METHOD = gql`
- query GetPaymentMethod($id: ID!) {
- paymentMethod(id: $id) {
- ...PaymentMethod
- }
- }
- ${PAYMENT_METHOD_FRAGMENT}
- `;
- export const UPDATE_PAYMENT_METHOD = gql`
- mutation UpdatePaymentMethod($input: UpdatePaymentMethodInput!) {
- updatePaymentMethod(input: $input) {
- ...PaymentMethod
- }
- }
- ${PAYMENT_METHOD_FRAGMENT}
- `;
|