Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add mutations
dominik-zeglen7077d505960f
diff --git a/saleor/static/dashboard-next/siteSettings/mutations.ts b/saleor/static/dashboard-next/siteSettings/mutations.tsnew file mode 100644index 0000000000..b5682c1da6--- /dev/null+++ b/saleor/static/dashboard-next/siteSettings/mutations.ts@@ -0,0 +1,64 @@+import gql from "graphql-tag";++import { TypedMutation } from "../mutations";+import { shopFragment } from "./queries";+import {+ AuthorizationKeyAdd,+ AuthorizationKeyAddVariables+} from "./types/AuthorizationKeyAdd";+import {+ ShopSettingsUpdate,+ ShopSettingsUpdateVariables+} from "./types/ShopSettingsUpdate";++const authorizationKeyAdd = gql`+ mutation AuthorizationKeyAdd(+ $input: AuthorizationKeyInput!+ $keyType: AuthorizationKeyType!+ ) {+ authorizationKeyAdd(input: $input, keyType: $keyType) {+ errors {+ field+ message+ }+ }+ }+`;+export const TypedAuthorizationKeyAdd = TypedMutation<+ AuthorizationKeyAdd,+ AuthorizationKeyAddVariables+>(authorizationKeyAdd);++const shopSettingsUpdate = gql`+ ${shopFragment}+ mutation ShopSettingsUpdate(+ $shopDomainInput: SiteDomainInput!+ $shopSettingsInput: ShopSettingsInput!+ ) {+ shopSettingsUpdate(input: $shopSettingsInput) {+ errors {+ field+ message+ }+ shop {+ ...ShopFragment+ }+ }+ shopDomainUpdate(input: $shopDomainInput) {+ errors {+ field+ message+ }+ shop {+ domain {+ host+ url+ }+ }+ }+ }+`;+export const TypedShopSettingsUpdate = TypedMutation<+ ShopSettingsUpdate,+ ShopSettingsUpdateVariables+>(shopSettingsUpdate);diff --git a/saleor/static/dashboard-next/siteSettings/types/AuthorizationKeyAdd.ts b/saleor/static/dashboard-next/siteSettings/types/AuthorizationKeyAdd.tsnew file mode 100644index 0000000000..d0b092c9d0--- /dev/null+++ b/saleor/static/dashboard-next/siteSettings/types/AuthorizationKeyAdd.ts@@ -0,0 +1,28 @@+/* tslint:disable */+// This file was automatically generated and should not be edited.++import { AuthorizationKeyInput, AuthorizationKeyType } from "./../../types/globalTypes";++// ====================================================+// GraphQL mutation operation: AuthorizationKeyAdd+// ====================================================++export interface AuthorizationKeyAdd_authorizationKeyAdd_errors {+ __typename: "Error";+ field: string | null;+ message: string | null;+}++export interface AuthorizationKeyAdd_authorizationKeyAdd {+ __typename: "AuthorizationKeyAdd";+ errors: (AuthorizationKeyAdd_authorizationKeyAdd_errors | null)[] | null;+}++export interface AuthorizationKeyAdd {+ authorizationKeyAdd: AuthorizationKeyAdd_authorizationKeyAdd | null;+}++export interface AuthorizationKeyAddVariables {+ input: AuthorizationKeyInput;+ keyType: AuthorizationKeyType;+}diff --git a/saleor/static/dashboard-next/siteSettings/types/ShopFragment.ts b/saleor/static/dashboard-next/siteSettings/types/ShopFragment.tsindex 46533b1b57..f0d3a27bcf 100644--- a/saleor/static/dashboard-next/siteSettings/types/ShopFragment.ts+++ b/saleor/static/dashboard-next/siteSettings/types/ShopFragment.ts@@ -1,6 +1,8 @@/* tslint:disable */// This file was automatically generated and should not be edited.+import { AuthorizationKeyType } from "./../../types/globalTypes";+// ====================================================// GraphQL fragment: ShopFragment// ====================================================@@ -8,7 +10,7 @@export interface ShopFragment_authorizationKeys {__typename: "AuthorizationKey";key: string;- name: string;+ name: AuthorizationKeyType;}export interface ShopFragment_domain {diff --git a/saleor/static/dashboard-next/siteSettings/types/ShopSettingsUpdate.ts b/saleor/static/dashboard-next/siteSettings/types/ShopSettingsUpdate.tsnew file mode 100644index 0000000000..765b3ae2b4--- /dev/null+++ b/saleor/static/dashboard-next/siteSettings/types/ShopSettingsUpdate.ts@@ -0,0 +1,72 @@+/* tslint:disable */+// This file was automatically generated and should not be edited.++import { SiteDomainInput, ShopSettingsInput, AuthorizationKeyType } from "./../../types/globalTypes";++// ====================================================+// GraphQL mutation operation: ShopSettingsUpdate+// ====================================================++export interface ShopSettingsUpdate_shopSettingsUpdate_errors {+ __typename: "Error";+ field: string | null;+ message: string | null;+}++export interface ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys {+ __typename: "AuthorizationKey";+ key: string;+ name: AuthorizationKeyType;+}++export interface ShopSettingsUpdate_shopSettingsUpdate_shop_domain {+ __typename: "Domain";+ host: string;+}++export interface ShopSettingsUpdate_shopSettingsUpdate_shop {+ __typename: "Shop";+ authorizationKeys: (ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys | null)[];+ description: string | null;+ domain: ShopSettingsUpdate_shopSettingsUpdate_shop_domain;+ name: string;+}++export interface ShopSettingsUpdate_shopSettingsUpdate {+ __typename: "ShopSettingsUpdate";+ errors: (ShopSettingsUpdate_shopSettingsUpdate_errors | null)[] | null;+ shop: ShopSettingsUpdate_shopSettingsUpdate_shop | null;+}++export interface ShopSettingsUpdate_shopDomainUpdate_errors {+ __typename: "Error";+ field: string | null;+ message: string | null;+}++export interface ShopSettingsUpdate_shopDomainUpdate_shop_domain {+ __typename: "Domain";+ host: string;+ url: string;+}++export interface ShopSettingsUpdate_shopDomainUpdate_shop {+ __typename: "Shop";+ domain: ShopSettingsUpdate_shopDomainUpdate_shop_domain;+}++export interface ShopSettingsUpdate_shopDomainUpdate {+ __typename: "ShopDomainUpdate";+ errors: (ShopSettingsUpdate_shopDomainUpdate_errors | null)[] | null;+ shop: ShopSettingsUpdate_shopDomainUpdate_shop | null;+}++export interface ShopSettingsUpdate {+ shopSettingsUpdate: ShopSettingsUpdate_shopSettingsUpdate | null;+ shopDomainUpdate: ShopSettingsUpdate_shopDomainUpdate | null;+}++export interface ShopSettingsUpdateVariables {+ shopDomainInput: SiteDomainInput;+ shopSettingsInput: ShopSettingsInput;+}diff --git a/saleor/static/dashboard-next/siteSettings/types/SiteSettings.ts b/saleor/static/dashboard-next/siteSettings/types/SiteSettings.tsindex a588c4104e..47d34631e9 100644--- a/saleor/static/dashboard-next/siteSettings/types/SiteSettings.ts+++ b/saleor/static/dashboard-next/siteSettings/types/SiteSettings.ts@@ -1,6 +1,8 @@/* tslint:disable */// This file was automatically generated and should not be edited.+import { AuthorizationKeyType } from "./../../types/globalTypes";+// ====================================================// GraphQL query operation: SiteSettings// ====================================================@@ -8,7 +10,7 @@export interface SiteSettings_shop_authorizationKeys {__typename: "AuthorizationKey";key: string;- name: string;+ name: AuthorizationKeyType;}export interface SiteSettings_shop_domain {diff --git a/saleor/static/dashboard-next/types/globalTypes.ts b/saleor/static/dashboard-next/types/globalTypes.tsindex 860e853c97..a0aad36b2c 100644--- a/saleor/static/dashboard-next/types/globalTypes.ts+++ b/saleor/static/dashboard-next/types/globalTypes.ts@@ -5,6 +5,11 @@// START Enums and Input Objects//==============================================================+export enum AuthorizationKeyType {+ FACEBOOK = "FACEBOOK",+ GOOGLE_OAUTH2 = "GOOGLE_OAUTH2",+}+export enum FulfillmentStatus {CANCELED = "CANCELED",FULFILLED = "FULFILLED",@@ -95,6 +100,13 @@ export enum TaxRateType {WATER = "WATER",}+export enum WeightUnitsEnum {+ g = "g",+ kg = "kg",+ lb = "lb",+ oz = "oz",+}+export interface AddressInput {firstName?: string | null;lastName?: string | null;@@ -114,6 +126,11 @@ export interface AttributeValueInput {value: string;}+export interface AuthorizationKeyInput {+ key?: string | null;+ password?: string | null;+}+export interface DraftOrderInput {billingAddress?: AddressInput | null;user?: string | null;@@ -177,6 +194,20 @@ export interface ProductTypeInput {taxRate?: TaxRateType | null;}+export interface ShopSettingsInput {+ headerText?: string | null;+ description?: string | null;+ includeTaxesInPrices?: boolean | null;+ displayGrossPrices?: boolean | null;+ trackInventoryByDefault?: boolean | null;+ defaultWeightUnit?: WeightUnitsEnum | null;+}++export interface SiteDomainInput {+ domain?: string | null;+ name?: string | null;+}+export interface StaffCreateInput {email?: string | null;note?: string | null;